Getting Information About Subregions
You can get information about the Subregions of a Region.
This enables you to identify which Subregion corresponds to which physical zones for your particular account. For more information, see About Regions and Subregions > Mapping Between Subregions and Physical Zones. |
Getting Information About Subregions Using OSC CLI
The ReadSubregions command lists one or more of the enabled Subregions that you can access in the current Region.
For more information, see About Regions and Subregions.
$ osc-cli api ReadSubregions --profile "default" \
--Filters '{
"SubregionNames": ["eu-west-2a"]
}'
$ osc-cli api ReadSubregions --profile "default" \
--Filters '{
"SubregionNames": ["eu-west-2a", "eu-west-2b"]
}'
This command contains the following attributes that you need to specify:
-
DryRun
: (optional) If true, checks whether you have the required permissions to perform the action. -
Filters
: (optional) One or more filters.-
RegionNames
: (optional) The names of the Regions containing the Subregions. -
States
: (optional) The states of the Subregions. -
SubregionNames
: (optional) The names of the Subregions.
-
-
NextPageToken
: (optional) The token to request the next page of results. Each token refers to a specific page. -
ResultsPerPage
: (optional) The maximum number of logs returned in a single response (between1
and1000
, both included). By default,100
.
The ReadSubregions command returns the following elements:
-
NextPageToken
: The token to request the next page of results. Each token refers to a specific page. -
ResponseContext
: Information about the context of the response.-
RequestId
: The ID of the request.
-
-
Subregions
: Information about one or more Subregions.-
LocationCode
: The location code (physical zone) of the Subregion. For more information, see About Regions > Mapping Between Subregions and Physical Zones. -
RegionName
: The name of the Region containing the Subregion. -
State
: The state of the Subregion. -
SubregionName
: The name of the Subregion.
-
{
"Subregions": [
{
"State": "available",
"RegionName": "eu-west-2",
"SubregionName": "eu-west-2a",
"LocationCode": "PAR1"
}
],
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
}
}
{
"Subregions": [
{
"State": "available",
"RegionName": "eu-west-2",
"SubregionName": "eu-west-2a",
"LocationCode": "PAR1"
},
{
"State": "available",
"RegionName": "eu-west-2",
"SubregionName": "eu-west-2b",
"LocationCode": "PAR4"
}
],
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
}
}
Getting Information About Subregions Using oapi-cli
The ReadSubregions command lists one or more of the enabled Subregions that you can access in the current Region.
For more information, see About Regions and Subregions.
$ oapi-cli --profile "default" ReadSubregions \
--Filters '{
"SubregionNames": ["eu-west-2a"]
}'
$ oapi-cli --profile "default" ReadSubregions \
--Filters '{
"SubregionNames": ["eu-west-2a", "eu-west-2b"]
}'
This command contains the following attributes that you need to specify:
-
DryRun
: (optional) If true, checks whether you have the required permissions to perform the action. -
Filters
: (optional) One or more filters.-
RegionNames
: (optional) The names of the Regions containing the Subregions. -
States
: (optional) The states of the Subregions. -
SubregionNames
: (optional) The names of the Subregions.
-
-
NextPageToken
: (optional) The token to request the next page of results. Each token refers to a specific page. -
ResultsPerPage
: (optional) The maximum number of logs returned in a single response (between1
and1000
, both included). By default,100
.
The ReadSubregions command returns the following elements:
-
NextPageToken
: The token to request the next page of results. Each token refers to a specific page. -
ResponseContext
: Information about the context of the response.-
RequestId
: The ID of the request.
-
-
Subregions
: Information about one or more Subregions.-
LocationCode
: The location code (physical zone) of the Subregion. For more information, see About Regions > Mapping Between Subregions and Physical Zones. -
RegionName
: The name of the Region containing the Subregion. -
State
: The state of the Subregion. -
SubregionName
: The name of the Subregion.
-
{
"Subregions": [
{
"State": "available",
"RegionName": "eu-west-2",
"SubregionName": "eu-west-2a",
"LocationCode": "PAR1"
}
],
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
}
}
{
"Subregions": [
{
"State": "available",
"RegionName": "eu-west-2",
"SubregionName": "eu-west-2a",
"LocationCode": "PAR1"
},
{
"State": "available",
"RegionName": "eu-west-2",
"SubregionName": "eu-west-2b",
"LocationCode": "PAR4"
}
],
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
}
}
Getting Information About Availability Zones Using AWS CLI
You can use this command to get information about Availability Zones only in a Region for which you have an account. Otherwise, an error message is returned. |
Before you begin: Install and configure AWS CLI. For more information, see Installing and Configuring AWS CLI. |
To get information about one or more Availability Zones inside a Region, use the describe-availability-zones command following this syntax:
$ aws ec2 describe-availability-zones \
--profile YOUR_PROFILE \
--zone-names NOT_SPECIFIED \
--filters Name=X,Values=Y \
--endpoint https://fcu.eu-west-2.outscale.com
This command contains the following attributes that you need to specify:
-
(optional)
profile
: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI. -
(optional)
zone-names
: The name of one or more Availability Zones. -
(optional)
filters
: One or more filters, in the "Name=X,Values=Y" format.You can specify several values for a same filter using the "Name=X,Values=Y, Z" format.
The following filters are available:
-
region-name
: The name of the Region where the Availability Zones are located. -
state
: The current state of the Availability Zones (available
|information
|impaired
|unavailable
). -
zone-name
: The name of the Availability Zones.
-
-
endpoint
: The endpoint corresponding to the Region you want to send the request to. For more information, see Installing and Configuring AWS CLI.
The describe-availability-zones command returns the following elements:
-
AvailabilityZones
: Information about one or more Availability Zones. This element contains the following information for each Availability Zone:-
State
: The current state of the Availability Zone (alwaysavailable
). -
RegionName
: The name of the Region where the Availability Zone is located. -
ZoneName
: The name of the Availability Zone.
-
{
"AvailabilityZones": [
{
"State": "available",
"RegionName": "eu-west-2",
"ZoneName": "eu-west-2b"
},
{
"State": "available",
"RegionName": "eu-west-2",
"ZoneName": "eu-west-2a"
}
]
}
Related Pages
Corresponding API Methods
AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.