regions
Creates, updates, deletes, gets or lists a regions resource.
Overview
| Name | regions |
| Type | Resource |
| Id | aws.sso_admin.regions |
Fields
The following fields are returned by SELECT queries:
- describe_region
- list_regions
| Name | Datatype | Description |
|---|---|---|
added_date | string (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_region | boolean | Indicates 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_name | string | The Amazon Web Services Region name. (pattern: <code>([a-z]+-){2,3}\d</code>) |
status | string | The 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) |
| Name | Datatype | Description |
|---|---|---|
added_date | string (date-time) | The timestamp when the Region was added to the IAM Identity Center instance. For the primary Region, this is the instance creation time. |
is_primary_region | boolean | Indicates whether this is the primary Region where the IAM Identity Center instance was originally enabled. The primary Region cannot be removed. |
region_name | string | The Amazon Web Services Region name. (pattern: <code>([a-z]+-){2,3}\d</code>) |
status | string | The current status of the Region. Valid values are ACTIVE (Region is operational), ADDING (Region extension workflow is in progress), or REMOVING (Region removal workflow is in progress). (ACTIVE, ADDING, REMOVING) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_region | select | region | 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 | |
list_regions | select | region | Lists 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_region | update | region, InstanceArn, RegionName | 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 | |
remove_region | exec | region, InstanceArn, RegionName | 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 |
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 |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_region
- list_regions
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
;
Lists 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
SELECT
added_date,
is_primary_region,
region_name,
status
FROM aws.sso_admin.regions
WHERE region = '{{ region }}' -- required
;
UPDATE examples
- add_region
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
- remove_region
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 }}"
}'
;