zscaler.ziacloud.zia_workload_groups_info module – Get a list of workload groups.

Note

This module is part of the zscaler.ziacloud collection (version 1.3.0).

It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install zscaler.ziacloud. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: zscaler.ziacloud.zia_workload_groups_info.

New in zscaler.ziacloud 1.0.0

Synopsis

  • Get a list of workload groups.

Requirements

The below requirements are needed on the host that executes this module.

Parameters

Parameter

Comments

api_key

string

A string that contains the obfuscated API key.

cloud

string

The Zscaler cloud name was provisioned for your organization.

Choices:

  • "zscloud"

  • "zscaler"

  • "zscalerone"

  • "zscalertwo"

  • "zscalerthree"

  • "zscalerbeta"

  • "zscalergov"

  • "zscalerten"

id

integer

A unique identifier assigned to the workload group

name

string

The name of the workload group

password

string

A string that contains the password for the API admin.

provider

dictionary

A dict object containing connection details. This is optional; credentials can also be provided directly at the top level.

api_key

string

A string that contains the obfuscated API key.

cloud

string

The Zscaler cloud name was provisioned for your organization.

Choices:

  • "zscloud"

  • "zscaler"

  • "zscalerone"

  • "zscalertwo"

  • "zscalerthree"

  • "zscalerbeta"

  • "zscalergov"

  • "zscalerten"

password

string

A string that contains the password for the API admin.

sandbox_token

string

A string that contains the Sandbox API Key.

username

string

A string that contains the email ID of the API admin.

sandbox_token

string

A string that contains the Sandbox API Key.

username

string

A string that contains the email ID of the API admin.

Notes

Note

  • Check mode is not supported.

Examples

- name: Gets list of all workload groups
  zscaler.ziacloud.zia_workload_groups_info:
    provider: '{{ provider }}'

- name: Gets a workload group by name
  zscaler.ziacloud.zia_workload_groups_info:
    provider: '{{ provider }}'
    name: "Example"

- name: Gets a workload group by ID
  zscaler.ziacloud.zia_workload_groups_info:
    provider: '{{ provider }}'
    name: "12345676"

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

workload_group

dictionary

Details of the workload group fetched.

Returned: when a specific group is requested

description

string

A brief description of the workload group.

Returned: success

Sample: "BD_WORKLOAD_GROUP01"

expression

string

Raw expression used in the workload group settings, typically complex and encoded.

Returned: success

Sample: "Encoded expression string"

expression_json

string

JSON format of the expression for more readable output, detailing the attributes and conditions used.

Returned: success

Sample: "{\n  \"expression_containers\": [\n    {\"tag_type\": \"ATTR\", \"operator\": \"AND\", \"tag_container\": {\"tags\": [{\"key\": \"GroupName\", \"value\": \"example\"}], \"operator\": \"AND\"}},\n    ...\n  ]\n}\n"

id

integer

The unique identifier for the workload group.

Returned: success

Sample: 17811899

last_modified_by

dictionary

Information about the user who last modified the group.

Returned: success

Sample: {"id": 8061243, "name": "Admin User"}

last_modified_time

integer

UNIX timestamp of when the group was last modified.

Returned: success

Sample: 1705956482

name

string

The name of the workload group.

Returned: success

Sample: "BD_WORKLOAD_GROUP01"

workload_groups

list / elements=dictionary

List of all workload groups retrieved if no specific group is requested.

Returned: when listing all groups and no specific group is requested

Sample: [{"description": "BD_WORKLOAD_GROUP01", "expression": "Encoded expression string", "expression_json": "{...}", "id": 17811899, "last_modified_by": {"id": 8061243, "name": "Admin User"}, "last_modified_time": 1705956482, "name": "BD_WORKLOAD_GROUP01"}]

Authors

  • William Guilherme (@willguibr)