Skip to content

Commit

Permalink
Merge pull request #9191 from elysahall/awsdocs-01-06-25
Browse files Browse the repository at this point in the history
Examples for ec2
  • Loading branch information
kdaily authored Jan 7, 2025
2 parents b110852 + 0550dd4 commit b788496
Show file tree
Hide file tree
Showing 42 changed files with 456 additions and 456 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ Output::
}
}

For more information, see `Managing multicast domains <https://docs.aws.amazon.com/vpc/latest/tgw/manage-domain.html>`__ in the *Transit Gateways Guide*.
For more information, see `Multicast domains <https://docs.aws.amazon.com/vpc/latest/tgw/multicast-domains-about.html>`__ in the *Transit Gateways Guide*.
2 changes: 1 addition & 1 deletion awscli/examples/ec2/delete-verified-access-endpoint.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ Output::
}
}

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*.
For more information, see `Verified Access endpoints <https://docs.aws.amazon.com/verified-access/latest/ug/verified-access-endpoints.html>`__ in the *AWS Verified Access User Guide*.
4 changes: 2 additions & 2 deletions awscli/examples/ec2/describe-verified-access-endpoints.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
**To describe a Verified Access endpoint**

The following ``delete-verified-access-endpoints`` example describes the specified Verified Access endpoint. ::
The following ``describe-verified-access-endpoints`` example describes the specified Verified Access endpoint. ::

aws ec2 describe-verified-access-endpoints \
--verified-access-endpoint-ids vae-066fac616d4d546f2
Expand Down Expand Up @@ -42,4 +42,4 @@ Output::
]
}

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*.
For more information, see `Verified Access endpoints <https://docs.aws.amazon.com/verified-access/latest/ug/verified-access-endpoints.html>`__ in the *AWS Verified Access User Guide*.
2 changes: 1 addition & 1 deletion awscli/examples/ec2/disable-address-transfer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ Output::
}
}

For more information, see `Transfer Elastic IP addresses <https://docs.aws.amazon.com/vpc/latest/userguide/vpc-eips.html#transfer-EIPs-intro>`__ in the *Amazon VPC User Guide*.
For more information, see `Transfer Elastic IP addresses <https://docs.aws.amazon.com/vpc/latest/userguide/WorkWithEIPs.html#transfer-EIPs-intro>`__ in the *Amazon VPC User Guide*.
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ Output::
"Output": true
}

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*.
For more information, see `Manage CloudWatch subscriptions using the CLI <https://docs.aws.amazon.com/network-manager/latest/infrastructure-performance/getting-started-nmip-cli.html>`__ in the *Infrastructure Performance User Guide*.
4 changes: 2 additions & 2 deletions awscli/examples/ec2/disable-fast-launch.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
**To discontinue fast launching for an image**

The following ``disable-fast-launch`` example discontinues fast launching on the specified AMI, and cleans up existing pre-provisioned snapshots. ::
The following ``disable-fast-launch`` example discontinues Fast Launch for the specified AMI, and cleans up existing pre-provisioned snapshots. ::

aws ec2 disable-fast-launch \
--image-id ami-01234567890abcedf
Expand All @@ -23,4 +23,4 @@ Output::
"StateTransitionTime": "2022-01-27T22:47:29.265000+00:00"
}

For more information about configuring a Windows AMI for faster launching, see `Configure your AMI for faster launching <https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/windows-ami-version-history.html#win-ami-config-fast-launch>`__ in the *Amazon EC2 User Guide*.
For more information, see `Configure EC2 Fast Launch settings for your Windows AMI <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/win-fast-launch-configure.html>`__ in the *Amazon EC2 User Guide*.
2 changes: 1 addition & 1 deletion awscli/examples/ec2/disable-image-block-public-access.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ Output::
"ImageBlockPublicAccessState": "unblocked"
}

For more information, see `Block public access to your AMIs <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/sharingamis-intro.html#block-public-access-to-amis>`__ in the *Amazon EC2 User Guide*.
For more information, see `Block public access to your AMIs <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-public-access-to-amis.html>`__ in the *Amazon EC2 User Guide*.
2 changes: 1 addition & 1 deletion awscli/examples/ec2/disable-image-deprecation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ Output::
"Return": "true"
}

For more information, see `Deprecate an AMI <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-deprecate.html#deprecate-ami>` in the *Amazon EC2 User Guide*.
For more information, see `Deprecate an AMI <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-deprecate.html>`__ in the *Amazon EC2 User Guide*.
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ Output::
}
}

For more information, see `Working with multicast <https://docs.aws.amazon.com/vpc/latest/tgw/working-with-multicast.html>`__ in the *Transit Gateways Guide*'.
For more information, see `Multicast domains <https://docs.aws.amazon.com/vpc/latest/tgw/multicast-domains-about.html>`__ in the *Transit Gateways Guide*'.
2 changes: 1 addition & 1 deletion awscli/examples/ec2/enable-address-transfer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ Output::
}
}

For more information, see `Transfer Elastic IP addresses <https://docs.aws.amazon.com/vpc/latest/userguide/vpc-eips.html#transfer-EIPs-intro>`__ in the *Amazon VPC User Guide*.
For more information, see `Transfer Elastic IP addresses <https://docs.aws.amazon.com/vpc/latest/userguide/WorkWithEIPs.html#transfer-EIPs-intro>`__ in the *Amazon VPC User Guide*.
4 changes: 2 additions & 2 deletions awscli/examples/ec2/enable-fast-launch.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
**To start fast launching for an image**

The following ``enable-fast-launch`` example starts fast launching on the specified AMI and sets the maximum number of parallel instances to launch to 6. The type of resource to use to pre-provision the AMI is set to ``snapshot``, which is also the default value. ::
The following ``enable-fast-launch`` example configures the specified AMI for Fast Launch and sets the maximum number of parallel instances to launch to 6. The type of resource to use to pre-provision the AMI is set to ``snapshot``, which is also the default value. ::

aws ec2 enable-fast-launch \
--image-id ami-01234567890abcedf \
Expand All @@ -23,4 +23,4 @@ Output::
"StateTransitionTime": "2022-01-27T22:16:03.199000+00:00"
}

For more information about configuring a Windows AMI for faster launching, see `Configure your AMI for faster launching <https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/windows-ami-version-history.html#win-ami-config-fast-launch>`__ in the *Amazon EC2 User Guide*.
For more information, see `Configure EC2 Fast Launch settings for your Windows AMI <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/win-fast-launch-configure.html>`__ in the *Amazon EC2 User Guide*.
6 changes: 3 additions & 3 deletions awscli/examples/ec2/enable-image-deprecation.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
**Example 1: To deprecate an AMI**
**To deprecate an AMI**

The following ``enable-image-deprecation`` example deprecates an AMI on a specific date and time. If you specify a value for seconds, Amazon EC2 rounds the seconds to the nearest minute. You must be the AMI owner to perform this procedure. ::

aws ec2 enable-image-deprecation \
--image-id ami-1234567890abcdef0 \
--deprecate-at "2022-10-15T13:17:12.000Z"
--deprecate-at '2022-10-15T13:17:12.000Z'

Output::

Expand All @@ -13,4 +13,4 @@ Output::
"Return": "true"
}

For more information, see `Deprecate an AMI <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-deprecate.html#deprecate-ami>` in the *Amazon EC2 User Guide*.
For more information, see `Deprecate an AMI <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-deprecate.html#deprecate-ami>`__ in the *Amazon EC2 User Guide*.
86 changes: 43 additions & 43 deletions awscli/examples/ec2/export-client-vpn-client-configuration.rst
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
**To export the client configuration**

The following ``export-client-vpn-client-configuration`` example exports the client configuration for the specified Client VPN endpoint. In this example, the output is returned in text format to make it easier to read. ::

aws ec2 export-client-vpn-client-configuration \
--client-vpn-endpoint-id cvpn-endpoint-123456789123abcde \
--output text

Output::

client
dev tun
proto udp
remote cvpn-endpoint-123456789123abcde.prod.clientvpn.ap-south-1.amazonaws.com 443
remote-random-hostname
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
cipher AES-256-GCM
verb 3
<ca>
-----BEGIN CERTIFICATE-----
MIICiTCCAfICCQD6m7oRw0uXOjANBgkqhkiG9w0BAQUFADCBiDELMAkGA1UEBhMC
VVMxCzAJBgNVBAgTAldBMRAwDgYDVQQHEwdTZWF0dGxlMQ8wDQYDVQQKEwZBbWF6
b24xFDASBgNVBAsTC0lBTSBDb25zb2xlMRIwEAYDVQQDEwlUZXN0Q2lsYWMxHzAd
BgkqhkiG9w0BCQEWEG5vb25lQGFtYXpvbi5jb20wHhcNMTEwNDI1MjA0NTIxWhcN
MTIwNDI0MjA0NTIxWjCBiDELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAldBMRAwDgYD
VQQHEwdTZWF0dGxlMQ8wDQYDVQQKEwZBbWF6b24xFDASBgNVBAsTC0lBTSBDb25z
b2xlMRIwEAYDVQQDEwlUZXN0Q2lsYWMxHzAdBgkqhkiG9w0BCQEWEG5vb25lQGFt
YXpvbi5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMaK0dn+a4GmWIWJ
21uUSfwfEvySWtC2XADZ4nB+BLYgVIk60CpiwsZ3G93vUEIO3IyNoH/f0wYK8m9T
rDHudUZg3qX4waLG5M43q7Wgc/MbQITxOUSQv7c7ugFFDzQGBzZswY6786m86gpE
Ibb3OhjZnzcvQAaRHhdlQWIMm2nrAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAtCu4
nUhVVxYUntneD9+h8Mg9q6q+auNKyExzyLwaxlAoo7TJHidbtS4J5iNmZgXL0Fkb
FFBjvSfpJIlJ00zbhNYS5f6GuoEDmFJl0ZxBHjJnyp378OD8uTs7fLvjx79LjSTb
NYiytVbZPQUQ5Yaxu2jXnimvw3rrszlaEXAMPLE=
-----END CERTIFICATE-----
</ca>
reneg-sec 0

For more information, see `Client VPN Endpoints <https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/cvpn-working-endpoints.html>`__ in the *AWS Client VPN Administrator Guide*.
**To export the client configuration**

The following ``export-client-vpn-client-configuration`` example exports the client configuration for the specified Client VPN endpoint. In this example, the output is returned in text format to make it easier to read. ::

aws ec2 export-client-vpn-client-configuration \
--client-vpn-endpoint-id cvpn-endpoint-123456789123abcde \
--output text

Output::

client
dev tun
proto udp
remote cvpn-endpoint-123456789123abcde.prod.clientvpn.ap-south-1.amazonaws.com 443
remote-random-hostname
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
cipher AES-256-GCM
verb 3
<ca>
-----BEGIN CERTIFICATE-----
MIICiTCCAfICCQD6m7oRw0uXOjANBgkqhkiG9w0BAQUFADCBiDELMAkGA1UEBhMC
VVMxCzAJBgNVBAgTAldBMRAwDgYDVQQHEwdTZWF0dGxlMQ8wDQYDVQQKEwZBbWF6
b24xFDASBgNVBAsTC0lBTSBDb25zb2xlMRIwEAYDVQQDEwlUZXN0Q2lsYWMxHzAd
BgkqhkiG9w0BCQEWEG5vb25lQGFtYXpvbi5jb20wHhcNMTEwNDI1MjA0NTIxWhcN
MTIwNDI0MjA0NTIxWjCBiDELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAldBMRAwDgYD
VQQHEwdTZWF0dGxlMQ8wDQYDVQQKEwZBbWF6b24xFDASBgNVBAsTC0lBTSBDb25z
b2xlMRIwEAYDVQQDEwlUZXN0Q2lsYWMxHzAdBgkqhkiG9w0BCQEWEG5vb25lQGFt
YXpvbi5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMaK0dn+a4GmWIWJ
21uUSfwfEvySWtC2XADZ4nB+BLYgVIk60CpiwsZ3G93vUEIO3IyNoH/f0wYK8m9T
rDHudUZg3qX4waLG5M43q7Wgc/MbQITxOUSQv7c7ugFFDzQGBzZswY6786m86gpE
Ibb3OhjZnzcvQAaRHhdlQWIMm2nrAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAtCu4
nUhVVxYUntneD9+h8Mg9q6q+auNKyExzyLwaxlAoo7TJHidbtS4J5iNmZgXL0Fkb
FFBjvSfpJIlJ00zbhNYS5f6GuoEDmFJl0ZxBHjJnyp378OD8uTs7fLvjx79LjSTb
NYiytVbZPQUQ5Yaxu2jXnimvw3rrszlaEXAMPLE=
-----END CERTIFICATE-----
</ca>
reneg-sec 0

For more information, see `Client VPN endpoint configuration file export <https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/cvpn-working-endpoint-export.html>`__ in the *AWS Client VPN Administrator Guide*.
2 changes: 1 addition & 1 deletion awscli/examples/ec2/get-aws-network-performance-data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ Output::
]
}

For more information, see `Monitor network performance <https://docs.aws.amazon.com/network-manager/latest/infrastructure-performance/getting-started-nmip-console.html>`__ in the *Infrastructure Performance User Guide*.
For more information, see `Monitor network performance <https://docs.aws.amazon.com/network-manager/latest/infrastructure-performance/nmip-performance-cli.html>`__ in the *Infrastructure Performance User Guide*.
48 changes: 24 additions & 24 deletions awscli/examples/ec2/get-capacity-reservation-usage.rst
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
**To view capacity reservation usage across AWS accounts**

The following ``get-capacity-reservation-usage`` example displays usage information for the specified capacity reservation. ::

aws ec2 get-capacity-reservation-usage \
--capacity-reservation-id cr-1234abcd56EXAMPLE

Output::

{
"CapacityReservationId": "cr-1234abcd56EXAMPLE ",
"InstanceUsages": [
{
"UsedInstanceCount": 1,
"AccountId": "123456789012"
}
],
"AvailableInstanceCount": 4,
"TotalInstanceCount": 5,
"State": "active",
"InstanceType": "t2.medium"
}

For more information, see `Viewing Shared Capacity Reservation Usage <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/capacity-reservation-sharing.html#shared-cr-usage>`__ in the *Amazon Elastic Compute Cloud User Guide for Linux Instances*.
**To view capacity reservation usage across AWS accounts**

The following ``get-capacity-reservation-usage`` example displays usage information for the specified capacity reservation. ::

aws ec2 get-capacity-reservation-usage \
--capacity-reservation-id cr-1234abcd56EXAMPLE

Output::

{
"CapacityReservationId": "cr-1234abcd56EXAMPLE ",
"InstanceUsages": [
{
"UsedInstanceCount": 1,
"AccountId": "123456789012"
}
],
"AvailableInstanceCount": 4,
"TotalInstanceCount": 5,
"State": "active",
"InstanceType": "t2.medium"
}

For more information, see `Shared Capacity Reservations <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/capacity-reservation-sharing.html>`__ in the *Amazon EC2 User Guide*.
2 changes: 1 addition & 1 deletion awscli/examples/ec2/get-coip-pool-usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ Output::
"LocalGatewayRouteTableId": "lgw-rtb-059615ef7dEXAMPLE"
}

For more information, see `Customer-owned IP addresses <https://docs.aws.amazon.com/outposts/latest/userguide/outposts-networking-components.html#ip-addressing>`__ in the *AWS Outposts User Guide*.
For more information, see `Customer-owned IP addresses <https://docs.aws.amazon.com/outposts/latest/userguide/routing.html#ip-addressing>`__ in the *AWS Outposts User Guide for Outposts racks*.
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ Output::
]
}

For more information, see `Working with Capacity Reservations <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/capacity-reservations-using.html>`__ in the *Amazon Elastic Compute Cloud User Guide for Linux Instances*.
For more information, see `Capacity Reservation groups <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/create-cr-group.html>`__ in the *Amazon EC2 User Guide*.
Original file line number Diff line number Diff line change
@@ -1,60 +1,60 @@
**To get the findings of Network Insights access scope analysis**

The following ``get-network-insights-access-scope-analysis-findings`` example gets the selected scope analysis findings in your AWS account. ::

aws ec2 get-network-insights-access-scope-analysis-findings \
--region us-east-1 \
--network-insights-access-scope-analysis-id nis \
--nis-123456789111

Output::

{
"NetworkInsightsAccessScopeAnalysisId": "nisa-123456789222",
"AnalysisFindings": [
{
"NetworkInsightsAccessScopeAnalysisId": "nisa-123456789222",
"NetworkInsightsAccessScopeId": "nis-123456789111",
"FindingComponents": [
{
"SequenceNumber": 1,
"Component": {
"Id": "eni-02e3d42d5cceca67d",
"Arn": "arn:aws:ec2:us-east-1:936459623503:network-interface/eni-02e3d32d9cceca17d"
},
"OutboundHeader": {
"DestinationAddresses": [
"0.0.0.0/5",
"11.0.0.0/8",
"12.0.0.0/6",
"128.0.0.0/3",
"16.0.0.0/4",
"160.0.0.0/5",
"168.0.0.0/6",
"172.0.0.0/12"
"8.0.0.0/7"
],
"DestinationPortRanges": [
{
"From": 0,
"To": 65535
}
],
"Protocol": "6",
"SourceAddresses": [
"10.0.2.253/32"
],
"SourcePortRanges": [
{
"From": 0,
"To": 65535
}
]
}, [etc]
]
}
}
]
}

For more information, see `Getting started with Network Access Analyzer using the AWS CLI <https://docs.aws.amazon.com/vpc/latest/network-access-analyzer/getting-started-cli-naa.html>`__ in the *Network Access Analyzer Guide*.
**To get the findings of Network Insights access scope analysis**

The following ``get-network-insights-access-scope-analysis-findings`` example gets the selected scope analysis findings in your AWS account. ::

aws ec2 get-network-insights-access-scope-analysis-findings \
--region us-east-1 \
--network-insights-access-scope-analysis-id nis \
--nis-123456789111

Output::

{
"NetworkInsightsAccessScopeAnalysisId": "nisa-123456789222",
"AnalysisFindings": [
{
"NetworkInsightsAccessScopeAnalysisId": "nisa-123456789222",
"NetworkInsightsAccessScopeId": "nis-123456789111",
"FindingComponents": [
{
"SequenceNumber": 1,
"Component": {
"Id": "eni-02e3d42d5cceca67d",
"Arn": "arn:aws:ec2:us-east-1:936459623503:network-interface/eni-02e3d32d9cceca17d"
},
"OutboundHeader": {
"DestinationAddresses": [
"0.0.0.0/5",
"11.0.0.0/8",
"12.0.0.0/6",
"128.0.0.0/3",
"16.0.0.0/4",
"160.0.0.0/5",
"168.0.0.0/6",
"172.0.0.0/12"
"8.0.0.0/7"
],
"DestinationPortRanges": [
{
"From": 0,
"To": 65535
}
],
"Protocol": "6",
"SourceAddresses": [
"10.0.2.253/32"
],
"SourcePortRanges": [
{
"From": 0,
"To": 65535
}
]
}, [etc]
]
}
}
]
}

For more information, see `Getting started with Network Access Analyzer using the AWS CLI <https://docs.aws.amazon.com/vpc/latest/network-access-analyzer/getting-started-cli.html>`__ in the *Network Access Analyzer Guide*.
Loading

0 comments on commit b788496

Please sign in to comment.