Skip to content

Commit bc92c8d

Browse files
[Add] - aws natgw cli
1 parent 782cf7c commit bc92c8d

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

services/ec2/aws_ec2_natgw.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
###################################################################
3+
# # @version 1.0.0
4+
# # @script aws_ec2_natgw.sh
5+
# # @author lamhaison
6+
7+
# # @description When working with natgw
8+
# # @bash_version None
9+
# # @notes None
10+
# # @usage Only use function in the script instead of bash aws_ec2_natgw.sh
11+
# # @date YYYYMMDD
12+
###################################################################
13+
14+
function aws_ec2_natgw_list() {
15+
aws_run_commandline '\
16+
aws ec2 describe-nat-gateways \
17+
--query "NatGateways[*].{ID:NatGatewayId, State:State, EIP:NatGatewayAddresses[*].PublicIp, Subnet:SubnetId, VPC:VpcId}" \
18+
--output table
19+
'
20+
}

0 commit comments

Comments
 (0)