-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8183 from elysahall/awsdocs-09-19-23
CLI examples directconnect, ec2, iam, iot, lambda, sqs
- Loading branch information
Showing
53 changed files
with
1,425 additions
and
159 deletions.
There are no files selected for viewing
114 changes: 57 additions & 57 deletions
114
awscli/examples/directconnect/create-transit-virtual-interface.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,57 @@ | ||
**To create a transit virtual interface** | ||
|
||
The following ``create-transit-virtual-interface`` example creates a transit virtual interface for the specified connection. :: | ||
|
||
ws directconnect create-transit-virtual-interface \ | ||
--connection-id dxlag-fEXAMPLE \ | ||
--new-transit-virtual-interface "virtualInterfaceName=Example Transit Virtual Interface,vlan=126,asn=65110,mtu=1500,authKey=0xzxgA9YoW9h58u8SvEXAMPLE,amazonAddress=192.168.1.1/30,customerAddress=192.168.1.2/30,addressFamily=ipv4,directConnectGatewayId=8384da05-13ce-4a91-aada-5a1baEXAMPLE,tags=[{key=Tag,value=Example}]" | ||
|
||
Output:: | ||
|
||
{ | ||
"virtualInterface": { | ||
"ownerAccount": "1111222233333", | ||
"virtualInterfaceId": "dxvif-fEXAMPLE", | ||
"location": "loc1", | ||
"connectionId": "dxlag-fEXAMPLE", | ||
"virtualInterfaceType": "transit", | ||
"virtualInterfaceName": "Example Transit Virtual Interface", | ||
"vlan": 126, | ||
"asn": 65110, | ||
"amazonSideAsn": 4200000000, | ||
"authKey": "0xzxgA9YoW9h58u8SEXAMPLE", | ||
"amazonAddress": "192.168.1.1/30", | ||
"customerAddress": "192.168.1.2/30", | ||
"addressFamily": "ipv4", | ||
"virtualInterfaceState": "pending", | ||
"customerRouterConfig": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<logical_connection id=\"dxvif-fEXAMPLE\">\n <vlan>126</vlan>\n <customer_address>192.168.1.2/30</customer_address>\n <amazon_address>192.168.1.1/30</amazon_address>\n <bgp_asn>65110</bgp_asn>\n <bgp_auth_key>0xzxgA9YoW9h58u8SvOmXRTw</bgp_auth_key>\n <amazon_bgp_asn>4200000000</amazon_bgp_asn>\n <connection_type>transit</connection_type>\n</logical_connection>\n", | ||
"mtu": 1500, | ||
"jumboFrameCapable": true, | ||
"virtualGatewayId": "", | ||
"directConnectGatewayId": "8384da05-13ce-4a91-aada-5a1baEXAMPLE", | ||
"routeFilterPrefixes": [], | ||
"bgpPeers": [ | ||
{ | ||
"bgpPeerId": "dxpeer-EXAMPLE", | ||
"asn": 65110, | ||
"authKey": "0xzxgA9YoW9h58u8SEXAMPLE", | ||
"addressFamily": "ipv4", | ||
"amazonAddress": "192.168.1.1/30", | ||
"customerAddress": "192.168.1.2/30", | ||
"bgpPeerState": "pending", | ||
"bgpStatus": "down", | ||
"awsDeviceV2": "loc1-26wz6vEXAMPLE" | ||
} | ||
], | ||
"region": "sa-east-1", | ||
"awsDeviceV2": "loc1-26wz6vEXAMPLE", | ||
"tags": [ | ||
{ | ||
"key": "Tag", | ||
"value": "Example" | ||
} | ||
] | ||
} | ||
} | ||
|
||
For more information, see `Creating a Transit Virtual Interface to the Direct Connect Gateway <https://docs.aws.amazon.com/directconnect/latest/UserGuide/create-vif.html#create-transit-vif>`__ in the *AWS Direct Connect User Guide*. | ||
**To create a transit virtual interface** | ||
|
||
The following ``create-transit-virtual-interface`` example creates a transit virtual interface for the specified connection. :: | ||
|
||
aws directconnect create-transit-virtual-interface \ | ||
--connection-id dxlag-fEXAMPLE \ | ||
--new-transit-virtual-interface "virtualInterfaceName=Example Transit Virtual Interface,vlan=126,asn=65110,mtu=1500,authKey=0xzxgA9YoW9h58u8SvEXAMPLE,amazonAddress=192.168.1.1/30,customerAddress=192.168.1.2/30,addressFamily=ipv4,directConnectGatewayId=8384da05-13ce-4a91-aada-5a1baEXAMPLE,tags=[{key=Tag,value=Example}]" | ||
|
||
Output:: | ||
|
||
{ | ||
"virtualInterface": { | ||
"ownerAccount": "1111222233333", | ||
"virtualInterfaceId": "dxvif-fEXAMPLE", | ||
"location": "loc1", | ||
"connectionId": "dxlag-fEXAMPLE", | ||
"virtualInterfaceType": "transit", | ||
"virtualInterfaceName": "Example Transit Virtual Interface", | ||
"vlan": 126, | ||
"asn": 65110, | ||
"amazonSideAsn": 4200000000, | ||
"authKey": "0xzxgA9YoW9h58u8SEXAMPLE", | ||
"amazonAddress": "192.168.1.1/30", | ||
"customerAddress": "192.168.1.2/30", | ||
"addressFamily": "ipv4", | ||
"virtualInterfaceState": "pending", | ||
"customerRouterConfig": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<logical_connection id=\"dxvif-fEXAMPLE\">\n <vlan>126</vlan>\n <customer_address>192.168.1.2/30</customer_address>\n <amazon_address>192.168.1.1/30</amazon_address>\n <bgp_asn>65110</bgp_asn>\n <bgp_auth_key>0xzxgA9YoW9h58u8SvOmXRTw</bgp_auth_key>\n <amazon_bgp_asn>4200000000</amazon_bgp_asn>\n <connection_type>transit</connection_type>\n</logical_connection>\n", | ||
"mtu": 1500, | ||
"jumboFrameCapable": true, | ||
"virtualGatewayId": "", | ||
"directConnectGatewayId": "8384da05-13ce-4a91-aada-5a1baEXAMPLE", | ||
"routeFilterPrefixes": [], | ||
"bgpPeers": [ | ||
{ | ||
"bgpPeerId": "dxpeer-EXAMPLE", | ||
"asn": 65110, | ||
"authKey": "0xzxgA9YoW9h58u8SEXAMPLE", | ||
"addressFamily": "ipv4", | ||
"amazonAddress": "192.168.1.1/30", | ||
"customerAddress": "192.168.1.2/30", | ||
"bgpPeerState": "pending", | ||
"bgpStatus": "down", | ||
"awsDeviceV2": "loc1-26wz6vEXAMPLE" | ||
} | ||
], | ||
"region": "sa-east-1", | ||
"awsDeviceV2": "loc1-26wz6vEXAMPLE", | ||
"tags": [ | ||
{ | ||
"key": "Tag", | ||
"value": "Example" | ||
} | ||
] | ||
} | ||
} | ||
|
||
For more information, see `Creating a Transit Virtual Interface to the Direct Connect Gateway <https://docs.aws.amazon.com/directconnect/latest/UserGuide/create-vif.html#create-transit-vif>`__ in the *AWS Direct Connect User Guide*. |
27 changes: 27 additions & 0 deletions
27
awscli/examples/ec2/assign-private-nat-gateway-address.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
**To assign private IP addresses to your private NAT gateway** | ||
|
||
The following ``assign-private-nat-gateway-address`` example assigns two private IP addresses to the specified private NAT gateway. :: | ||
|
||
aws ec2 assign-private-nat-gateway-address \ | ||
--nat-gateway-id nat-1234567890abcdef0 \ | ||
--private-ip-address-count 2 | ||
|
||
Output:: | ||
|
||
{ | ||
"NatGatewayId": "nat-1234567890abcdef0", | ||
"NatGatewayAddresses": [ | ||
{ | ||
"NetworkInterfaceId": "eni-0065a61b324d1897a", | ||
"IsPrimary": false, | ||
"Status": "assigning" | ||
}, | ||
{ | ||
"NetworkInterfaceId": "eni-0065a61b324d1897a", | ||
"IsPrimary": false, | ||
"Status": "assigning" | ||
} | ||
] | ||
} | ||
|
||
For more information, see `NAT gateways <https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html>`__ in the *Amazon VPC User Guide*. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
**To associate an Elastic IP address with a public NAT gateway** | ||
|
||
The following ``associate-nat-gateway-address`` example associates the specified Elastic IP address with the specified public NAT gateway. AWS automatically assigns a secondary private IPv4 address. :: | ||
|
||
aws ec2 associate-nat-gateway-address \ | ||
--nat-gateway-id nat-1234567890abcdef0 \ | ||
--allocation-ids eipalloc-0be6ecac95EXAMPLE | ||
|
||
Output:: | ||
|
||
{ | ||
"NatGatewayId": "nat-1234567890abcdef0", | ||
"NatGatewayAddresses": [ | ||
{ | ||
"AllocationId": "eipalloc-0be6ecac95EXAMPLE", | ||
"NetworkInterfaceId": "eni-09cc4b2558794f7f9", | ||
"IsPrimary": false, | ||
"Status": "associating" | ||
} | ||
] | ||
} | ||
|
||
For more information, see `NAT gateways <https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html>`__ in the *Amazon VPC User Guide*. |
36 changes: 36 additions & 0 deletions
36
awscli/examples/ec2/attach-verified-access-trust-provider.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
**To attach a trust provider to an instance** | ||
|
||
The following ``attach-verified-access-trust-provider`` example attaches the specified Verified Access trust provider to the specified Verified Access instance. :: | ||
|
||
aws ec2 attach-verified-access-trust-provider \ | ||
--verified-access-instance-id vai-0ce000c0b7643abea \ | ||
--verified-access-trust-provider-id vatp-0bb32de759a3e19e7 | ||
|
||
Output:: | ||
|
||
{ | ||
"VerifiedAccessTrustProvider": { | ||
"VerifiedAccessTrustProviderId": "vatp-0bb32de759a3e19e7", | ||
"Description": "", | ||
"TrustProviderType": "user", | ||
"UserTrustProviderType": "iam-identity-center", | ||
"PolicyReferenceName": "idc", | ||
"CreationTime": "2023-08-25T19:00:38", | ||
"LastUpdatedTime": "2023-08-25T19:00:38" | ||
}, | ||
"VerifiedAccessInstance": { | ||
"VerifiedAccessInstanceId": "vai-0ce000c0b7643abea", | ||
"Description": "", | ||
"VerifiedAccessTrustProviders": [ | ||
{ | ||
"VerifiedAccessTrustProviderId": "vatp-0bb32de759a3e19e7", | ||
"TrustProviderType": "user", | ||
"UserTrustProviderType": "iam-identity-center" | ||
} | ||
], | ||
"CreationTime": "2023-08-25T18:27:56", | ||
"LastUpdatedTime": "2023-08-25T18:27:56" | ||
} | ||
} | ||
|
||
For more information, see `Verified Access instances <https://docs.aws.amazon.com/verified-access/latest/ug/verified-access-instances.html>`__ in the *AWS Verified Access User Guide*. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
**To cancel having an AMI shared with your Amazon Web Services account** | ||
|
||
The following ``cancel-image-launch-permission`` example removes your account from the specified AMI's launch permissions. :: | ||
|
||
aws ec2 cancel-image-launch-permission \ | ||
--image-id ami-0123456789example \ | ||
--region us-east-1 | ||
|
||
Output:: | ||
|
||
{ | ||
"Return": true | ||
} | ||
|
||
For more information, see `Cancel having an AMI shared with your Amazon Web Services account <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/cancel-sharing-an-AMI.html#cancel-image-launch-permission>`__ in the *Amazon EC2 User Guide*. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
**To create a carrier gateway** | ||
|
||
The following ``create-carrier-gateway`` example creates a carrier gateway for the specified VPC. :: | ||
|
||
aws ec2 create-carrier-gateway \ | ||
--vpc-id vpc-0c529aEXAMPLE1111 | ||
|
||
Output:: | ||
|
||
{ | ||
"CarrierGateway": { | ||
"CarrierGatewayId": "cagw-0465cdEXAMPLE1111", | ||
"VpcId": "vpc-0c529aEXAMPLE1111", | ||
"State": "pending", | ||
"OwnerId": "123456789012" | ||
} | ||
} | ||
|
||
For more information, see `Carrier gateways <https://docs.aws.amazon.com/wavelength/latest/developerguide/carrier-gateways.html>`__ in the *AWS Wavelength User Guide*. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
**To create an EC2 Instance Connect Endpoint** | ||
|
||
The following ``create-instance-connect-endpoint`` example creates an EC2 Instance Connect Endpoint in the specified subnet. :: | ||
|
||
aws ec2 create-instance-connect-endpoint \ | ||
--region us-east-1 \ | ||
--subnet-id subnet-0123456789example | ||
|
||
Output:: | ||
|
||
{ | ||
"VpcId": "vpc-0123abcd", | ||
"InstanceConnectEndpointArn": "arn:aws:ec2:us-east-1:111111111111:instance-connect-endpoint/eice-0123456789example", | ||
"AvailabilityZone": "us-east-1a", | ||
"NetworkInterfaceIds": [ | ||
"eni-0123abcd" | ||
], | ||
"PreserveClientIp": true, | ||
"Tags": [], | ||
"FipsDnsName": "eice-0123456789example.0123abcd.fips.ec2-instance-connect-endpoint.us-east-1.amazonaws.com", | ||
"StateMessage": "", | ||
"State": "create-complete", | ||
"DnsName": "eice-0123456789example.0123abcd.ec2-instance-connect-endpoint.us-east-1.amazonaws.com", | ||
"SubnetId": "subnet-0123abcd", | ||
"OwnerId": "111111111111", | ||
"SecurityGroupIds": [ | ||
"sg-0123abcd" | ||
], | ||
"InstanceConnectEndpointId": "eice-0123456789example", | ||
"CreatedAt": "2023-04-07T15:43:53.000Z" | ||
} | ||
|
||
For more information, see `Create an EC2 Instance Connect Endpoint <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/create-ec2-instance-connect-endpoints.html>`__ in the *Amazon EC2 User Guide*. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
**To create a Verified Access endpoint** | ||
|
||
The following ``create-verified-access-endpoint`` example creates a Verified Access endpoint for the speciied Verified Access group. The specified network interface and security group must belong to the same VPC. :: | ||
|
||
aws ec2 create-verified-access-endpoint \ | ||
--verified-access-group-id vagr-0dbe967baf14b7235 \ | ||
--endpoint-type network-interface \ | ||
--attachment-type vpc \ | ||
--domain-certificate-arn arn:aws:acm:us-east-2:123456789012:certificate/eb065ea0-26f9-4e75-a6ce-0a1a7EXAMPLE \ | ||
--application-domain example.com \ | ||
--endpoint-domain-prefix my-ava-app \ | ||
--security-group-ids sg-004915970c4c8f13a \ | ||
--network-interface-options NetworkInterfaceId=eni-0aec70418c8d87a0f,Protocol=https,Port=443 \ | ||
--tag-specifications ResourceType=verified-access-endpoint,Tags=[{Key=Name,Value=my-va-endpoint}] | ||
|
||
Output:: | ||
|
||
{ | ||
"VerifiedAccessEndpoint": { | ||
"VerifiedAccessInstanceId": "vai-0ce000c0b7643abea", | ||
"VerifiedAccessGroupId": "vagr-0dbe967baf14b7235", | ||
"VerifiedAccessEndpointId": "vae-066fac616d4d546f2", | ||
"ApplicationDomain": "example.com", | ||
"EndpointType": "network-interface", | ||
"AttachmentType": "vpc", | ||
"DomainCertificateArn": "arn:aws:acm:us-east-2:123456789012:certificate/eb065ea0-26f9-4e75-a6ce-0a1a7EXAMPLE", | ||
"EndpointDomain": "my-ava-app.edge-00c3372d53b1540bb.vai-0ce000c0b7643abea.prod.verified-access.us-east-2.amazonaws.com", | ||
"SecurityGroupIds": [ | ||
"sg-004915970c4c8f13a" | ||
], | ||
"NetworkInterfaceOptions": { | ||
"NetworkInterfaceId": "eni-0aec70418c8d87a0f", | ||
"Protocol": "https", | ||
"Port": 443 | ||
}, | ||
"Status": { | ||
"Code": "pending" | ||
}, | ||
"Description": "", | ||
"CreationTime": "2023-08-25T20:54:43", | ||
"LastUpdatedTime": "2023-08-25T20:54:43", | ||
"Tags": [ | ||
{ | ||
"Key": "Name", | ||
"Value": "my-va-endpoint" | ||
} | ||
] | ||
} | ||
} | ||
|
||
For more information, see `Verified Access endpoints <https://docs.aws.amazon.com/verified-access/latest/ug/verfied-access-endpoints.html>`__ in the *AWS Verified Access User Guide*. |
Oops, something went wrong.