policies
Creates, updates, deletes, gets or lists a policies
resource.
Overview
Name | policies |
Type | Resource |
Id | okta.authorizationservers.policies |
Fields
The following fields are returned by SELECT
queries:
- list_authorization_server_policies
- get_authorization_server_policy
Name | Datatype | Description |
---|---|---|
id | string | ID of the Policy |
name | string | Name of the Policy |
_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. |
conditions | object | |
created | string (date-time) | Timestamp when the Policy was created |
description | string | Description of the Policy |
lastUpdated | string (date-time) | Timestamp when the Policy was last updated |
priority | integer | Specifies the order in which this Policy is evaluated in relation to the other Policies in a custom authorization server |
status | string | Specifies whether requests have access to this Policy |
system | boolean | Specifies whether Okta created this Policy |
type | string | Indicates that the Policy is an authorization server Policy |
Name | Datatype | Description |
---|---|---|
id | string | ID of the Policy |
name | string | Name of the Policy |
_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. |
conditions | object | |
created | string (date-time) | Timestamp when the Policy was created |
description | string | Description of the Policy |
lastUpdated | string (date-time) | Timestamp when the Policy was last updated |
priority | integer | Specifies the order in which this Policy is evaluated in relation to the other Policies in a custom authorization server |
status | string | Specifies whether requests have access to this Policy |
system | boolean | Specifies whether Okta created this Policy |
type | string | Indicates that the Policy is an authorization server Policy |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
list_authorization_server_policies | select | subdomain | Lists all policies | |
get_authorization_server_policy | select | subdomain | Retrieves a policy | |
create_authorization_server_policy | insert | subdomain | Creates a policy | |
replace_authorization_server_policy | replace | subdomain | Replaces a policy | |
delete_authorization_server_policy | delete | subdomain | Deletes a policy | |
activate_authorization_server_policy | exec | subdomain | Activates an authorization server policy | |
deactivate_authorization_server_policy | exec | subdomain | Deactivates an authorization server policy |
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_authorization_server_policies
- get_authorization_server_policy
Lists all policies
SELECT
id,
name,
_links,
conditions,
created,
description,
lastUpdated,
priority,
status,
system,
type
FROM okta.authorizationservers.policies
WHERE subdomain = '{{ subdomain }}' -- required;
Retrieves a policy
SELECT
id,
name,
_links,
conditions,
created,
description,
lastUpdated,
priority,
status,
system,
type
FROM okta.authorizationservers.policies
WHERE subdomain = '{{ subdomain }}' -- required;
INSERT
examples
- create_authorization_server_policy
- Manifest
Creates a policy
INSERT INTO okta.authorizationservers.policies (
data__id,
data__type,
data__name,
data__conditions,
data__description,
data__priority,
data__status,
data__system,
subdomain
)
SELECT
'{{ id }}',
'{{ type }}',
'{{ name }}',
'{{ conditions }}',
'{{ description }}',
{{ priority }},
'{{ status }}',
{{ system }},
'{{ subdomain }}'
RETURNING
id,
name,
_links,
conditions,
created,
description,
lastUpdated,
priority,
status,
system,
type
;
# Description fields are for documentation purposes
- name: policies
props:
- name: subdomain
value: string
description: Required parameter for the policies resource.
- name: id
value: string
description: >
ID of the Policy
- name: type
value: string
description: >
Indicates that the Policy is an authorization server Policy
valid_values: ['OAUTH_AUTHORIZATION_POLICY']
- name: name
value: string
description: >
Name of the Policy
- name: conditions
value: object
- name: description
value: string
description: >
Description of the Policy
- name: priority
value: integer
description: >
Specifies the order in which this Policy is evaluated in relation to the other Policies in a custom authorization server
- name: status
value: string
description: >
Specifies whether requests have access to this Policy
valid_values: ['ACTIVE', 'INACTIVE']
- name: system
value: boolean
description: >
Specifies whether Okta created this Policy
REPLACE
examples
- replace_authorization_server_policy
Replaces a policy
REPLACE okta.authorizationservers.policies
SET
data__id = '{{ id }}',
data__type = '{{ type }}',
data__name = '{{ name }}',
data__conditions = '{{ conditions }}',
data__description = '{{ description }}',
data__priority = {{ priority }},
data__status = '{{ status }}',
data__system = {{ system }}
WHERE
subdomain = '{{ subdomain }}' --required
RETURNING
id,
name,
_links,
conditions,
created,
description,
lastUpdated,
priority,
status,
system,
type;
DELETE
examples
- delete_authorization_server_policy
Deletes a policy
DELETE FROM okta.authorizationservers.policies
WHERE subdomain = '{{ subdomain }}' --required;
Lifecycle Methods
- activate_authorization_server_policy
- deactivate_authorization_server_policy
Activates an authorization server policy
EXEC okta.authorizationservers.policies.activate_authorization_server_policy
@subdomain='{{ subdomain }}' --required;
Deactivates an authorization server policy
EXEC okta.authorizationservers.policies.deactivate_authorization_server_policy
@subdomain='{{ subdomain }}' --required;