Wait until JMESPath query VpnConnections[].State returns deleted for all elements when polling with describe-vpn-connections
. It will poll every 15 seconds until a successful state has been reached. This will exit with a return code of 255 after 40 failed checks.
See also: AWS API Documentation
See ‘aws help’ for descriptions of global parameters.
vpn-connection-deleted
[--filters <value>]
[--vpn-connection-ids <value>]
[--dry-run | --no-dry-run]
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]
--filters
(list)
One or more filters.
customer-gateway-configuration
- The configuration information for the customer gateway.
customer-gateway-id
- The ID of a customer gateway associated with the VPN connection.
state
- The state of the VPN connection (pending
|available
|deleting
|deleted
).
option.static-routes-only
- Indicates whether the connection has static routes only. Used for devices that do not support Border Gateway Protocol (BGP).
route.destination-cidr-block
- The destination CIDR block. This corresponds to the subnet used in a customer data center.
bgp-asn
- The BGP Autonomous System Number (ASN) associated with a BGP device.
tag
:<key> - The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value as the filter value. For example, to find all resources that have a tag with the keyOwner
and the valueTeamA
, specifytag:Owner
for the filter name andTeamA
for the filter value.
tag-key
- The key of a tag assigned to the resource. Use this filter to find all resources assigned a tag with a specific key, regardless of the tag value.
type
- The type of VPN connection. Currently the only supported type isipsec.1
.
vpn-connection-id
- The ID of the VPN connection.
vpn-gateway-id
- The ID of a virtual private gateway associated with the VPN connection.
transit-gateway-id
- The ID of a transit gateway associated with the VPN connection.(structure)
A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.
If you specify multiple filters, the filters are joined with an
AND
, and the request returns only results that match all of the specified filters.Name -> (string)
The name of the filter. Filter names are case-sensitive.
Values -> (list)
The filter values. Filter values are case-sensitive. If you specify multiple values for a filter, the values are joined with an
OR
, and the request returns all results that match any of the specified values.(string)
Shorthand Syntax:
Name=string,Values=string,string ...
JSON Syntax:
[
{
"Name": "string",
"Values": ["string", ...]
}
...
]
--vpn-connection-ids
(list)
One or more VPN connection IDs.
Default: Describes your VPN connections.
(string)
Syntax:
"string" "string" ...
--dry-run
| --no-dry-run
(boolean)
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation
. Otherwise, it isUnauthorizedOperation
.
--cli-input-json
| --cli-input-yaml
(string)
Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton
. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml
.
--generate-cli-skeleton
(string)
Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input
, prints a sample input JSON that can be used as an argument for --cli-input-json
. Similarly, if provided yaml-input
it will print a sample input YAML that can be used with --cli-input-yaml
. If provided with the value output
, it validates the command inputs and returns a sample output JSON for that command.
See ‘aws help’ for descriptions of global parameters.
To wait until a VPN connection is deleted
The following waitt vpn-connection-deleted
example command pauses and continues when it can confirm that the specified VPN connection is deleted. It produces no output.
aws ec2 wait vpn-connection-deleted \
--vpn-connection-ids vpn-1234567890abcdef0
None