Skip to main content

regions

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

Overview

Nameregions
TypeResource
Idaws.account.regions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
region_namestringThe Region code of a given Region (for example, us-east-1).
region_opt_statusstringOne 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:

NameAccessible byRequired ParamsOptional ParamsDescription
list_regionsselectregionLists 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_regionexecregion, RegionNameDisables (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_regionexecregion, RegionNameEnables (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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

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

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 }}"
}'
;