regions
Creates, updates, deletes, gets or lists a regions resource.
Overview
| Name | regions |
| Type | Resource |
| Id | aws.account.regions |
Fields
The following fields are returned by SELECT queries:
- list_regions
| Name | Datatype | Description |
|---|---|---|
region_name | string | The Region code of a given Region (for example, us-east-1). |
region_opt_status | string | One of potential statuses a Region can undergo (Enabled, Enabling, Disabled, Disabling, Enabled_By_Default). (ENABLED, ENABLING, DISABLING, DISABLED, ENABLED_BY_DEFAULT) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_regions | select | region | Lists all the Regions for a given account and their respective opt-in statuses. Optionally, this list can be filtered by the region-opt-status-contains parameter. | |
disable_region | exec | region, RegionName | Disables (opts-out) a particular Region for an account. The act of disabling a Region will remove all IAM access to any resources that reside in that Region. | |
enable_region | exec | region, RegionName | Enables (opts-in) a particular Region for an account. |
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
- list_regions
Lists all the Regions for a given account and their respective opt-in statuses. Optionally, this list can be filtered by the region-opt-status-contains parameter.
SELECT
region_name,
region_opt_status
FROM aws.account.regions
WHERE region = '{{ region }}' -- required
;
Lifecycle Methods
- disable_region
- enable_region
Disables (opts-out) a particular Region for an account. The act of disabling a Region will remove all IAM access to any resources that reside in that Region.
EXEC aws.account.regions.disable_region
@region='{{ region }}' --required
@@json=
'{
"AccountId": "{{ AccountId }}",
"RegionName": "{{ RegionName }}"
}'
;
Enables (opts-in) a particular Region for an account.
EXEC aws.account.regions.enable_region
@region='{{ region }}' --required
@@json=
'{
"AccountId": "{{ AccountId }}",
"RegionName": "{{ RegionName }}"
}'
;