AWS code-library documentation change
Summary
Added PowerShell examples for describing customer gateways including filtering by state and retrieving all gateways
Security assessment
The examples demonstrate basic query functionality for VPN gateway resources without addressing security configurations or vulnerabilities
Diff
diff --git a/code-library/latest/ug/ec2_example_ec2_DescribeCustomerGateways_section.md b/code-library/latest/ug/ec2_example_ec2_DescribeCustomerGateways_section.md index 34f70d730..bfd9f5f8b 100644 --- a//code-library/latest/ug/ec2_example_ec2_DescribeCustomerGateways_section.md +++ b//code-library/latest/ug/ec2_example_ec2_DescribeCustomerGateways_section.md @@ -121,0 +122,40 @@ PowerShell +**Tools for PowerShell V5** + + +**Example 1: This example describes the specified customer gateway.** + + + Get-EC2CustomerGateway -CustomerGatewayId cgw-1a2b3c4d + + +**Output:** + + + BgpAsn : 65534 + CustomerGatewayId : cgw-1a2b3c4d + IpAddress : 203.0.113.12 + State : available + Tags : {} + Type : ipsec.1 + +**Example 2: This example describes any customer gateway whose state is either pending or available.** + + + $filter = New-Object Amazon.EC2.Model.Filter + $filter.Name = "state" + $filter.Values = @( "pending", "available" ) + + Get-EC2CustomerGateway -Filter $filter + + +**Example 3: This example describes all your customer gateways.** + + + Get-EC2CustomerGateway + + + * For API details, see [DescribeCustomerGateways](https://docs.aws.amazon.com/powershell/v5/reference) in _AWS Tools for PowerShell Cmdlet Reference (V5)_. + + + +