zscaler.ziacloud.zia_datacenters_info module – Gets information about ZIA datacenters

Note

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

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_datacenters_info.

New in zscaler.ziacloud 1.0.0

Synopsis

  • Retrieves the list of Zscaler data centers (DCs) that can be excluded from service.

  • Filter by datacenter ID, name, or city.

  • If no filter is provided, lists all datacenters.

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.

city

string

Filter datacenters by city (case-insensitive partial match).

client_id

string

The client ID for OAuth2 authentication.

client_secret

string

The client secret for OAuth2 authentication.

cloud

string

The Zscaler cloud name provisioned for your organization.

Choices:

  • "beta"

  • "production"

  • "zscaler"

  • "zscalerbeta"

  • "zscalergov"

  • "zscalerone"

  • "zscalerten"

  • "zscalerthree"

  • "zscalertwo"

  • "zscloud"

  • "zspreview"

datacenter_id

integer

Filter datacenters by ID.

name

string

Filter datacenters by name (case-insensitive partial match).

password

string

A string that contains the password for the API admin.

private_key

string

The private key for JWT-based OAuth2 authentication.

provider

dictionary

A dict containing authentication credentials.

api_key

string

Obfuscated API key.

client_id

string

OAuth2 client ID.

client_secret

string

OAuth2 client secret.

cloud

string

Zscaler cloud name.

Choices:

  • "beta"

  • "production"

  • "zscaler"

  • "zscalerbeta"

  • "zscalergov"

  • "zscalerone"

  • "zscalerten"

  • "zscalerthree"

  • "zscalertwo"

  • "zscloud"

  • "zspreview"

password

string

Password for the API admin.

private_key

string

Private key for OAuth2 JWT.

sandbox_cloud

string

Sandbox Cloud environment.

sandbox_token

string

Sandbox API Key.

use_legacy_client

boolean

Whether to use the legacy Zscaler API client.

Choices:

  • false ← (default)

  • true

username

string

Email ID of the API admin.

vanity_domain

string

Vanity domain for OAuth2.

sandbox_cloud

string

The Sandbox cloud environment for API access.

sandbox_token

string

A string that contains the Sandbox API Key.

use_legacy_client

boolean

Whether to use the legacy Zscaler API client.

Choices:

  • false ← (default)

  • true

username

string

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

vanity_domain

string

The vanity domain provisioned by Zscaler for OAuth2 flows.

Notes

Note

  • Check mode is not supported.

  • Datacenters are read-only; there is no resource module for creating/updating them.

Examples

- name: Get all datacenters
  zscaler.ziacloud.zia_datacenters_info:
    provider: '{{ provider }}'

- name: Get datacenter by ID
  zscaler.ziacloud.zia_datacenters_info:
    provider: '{{ provider }}'
    datacenter_id: 5313

- name: Get datacenters by name
  zscaler.ziacloud.zia_datacenters_info:
    provider: '{{ provider }}'
    name: "San Jose"

- name: Get datacenters by city
  zscaler.ziacloud.zia_datacenters_info:
    provider: '{{ provider }}'
    city: "Chicago"

Return Values

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

Key

Description

datacenters

list / elements=dictionary

List of datacenter entries.

Returned: always

city

string

City where the datacenter is located.

Returned: success

create_time

integer

Timestamp when the datacenter was created.

Returned: success

dont_provision

boolean

Whether the datacenter should not be provisioned.

Returned: success

dont_publish

boolean

Whether the datacenter should not be published.

Returned: success

download_bandwidth

integer

Download bandwidth in bytes per second.

Returned: success

for_future_use

boolean

Whether the datacenter is reserved for future use.

Returned: success

gov_only

boolean

Whether this is a government-only datacenter.

Returned: success

id

integer

Unique identifier for the datacenter.

Returned: success

last_modified_time

integer

Timestamp when the datacenter was last modified.

Returned: success

lat

integer

Latitude coordinate (legacy field).

Returned: success

latitude

float

Latitude coordinate.

Returned: success

longi

integer

Longitude coordinate (legacy field).

Returned: success

longitude

float

Longitude coordinate.

Returned: success

managed_bcp

boolean

Whether the datacenter is managed by BCP.

Returned: success

name

string

Zscaler data center name.

Returned: success

not_ready_for_use

boolean

Whether the datacenter is not ready for use.

Returned: success

owned_by_customer

boolean

Whether the datacenter is owned by the customer.

Returned: success

provider

string

Provider of the datacenter.

Returned: success

regional_surcharge

boolean

Whether there is a regional surcharge for this datacenter.

Returned: success

third_party_cloud

boolean

Whether this is a third-party cloud datacenter.

Returned: success

timezone

string

Timezone of the datacenter.

Returned: success

upload_bandwidth

integer

Upload bandwidth in bytes per second.

Returned: success

virtual

boolean

Whether this is a virtual datacenter.

Returned: success

Authors

  • William Guilherme (@willguibr)