Skip to main content

regions

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

Overview

Nameregions
TypeResource
Idaws.sso_admin.regions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
added_datestring (date-time)The timestamp when the Region was added to the IAM Identity Center instance. For the primary Region, this is the IAM Identity Center instance creation time.
is_primary_regionbooleanIndicates whether this is the primary Region where the IAM Identity Center instance was originally enabled. For more information on the difference between the primary Region and additional Regions, see IAM Identity Center User Guide
region_namestringThe Amazon Web Services Region name. (pattern: <code>([a-z]+-){2,3}\d</code>)
statusstringThe current status of the Region. Valid values are ACTIVE (Region is operational), ADDING (Region replication workflow is in progress), or REMOVING (Region removal workflow is in progress). (ACTIVE, ADDING, REMOVING)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_regionselectregionRetrieves details about a specific Region enabled in an IAM Identity Center instance. Details include the Region name, current status (ACTIVE, ADDING, or REMOVING), the date when the Region was added, and whether it is the primary Region. The request must be made from one of the enabled Regions of the IAM Identity Center instance. The following actions are related to DescribeRegion: AddRegion RemoveRegion ListRegions
list_regionsselectregionLists all enabled Regions of an IAM Identity Center instance, including those that are being added or removed. This operation returns Regions with ACTIVE, ADDING, or REMOVING status. The following actions are related to ListRegions: AddRegion RemoveRegion DescribeRegion
add_regionupdateregion, InstanceArn, RegionNameAdds a Region to an IAM Identity Center instance. This operation initiates an asynchronous workflow to replicate the IAM Identity Center instance to the target Region. The Region status is set to ADDING at first and changes to ACTIVE when the workflow completes. To use this operation, your IAM Identity Center instance and the target Region must meet the requirements described in the IAM Identity Center User Guide. The following actions are related to AddRegion: RemoveRegion DescribeRegion ListRegions
remove_regionexecregion, InstanceArn, RegionNameRemoves an additional Region from an IAM Identity Center instance. This operation initiates an asynchronous workflow to clean up IAM Identity Center resources in the specified additional Region. The Region status is set to REMOVING and the Region record is deleted when the workflow completes. The request must be made from the primary Region. The target Region cannot be the primary Region, and no other add or remove Region workflows can be in progress. The following actions are related to RemoveRegion: AddRegion DescribeRegion ListRegions

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

Retrieves details about a specific Region enabled in an IAM Identity Center instance. Details include the Region name, current status (ACTIVE, ADDING, or REMOVING), the date when the Region was added, and whether it is the primary Region. The request must be made from one of the enabled Regions of the IAM Identity Center instance. The following actions are related to DescribeRegion: AddRegion RemoveRegion ListRegions

SELECT
added_date,
is_primary_region,
region_name,
status
FROM aws.sso_admin.regions
WHERE region = '{{ region }}' -- required
;

UPDATE examples

Adds a Region to an IAM Identity Center instance. This operation initiates an asynchronous workflow to replicate the IAM Identity Center instance to the target Region. The Region status is set to ADDING at first and changes to ACTIVE when the workflow completes. To use this operation, your IAM Identity Center instance and the target Region must meet the requirements described in the IAM Identity Center User Guide. The following actions are related to AddRegion: RemoveRegion DescribeRegion ListRegions

UPDATE aws.sso_admin.regions
SET
InstanceArn = '{{ InstanceArn }}',
RegionName = '{{ RegionName }}'
WHERE
region = '{{ region }}' --required
AND InstanceArn = '{{ InstanceArn }}' --required
AND RegionName = '{{ RegionName }}' --required
RETURNING
status;

Lifecycle Methods

Removes an additional Region from an IAM Identity Center instance. This operation initiates an asynchronous workflow to clean up IAM Identity Center resources in the specified additional Region. The Region status is set to REMOVING and the Region record is deleted when the workflow completes. The request must be made from the primary Region. The target Region cannot be the primary Region, and no other add or remove Region workflows can be in progress. The following actions are related to RemoveRegion: AddRegion DescribeRegion ListRegions

EXEC aws.sso_admin.regions.remove_region
@region='{{ region }}' --required
@@json=
'{
"InstanceArn": "{{ InstanceArn }}",
"RegionName": "{{ RegionName }}"
}'
;