zscaler.ziacloud.zia_tenant_restriction_profile module – Manages ZIA tenant restriction profiles
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_tenant_restriction_profile.
New in zscaler.ziacloud 1.0.0
Synopsis
Creates, updates, or deletes tenant restriction profiles for cloud app control.
Tenant restriction profiles control access to cloud applications (e.g., Microsoft 365, Google).
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 |
|---|---|
Flag to allow or disallow GCP cloud storage reads. Choices:
|
|
Flag to allow Google consumers. Choices:
|
|
Flag to allow Google visitors. Choices:
|
|
A string that contains the obfuscated API key. |
|
Restricted tenant profile application type. Supported values include YOUTUBE, GOOGLE, MSLOGINSERVICES, SLACK, BOX, FACEBOOK, AWS, DROPBOX, WEBEX_LOGIN_SERVICES, AMAZON_S3, ZOHO_LOGIN_SERVICES, GOOGLE_CLOUD_PLATFORM, ZOOM, IBMSMARTCLOUD, GITHUB, CHATGPT_AI. |
|
The client ID for OAuth2 authentication. |
|
The client secret for OAuth2 authentication. |
|
The Zscaler cloud name provisioned for your organization. Choices:
|
|
Additional information about the profile. |
|
The unique identifier for the tenant restriction profile. Used to reference an existing profile for update or delete. |
|
Tenant profile primary item data (list of strings). |
|
Tenant profile secondary item data (list of strings). |
|
Tenant profile primary item type. See Zscaler documentation for available item types. |
|
Tenant profile secondary item type. |
|
Tenant profile item value for YouTube categories. See Zscaler documentation for available item values. |
|
Flag to choose between v1 and v2 for MS Login services tenant restriction. Choices:
|
|
The tenant restriction profile name. Required for create. |
|
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. |
|
Flag to restrict personal domains for Office 365. Choices:
|
|
The Sandbox cloud environment for API access. |
|
A string that contains the Sandbox API Key. |
|
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
idornameto reference an existing profile for update/delete.
Examples
- name: Create a tenant restriction profile for Microsoft Login Services (v1)
zscaler.ziacloud.zia_tenant_restriction_profile:
provider: '{{ provider }}'
name: "MS Profile 01"
description: "Restricts to allowed tenants"
app_type: "MSLOGINSERVICES"
item_type_primary: "TENANT_RESTRICTION_TENANT_DIRECTORY"
item_data_primary:
- "76b66e9c-201a-49dc-bb7e-e9d77604a4c2"
item_type_secondary: "TENANT_RESTRICTION_TENANT_NAME"
item_data_secondary:
- "example.com"
- "example.org"
restrict_personal_o365_domains: false
- name: Create a tenant restriction profile for Microsoft Login Services (v2)
zscaler.ziacloud.zia_tenant_restriction_profile:
provider: '{{ provider }}'
name: "SGIO-MSFT-CA_v2"
description: "MS Login Services v2 with tenant policy IDs"
app_type: "MSLOGINSERVICES"
ms_login_services_tr_v2: true
item_type_primary: "TENANT_RESTRICTION_TENANT_POLICY_ID"
item_data_primary:
- "76b66e9c-201a-49dc-bb7e-e9d77604a4c2:quadsj"
- name: Update a tenant restriction profile by ID
zscaler.ziacloud.zia_tenant_restriction_profile:
provider: '{{ provider }}'
id: 1254654
name: "MS Profile 01 Updated"
description: "Updated description"
- name: Delete a tenant restriction profile
zscaler.ziacloud.zia_tenant_restriction_profile:
provider: '{{ provider }}'
id: 1254654
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
The tenant restriction profile resource record. Returned: on success |