Getting Information About Your Virtual Gateways

You can get information about one or more of your virtual gateways.

By default, this action describes all your virtual gateways.

Getting Information About Your Virtual Gateways Using Cockpit v2

See the Virtual Gateways dashboard.

Getting Information About Your Virtual Gateways Using OSC CLI

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"
  }
}

Getting Information About Your Virtual Gateways Using oapi-cli

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"
  }
}

Getting Information About Your Virtual Private Gateways Using AWS CLI

Before you begin: Install and configure AWS CLI. For more information, see Installing and Configuring AWS CLI.

To get information about one or more virtual private gateways, use the describe-vpn-gateways command following this syntax:

Request sample
$ aws ec2 describe-vpn-gateways \
    --profile YOUR_PROFILE \
    --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) vpn-gateway-ids: The ID of one or more virtual private gateways you want to get information about.

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

    • attachment.state: The state of the attachment between the virtual private gateway and the VPC, if any (attaching | attached | detaching | detached). For more information, see About Virtual Private Gateways > Lifecycle.

    • attachment.vpc-id: The ID of the attached VPC, if any.

    • state: The state of the virtual private gateway (pending | available | deleting | deleted). For more information, see About Virtual Private Gateways > Lifecycle.

    • tag-key: The key of a tag associated with the resource.

    • tag-value: The value of a tag associated with the resource.

    • tag:XXXX: The value of a tag associated with the resource, where XXXX is the key of the tag.

      To filter a tag whose key is XXXX and value is YYYY, you can therefore use either of the following two formats:

      • --filters Name=tag-key,Values=XXXX Name=tag-value,Values=YYYY

      • --filters Name=tag:XXXX,Values=YYYY

    • type: The type of VPN connection that the virtual private gateway supports (always ipsec.1).

    • vpn-gateway-id: The ID of the virtual private gateway.

  • 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-vpn-gateways command returns the following elements:

  • State: The state of the virtual private gateway (pending | available | deleting | deleted). For more information, see About Virtual Private Gateways > Lifecycle.

  • Tags: One or more tags associated with the virtual private gateway. This element contains the following information:

    • Key: The key of the tag.

    • Value: The value of the tag.

  • Type: The type of VPN connection that the virtual private gateway supports (always ipsec.1).

  • VpnGatewayId: The ID of the virtual private gateway.

  • VpcAttachments: Information about the VPC the virtual private gateway is attached to, if any. This element contains the following information:

    • State: The state of the attachment (attaching | attached | detaching | detached). For more information, see About Virtual Private Gateways > Lifecycle.

    • VpcId: The ID of the VPC to which the virtual private gateway is attached.

Result sample
 {
    "VpnGateways": [
        {
            "State": "available",
            "Tags": [],
            "Type": "ipsec.1",
            "VpnGatewayId": "vgw-00ac2c82",
            "VpcAttachments": [
                {
                    "State": "attached",
                    "VpcId": "vpc-eb1e7306"
                }
            ]
        }
    ]
}

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.