zscaler.ziacloud.zia_bandwidth_control_rules module – Adds a new Bandwidth Control policy 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_bandwidth_control_rules.

New in zscaler.ziacloud 2.0.0

Synopsis

  • Adds a new Bandwidth Control policy rule

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.

bandwidth_classes

list / elements=integer

The bandwidth classes to which you want to apply this rule.

You first must add URLs or cloud applications to predefined or custom bandwidth classes.

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:

  • "zscloud"

  • "zscaler"

  • "zscalerone"

  • "zscalertwo"

  • "zscalerthree"

  • "zscalerbeta"

  • "zscalergov"

  • "zscalerten"

  • "beta"

  • "production"

description

string

Additional information about the rule

enabled

boolean

Determines whether the Bandwidth Control Rule is enabled or disabled

Choices:

  • false

  • true

id

integer

Unique identifier for the Bandwidth Control Rule

labels

list / elements=integer

The URL Filtering rule label. Rule labels allow you to logically group your organization policy rules.

Policy rules that are not associated with a rule label are grouped under the Untagged label.

location_groups

list / elements=integer

The location groups to which the Bandwidth Control Rule applies

locations

list / elements=integer

The locations to which the Bandwidth Control Rule applies

max_bandwidth

integer

The maximum percentage of a location’s bandwidth to be guaranteed for each selected bandwidth class.

This percentage includes bandwidth for uploads and downloads.

min_bandwidth

integer

The minimum percentage of a location’s bandwidth you want to be guaranteed for each selected bandwidth class.

This percentage includes bandwidth for uploads and downloads.

name

string / required

Name of the Bandwidth Control Rule

order

integer

Rule order number of the Bandwidth Control Rule

password

string

A string that contains the password for the API admin.

private_key

string

The private key for JWT-based OAuth2 authentication.

protocols

list / elements=string

Protocol criteria

Choices:

  • "WEBSOCKETSSL_RULE"

  • "WEBSOCKET_RULE"

  • "DOHTTPS_RULE"

  • "TUNNELSSL_RULE"

  • "HTTP_PROXY"

  • "FOHTTP_RULE"

  • "FTP_RULE"

  • "HTTPS_RULE"

  • "HTTP_RULE"

  • "SSL_RULE"

  • "TUNNEL_RULE"

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:

  • "zscloud"

  • "zscaler"

  • "zscalerone"

  • "zscalertwo"

  • "zscalerthree"

  • "zscalerbeta"

  • "zscalergov"

  • "zscalerten"

  • "beta"

  • "production"

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.

rank

integer

Admin rank of the Bandwidth Control Rule

Default: 7

sandbox_cloud

string

The Sandbox cloud environment for API access.

sandbox_token

string

A string that contains the Sandbox API Key.

state

string

Specifies the desired state of the resource.

Choices:

  • "present" ← (default)

  • "absent"

time_windows

list / elements=integer

The time interval in which the Bandwidth Control Rule applies

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

Examples

- name: Create/update Bandwidth Control Rule
  zscaler.ziacloud.zia_bandwidth_control_rules:
    provider: '{{ provider }}'
    state: present
    name: "Ansible_Example_Rule"
    description: "TT#1965232865"
    enabled: true
    order: 1
    max_bandwidth: 100
    min_bandwidth: 20
    bandwidth_class_ids:
      - 4
      - 8
    locations:
      - 123545
      - 654654
    protocols:
      - WEBSOCKETSSL_RULE
      - WEBSOCKET_RULE
      - DOHTTPS_RULE
      - TUNNELSSL_RULE
      - HTTP_PROXY
      - FOHTTP_RULE
      - FTP_RULE
      - HTTPS_RULE
      - HTTP_RULE
      - SSL_RULE
      - TUNNEL_RULE

Authors

  • William Guilherme (@willguibr)