zscaler.ziacloud.zia_url_categories module – Adds a new custom URL category.

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

New in zscaler.ziacloud 1.0.0

Synopsis

  • Adds a new custom URL category.

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.

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"

configured_name

string

Name of the URL category. This is only required for custom URL categories.

custom_category

boolean

Set to true for custom URL category. Up to 48 custom URL categories can be added per organization.

Choices:

  • false

  • true

db_categorized_urls

list / elements=string

URLs added to a custom URL category are also retained under the original parent URL category.

i.e. the predefined category the URL previously belonged to.

The URLs entered are covered by policies that reference the original parent URL category.

If you add www.amazon.com, this URL is covered by policies that reference the custom URL category.

description

string

Description of the URL category.

editable

boolean

Value is set to false for custom URL category when due to scope user does not have edit permission

Choices:

  • false

  • true

id

string

ip_ranges

list / elements=string

Custom IP address ranges associated to a URL category.

Up to 2000 custom IP address ranges and retaining parent custom IP address ranges can be added, per organization, across all categories.

This field is available only if the option to configure custom IP ranges is enabled for your organization.

To enable this option, contact Zscaler Support.

ip_ranges_retaining_parent_category

list / elements=string

The retaining parent custom IP address ranges associated to a URL category.

Up to 2000 custom IP ranges and retaining parent custom IP address ranges can be added, per organization, across all categories.

keywords

list / elements=string

Custom keywords associated to a URL category.

Up to 2048 custom keywords can be added per organization across all categories including bandwidth classes

keywords_retaining_parent_category

list / elements=string

Retained custom keywords from the parent URL category that is associated to a URL category.

Up to 2048 retained parent keywords can be added per organization across all categories including bandwidth classes.

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:

  • "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.

sandbox_cloud

string

The Sandbox cloud environment for API access.

sandbox_token

string

A string that contains the Sandbox API Key.

scopes

list / elements=dictionary

Scope of the custom categories.

scope_entities

list / elements=integer

Based on the admin scope type, the entities can be the ID/name pair of departments, locations, or location groups.

The attribute name is subject to change.

type

string

The admin scope type. The attribute name is subject to change.

Choices:

  • "ORGANIZATION"

  • "DEPARTMENT"

  • "LOCATION"

  • "LOCATION_GROUP"

state

string

Specifies the desired state of the resource.

Choices:

  • "present" ← (default)

  • "absent"

super_category

string

Super Category of the URL category.

This field is required when creating custom URL categories.

type

string

Type of the custom categories.

Choices:

  • "URL_CATEGORY"

  • "TLD_CATEGORY"

  • "ALL"

urls

list / elements=string

Retained custom keywords from the parent URL category that is associated to a URL category.

Up to 2048 retained parent keywords can be added per organization across all categories including bandwidth classes.

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 a URL Category
  zscaler.ziacloud.zia_url_categories:
    provider: '{{ provider }}'
    super_category: USER_DEFINED
    name: Example_Category
    description: Example_Category
    type: URL_CATEGORY
    keywords:
      - microsoft
    custom_category: true
    db_categorized_urls:
      - .creditkarma.com
      - .youku.com
    urls:
      - .coupons.com
      - .resource.alaskaair.net
      - .techrepublic.com
      - .dailymotion.com
      - .osiriscomm.com
      - .uefa.com
      - .Logz.io
      - .alexa.com
      - .baidu.com
      - .cnn.com
      - .level3.com

Authors

  • William Guilherme (@willguibr)