Obtenir des informations sur les Sous-régions
Vous pouvez obtenir des informations à propos des Sous-régions d’une Région.
|
Cela vous permet d’identifier quelle Sous-région correspond à quelle zone physique pour votre compte en particulier. Pour en savoir plus, voir À propos des Régions et Sous-régions > Mapping entre Sous-régions et zones physiques. |
Obtenir des informations sur les Sous-régions avec OSC CLI
|
À ce jour, cette section est disponible en anglais uniquement. |
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 (between1and1000, both included).
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"
}
}
Obtenir des informations sur les Sous-régions avec oapi-cli
|
À ce jour, cette section est disponible en anglais uniquement. |
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 (between1and1000, both included).
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"
}
}
Obtenir des informations sur les Availability Zones avec AWS CLI
|
Vous pouvez utiliser cette commande uniquement pour obtenir des informations sur les Availability Zones d’une Région de votre compte. Sinon, un message d’erreur est renvoyé. |
Avant de commencer : Installez et configurez AWS CLI. Pour en savoir plus, voir Installer et configurer AWS CLI. |
Pour obtenir des informations sur une ou plusieurs Availability Zones, utilisez la commande describe-availability-zones en suivant cette syntaxe :
$ 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
Cette commande contient les options suivantes que vous devez spécifier :
-
(optionnel)
profile: Le profil nommé que vous voulez utiliser, créé pendant la configuration d’AWS CLI. Pour en savoir plus, voir Installer et configurer AWS CLI. -
(optionnel)
zone-names: Le nom d’une ou plusieurs Availability Zones. -
(optionnel)
filters: Un ou plusieurs filtres, au format "Name=X,Values=Y".Vous pouvez spécifier plusieurs valeurs pour un même filtre en utilisant le format "Name=X,Values=Y, Z".
Les filtres suivants sont disponibles :
-
region-name: Le nom de la Région qui contient les Availability Zones. -
state: L’état actuel de l’Availability Zone (available|information|impaired|unavailable). -
zone-name: Le nom de l’Availability Zone.
-
-
endpoint: Le endpoint correspondant à la Région à laquelle vous voulez envoyer la requête. Pour en savoir plus, voir Installer et configurer AWS CLI.
La commande describe-availability-zones renvoie les éléments suivants :
AvailabilityZones : Informations à propos d’une ou plusieurs Availability Zones. Cet élément contient les informations suivantes pour chaque Availability Zone :
-
State: L’état actuel de l’Availability Zone (toujoursavailable). -
RegionName: Le nom de la Région où l’Availability Zone est située. -
ZoneName: Le nom de l’Availability Zone.
{
"AvailabilityZones": [
{
"State": "available",
"RegionName": "eu-west-2",
"ZoneName": "eu-west-2b"
},
{
"State": "available",
"RegionName": "eu-west-2",
"ZoneName": "eu-west-2a"
}
]
}
Pages connexes
Méthodes API correspondantes
AWS™ et Amazon Web Services™ sont des marques de commerce d'Amazon Technologies, Inc. ou de ses affiliées aux États-Unis et/ou dans les autres pays.