| Did this page help you? Yes No Tell us about it... |
Gives you information about your customer gateways. You can filter the results to return information only about customer gateways
that match criteria you specify. For example, you could get information only about gateways whose state is pending or
available. The customer gateway must match at least one of the specified values for it to be included in the
results.
You can specify multiple filters (e.g., the customer gateway has a particular IP address for the Internet-routable external
interface, and the gateway's state is pending or available). The result includes information for a
particular customer gateway only if the gateway matches all your filters. If there's no match, no special message
is returned; the response is simply empty.
You can use wildcards with the filter values: * matches zero or more characters, and ? matches exactly one character. You can escape special characters using a backslash before the character. For example, a value of \*amazon\?\\ searches for the literal string *amazon?\.
The following table shows the available filters.
| Filter Name | Description |
|---|---|
|
|
The customer gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN). Type: String |
|
|
ID of the customer gateway. Type: String |
|
|
The IP address of the customer gateway's Internet-routable external interface (e.g., 12.1.2.3). Type: String |
|
|
The state of the customer gateway. Type: String Valid Values: |
|
|
The type of customer gateway. Currently the only supported type is
Type: String Valid Values: |
|
|
Key of a tag assigned to the resource. This filter is independent of the For more information about tags, go to Using Tags in the Amazon Elastic Compute Cloud User Guide. Type: String |
|
|
Value of a tag assigned to the resource. This filter is independent of the Type: String |
|
|
Filters the results based on a specific tag/value combination. Example: To list just the resources assigned tag Purpose=X, then specify:
Example: To list just resources assigned tag Purpose=X OR Purpose=Y, then specify:
|
For more information about Amazon Virtual Private Cloud and VPN customer gateways, go to Adding an IPsec Hardware Virtual Private Gateway to Your VPC in the Amazon Virtual Private Cloud User Guide.
The short version of this command is ec2dcgw.
ec2-describe-customer-gateways [
customer_gateway_id
... ]
[[--filter name=value] ...]
| Name | Description | Required |
|---|---|---|
|
|
A customer gateway ID. You can specify more than one in the request. Type: String Default: Returns information about all your customer gateways. Example: cgw-b4dc3961 |
No |
|
|
A filter for limiting the results. See the preceding table for a list of allowed filter names and values. You need to use quotation marks if the value string has a space (e.g., "name=value example"). If you're using the command line tools on a Windows system, you might need to use quotation marks, even when there is no space in the value string (e.g., "name=value"). Type: String Default: Describes all customer gateways you own, or only those otherwise specified. Example: --filter "tag-key=Production" |
No |
| Option | Description |
|---|---|
|
|
Overrides the Region specified in the Default: The Example: |
|
|
Default: The Example: |
|
|
The private key to use when constructing requests to Amazon EC2. Default: The value of the Example: |
|
|
The X.509 certificate to use when constructing requests to Amazon EC2. Default: The value of the Example: |
|
|
Specifies a connection timeout (in seconds). Example: --connection-timeout 30 |
|
|
Specifies a request timeout (in seconds). Example: --request-timeout 45 |
|
|
Displays verbose output by showing the SOAP request and response on the command line. This is particularly useful if you are building tools to talk directly to our SOAP API. |
|
|
Displays column headers in the output. |
|
|
Shows empty columns as |
|
|
Do not display tags for tagged resources. |
|
|
Prints internal debugging information. This is useful to assist us when troubleshooting problems. |
|
|
Displays Help. |
|
|
If Example: |
The command returns a table that contains the following information:
Output type identifier ("CUSTOMERGATEWAY")
Customer gateway ID
State of the customer gateway (pending, available, deleting, deleted)
Type of VPN connection the customer gateway supports
Internet-routable IP address of the customer gateway's outside interface
The customer gateway's Border Gateway Protocol (BGP) Autonomous System Number (ASN)
Any tags assigned to the customer gateway
Amazon EC2 command line tools display errors on stderr.
This example gives a description of the customer gateway with ID cgw-b4dc3961.
PROMPT>ec2-describe-customer-gateways cgw-b4dc3961CUSTOMERGATEWAY cgw-b4dc3961 available ipsec.1 12.1.2.3 65534
This example uses filters to give a description of any customer gateway you own whose IP address is 12.1.2.3, and whose state is
either pending or available.
PROMPT>ec2-describe-customer-gateways --filter "ip-address=12.1.2.3" --filter "state=pending" --filter "state=available"CUSTOMERGATEWAY cgw-b4dc3961 available ipsec.1 12.1.2.3 65534