Skip to main content

policy_mappings

Creates, updates, deletes, gets or lists a policy_mappings resource.

Overview

Namepolicy_mappings
TypeResource
Idokta.policies.policy_mappings

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstring
_linksobjectSpecifies 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:

NameAccessible byRequired ParamsOptional ParamsDescription
list_policy_mappingsselectsubdomainLists all resources mapped to a policy identified by policyId
get_policy_mappingselectsubdomainRetrieves a resource mapping for a policy identified by policyId and mappingId
delete_policy_resource_mappingdeletesubdomainDeletes the resource mapping for a policy identified by policyId and mappingId
map_resource_to_policyexecsubdomainMaps 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.

NameDatatypeDescription
subdomainstringThe 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

Lists all resources mapped to a policy identified by policyId

SELECT
id,
_links
FROM okta.policies.policy_mappings
WHERE subdomain = '{{ subdomain }}' -- required
;

DELETE examples

Deletes the resource mapping for a policy identified by policyId and mappingId

DELETE FROM okta.policies.policy_mappings
WHERE subdomain = '{{ subdomain }}' --required
;

Lifecycle Methods

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 }}"
}'
;