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
get_policy_mappingselectpolicyId, mappingId, subdomainRetrieves a resource mapping for a policy identified by policyId and mappingId
list_policy_mappingsselectpolicyId, subdomainLists all resources mapped to a policy identified by policyId
delete_policy_resource_mappingdeletepolicyId, mappingId, subdomainDeletes the resource mapping for a policy identified by policyId and mappingId
map_resource_to_policyexecpolicyId, subdomainMaps a resource to a policy identified by policyId

> Note: Use the Assign an app sign-in policy endpoint to assign an app sign-in policy to an app.

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
mappingIdstringid of the policy resource Mapping
policyIdstringid of the policy
subdomainstring(default: my-org)

SELECT examples​

Retrieves a resource mapping for a policy identified by policyId and mappingId

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

DELETE examples​

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

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

Lifecycle Methods​

Maps a resource to a policy identified by policyId

> Note: Use the Assign an app sign-in policy endpoint to assign an app sign-in policy to an app.

EXEC okta.policies.policy_mappings.map_resource_to_policy
@policyId='{{ policyId }}' --required,
@subdomain='{{ subdomain }}' --required
@@json=
'{
"resourceId": "{{ resourceId }}",
"resourceType": "{{ resourceType }}"
}'
;