Obtenir des informations sur vos internet services
Vous pouvez obtenir des informations à propos d’un ou plusieurs de vos internet services, comme son état d’attachement ou le Net auquel il est attaché.
Obtenir des informations sur vos internet services avec Cockpit
|
Voir le dashboard Internet Services. |
Obtenir des informations sur vos internet services avec OSC CLI
|
À ce jour, cette section est disponible en anglais uniquement. |
The ReadInternetServices command lists one or more of your internet services.
An internet service enables virtual machines (VMs) launched in a Net to connect to the Internet. It allows routing of incoming and outgoing Internet traffic and management of public IP addresses.
$ osc-cli api ReadInternetServices --profile "default" \
--Filters '{
"InternetServiceIds": ["igw-12345678"]
}'
$ osc-cli api ReadInternetServices --profile "default" \
--Filters '{
"TagKeys": ["env"],
"TagValues": ["prod", "test"]
}'
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.-
InternetServiceIds: (optional) The IDs of the internet services. -
LinkNetIds: (optional) The IDs of the Nets the internet services are attached to. -
LinkStates: (optional) The current states of the attachments between the internet services and the Nets (onlyavailable, if the internet gateway is attached to a Net). -
TagKeys: (optional) The keys of the tags associated with the internet services. -
TagValues: (optional) The values of the tags associated with the internet services. -
Tags: (optional) The key/value combination of the tags associated with the internet services, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.
-
-
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 ReadInternetServices command returns the following elements:
-
InternetServices: Information about one or more internet services.-
InternetServiceId: The ID of the internet service. -
NetId: The ID of the Net attached to the internet service. -
State: The state of the attachment of the internet service to the Net (alwaysavailable). -
Tags: One or more tags associated with the internet service.-
Key: The key of the tag, with a minimum of 1 character. -
Value: The value of the tag, between 0 and 255 characters.
-
-
-
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.
-
{
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
},
"InternetServices": [
{
"Tags": [
{
"Value": "prod",
"Key": "env"
}
],
"State": "available",
"NetId": "vpc-12345678",
"InternetServiceId": "igw-12345678"
}
]
}
Obtenir des informations sur vos Internet services avec oapi-cli
|
À ce jour, cette section est disponible en anglais uniquement. |
The ReadInternetServices command lists one or more of your internet services.
An internet service enables virtual machines (VMs) launched in a Net to connect to the Internet. It allows routing of incoming and outgoing Internet traffic and management of public IP addresses.
$ oapi-cli --profile "default" ReadInternetServices \
--Filters '{
"InternetServiceIds": ["igw-12345678"]
}'
$ oapi-cli --profile "default" ReadInternetServices \
--Filters '{
"TagKeys": ["env"],
"TagValues": ["prod", "test"]
}'
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.-
InternetServiceIds: (optional) The IDs of the internet services. -
LinkNetIds: (optional) The IDs of the Nets the internet services are attached to. -
LinkStates: (optional) The current states of the attachments between the internet services and the Nets (onlyavailable, if the internet gateway is attached to a Net). -
TagKeys: (optional) The keys of the tags associated with the internet services. -
TagValues: (optional) The values of the tags associated with the internet services. -
Tags: (optional) The key/value combination of the tags associated with the internet services, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.
-
-
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 ReadInternetServices command returns the following elements:
-
InternetServices: Information about one or more internet services.-
InternetServiceId: The ID of the internet service. -
NetId: The ID of the Net attached to the internet service. -
State: The state of the attachment of the internet service to the Net (alwaysavailable). -
Tags: One or more tags associated with the internet service.-
Key: The key of the tag, with a minimum of 1 character. -
Value: The value of the tag, between 0 and 255 characters.
-
-
-
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.
-
{
"ResponseContext": {
"RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
},
"InternetServices": [
{
"Tags": [
{
"Value": "prod",
"Key": "env"
}
],
"State": "available",
"NetId": "vpc-12345678",
"InternetServiceId": "igw-12345678"
}
]
}
Obtenir des informations sur vos internet gateways avec AWS CLI
Avant de commencer : Installez et configurez AWS CLI. Pour en savoir plus, voir Installer et configurer AWS CLI. |
Pour obtenir des informations à propos d’une ou plusieurs internet gateways, utilisez la commande describe-internet-gateways en suivant cette syntaxe :
$ aws ec2 describe-internet-gateway \
--profile YOUR_PROFILE \
--internet-gateway-ids NOT_SPECIFIED \
--filters "Name=attachment.state,values=available" \
--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)
internet-gateway-ids: Un ou plusieurs ID d’internet gateways. -
(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 :
-
attachment.state: L’état d’attachement actuel entre l’internet gateway et un VPC (availableuniquement, si l’internet gateway est attachée à un VPC). -
attachment.vpc-id: L’ID du VPC auquel l’internet gateway est attachée. -
internet-gateway-id: L’ID de l’internet gateway.
-
tag-key: La clé d’un tag associé à la ressource. -
tag-value: La valeur d’un tag associé à la ressource. -
tag:XXXX: La valeur d’un tag associé à la ressource, oùXXXXest la clé du tag.Pour filtrer un tag dont la clé est
XXXXet la valeur estYYYY, vous pouvez donc utiliser un des deux formats suivants :-
--filters Name=tag-key,Values=XXXX Name=tag-value,Values=YYYY -
--filters Name=tag:XXXX,Values=YYYY
-
-
-
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-internet-gateways renvoie les éléments suivants :
-
InternetGateways: Informations à propos d’une ou plusieurs internet gateways. Cet élément contient les informations suivantes :-
Tags: Un ou plusieurs tags associés à la ressource. Cet élément contient les informations suivantes :-
Value: La valeur du tag. -
Key: La clé du tag.
-
-
InternetGatewayId: L’ID de l’internet gateway. -
Attachments: Informations à propos de l’attachement à un VPC. Cet élément contient les informations suivantes :-
State: L’état d’attachement (availableuniquement, si l’internet gateway est attachée à un VPC). -
VpcId: L’ID du VPC auquel l’internet gateway est attachée.
-
-
{
"InternetGateways": [
{
"Tags":[
{
"Value": "VPC1",
"Key": "Name"
}
],
"InternetGatewayId": "igw-12345678",
"Attachments": [
{
"State": "available",
"VpcId": "vpc-12345678"
}
]
}
]
}
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.