awscli 1.37.3__py3-none-any.whl → 1.37.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of awscli might be problematic. Click here for more details.
- awscli/__init__.py +1 -1
- awscli/examples/cloudfront/create-distribution-with-tags.rst +9 -13
- awscli/examples/cloudfront/get-distribution.rst +6 -10
- awscli/examples/cloudtrail/put-event-selectors.rst +2 -2
- awscli/examples/deploy/batch-get-deployments.rst +2 -2
- awscli/examples/deploy/create-deployment.rst +1 -1
- awscli/examples/deploy/get-application-revision.rst +2 -2
- awscli/examples/deploy/get-deployment.rst +1 -1
- awscli/examples/deploy/list-application-revisions.rst +3 -3
- awscli/examples/deploy/push.rst +2 -2
- awscli/examples/deploy/register-application-revision.rst +1 -1
- awscli/examples/ec2/accept-address-transfer.rst +1 -1
- awscli/examples/ec2/allocate-hosts.rst +55 -55
- awscli/examples/ec2/associate-address.rst +44 -35
- awscli/examples/ec2/authorize-security-group-egress.rst +56 -23
- awscli/examples/ec2/authorize-security-group-ingress.rst +15 -15
- awscli/examples/ec2/cancel-capacity-reservation.rst +14 -14
- awscli/examples/ec2/cancel-spot-fleet-requests.rst +43 -46
- awscli/examples/ec2/copy-snapshot.rst +2 -4
- awscli/examples/ec2/create-capacity-reservation.rst +95 -95
- awscli/examples/ec2/create-replace-root-volume-task.rst +1 -3
- awscli/examples/ec2/create-restore-image-task.rst +2 -2
- awscli/examples/ec2/create-spot-datafeed-subscription.rst +1 -1
- awscli/examples/ec2/create-tags.rst +43 -43
- awscli/examples/ec2/create-traffic-mirror-filter-rule.rst +32 -32
- awscli/examples/ec2/create-traffic-mirror-filter.rst +22 -12
- awscli/examples/ec2/create-traffic-mirror-session.rst +31 -31
- awscli/examples/ec2/create-traffic-mirror-target.rst +45 -35
- awscli/examples/ec2/create-transit-gateway-prefix-list-reference.rst +27 -27
- awscli/examples/ec2/create-verified-access-endpoint.rst +1 -1
- awscli/examples/ec2/create-vpc-endpoint-service-configuration.rst +67 -65
- awscli/examples/ec2/create-vpc-endpoint.rst +4 -4
- awscli/examples/ec2/describe-vpc-endpoint-service-configurations.rst +62 -62
- awscli/examples/ec2/describe-vpc-endpoint-services.rst +132 -134
- awscli/examples/ec2/describe-vpc-endpoints.rst +89 -89
- awscli/examples/eks/describe-cluster.rst +1 -1
- awscli/examples/emr/create-cluster-examples.rst +4 -4
- awscli/examples/emr/schedule-hbase-backup.rst +23 -23
- awscli/examples/importexport/create-job.rst +2 -2
- awscli/examples/importexport/get-shipping-label.rst +1 -1
- awscli/examples/importexport/get-status.rst +1 -1
- awscli/examples/rds/download-db-log-file-portion.rst +7 -3
- awscli/examples/resourcegroupstaggingapi/untag-resources.rst +1 -1
- awscli/examples/s3/cp.rst +7 -7
- awscli/examples/s3/ls.rst +2 -2
- awscli/examples/s3/mv.rst +5 -5
- awscli/examples/s3/sync.rst +5 -5
- awscli/examples/securitylake/create-subscriber.rst +83 -0
- {awscli-1.37.3.dist-info → awscli-1.37.4.dist-info}/METADATA +2 -2
- {awscli-1.37.3.dist-info → awscli-1.37.4.dist-info}/RECORD +62 -63
- awscli/examples/securitylake/create-subscriber-data-access.rst +0 -41
- awscli/examples/securitylake/create-subscriber-query-access.rst +0 -41
- /awscli/examples/securitylake/{create-aws-logsource.rst → create-aws-log-source.rst} +0 -0
- /awscli/examples/securitylake/{create-custom-logsource.rst → create-custom-log-source.rst} +0 -0
- /awscli/examples/securitylake/{delete-aws-logsource.rst → delete-aws-log-source.rst} +0 -0
- /awscli/examples/securitylake/{delete-custom-logsource.rst → delete-custom-log-source.rst} +0 -0
- {awscli-1.37.3.data → awscli-1.37.4.data}/scripts/aws +0 -0
- {awscli-1.37.3.data → awscli-1.37.4.data}/scripts/aws.cmd +0 -0
- {awscli-1.37.3.data → awscli-1.37.4.data}/scripts/aws_bash_completer +0 -0
- {awscli-1.37.3.data → awscli-1.37.4.data}/scripts/aws_completer +0 -0
- {awscli-1.37.3.data → awscli-1.37.4.data}/scripts/aws_zsh_completer.sh +0 -0
- {awscli-1.37.3.dist-info → awscli-1.37.4.dist-info}/LICENSE.txt +0 -0
- {awscli-1.37.3.dist-info → awscli-1.37.4.dist-info}/WHEEL +0 -0
- {awscli-1.37.3.dist-info → awscli-1.37.4.dist-info}/top_level.txt +0 -0
awscli/__init__.py
CHANGED
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
**To create a CloudFront distribution with tags**
|
|
2
2
|
|
|
3
|
-
The following example creates a distribution with two tags by providing the
|
|
4
|
-
distribution configuration and tags in a JSON file named
|
|
5
|
-
``dist-config-with-tags.json``::
|
|
3
|
+
The following ``create-distribution-with-tags`` example creates a distribution with two tags by providing the distribution configuration and tags in a JSON file named ``dist-config-with-tags.json``. ::
|
|
6
4
|
|
|
7
5
|
aws cloudfront create-distribution-with-tags \
|
|
8
6
|
--distribution-config-with-tags file://dist-config-with-tags.json
|
|
9
7
|
|
|
10
|
-
The file ``dist-config-with-tags.json`` is a JSON document in the current
|
|
11
|
-
folder that contains the following. Note the ``Tags`` object at the top of
|
|
12
|
-
the file, which contains two tags:
|
|
8
|
+
The file ``dist-config-with-tags.json`` is a JSON document in the current folder. Note the ``Tags`` object at the top of the file, which contains two tags:
|
|
13
9
|
|
|
14
10
|
- ``Name = ExampleDistribution``
|
|
15
11
|
- ``Project = ExampleProject``
|
|
16
12
|
|
|
17
|
-
|
|
13
|
+
Contents of ``dist-config-with-tags.json``::
|
|
18
14
|
|
|
19
15
|
{
|
|
20
16
|
"Tags": {
|
|
@@ -39,8 +35,8 @@ the file, which contains two tags:
|
|
|
39
35
|
"Quantity": 1,
|
|
40
36
|
"Items": [
|
|
41
37
|
{
|
|
42
|
-
"Id": "
|
|
43
|
-
"DomainName": "
|
|
38
|
+
"Id": "amzn-s3-demo-bucket.s3.amazonaws.com-cli-example",
|
|
39
|
+
"DomainName": "amzn-s3-demo-bucket.s3.amazonaws.com",
|
|
44
40
|
"OriginPath": "",
|
|
45
41
|
"CustomHeaders": {
|
|
46
42
|
"Quantity": 0
|
|
@@ -55,7 +51,7 @@ the file, which contains two tags:
|
|
|
55
51
|
"Quantity": 0
|
|
56
52
|
},
|
|
57
53
|
"DefaultCacheBehavior": {
|
|
58
|
-
"TargetOriginId": "
|
|
54
|
+
"TargetOriginId": "amzn-s3-demo-bucket.s3.amazonaws.com-cli-example",
|
|
59
55
|
"ForwardedValues": {
|
|
60
56
|
"QueryString": false,
|
|
61
57
|
"Cookies": {
|
|
@@ -155,8 +151,8 @@ Output::
|
|
|
155
151
|
"Quantity": 1,
|
|
156
152
|
"Items": [
|
|
157
153
|
{
|
|
158
|
-
"Id": "
|
|
159
|
-
"DomainName": "
|
|
154
|
+
"Id": "amzn-s3-demo-bucket.s3.amazonaws.com-cli-example",
|
|
155
|
+
"DomainName": "amzn-s3-demo-bucket.s3.amazonaws.com",
|
|
160
156
|
"OriginPath": "",
|
|
161
157
|
"CustomHeaders": {
|
|
162
158
|
"Quantity": 0
|
|
@@ -171,7 +167,7 @@ Output::
|
|
|
171
167
|
"Quantity": 0
|
|
172
168
|
},
|
|
173
169
|
"DefaultCacheBehavior": {
|
|
174
|
-
"TargetOriginId": "
|
|
170
|
+
"TargetOriginId": "amzn-s3-demo-bucket.s3.amazonaws.com-cli-example",
|
|
175
171
|
"ForwardedValues": {
|
|
176
172
|
"QueryString": false,
|
|
177
173
|
"Cookies": {
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
**To get a CloudFront distribution**
|
|
2
2
|
|
|
3
|
-
The following example gets the CloudFront distribution with the ID
|
|
4
|
-
``EDFDVBD6EXAMPLE``, including its ``ETag``. The distribution ID is returned in
|
|
5
|
-
the `create-distribution <create-distribution.html>`_ and `list-distributions
|
|
6
|
-
<list-distributions.html>`_ commands.
|
|
3
|
+
The following ``get-distribution`` example gets the CloudFront distribution with the ID ``EDFDVBD6EXAMPLE``, including its ``ETag``. The distribution ID is returned in the `create-distribution <create-distribution.html>`__ and `list-distributions <list-distributions.html>`__ commands. ::
|
|
7
4
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
aws cloudfront get-distribution --id EDFDVBD6EXAMPLE
|
|
5
|
+
aws cloudfront get-distribution \
|
|
6
|
+
--id EDFDVBD6EXAMPLE
|
|
11
7
|
|
|
12
8
|
Output::
|
|
13
9
|
|
|
@@ -34,8 +30,8 @@ Output::
|
|
|
34
30
|
"Quantity": 1,
|
|
35
31
|
"Items": [
|
|
36
32
|
{
|
|
37
|
-
"Id": "
|
|
38
|
-
"DomainName": "
|
|
33
|
+
"Id": "amzn-s3-demo-bucket.s3.amazonaws.com-cli-example",
|
|
34
|
+
"DomainName": "amzn-s3-demo-bucket.s3.amazonaws.com",
|
|
39
35
|
"OriginPath": "",
|
|
40
36
|
"CustomHeaders": {
|
|
41
37
|
"Quantity": 0
|
|
@@ -50,7 +46,7 @@ Output::
|
|
|
50
46
|
"Quantity": 0
|
|
51
47
|
},
|
|
52
48
|
"DefaultCacheBehavior": {
|
|
53
|
-
"TargetOriginId": "
|
|
49
|
+
"TargetOriginId": "amzn-s3-demo-bucket.s3.amazonaws.com-cli-example",
|
|
54
50
|
"ForwardedValues": {
|
|
55
51
|
"QueryString": false,
|
|
56
52
|
"Cookies": {
|
|
@@ -119,7 +119,7 @@ The following example creates an event selector for a trail named ``TrailName``
|
|
|
119
119
|
|
|
120
120
|
aws cloudtrail put-event-selectors \
|
|
121
121
|
--trail-name TrailName \
|
|
122
|
-
--event-selectors '[{"ReadWriteType": "All","IncludeManagementEvents": true,"DataResources": [{"Type":"AWS::S3::Object", "Values": ["arn:aws:s3:::mybucket/prefix","arn:aws:s3:::
|
|
122
|
+
--event-selectors '[{"ReadWriteType": "All","IncludeManagementEvents": true,"DataResources": [{"Type":"AWS::S3::Object", "Values": ["arn:aws:s3:::mybucket/prefix","arn:aws:s3:::amzn-s3-demo-bucket2/prefix2"]},{"Type": "AWS::Lambda::Function","Values": ["arn:aws:lambda:us-west-2:999999999999:function:hello-world-python-function"]}]}]'
|
|
123
123
|
|
|
124
124
|
Output::
|
|
125
125
|
|
|
@@ -131,7 +131,7 @@ Output::
|
|
|
131
131
|
{
|
|
132
132
|
"Values": [
|
|
133
133
|
"arn:aws:s3:::mybucket/prefix",
|
|
134
|
-
"arn:aws:s3:::
|
|
134
|
+
"arn:aws:s3:::amzn-s3-demo-bucket2/prefix2"
|
|
135
135
|
],
|
|
136
136
|
"Type": "AWS::S3::Object"
|
|
137
137
|
},
|
|
@@ -26,7 +26,7 @@ Output::
|
|
|
26
26
|
"s3Location": {
|
|
27
27
|
"bundleType": "zip",
|
|
28
28
|
"version": "uTecLusEXAMPLEFXtfUcyfV8bEXAMPLE",
|
|
29
|
-
"bucket": "
|
|
29
|
+
"bucket": "amzn-s3-demo-bucket",
|
|
30
30
|
"key": "WordPressApp.zip"
|
|
31
31
|
}
|
|
32
32
|
},
|
|
@@ -56,7 +56,7 @@ Output::
|
|
|
56
56
|
"s3Location": {
|
|
57
57
|
"bundleType": "zip",
|
|
58
58
|
"eTag": "\"dd56cfdEXAMPLE8e768f9d77fEXAMPLE\"",
|
|
59
|
-
"bucket": "
|
|
59
|
+
"bucket": "amzn-s3-demo-bucket",
|
|
60
60
|
"key": "MyOtherApp.zip"
|
|
61
61
|
}
|
|
62
62
|
},
|
|
@@ -7,7 +7,7 @@ The following ``create-deployment`` example creates a deployment and associates
|
|
|
7
7
|
--deployment-config-name CodeDeployDefault.OneAtATime \
|
|
8
8
|
--deployment-group-name WordPress_DG \
|
|
9
9
|
--description "My demo deployment" \
|
|
10
|
-
--s3-location bucket=
|
|
10
|
+
--s3-location bucket=amzn-s3-demo-bucket,bundleType=zip,eTag=dd56cfdEXAMPLE8e768f9d77fEXAMPLE,key=WordPressApp.zip
|
|
11
11
|
|
|
12
12
|
Output::
|
|
13
13
|
|
|
@@ -4,7 +4,7 @@ The following ``get-application-revision`` example displays information about an
|
|
|
4
4
|
|
|
5
5
|
aws deploy get-application-revision \
|
|
6
6
|
--application-name WordPress_App \
|
|
7
|
-
--s3-location bucket=
|
|
7
|
+
--s3-location bucket=amzn-s3-demo-bucket,bundleType=zip,eTag=dd56cfdEXAMPLE8e768f9d77fEXAMPLE,key=WordPressApp.zip
|
|
8
8
|
|
|
9
9
|
Output::
|
|
10
10
|
|
|
@@ -22,7 +22,7 @@ Output::
|
|
|
22
22
|
"s3Location": {
|
|
23
23
|
"bundleType": "zip",
|
|
24
24
|
"eTag": "dd56cfdEXAMPLE8e768f9d77fEXAMPLE",
|
|
25
|
-
"bucket": "
|
|
25
|
+
"bucket": "amzn-s3-demo-bucket",
|
|
26
26
|
"key": "WordPressApp.zip"
|
|
27
27
|
}
|
|
28
28
|
}
|
|
@@ -4,7 +4,7 @@ The following ``list-application-revisions`` example displays information about
|
|
|
4
4
|
|
|
5
5
|
aws deploy list-application-revisions \
|
|
6
6
|
--application-name WordPress_App \
|
|
7
|
-
--s-3-bucket
|
|
7
|
+
--s-3-bucket amzn-s3-demo-bucket \
|
|
8
8
|
--deployed exclude \
|
|
9
9
|
--s-3-key-prefix WordPress_ \
|
|
10
10
|
--sort-by lastUsedTime \
|
|
@@ -18,7 +18,7 @@ Output::
|
|
|
18
18
|
"revisionType": "S3",
|
|
19
19
|
"s3Location": {
|
|
20
20
|
"version": "uTecLusvCB_JqHFXtfUcyfV8bEXAMPLE",
|
|
21
|
-
"bucket": "
|
|
21
|
+
"bucket": "amzn-s3-demo-bucket",
|
|
22
22
|
"key": "WordPress_App.zip",
|
|
23
23
|
"bundleType": "zip"
|
|
24
24
|
}
|
|
@@ -27,7 +27,7 @@ Output::
|
|
|
27
27
|
"revisionType": "S3",
|
|
28
28
|
"s3Location": {
|
|
29
29
|
"version": "tMk.UxgDpMEVb7V187ZM6wVAWEXAMPLE",
|
|
30
|
-
"bucket": "
|
|
30
|
+
"bucket": "amzn-s3-demo-bucket",
|
|
31
31
|
"key": "WordPress_App_2-0.zip",
|
|
32
32
|
"bundleType": "zip"
|
|
33
33
|
}
|
awscli/examples/deploy/push.rst
CHANGED
|
@@ -6,10 +6,10 @@ The following ``push`` example bundles and deploys an application revision to Am
|
|
|
6
6
|
--application-name WordPress_App \
|
|
7
7
|
--description "This is my deployment" \
|
|
8
8
|
--ignore-hidden-files \
|
|
9
|
-
--s3-location s3://
|
|
9
|
+
--s3-location s3://amzn-s3-demo-bucket/WordPressApp.zip \
|
|
10
10
|
--source /tmp/MyLocalDeploymentFolder/
|
|
11
11
|
|
|
12
12
|
The output describes how to use the ``create-deployment`` command to create a deployment that uses the uploaded application revision. ::
|
|
13
13
|
|
|
14
14
|
To deploy with this revision, run:
|
|
15
|
-
aws deploy create-deployment --application-name WordPress_App --deployment-config-name <deployment-config-name> --deployment-group-name <deployment-group-name> --s3-location bucket=
|
|
15
|
+
aws deploy create-deployment --application-name WordPress_App --deployment-config-name <deployment-config-name> --deployment-group-name <deployment-group-name> --s3-location bucket=amzn-s3-demo-bucket,key=WordPressApp.zip,bundleType=zip,eTag="cecc9b8EXAMPLE50a6e71fdb88EXAMPLE",version=LFsJAUdEXAMPLEfvKtvi79L8EXAMPLE
|
|
@@ -5,6 +5,6 @@ The following ``register-application-revision`` example registers information ab
|
|
|
5
5
|
aws deploy register-application-revision \
|
|
6
6
|
--application-name WordPress_App \
|
|
7
7
|
--description "Revised WordPress application" \
|
|
8
|
-
--s3-location bucket=
|
|
8
|
+
--s3-location bucket=amzn-s3-demo-bucket,key=RevisedWordPressApp.zip,bundleType=zip,eTag=cecc9b8a08eac650a6e71fdb88EXAMPLE
|
|
9
9
|
|
|
10
10
|
This command produces no output.
|
|
@@ -18,4 +18,4 @@ Output::
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
For more information, see `Transfer Elastic IP addresses <https://docs.aws.amazon.com/vpc/latest/userguide/
|
|
21
|
+
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*.
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
**Example 1: To allocate a Dedicated Host**
|
|
2
|
-
|
|
3
|
-
The following ``allocate-hosts`` example allocates a single Dedicated Host in the ``eu-west-1a`` Availability Zone, onto which you can launch ``m5.large`` instances. By default, the Dedicated Host accepts only target instance launches, and does not support host recovery. ::
|
|
4
|
-
|
|
5
|
-
aws ec2 allocate-hosts \
|
|
6
|
-
--instance-type m5.large \
|
|
7
|
-
--availability-zone eu-west-1a \
|
|
8
|
-
--quantity 1
|
|
9
|
-
|
|
10
|
-
Output::
|
|
11
|
-
|
|
12
|
-
{
|
|
13
|
-
"HostIds": [
|
|
14
|
-
"h-07879acf49EXAMPLE"
|
|
15
|
-
]
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
**Example 2: To allocate a Dedicated Host with auto-placement and host recovery enabled**
|
|
19
|
-
|
|
20
|
-
The following ``allocate-hosts`` example allocates a single Dedicated Host in the ``eu-west-1a`` Availability Zone with auto-placement and host recovery enabled. ::
|
|
21
|
-
|
|
22
|
-
aws ec2 allocate-hosts \
|
|
23
|
-
--instance-type m5.large \
|
|
24
|
-
--availability-zone eu-west-1a \
|
|
25
|
-
--auto-placement on \
|
|
26
|
-
--host-recovery on \
|
|
27
|
-
--quantity 1
|
|
28
|
-
|
|
29
|
-
Output::
|
|
30
|
-
|
|
31
|
-
{
|
|
32
|
-
"HostIds": [
|
|
33
|
-
"h-07879acf49EXAMPLE"
|
|
34
|
-
]
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
**Example 3: To allocate a Dedicated Host with tags**
|
|
38
|
-
|
|
39
|
-
The following ``allocate-hosts`` example allocates a single Dedicated Host and applies a tag with a key named ``purpose`` and a value of ``production``. ::
|
|
40
|
-
|
|
41
|
-
aws ec2 allocate-hosts \
|
|
42
|
-
--instance-type m5.large \
|
|
43
|
-
--availability-zone eu-west-1a \
|
|
44
|
-
--quantity 1 \
|
|
45
|
-
--tag-specifications 'ResourceType=dedicated-host,Tags={Key=purpose,Value=production}'
|
|
46
|
-
|
|
47
|
-
Output::
|
|
48
|
-
|
|
49
|
-
{
|
|
50
|
-
"HostIds": [
|
|
51
|
-
"h-07879acf49EXAMPLE"
|
|
52
|
-
]
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
For more information, see `
|
|
1
|
+
**Example 1: To allocate a Dedicated Host**
|
|
2
|
+
|
|
3
|
+
The following ``allocate-hosts`` example allocates a single Dedicated Host in the ``eu-west-1a`` Availability Zone, onto which you can launch ``m5.large`` instances. By default, the Dedicated Host accepts only target instance launches, and does not support host recovery. ::
|
|
4
|
+
|
|
5
|
+
aws ec2 allocate-hosts \
|
|
6
|
+
--instance-type m5.large \
|
|
7
|
+
--availability-zone eu-west-1a \
|
|
8
|
+
--quantity 1
|
|
9
|
+
|
|
10
|
+
Output::
|
|
11
|
+
|
|
12
|
+
{
|
|
13
|
+
"HostIds": [
|
|
14
|
+
"h-07879acf49EXAMPLE"
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
**Example 2: To allocate a Dedicated Host with auto-placement and host recovery enabled**
|
|
19
|
+
|
|
20
|
+
The following ``allocate-hosts`` example allocates a single Dedicated Host in the ``eu-west-1a`` Availability Zone with auto-placement and host recovery enabled. ::
|
|
21
|
+
|
|
22
|
+
aws ec2 allocate-hosts \
|
|
23
|
+
--instance-type m5.large \
|
|
24
|
+
--availability-zone eu-west-1a \
|
|
25
|
+
--auto-placement on \
|
|
26
|
+
--host-recovery on \
|
|
27
|
+
--quantity 1
|
|
28
|
+
|
|
29
|
+
Output::
|
|
30
|
+
|
|
31
|
+
{
|
|
32
|
+
"HostIds": [
|
|
33
|
+
"h-07879acf49EXAMPLE"
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
**Example 3: To allocate a Dedicated Host with tags**
|
|
38
|
+
|
|
39
|
+
The following ``allocate-hosts`` example allocates a single Dedicated Host and applies a tag with a key named ``purpose`` and a value of ``production``. ::
|
|
40
|
+
|
|
41
|
+
aws ec2 allocate-hosts \
|
|
42
|
+
--instance-type m5.large \
|
|
43
|
+
--availability-zone eu-west-1a \
|
|
44
|
+
--quantity 1 \
|
|
45
|
+
--tag-specifications 'ResourceType=dedicated-host,Tags={Key=purpose,Value=production}'
|
|
46
|
+
|
|
47
|
+
Output::
|
|
48
|
+
|
|
49
|
+
{
|
|
50
|
+
"HostIds": [
|
|
51
|
+
"h-07879acf49EXAMPLE"
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
For more information, see `Allocate a Dedicated Host <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-allocating.html>`__ in the *Amazon EC2 User Guide*.
|
|
@@ -1,35 +1,44 @@
|
|
|
1
|
-
**To associate an Elastic IP
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
1
|
+
**Example 1: To associate an Elastic IP address with an instance**
|
|
2
|
+
|
|
3
|
+
The following ``associate-address`` example associates an Elastic IP address with the specified EC2 instance. ::
|
|
4
|
+
|
|
5
|
+
aws ec2 associate-address \
|
|
6
|
+
--instance-id i-0b263919b6498b123 \
|
|
7
|
+
--allocation-id eipalloc-64d5890a
|
|
8
|
+
|
|
9
|
+
Output::
|
|
10
|
+
|
|
11
|
+
{
|
|
12
|
+
"AssociationId": "eipassoc-2bebb745"
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
**Example 2: To associate an Elastic IP address with a network interface**
|
|
16
|
+
|
|
17
|
+
The following ``associate-address`` example associates the specified Elastic IP address with the specified network interface. ::
|
|
18
|
+
|
|
19
|
+
aws ec2 associate-address
|
|
20
|
+
--allocation-id eipalloc-64d5890a \
|
|
21
|
+
--network-interface-id eni-1a2b3c4d
|
|
22
|
+
|
|
23
|
+
Output::
|
|
24
|
+
|
|
25
|
+
{
|
|
26
|
+
"AssociationId": "eipassoc-2bebb745"
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
**Example 3: To associate an Elastic IP address with a private IP address**
|
|
30
|
+
|
|
31
|
+
The following ``associate-address`` example associates the specified Elastic IP address with the specified private IP address in the specified network interface. ::
|
|
32
|
+
|
|
33
|
+
aws ec2 associate-address \
|
|
34
|
+
--allocation-id eipalloc-64d5890a \
|
|
35
|
+
--network-interface-id eni-1a2b3c4d \
|
|
36
|
+
--private-ip-address 10.0.0.85
|
|
37
|
+
|
|
38
|
+
Output::
|
|
39
|
+
|
|
40
|
+
{
|
|
41
|
+
"AssociationId": "eipassoc-2bebb745"
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
For more information, see `Elastic IP addresses <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html>`__ in the *Amazon EC2 User Guide*.
|
|
@@ -1,23 +1,56 @@
|
|
|
1
|
-
**To add a rule that allows outbound traffic to a specific address range**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
**Example 1: To add a rule that allows outbound traffic to a specific address range**
|
|
2
|
+
|
|
3
|
+
The following ``authorize-security-group-egress`` example adds a rule that grants access to the specified address ranges on TCP port 80. ::
|
|
4
|
+
|
|
5
|
+
aws ec2 authorize-security-group-egress \
|
|
6
|
+
--group-id sg-1234567890abcdef0 \
|
|
7
|
+
--ip-permissions 'IpProtocol=tcp,FromPort=80,ToPort=80,IpRanges=[{CidrIp=10.0.0.0/16}]'
|
|
8
|
+
|
|
9
|
+
Output::
|
|
10
|
+
|
|
11
|
+
{
|
|
12
|
+
"Return": true,
|
|
13
|
+
"SecurityGroupRules": [
|
|
14
|
+
{
|
|
15
|
+
"SecurityGroupRuleId": "sgr-0b15794cdb17bf29c",
|
|
16
|
+
"GroupId": "sg-1234567890abcdef0",
|
|
17
|
+
"GroupOwnerId": "123456789012",
|
|
18
|
+
"IsEgress": true,
|
|
19
|
+
"IpProtocol": "tcp",
|
|
20
|
+
"FromPort": 80,
|
|
21
|
+
"ToPort": 80,
|
|
22
|
+
"CidrIpv4": "10.0.0.0/16"
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
**Example 2: To add a rule that allows outbound traffic to a specific security group**
|
|
28
|
+
|
|
29
|
+
The following ``authorize-security-group-egress`` example adds a rule that grants access to the specified security group on TCP port 80. ::
|
|
30
|
+
|
|
31
|
+
aws ec2 authorize-security-group-egress \
|
|
32
|
+
--group-id sg-1234567890abcdef0 \
|
|
33
|
+
--ip-permissions 'IpProtocol=tcp,FromPort=80,ToPort=80,UserIdGroupPairs=[{GroupId=sg-0aad1c26bbeec5c22}]'
|
|
34
|
+
|
|
35
|
+
Output::
|
|
36
|
+
|
|
37
|
+
{
|
|
38
|
+
"Return": true,
|
|
39
|
+
"SecurityGroupRules": [
|
|
40
|
+
{
|
|
41
|
+
"SecurityGroupRuleId": "sgr-0b5dd815afcea9cc3",
|
|
42
|
+
"GroupId": "sg-1234567890abcdef0",
|
|
43
|
+
"GroupOwnerId": "123456789012",
|
|
44
|
+
"IsEgress": true,
|
|
45
|
+
"IpProtocol": "tcp",
|
|
46
|
+
"FromPort": 80,
|
|
47
|
+
"ToPort": 80,
|
|
48
|
+
"ReferencedGroupInfo": {
|
|
49
|
+
"GroupId": "sg-0aad1c26bbeec5c22",
|
|
50
|
+
"UserId": "123456789012"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
For more information, see `Security groups <https://docs.aws.amazon.com/vpc/latest/userguide/vpc-security-groups.html>`__ in the *Amazon VPC User Guide*.
|
|
@@ -59,11 +59,11 @@ Output::
|
|
|
59
59
|
|
|
60
60
|
**Example 3: To add multiple rules in the same call**
|
|
61
61
|
|
|
62
|
-
The following ``authorize-security-group-ingress`` example uses the ``ip-permissions`` parameter to add two inbound rules, one that enables inbound access on TCP port 3389 (RDP) and the other that enables ping/ICMP.
|
|
62
|
+
The following ``authorize-security-group-ingress`` example uses the ``ip-permissions`` parameter to add two inbound rules, one that enables inbound access on TCP port 3389 (RDP) and the other that enables ping/ICMP. ::
|
|
63
63
|
|
|
64
64
|
aws ec2 authorize-security-group-ingress \
|
|
65
65
|
--group-id sg-1234567890abcdef0 \
|
|
66
|
-
--ip-permissions IpProtocol=tcp,FromPort=3389,ToPort=3389,IpRanges=
|
|
66
|
+
--ip-permissions 'IpProtocol=tcp,FromPort=3389,ToPort=3389,IpRanges=[{CidrIp=172.31.0.0/16}]" "IpProtocol=icmp,FromPort=-1,ToPort=-1,IpRanges=[{CidrIp=172.31.0.0/16}]'
|
|
67
67
|
|
|
68
68
|
Output::
|
|
69
69
|
|
|
@@ -92,14 +92,14 @@ Output::
|
|
|
92
92
|
}
|
|
93
93
|
]
|
|
94
94
|
}
|
|
95
|
-
|
|
95
|
+
|
|
96
96
|
**Example 4: To add a rule for ICMP traffic**
|
|
97
97
|
|
|
98
|
-
The following ``authorize-security-group-ingress`` example uses the ``ip-permissions`` parameter to add an inbound rule that allows the ICMP message ``Destination Unreachable: Fragmentation Needed and Don't Fragment was Set`` (Type 3, Code 4) from anywhere.
|
|
98
|
+
The following ``authorize-security-group-ingress`` example uses the ``ip-permissions`` parameter to add an inbound rule that allows the ICMP message ``Destination Unreachable: Fragmentation Needed and Don't Fragment was Set`` (Type 3, Code 4) from anywhere. ::
|
|
99
99
|
|
|
100
100
|
aws ec2 authorize-security-group-ingress \
|
|
101
101
|
--group-id sg-1234567890abcdef0 \
|
|
102
|
-
--ip-permissions IpProtocol=icmp,FromPort=3,ToPort=4,IpRanges=
|
|
102
|
+
--ip-permissions 'IpProtocol=icmp,FromPort=3,ToPort=4,IpRanges=[{CidrIp=0.0.0.0/0}]'
|
|
103
103
|
|
|
104
104
|
Output::
|
|
105
105
|
|
|
@@ -121,11 +121,11 @@ Output::
|
|
|
121
121
|
|
|
122
122
|
**Example 5: To add a rule for IPv6 traffic**
|
|
123
123
|
|
|
124
|
-
The following ``authorize-security-group-ingress`` example uses the ``ip-permissions`` parameter to add an inbound rule that allows SSH access (port 22) from the IPv6 range ``2001:db8:1234:1a00::/64``.
|
|
124
|
+
The following ``authorize-security-group-ingress`` example uses the ``ip-permissions`` parameter to add an inbound rule that allows SSH access (port 22) from the IPv6 range ``2001:db8:1234:1a00::/64``. ::
|
|
125
125
|
|
|
126
126
|
aws ec2 authorize-security-group-ingress \
|
|
127
127
|
--group-id sg-1234567890abcdef0 \
|
|
128
|
-
--ip-permissions IpProtocol=tcp,FromPort=22,ToPort=22,Ipv6Ranges=
|
|
128
|
+
--ip-permissions 'IpProtocol=tcp,FromPort=22,ToPort=22,Ipv6Ranges=[{CidrIpv6=2001:db8:1234:1a00::/64}]'
|
|
129
129
|
|
|
130
130
|
Output::
|
|
131
131
|
|
|
@@ -147,12 +147,12 @@ Output::
|
|
|
147
147
|
|
|
148
148
|
**Example 6: To add a rule for ICMPv6 traffic**
|
|
149
149
|
|
|
150
|
-
The following ``authorize-security-group-ingress`` example uses the ``ip-permissions`` parameter to add an inbound rule that allows ICMPv6 traffic from anywhere.
|
|
150
|
+
The following ``authorize-security-group-ingress`` example uses the ``ip-permissions`` parameter to add an inbound rule that allows ICMPv6 traffic from anywhere. ::
|
|
151
151
|
|
|
152
152
|
aws ec2 authorize-security-group-ingress \
|
|
153
153
|
--group-id sg-1234567890abcdef0 \
|
|
154
|
-
--ip-permissions IpProtocol=icmpv6,Ipv6Ranges=
|
|
155
|
-
|
|
154
|
+
--ip-permissions 'IpProtocol=icmpv6,Ipv6Ranges=[{CidrIpv6=::/0}]'
|
|
155
|
+
|
|
156
156
|
Output::
|
|
157
157
|
|
|
158
158
|
{
|
|
@@ -173,11 +173,11 @@ Output::
|
|
|
173
173
|
|
|
174
174
|
**Example 7: Add a rule with a description**
|
|
175
175
|
|
|
176
|
-
The following ``authorize-security-group-ingress`` example uses the ``ip-permissions`` parameter to add an inbound rule that allows RDP traffic from the specified IPv4 address range. The rule includes a description to help you identify it later.
|
|
176
|
+
The following ``authorize-security-group-ingress`` example uses the ``ip-permissions`` parameter to add an inbound rule that allows RDP traffic from the specified IPv4 address range. The rule includes a description to help you identify it later. ::
|
|
177
177
|
|
|
178
178
|
aws ec2 authorize-security-group-ingress \
|
|
179
179
|
--group-id sg-1234567890abcdef0 \
|
|
180
|
-
--ip-permissions IpProtocol=tcp,FromPort=3389,ToPort=3389,IpRanges=
|
|
180
|
+
--ip-permissions 'IpProtocol=tcp,FromPort=3389,ToPort=3389,IpRanges=[{CidrIp=203.0.113.0/24,Description='RDP access from NY office'}]'
|
|
181
181
|
|
|
182
182
|
Output::
|
|
183
183
|
|
|
@@ -200,11 +200,11 @@ Output::
|
|
|
200
200
|
|
|
201
201
|
**Example 8: To add an inbound rule that uses a prefix list**
|
|
202
202
|
|
|
203
|
-
The following ``authorize-security-group-ingress`` example uses the ``ip-permissions`` parameter to add an inbound rule that allows all traffic for the CIDR ranges in the specified prefix list.
|
|
203
|
+
The following ``authorize-security-group-ingress`` example uses the ``ip-permissions`` parameter to add an inbound rule that allows all traffic for the CIDR ranges in the specified prefix list. ::
|
|
204
204
|
|
|
205
205
|
aws ec2 authorize-security-group-ingress \
|
|
206
206
|
--group-id sg-04a351bfe432d4e71 \
|
|
207
|
-
--ip-permissions IpProtocol=all,PrefixListIds=
|
|
207
|
+
--ip-permissions 'IpProtocol=all,PrefixListIds=[{PrefixListId=pl-002dc3ec097de1514}]'
|
|
208
208
|
|
|
209
209
|
Output::
|
|
210
210
|
|
|
@@ -224,4 +224,4 @@ Output::
|
|
|
224
224
|
]
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
-
For more information, see `Security groups <https://docs.aws.amazon.com/vpc/latest/userguide/
|
|
227
|
+
For more information, see `Security groups <https://docs.aws.amazon.com/vpc/latest/userguide/vpc-security-groups.html>`__ in the *Amazon VPC User Guide*.
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
**To cancel a capacity reservation**
|
|
2
|
-
|
|
3
|
-
The following ``cancel-capacity-reservation`` example cancels the specified capacity reservation. ::
|
|
4
|
-
|
|
5
|
-
aws ec2 cancel-capacity-reservation \
|
|
6
|
-
--capacity-reservation-id cr-1234abcd56EXAMPLE
|
|
7
|
-
|
|
8
|
-
Output::
|
|
9
|
-
|
|
10
|
-
{
|
|
11
|
-
"Return": true
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
For more information, see `
|
|
1
|
+
**To cancel a capacity reservation**
|
|
2
|
+
|
|
3
|
+
The following ``cancel-capacity-reservation`` example cancels the specified capacity reservation. ::
|
|
4
|
+
|
|
5
|
+
aws ec2 cancel-capacity-reservation \
|
|
6
|
+
--capacity-reservation-id cr-1234abcd56EXAMPLE
|
|
7
|
+
|
|
8
|
+
Output::
|
|
9
|
+
|
|
10
|
+
{
|
|
11
|
+
"Return": true
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
For more information, see `Cancel a Capacity Reservation <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/capacity-reservations-release.html>`__ in the *Amazon EC2 User Guide*.
|