policy_mappings
Creates, updates, deletes, gets or lists a policy_mappings resource.
Overview
| Name | policy_mappings |
| Type | Resource |
| Id | okta.policies.policy_mappings |
Fields
The following fields are returned by SELECT queries:
- list_policy_mappings
- get_policy_mapping
| Name | Datatype | Description |
|---|---|---|
id | string | |
_links | object | Specifies link relations (see Web Linking) available using the JSON Hypertext Application Language specification. This object is used for dynamic discovery of related resources and lifecycle operations. |
| Name | Datatype | Description |
|---|---|---|
id | string | |
_links | object | Specifies link relations (see Web Linking) available using the JSON Hypertext Application Language specification. This object is used for dynamic discovery of related resources and lifecycle operations. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_policy_mappings | select | subdomain | Lists all resources mapped to a policy identified by policyId | |
get_policy_mapping | select | subdomain | Retrieves a resource mapping for a policy identified by policyId and mappingId | |
delete_policy_resource_mapping | delete | subdomain | Deletes the resource mapping for a policy identified by policyId and mappingId | |
map_resource_to_policy | exec | subdomain | Maps a resource to a policy identified by policyId |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
subdomain | string | The domain of your organization. This can be a provided subdomain of an official okta domain (okta.com, oktapreview.com, etc) or one of your configured custom domains. (default: my-org) |
SELECT examples
- list_policy_mappings
- get_policy_mapping
Lists all resources mapped to a policy identified by policyId
SELECT
id,
_links
FROM okta.policies.policy_mappings
WHERE subdomain = '{{ subdomain }}' -- required
;
Retrieves a resource mapping for a policy identified by policyId and mappingId
SELECT
id,
_links
FROM okta.policies.policy_mappings
WHERE subdomain = '{{ subdomain }}' -- required
;
DELETE examples
- delete_policy_resource_mapping
Deletes the resource mapping for a policy identified by policyId and mappingId
DELETE FROM okta.policies.policy_mappings
WHERE subdomain = '{{ subdomain }}' --required
;
Lifecycle Methods
- map_resource_to_policy
Maps a resource to a policy identified by policyId
EXEC okta.policies.policy_mappings.map_resource_to_policy
@subdomain='{{ subdomain }}' --required
@@json=
'{
"resourceId": "{{ resourceId }}",
"resourceType": "{{ resourceType }}"
}'
;