zscaler.ziacloud.zia_nat_control_policy module – Adds a new NAT Control Rule
Note
This module is part of the zscaler.ziacloud collection (version 2.0.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_nat_control_policy
.
New in zscaler.ziacloud 2.0.0
Synopsis
Adds a new NAT Control Rule
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:
|
|
The departments to which the NAT Control Rule applies |
|
Additional information about the rule |
|
List of destination IP addresses to which this rule will be applied. CIDR notation can be used for destination IP addresses. |
|
Destination countries for which the rule is applicable. If not set, the rule is not restricted to specific destination countries. Provide a ISO3166 Alpha2 code. Visit the following site for reference https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes |
|
IP address categories of destination for which the DNAT rule is applicable. If not set, the rule is not restricted to specific destination IP categories. |
|
User-defined destination IP address groups on which the rule is applied. If not set, the rule is not restricted to a specific destination IP address group. |
|
Destination IPv6 address groups for which the rule is applicable. If not set, the rule is not restricted to a specific source IPv6 address group. |
|
Determines whether the Firewall Filtering policy ips rule is enabled or disabled Choices:
|
|
The groups to which the NAT Control Rule applies |
|
Unique identifier for the NAT Control Rule |
|
Labels that are applicable to the rule. |
|
The location groups to which the NAT Control Rule applies |
|
The locations to which the NAT Control Rule applies |
|
Name of the NAT Control Rule |
|
User-defined network service group on which the rule is applied. If not set, the rule is not restricted to a specific network service group. |
|
User-defined network services on which the rule is applied. If not set, the rule is not restricted to a specific network service. |
|
Rule order number of the NAT Control Rule |
|
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. |
|
Admin rank of the NAT Control Rule Default: |
|
FQDN to which the traffic is redirected to when the DNAT rule is triggered |
|
IP address to which the traffic is redirected to when the DNAT rule is triggered |
|
Port to which the traffic is redirected to when the DNAT rule is triggered |
|
List of destination domain categories to which the rule applies |
|
The Sandbox cloud environment for API access. |
|
A string that contains the Sandbox API Key. |
|
User-defined source IP address groups for which the rule is applicable. If not set, the rule is not restricted to a specific source IP address group. |
|
User-defined source IP addresses for which the rule is applicable. If not set, the rule is not restricted to a specific source IP address. |
|
Source IPv6 address groups for which the rule is applicable. If not set, the rule is not restricted to a specific source IPv6 address group. |
|
Specifies the desired state of the resource. Choices:
|
|
The time interval in which the NAT Control Rule applies |
|
Whether to use the legacy Zscaler API client. Choices:
|
|
A string that contains the email ID of the API admin. |
|
The users to which the NAT Control Rule applies |
|
The vanity domain provisioned by Zscaler for OAuth2 flows. |
Notes
Note
Check mode is supported.
Examples
- name: Create/update NAT Control Rule
zscaler.ziacloud.zia_nat_control_policy:
provider: '{{ provider }}'
state: present
name: "Ansible_Example_Rule"
description: "TT#1965232865"
enabled: true
order: 1
redirect_ip: '1.1.1.1'
redirect_port: '2000'
src_ips:
- 192.168.100.0/24
- 192.168.200.1
dest_addresses:
- 3.217.228.0-3.217.231.255
- 3.235.112.0-3.235.119.255
- 35.80.88.0-35.80.95.255
- server1.acme.com
- '*.acme.com'
dest_countries:
- BR
- CA
- US