Obtenir des informations sur vos client gateways

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

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

Obtenir des informations sur vos client gateways avec Cockpit v2

Voir le dashboard Client Gateways.

Obtenir des informations sur vos client gateways avec OSC CLI

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

The ReadClientGateways command lists one or more of your client gateways.

Request sample
$ osc-cli api ReadClientGateways --profile "default" \
    --Filters '{
        "ClientGatewayIds": ["cgw-12345678"]
      }'
Request sample
$ osc-cli api ReadClientGateways --profile "default" \
    --Filters '{
        "BgpAsns": [65000],
        "PublicIps": ["192.0.2.0", "198.51.100.0"]
      }'

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.

    • BgpAsns: (optional) The Border Gateway Protocol (BGP) Autonomous System Numbers (ASNs) of the connections.

    • ClientGatewayIds: (optional) The IDs of the client gateways.

    • ConnectionTypes: (optional) The types of communication tunnels used by the client gateways (always ipsec.1).

    • PublicIps: (optional) The public IPv4 addresses of the client gateways.

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

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

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

    • Tags: (optional) The key/value combination of the tags associated with the client gateways, 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 (between 1 and 1000, both included). By default, 100.

The ReadClientGateways command returns the following elements:

  • ClientGateways: Information about one or more client gateways.

    • BgpAsn: The Autonomous System Number (ASN) used by the Border Gateway Protocol (BGP) to find the path to your client gateway through the Internet.

    • ClientGatewayId: The ID of the client gateway.

    • ConnectionType: The type of communication tunnel used by the client gateway (always ipsec.1).

    • PublicIp: The public IPv4 address of the client gateway (must be a fixed address into a NATed network).

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

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

      • 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.

Result sample
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "ClientGateways": [
    {
      "State": "available",
      "BgpAsn": 65000,
      "Tags": [],
      "ClientGatewayId": "cgw-12345678",
      "ConnectionType": "ipsec.1",
      "PublicIp": "192.0.2.0"
    }
  ]
}

Obtenir des informations sur vos client gateways avec oapi-cli

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

The ReadClientGateways command lists one or more of your client gateways.

Request sample
$ oapi-cli --profile "default" ReadClientGateways \
    --Filters '{
        "ClientGatewayIds": ["cgw-12345678"]
      }'
Request sample
$ oapi-cli --profile "default" ReadClientGateways \
    --Filters '{
        "BgpAsns": [65000],
        "PublicIps": ["192.0.2.0", "198.51.100.0"]
      }'

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.

    • BgpAsns: (optional) The Border Gateway Protocol (BGP) Autonomous System Numbers (ASNs) of the connections.

    • ClientGatewayIds: (optional) The IDs of the client gateways.

    • ConnectionTypes: (optional) The types of communication tunnels used by the client gateways (always ipsec.1).

    • PublicIps: (optional) The public IPv4 addresses of the client gateways.

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

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

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

    • Tags: (optional) The key/value combination of the tags associated with the client gateways, 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 (between 1 and 1000, both included). By default, 100.

The ReadClientGateways command returns the following elements:

  • ClientGateways: Information about one or more client gateways.

    • BgpAsn: The Autonomous System Number (ASN) used by the Border Gateway Protocol (BGP) to find the path to your client gateway through the Internet.

    • ClientGatewayId: The ID of the client gateway.

    • ConnectionType: The type of communication tunnel used by the client gateway (always ipsec.1).

    • PublicIp: The public IPv4 address of the client gateway (must be a fixed address into a NATed network).

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

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

      • 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.

Result sample
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "ClientGateways": [
    {
      "State": "available",
      "BgpAsn": 65000,
      "Tags": [],
      "ClientGatewayId": "cgw-12345678",
      "ConnectionType": "ipsec.1",
      "PublicIp": "192.0.2.0"
    }
  ]
}

Obtenir des informations sur vos customer 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 customer gateways, utilisez la commande describe-customer-gateways en suivant cette syntaxe :

Exemple de requête
$ aws ec2 describe-customer-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) customer-gateway-ids : L’ID d’une ou plusieurs customer 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 :

    • state : L’état de la customer gateways (pending | available | deleting | deleted). Pour en savoir plus, voir À propos des client gateways.

    • customer-gateway-id : L’ID de la customer gateway.

    • ip-address : L’IP publique de la customer gateway.

    • bgp-asn : Un Autonomous System Number (ASN) utilisé par le Border Gateway Protocol (BGP) pour atteindre votre customer gateway à travers Internet. Pour en savoir plus, voir À propos des client gateways. Pour en savoir plus, voir À propos des client gateways.

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

    • 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

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

  • CustomerGateway : Informations à propos d’une ou plusieurs customer gateways. Cet élément contient les informations suivantes :

  • Tags : Un ou plusieurs tags associés à la customer 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 customer gateway supporte (toujours ipsec.1).

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

  • CustomerGatewayId : L’ID de la customer gateway.

  • BgpAsn : Un Autonomous System Number (ASN) utilisé par le Border Gateway Protocol (BGP) pour atteindre votre customer gateway à travers Internet. Pour en savoir plus, voir À propos des client gateways.

  • IpAddress : L’IP publique de la customer gateway.

Exemple de résultat
{
    "CustomerGateways": [
        {
            "Tags": [],
            "Type": "ipsec.1",
            "State": "available",
            "CustomerGatewayId": "cgw-73a7fba3",
            "BgpAsn": "65000",
            "IpAddress": "198.18.7.207"
        }
    ]
}

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.