zscaler.ziacloud.zia_dc_exclusions module – Manages ZIA DC (datacenter) exclusions
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_dc_exclusions.
New in zscaler.ziacloud 1.0.0
Synopsis
Creates, updates, or deletes datacenter exclusions for traffic forwarding.
DC exclusions disable tunnels to specific Zscaler datacenters for a time period.
Requirements
The below requirements are needed on the host that executes this module.
Zscaler SDK Python can be obtained from PyPI https://pypi.org/project/zscaler-sdk-python/
Parameters
Parameter |
Comments |
|---|---|
A string that contains the obfuscated API key. |
|
The client ID for OAuth2 authentication. |
|
The client secret for OAuth2 authentication. |
|
The Zscaler cloud name provisioned for your organization. Choices:
|
|
Datacenter ID (dcid) to exclude. Required for create. Used with |
|
Description of the DC exclusion. Maximum 10240 characters. |
|
Unix timestamp when the exclusion window ends. Either end_time or end_time_utc must be set. |
|
Exclusion window end (UTC). Format If set, overrides end_time. |
|
Datacenter name for lookup when updating or deleting (used if datacenter_id is not set). |
|
A string that contains the password for the API admin. |
|
The private key for JWT-based OAuth2 authentication. |
|
A dict containing authentication credentials. |
|
Obfuscated API key. |
|
OAuth2 client ID. |
|
OAuth2 client secret. |
|
Zscaler cloud name. Choices:
|
|
Password for the API admin. |
|
Private key for OAuth2 JWT. |
|
Sandbox Cloud environment. |
|
Sandbox API Key. |
|
Whether to use the legacy Zscaler API client. Choices:
|
|
Email ID of the API admin. |
|
Vanity domain for OAuth2. |
|
The Sandbox cloud environment for API access. |
|
A string that contains the Sandbox API Key. |
|
Unix timestamp when the exclusion window starts. Either start_time or start_time_utc must be set. |
|
Exclusion window start (UTC). Format If set, overrides start_time. |
|
Specifies the desired state of the resource. Choices:
|
|
Whether to use the legacy Zscaler API client. Choices:
|
|
A string that contains the email ID of the API admin. |
|
The vanity domain provisioned by Zscaler for OAuth2 flows. |
Notes
Note
Check mode is supported.
Use
datacenter_idornameto reference an existing exclusion for update/delete.
Examples
- name: Create a DC exclusion
zscaler.ziacloud.zia_dc_exclusions:
provider: '{{ provider }}'
datacenter_id: 5313
start_time_utc: "04/29/2025 02:51:00 pm"
end_time_utc: "05/01/2025 02:00:00 pm"
description: "Maintenance window"
- name: Update a DC exclusion by datacenter ID
zscaler.ziacloud.zia_dc_exclusions:
provider: '{{ provider }}'
datacenter_id: 5313
description: "Updated description"
start_time: 1745941860
end_time: 1746114660
- name: Delete a DC exclusion
zscaler.ziacloud.zia_dc_exclusions:
provider: '{{ provider }}'
datacenter_id: 5313
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
The DC exclusion resource record. Returned: on success |