AWS code-library documentation change
Summary
Added PowerShell V5 examples for Get-EC2VpnConnection including connection lookup and state filtering
Security assessment
Standard operational examples for VPN connection monitoring. No security configurations or vulnerabilities addressed.
Diff
diff --git a/code-library/latest/ug/ec2_example_ec2_DescribeVpnConnections_section.md b/code-library/latest/ug/ec2_example_ec2_DescribeVpnConnections_section.md index fc3bd4f4a..fa5e3516e 100644 --- a//code-library/latest/ug/ec2_example_ec2_DescribeVpnConnections_section.md +++ b//code-library/latest/ug/ec2_example_ec2_DescribeVpnConnections_section.md @@ -136,0 +137,44 @@ PowerShell +**Tools for PowerShell V5** + + +**Example 1: This example describes the specified VPN connection.** + + + Get-EC2VpnConnection -VpnConnectionId vpn-12345678 + + +**Output:** + + + CustomerGatewayConfiguration : [XML document] + CustomerGatewayId : cgw-1a2b3c4d + Options : Amazon.EC2.Model.VpnConnectionOptions + Routes : {Amazon.EC2.Model.VpnStaticRoute} + State : available + Tags : {} + Type : ipsec.1 + VgwTelemetry : {Amazon.EC2.Model.VgwTelemetry, Amazon.EC2.Model.VgwTelemetry} + VpnConnectionId : vpn-12345678 + VpnGatewayId : vgw-1a2b3c4d + +**Example 2: This example describes any VPN connection whose state is either pending or available.** + + + $filter = New-Object Amazon.EC2.Model.Filter + $filter.Name = "state" + $filter.Values = @( "pending", "available" ) + + Get-EC2VpnConnection -Filter $filter + + +**Example 3: This example describes all your VPN connections.** + + + Get-EC2VpnConnection + + + * For API details, see [DescribeVpnConnections](https://docs.aws.amazon.com/powershell/v5/reference) in _AWS Tools for PowerShell Cmdlet Reference (V5)_. + + + +