Skip to main content

instances

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

Overview

Nameinstances
TypeResource
Idaws.sso_admin.instances

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
created_datestring (date-time)The date the instance was created.
encryption_configuration_detailsobjectContains the encryption configuration for your IAM Identity Center instance, including the encryption status, KMS key type, and KMS key ARN.
identity_store_idstringThe identifier of the identity store that is connected to the instance of IAM Identity Center. (pattern: <code>[a-zA-Z0-9-]*</code>)
instance_arnstringThe ARN of the instance of IAM Identity Center under which the operation will run. For more information about ARNs, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces in the Amazon Web Services General Reference. (pattern: <code>arn:aws(-[a-z]{1,5}){0,3}:sso:::instance/(sso)?ins-[a-zA-Z0-9-.]{16}</code>)
namestringSpecifies the instance name. (pattern: <code>[\w+=,.@-]+</code>)
owner_account_idstringThe identifier of the Amazon Web Services account for which the instance was created. (pattern: <code>\d{12}</code>)
permission_sets_enabledbooleanIndicates whether permission sets are enabled for this Identity Center instance.
statusstringThe status of the instance. (CREATE_IN_PROGRESS, CREATE_FAILED, DELETE_IN_PROGRESS, ACTIVE)
status_reasonstringProvides additional context about the current status of the IAM Identity Center instance. This field is particularly useful when an instance is in a non-ACTIVE state, such as CREATE_FAILED. When an instance fails to create or update, this field contains information about the cause, which may include issues with KMS key configuration, permission problems with the specified KMS key, or service-related errors. (pattern: <code>[\p{L}\p{M}\p{Z}\p{S}\p{N}\p{P}]*</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_instanceselectregionReturns the details of an instance of IAM Identity Center. The status can be one of the following: CREATE_IN_PROGRESS - The instance is in the process of being created. When the instance is ready for use, DescribeInstance returns the status of ACTIVE. While the instance is in the CREATE_IN_PROGRESS state, you can call only DescribeInstance and DeleteInstance operations. DELETE_IN_PROGRESS - The instance is being deleted. Returns AccessDeniedException after the delete operation completes. ACTIVE - The instance is active.
list_instancesselectregionLists the details of the organization and account instances of IAM Identity Center that were created in or visible to the account calling this API.
create_instanceinsertregionCreates an instance of IAM Identity Center for a standalone Amazon Web Services account that is not managed by Organizations or a member Amazon Web Services account in an organization. You can create only one instance per account and across all Amazon Web Services Regions. The CreateInstance request is rejected if the following apply: The instance is created within the organization management account. An instance already exists in the same account.
update_instanceupdateregion, InstanceArnUpdate the details for the instance of IAM Identity Center that is owned by the Amazon Web Services account. In a single UpdateInstance request, you can perform only one of the following operations: Update the encryption configuration of the instance by specifying EncryptionConfiguration. Enable permission sets for the instance by specifying PermissionSetsEnabled. A request that specifies both EncryptionConfiguration and PermissionSetsEnabled returns a ValidationException. To perform both operations, call UpdateInstance separately for each. The two calls can be made in parallel.
delete_instancedeleteregionDeletes the instance of IAM Identity Center. Only the account that owns the instance can call this API. Neither the delegated administrator nor member account can delete the organization instance, but those roles can delete their own instance.

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
regionstringAWS region (default: us-east-1)

SELECT examples

Returns the details of an instance of IAM Identity Center. The status can be one of the following: CREATE_IN_PROGRESS - The instance is in the process of being created. When the instance is ready for use, DescribeInstance returns the status of ACTIVE. While the instance is in the CREATE_IN_PROGRESS state, you can call only DescribeInstance and DeleteInstance operations. DELETE_IN_PROGRESS - The instance is being deleted. Returns AccessDeniedException after the delete operation completes. ACTIVE - The instance is active.

SELECT
created_date,
encryption_configuration_details,
identity_store_id,
instance_arn,
name,
owner_account_id,
permission_sets_enabled,
status,
status_reason
FROM aws.sso_admin.instances
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates an instance of IAM Identity Center for a standalone Amazon Web Services account that is not managed by Organizations or a member Amazon Web Services account in an organization. You can create only one instance per account and across all Amazon Web Services Regions. The CreateInstance request is rejected if the following apply: The instance is created within the organization management account. An instance already exists in the same account.

INSERT INTO aws.sso_admin.instances (
Name,
ClientToken,
Tags,
region
)
SELECT
'{{ Name }}',
'{{ ClientToken }}',
'{{ Tags }}',
'{{ region }}'
RETURNING
instance_arn
;

UPDATE examples

Update the details for the instance of IAM Identity Center that is owned by the Amazon Web Services account. In a single UpdateInstance request, you can perform only one of the following operations: Update the encryption configuration of the instance by specifying EncryptionConfiguration. Enable permission sets for the instance by specifying PermissionSetsEnabled. A request that specifies both EncryptionConfiguration and PermissionSetsEnabled returns a ValidationException. To perform both operations, call UpdateInstance separately for each. The two calls can be made in parallel.

UPDATE aws.sso_admin.instances
SET
Name = '{{ Name }}',
InstanceArn = '{{ InstanceArn }}',
EncryptionConfiguration = '{{ EncryptionConfiguration }}',
PermissionSetsEnabled = {{ PermissionSetsEnabled }}
WHERE
region = '{{ region }}' --required
AND InstanceArn = '{{ InstanceArn }}' --required;

DELETE examples

Deletes the instance of IAM Identity Center. Only the account that owns the instance can call this API. Neither the delegated administrator nor member account can delete the organization instance, but those roles can delete their own instance.

DELETE FROM aws.sso_admin.instances
WHERE region = '{{ region }}' --required
;