Skip to main content

instance_secrets

Creates, updates, deletes, gets or lists an instance_secrets resource.

Overview

Nameinstance_secrets
TypeResource
Idokta.integrations.instance_secrets

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe ID of the API Service Integration instance Secret (example: ocs2f4zrZbs8nUa7p0g4)
_linksobjectSpecifies link relations (see Web Linking) available for the current status of an application using the JSON Hypertext Application Language specification. This object is used for dynamic discovery of related resources and lifecycle operations.
client_secretstringThe OAuth 2.0 client secret string. The client secret string is returned in the response of a Secret creation request. In other responses (such as list, activate, or deactivate requests), the client secret is returned as an undisclosed hashed value. (example: DRUFXGF9XbLnS9k-Sla3x3POBiIxDreBCdZuFs5B)
createdstringTimestamp when the API Service Integration instance Secret was created (example: 2023-02-21T20:08:24.000Z)
lastUpdatedstringTimestamp when the API Service Integration instance Secret was updated (example: 2023-02-21T20:08:24.000Z)
secret_hashstringOAuth 2.0 client secret string hash (example: yk4SVx4sUWVJVbHt6M-UPA)
statusstringStatus of the API Service Integration instance Secret (example: ACTIVE)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_api_service_integration_instance_secretsselectsubdomainLists all client secrets for an API Service Integration instance by apiServiceId
create_api_service_integration_instance_secretinsertsubdomainCreates an API Service Integration instance Secret object with a new active client secret. You can create up to two Secret objects. An error is returned if you attempt to create more than two Secret objects.
delete_api_service_integration_instance_secretdeletesubdomainDeletes an API Service Integration instance Secret by secretId. You can only delete an inactive Secret.
activate_api_service_integration_instance_secretexecsubdomainActivates an API Service Integration instance Secret by secretId
deactivate_api_service_integration_instance_secretexecsubdomainDeactivates an API Service Integration instance Secret by secretId

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 client secrets for an API Service Integration instance by apiServiceId

SELECT
id,
_links,
client_secret,
created,
lastUpdated,
secret_hash,
status
FROM okta.integrations.instance_secrets
WHERE subdomain = '{{ subdomain }}' -- required
;

INSERT examples

Creates an API Service Integration instance Secret object with a new active client secret. You can create up to two Secret objects. An error is returned if you attempt to create more than two Secret objects.

INSERT INTO okta.integrations.instance_secrets (
subdomain
)
SELECT
'{{ subdomain }}'
RETURNING
id,
_links,
client_secret,
created,
lastUpdated,
secret_hash,
status
;

DELETE examples

Deletes an API Service Integration instance Secret by secretId. You can only delete an inactive Secret.

DELETE FROM okta.integrations.instance_secrets
WHERE subdomain = '{{ subdomain }}' --required
;

Lifecycle Methods

Activates an API Service Integration instance Secret by secretId

EXEC okta.integrations.instance_secrets.activate_api_service_integration_instance_secret 
@subdomain='{{ subdomain }}' --required
;