Obtenir des informations sur vos virtual gateways

Vous pouvez obtenir des informations sur une ou plusieurs de vos virtual gateways.

Par défaut, cette action décrit toutes vos virtual gateways.

Obtenir des informations sur vos virtual gateways avec Cockpit v2

Voir le dashboard Virtual Gateways.

Obtenir des informations sur vos virtual gateways avec OSC CLI

À ce jour, cette section est disponible en anglais uniquement.

The ReadVirtualGateways command lists one or more virtual gateways.

Request sample
$ osc-cli api ReadVirtualGateways --profile "default" \
    --Filters '{
        "VirtualGatewayIds": ["vgw-12345678"]
      }'
Request sample
$ osc-cli api ReadVirtualGateways --profile "default" \
    --Filters '{
        "States": ["available"],
        "LinkStates": ["attached", "detached"]
      }'

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.

    • ConnectionTypes: (optional) The types of the virtual gateways (always ipsec.1).

    • LinkNetIds: (optional) The IDs of the Nets the virtual gateways are attached to.

    • LinkStates: (optional) The current states of the attachments between the virtual gateways and the Nets (attaching | attached | detaching | detached).

    • States: (optional) The states of the virtual gateways (pending | available | deleting | deleted).

    • TagKeys: (optional) The keys of the tags associated with the virtual gateways.

    • TagValues: (optional) The values of the tags associated with the virtual gateways.

    • Tags: (optional) The key/value combination of the tags associated with the virtual gateways, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.

    • VirtualGatewayIds: (optional) The IDs of the virtual gateways.

  • 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 (between 1 and 1000, both included). By default, 100.

The ReadVirtualGateways 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.

  • VirtualGateways: Information about one or more virtual gateways.

    • ConnectionType: The type of VPN connection supported by the virtual gateway (always ipsec.1).

    • NetToVirtualGatewayLinks: The Net to which the virtual gateway is attached.

      • NetId: The ID of the Net to which the virtual gateway is attached.

      • State: The state of the attachment (attaching | attached | detaching | detached).

    • State: The state of the virtual gateway (pending | available | deleting | deleted).

    • Tags: One or more tags associated with the virtual gateway.

      • Key: The key of the tag, with a minimum of 1 character.

      • Value: The value of the tag, between 0 and 255 characters.

    • VirtualGatewayId: The ID of the virtual gateway.

Result sample
{
  "VirtualGateways": [
    {
      "VirtualGatewayId": "vgw-12345678",
      "ConnectionType": "ipsec.1",
      "NetToVirtualGatewayLinks": [],
      "State": "available",
      "Tags": []
    }
  ],
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}
Result sample
{
  "VirtualGateways": [
    {
      "VirtualGatewayId": "vgw-12345678",
      "ConnectionType": "ipsec.1",
      "NetToVirtualGatewayLinks": [
        {
          "State": "attached",
          "NetId": "vpc-12345678"
        }
      ],
      "State": "available",
      "Tags": []
    }
  ],
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

Obtenir des informations sur vos virtual gateways avec oapi-cli

À ce jour, cette section est disponible en anglais uniquement.

The ReadVirtualGateways command lists one or more virtual gateways.

Request sample
$ oapi-cli --profile "default" ReadVirtualGateways \
    --Filters '{
        "VirtualGatewayIds": ["vgw-12345678"]
      }'
Request sample
$ oapi-cli --profile "default" ReadVirtualGateways \
    --Filters '{
        "States": ["available"],
        "LinkStates": ["attached", "detached"]
      }'

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.

    • ConnectionTypes: (optional) The types of the virtual gateways (always ipsec.1).

    • LinkNetIds: (optional) The IDs of the Nets the virtual gateways are attached to.

    • LinkStates: (optional) The current states of the attachments between the virtual gateways and the Nets (attaching | attached | detaching | detached).

    • States: (optional) The states of the virtual gateways (pending | available | deleting | deleted).

    • TagKeys: (optional) The keys of the tags associated with the virtual gateways.

    • TagValues: (optional) The values of the tags associated with the virtual gateways.

    • Tags: (optional) The key/value combination of the tags associated with the virtual gateways, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.

    • VirtualGatewayIds: (optional) The IDs of the virtual gateways.

  • 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 (between 1 and 1000, both included). By default, 100.

The ReadVirtualGateways 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.

  • VirtualGateways: Information about one or more virtual gateways.

    • ConnectionType: The type of VPN connection supported by the virtual gateway (always ipsec.1).

    • NetToVirtualGatewayLinks: The Net to which the virtual gateway is attached.

      • NetId: The ID of the Net to which the virtual gateway is attached.

      • State: The state of the attachment (attaching | attached | detaching | detached).

    • State: The state of the virtual gateway (pending | available | deleting | deleted).

    • Tags: One or more tags associated with the virtual gateway.

      • Key: The key of the tag, with a minimum of 1 character.

      • Value: The value of the tag, between 0 and 255 characters.

    • VirtualGatewayId: The ID of the virtual gateway.

Result sample
{
  "VirtualGateways": [
    {
      "VirtualGatewayId": "vgw-12345678",
      "ConnectionType": "ipsec.1",
      "NetToVirtualGatewayLinks": [],
      "State": "available",
      "Tags": []
    }
  ],
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}
Result sample
{
  "VirtualGateways": [
    {
      "VirtualGatewayId": "vgw-12345678",
      "ConnectionType": "ipsec.1",
      "NetToVirtualGatewayLinks": [
        {
          "State": "attached",
          "NetId": "vpc-12345678"
        }
      ],
      "State": "available",
      "Tags": []
    }
  ],
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

Obtenir des informations sur vos virtual private 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 sur une ou plusieurs virtual private gateways, utilisez la commande describe-vpn-gateways en suivant cette syntaxe :

Exemple de requête
$ aws ec2 describe-vpn-gateways \
    --profile YOUR_PROFILE \
    --filters Name=X,Values=Y \
    --endpoint https://fcu.eu-west-2.outscale.com

Cette commande contient les attributs suivants 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) vpn-gateway-ids : L’ID d’une ou plusieurs virtual private gateways sur lesquelles vous voulez obtenir des informations.

  • (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 :

    • 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ù XXXX est la clé du tag.

      Pour filtrer un tag dont la clé est XXXX et la valeur est YYYY, 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

    • type : Le type de connexion VPN que la virtual private gateway supporte (toujours ipsec.1).

    • vpn-gateway-id : L’ID de la virtual private gateway.

  • 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-vpn-gateways renvoie les éléments suivants :

  • State : L’état de la virtual private gateway (pending | available | deleting | deleted). Pour en savoir plus, voir À propos des virtual private gateways > Cycle de vie.

  • Tags : Un ou plusieurs tags associés à la virtual private gateway. Cet élément contient les informations suivantes :

    • Key : La clé du tag.

    • Value : La valeur du tag.

  • Type : Le type de connexion VPN que la virtual private gateway supporte (toujours ipsec.1).

  • VpnGatewayId : L’ID de la virtual private gateway.

  • VpcAttachments : Informations à propos du VPC auquel la virtual private gateway est attachée, le cas échéant. Cet élément contient les informations suivantes :

Exemple de résultat
{
    "VpnGateways": [
        {
            "State": "available",
            "Tags": [],
            "Type": "ipsec.1",
            "VpnGatewayId": "vgw-00ac2c82",
            "VpcAttachments": [
                {
                    "State": "attached",
                    "VpcId": "vpc-eb1e7306"
                }
            ]
        }
    ]
}

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.