Skip to content

Commit 721728c

Browse files
committed
CLI examples for ec2, elbv2, iot, ivs-realtime, lambda, omics, secretsmanager
1 parent f050f08 commit 721728c

File tree

54 files changed

+1650
-376
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1650
-376
lines changed
+194-39
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,194 @@
1-
**To create a network interface**
2-
3-
This example creates a network interface for the specified subnet.
4-
5-
Command::
6-
7-
aws ec2 create-network-interface --subnet-id subnet-9d4a7b6c --description "my network interface" --groups sg-903004f8 --private-ip-address 10.0.2.17
8-
9-
Output::
10-
11-
{
12-
"NetworkInterface": {
13-
"Status": "pending",
14-
"MacAddress": "02:1a:80:41:52:9c",
15-
"SourceDestCheck": true,
16-
"VpcId": "vpc-a01106c2",
17-
"Description": "my network interface",
18-
"NetworkInterfaceId": "eni-e5aa89a3",
19-
"PrivateIpAddresses": [
20-
{
21-
"Primary": true,
22-
"PrivateIpAddress": "10.0.2.17"
23-
}
24-
],
25-
"RequesterManaged": false,
26-
"AvailabilityZone": "us-east-1d",
27-
"Ipv6Addresses": [],
28-
"Groups": [
29-
{
30-
"GroupName": "default",
31-
"GroupId": "sg-903004f8"
32-
}
33-
],
34-
"SubnetId": "subnet-9d4a7b6c",
35-
"OwnerId": "123456789012",
36-
"TagSet": [],
37-
"PrivateIpAddress": "10.0.2.17"
38-
}
39-
}
1+
**Example 1: To specify an IPv4 address for a network interface**
2+
3+
The following ``create-network-interface`` example creates a network interface for the specified subnet with the specified primary IPv4 address. ::
4+
5+
aws ec2 create-network-interface \
6+
--subnet-id subnet-00a24d0d67acf6333 \
7+
--description "my network interface" \
8+
--groups sg-09dfba7ed20cda78b \
9+
--private-ip-address 10.0.8.17
10+
11+
Output::
12+
13+
{
14+
"NetworkInterface": {
15+
"AvailabilityZone": "us-west-2a",
16+
"Description": "my network interface",
17+
"Groups": [
18+
{
19+
"GroupName": "my-security-group",
20+
"GroupId": "sg-09dfba7ed20cda78b"
21+
}
22+
],
23+
"InterfaceType": "interface",
24+
"Ipv6Addresses": [],
25+
"MacAddress": "06:6a:0f:9a:49:37",
26+
"NetworkInterfaceId": "eni-0492b355f0cf3b3f8",
27+
"OwnerId": "123456789012",
28+
"PrivateDnsName": "ip-10-0-8-18.us-west-2.compute.internal",
29+
"PrivateIpAddress": "10.0.8.17",
30+
"PrivateIpAddresses": [
31+
{
32+
"Primary": true,
33+
"PrivateDnsName": "ip-10-0-8-17.us-west-2.compute.internal",
34+
"PrivateIpAddress": "10.0.8.17"
35+
}
36+
],
37+
"RequesterId": "AIDA4Z3Y7GSXTMEXAMPLE",
38+
"RequesterManaged": false,
39+
"SourceDestCheck": true,
40+
"Status": "pending",
41+
"SubnetId": "subnet-00a24d0d67acf6333",
42+
"TagSet": [],
43+
"VpcId": "vpc-02723a0feeeb9d57b"
44+
}
45+
}
46+
47+
**Example 2: To create a network interface with an IPv4 address and an IPv6 address**
48+
49+
The following ``create-network-interface`` example creates a network interface for the specified subnet with an IPv4 address and an IPv6 address that are selected by Amazon EC2. ::
50+
51+
aws ec2 create-network-interface \
52+
--subnet-id subnet-00a24d0d67acf6333 \
53+
--description "my dual stack network interface" \
54+
--ipv6-address-count 1 \
55+
--groups sg-09dfba7ed20cda78b
56+
57+
Output::
58+
59+
{
60+
"NetworkInterface": {
61+
"AvailabilityZone": "us-west-2a",
62+
"Description": "my dual stack network interface",
63+
"Groups": [
64+
{
65+
"GroupName": "my-security-group",
66+
"GroupId": "sg-09dfba7ed20cda78b"
67+
}
68+
],
69+
"InterfaceType": "interface",
70+
"Ipv6Addresses": [
71+
{
72+
"Ipv6Address": "2600:1f13:cfe:3650:a1dc:237c:393a:4ba7",
73+
"IsPrimaryIpv6": false
74+
}
75+
],
76+
"MacAddress": "06:b8:68:d2:b2:2d",
77+
"NetworkInterfaceId": "eni-05da417453f9a84bf",
78+
"OwnerId": "123456789012",
79+
"PrivateDnsName": "ip-10-0-8-18.us-west-2.compute.internal",
80+
"PrivateIpAddress": "10.0.8.18",
81+
"PrivateIpAddresses": [
82+
{
83+
"Primary": true,
84+
"PrivateDnsName": "ip-10-0-8-18.us-west-2.compute.internal",
85+
"PrivateIpAddress": "10.0.8.18"
86+
}
87+
],
88+
"RequesterId": "AIDA4Z3Y7GSXTMEXAMPLE",
89+
"RequesterManaged": false,
90+
"SourceDestCheck": true,
91+
"Status": "pending",
92+
"SubnetId": "subnet-00a24d0d67acf6333",
93+
"TagSet": [],
94+
"VpcId": "vpc-02723a0feeeb9d57b",
95+
"Ipv6Address": "2600:1f13:cfe:3650:a1dc:237c:393a:4ba7"
96+
}
97+
}
98+
99+
**Example 3: To create a network interface with connection tracking configuration options**
100+
101+
The following ``create-network-interface`` example creates a network interface and configures the idle connection tracking timeouts. ::
102+
103+
aws ec2 create-network-interface \
104+
--subnet-id subnet-00a24d0d67acf6333 \
105+
--groups sg-02e57dbcfe0331c1b \
106+
--connection-tracking-specification TcpEstablishedTimeout=86400,UdpTimeout=60
107+
108+
Output::
109+
110+
{
111+
"NetworkInterface": {
112+
"AvailabilityZone": "us-west-2a",
113+
"ConnectionTrackingConfiguration": {
114+
"TcpEstablishedTimeout": 86400,
115+
"UdpTimeout": 60
116+
},
117+
"Description": "",
118+
"Groups": [
119+
{
120+
"GroupName": "my-security-group",
121+
"GroupId": "sg-02e57dbcfe0331c1b"
122+
}
123+
],
124+
"InterfaceType": "interface",
125+
"Ipv6Addresses": [],
126+
"MacAddress": "06:4c:53:de:6d:91",
127+
"NetworkInterfaceId": "eni-0c133586e08903d0b",
128+
"OwnerId": "123456789012",
129+
"PrivateDnsName": "ip-10-0-8-94.us-west-2.compute.internal",
130+
"PrivateIpAddress": "10.0.8.94",
131+
"PrivateIpAddresses": [
132+
{
133+
"Primary": true,
134+
"PrivateDnsName": "ip-10-0-8-94.us-west-2.compute.internal",
135+
"PrivateIpAddress": "10.0.8.94"
136+
}
137+
],
138+
"RequesterId": "AIDA4Z3Y7GSXTMEXAMPLE",
139+
"RequesterManaged": false,
140+
"SourceDestCheck": true,
141+
"Status": "pending",
142+
"SubnetId": "subnet-00a24d0d67acf6333",
143+
"TagSet": [],
144+
"VpcId": "vpc-02723a0feeeb9d57b"
145+
}
146+
}
147+
148+
**Example 4: To create an Elastic Fabric Adapter**
149+
150+
The following ``create-network-interface`` example creates an EFA. ::
151+
152+
aws ec2 create-network-interface \
153+
--interface-type efa \
154+
--subnet-id subnet-00a24d0d67acf6333 \
155+
--description "my efa" \
156+
--groups sg-02e57dbcfe0331c1b
157+
158+
Output::
159+
160+
{
161+
"NetworkInterface": {
162+
"AvailabilityZone": "us-west-2a",
163+
"Description": "my efa",
164+
"Groups": [
165+
{
166+
"GroupName": "my-efa-sg",
167+
"GroupId": "sg-02e57dbcfe0331c1b"
168+
}
169+
],
170+
"InterfaceType": "efa",
171+
"Ipv6Addresses": [],
172+
"MacAddress": "06:d7:a4:f7:4d:57",
173+
"NetworkInterfaceId": "eni-034acc2885e862b65",
174+
"OwnerId": "123456789012",
175+
"PrivateDnsName": "ip-10-0-8-180.us-west-2.compute.internal",
176+
"PrivateIpAddress": "10.0.8.180",
177+
"PrivateIpAddresses": [
178+
{
179+
"Primary": true,
180+
"PrivateDnsName": "ip-10-0-8-180.us-west-2.compute.internal",
181+
"PrivateIpAddress": "10.0.8.180"
182+
}
183+
],
184+
"RequesterId": "AIDA4Z3Y7GSXTMEXAMPLE",
185+
"RequesterManaged": false,
186+
"SourceDestCheck": true,
187+
"Status": "pending",
188+
"SubnetId": "subnet-00a24d0d67acf6333",
189+
"TagSet": [],
190+
"VpcId": "vpc-02723a0feeeb9d57b"
191+
}
192+
}
193+
194+
For more information, see `Elastic network interfaces <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html>`__ in the *Amazon EC2 User Guide*.

awscli/examples/ec2/create-store-image-task.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ Output::
1212
"ObjectKey": "ami-1234567890abcdef0.bin"
1313
}
1414

15-
For more information about storing and restoring an AMI using S3, see `Store and restore an AMI using S3 <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-store-restore.html>` in the *Amazon EC2 User Guide*.
15+
For more information, see `Store and restore an AMI using S3 <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-store-restore.html>`__ in the *Amazon EC2 User Guide*.
16+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
**To create a transit gateway policy table**
2+
3+
The following ``create-transit-gateway-policy-table`` example creates a transit gateway policy table for the specified transit gateway. ::
4+
5+
aws ec2 create-transit-gateway-policy-table \
6+
--transit-gateway-id tgw-067f8505c18f0bd6e
7+
8+
Output::
9+
10+
{
11+
"TransitGatewayPolicyTable": {
12+
"TransitGatewayPolicyTableId": "tgw-ptb-0a16f134b78668a81",
13+
"TransitGatewayId": "tgw-067f8505c18f0bd6e",
14+
"State": "pending",
15+
"CreationTime": "2023-11-28T16:36:43+00:00"
16+
}
17+
}
18+
19+
For more information, see `Transit gateway policy tables <https://docs.aws.amazon.com/vpc/latest/tgw/tgw-policy-tables.html>`__ in the *Transit Gateway User Guide*.
+15-12
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1-
**To delete a key pair**
2-
3-
This example deletes the key pair named ``MyKeyPair``. If the command succeeds, no output is returned.
4-
5-
Command::
6-
7-
aws ec2 delete-key-pair --key-name MyKeyPair
8-
9-
For more information, see `Using Key Pairs`_ in the *AWS Command Line Interface User Guide*.
10-
11-
.. _`Using Key Pairs`: http://docs.aws.amazon.com/cli/latest/userguide/cli-ec2-keypairs.html
12-
1+
**To delete a key pair**
2+
3+
The following ``delete-key-pair`` example deletes the specified key pair. ::
4+
5+
aws ec2 delete-key-pair \
6+
--key-name my-key-pair
7+
8+
Output::
9+
10+
{
11+
"Return": true,
12+
"KeyPairId": "key-03c8d3aceb53b507"
13+
}
14+
15+
For more information, see `Create and delete key pairs <https://docs.aws.amazon.com/cli/latest/userguide/cli-ec2-keypairs.html>`__ in the *AWS Command Line Interface User Guide*.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
**To delete a transit gateway policy table**
2+
3+
The following ``delete-transit-gateway-policy-table`` example deletes the specified transit gateway policy table. ::
4+
5+
aws ec2 delete-transit-gateway-policy-table \
6+
--transit-gateway-policy-table-id tgw-ptb-0a16f134b78668a81
7+
8+
Output::
9+
10+
{
11+
"TransitGatewayPolicyTables": [
12+
{
13+
"TransitGatewayPolicyTableId": "tgw-ptb-0a16f134b78668a81",
14+
"TransitGatewayId": "tgw-067f8505c18f0bd6e",
15+
"State": "deleting",
16+
"CreationTime": "2023-11-28T16:36:43+00:00",
17+
"Tags": []
18+
}
19+
]
20+
}
21+
22+
For more information, see `Transit gateway policy tables <https://docs.aws.amazon.com/vpc/latest/tgw/tgw-policy-tables.html>`__ in the *Transit Gateway User Guide*.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
**To describe your metric subscriptions**
2+
3+
The following ``describe-aws-network-performance-metric-subscriptions`` example describes your metric subscriptions. ::
4+
5+
aws ec2 describe-aws-network-performance-metric-subscriptions
6+
7+
Output::
8+
9+
{
10+
"Subscriptions": [
11+
{
12+
"Source": "us-east-1",
13+
"Destination": "eu-west-1",
14+
"Metric": "aggregate-latency",
15+
"Statistic": "p50",
16+
"Period": "five-minutes"
17+
}
18+
]
19+
}
20+
21+
For more information, see `Manage subscriptions <https://docs.aws.amazon.com/network-manager/latest/infrastructure-performance/nmip-subscriptions-cw.html>`__ in the *Infrastructure Performance User Guide*.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
**To describe the instance topology of all your instances**
2+
3+
The following ``describe-instance-topology`` example describes the topology of all your instances that match the supported instance types for this command. ::
4+
5+
aws ec2 describe-instance-topology \
6+
--region us-west-2
7+
8+
Output::
9+
10+
{
11+
"Instances": [
12+
{
13+
"InstanceId": "i-1111111111example",
14+
"InstanceType": "p4d.24xlarge",
15+
"GroupName": "my-ml-cpg",
16+
"NetworkNodes": [
17+
"nn-1111111111example",
18+
"nn-2222222222example",
19+
"nn-3333333333example"
20+
],
21+
"ZoneId": "usw2-az2",
22+
"AvailabilityZone": "us-west-2a"
23+
},
24+
{
25+
"InstanceId": "i-2222222222example",
26+
"InstanceType": "p4d.24xlarge",
27+
"NetworkNodes": [
28+
"nn-1111111111example",
29+
"nn-2222222222example",
30+
"nn-3333333333example"
31+
],
32+
"ZoneId": "usw2-az2",
33+
"AvailabilityZone": "us-west-2a"
34+
},
35+
{
36+
"InstanceId": "i-3333333333example",
37+
"InstanceType": "trn1.32xlarge",
38+
"NetworkNodes": [
39+
"nn-1212121212example",
40+
"nn-1211122211example",
41+
"nn-1311133311example"
42+
],
43+
"ZoneId": "usw2-az4",
44+
"AvailabilityZone": "us-west-2d"
45+
},
46+
{
47+
"InstanceId": "i-444444444example",
48+
"InstanceType": "trn1.2xlarge",
49+
"NetworkNodes": [
50+
"nn-1111111111example",
51+
"nn-5434334334example",
52+
"nn-1235301234example"
53+
],
54+
"ZoneId": "usw2-az2",
55+
"AvailabilityZone": "us-west-2a"
56+
}
57+
],
58+
"NextToken": "SomeEncryptedToken"
59+
}
60+
61+
For more information, including more examples, see `Amazon EC2 instance topology <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-topology.html>`__ in the *Amazon EC2 User Guide*.

0 commit comments

Comments
 (0)