Skip to content

Commit 3c2d75b

Browse files
committed
CLI examples configservice, ec2, pinpoint, payment-cryptography, payment-cryptography-data
1 parent 66ff174 commit 3c2d75b

Some content is hidden

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

44 files changed

+1294
-422
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,74 @@
1-
**To record all supported resources**
1+
**Example 1: To record all supported resources**
22

33
The following command creates a configuration recorder that tracks changes to all supported resource types, including global resource types::
44

5-
aws configservice put-configuration-recorder --configuration-recorder name=default,roleARN=arn:aws:iam::123456789012:role/config-role --recording-group allSupported=true,includeGlobalResourceTypes=true
5+
aws configservice put-configuration-recorder \
6+
--configuration-recorder name=default,roleARN=arn:aws:iam::123456789012:role/config-role \
7+
--recording-group allSupported=true,includeGlobalResourceTypes=true
68

7-
**To record specific types of resources**
9+
If the command succeeds, AWS Config returns no output. To verify the settings of your configuration recorder, run the `describe-configuration-recorders`__ command.
10+
11+
.. __: http://docs.aws.amazon.com/cli/latest/reference/configservice/describe-configuration-recorders.html
12+
13+
**Example 2: To record specific types of resources**
814

915
The following command creates a configuration recorder that tracks changes to only those types of resources that are specified in the JSON file for the `--recording-group` option::
1016

11-
aws configservice put-configuration-recorder --configuration-recorder name=default,roleARN=arn:aws:iam::123456789012:role/config-role --recording-group file://recordingGroup.json
17+
aws configservice put-configuration-recorder \
18+
--configuration-recorder name=default,roleARN=arn:aws:iam::123456789012:role/config-role \
19+
--recording-group file://recordingGroup.json
1220

1321
`recordingGroup.json` is a JSON file that specifies the types of resources that AWS Config will record::
1422

1523
{
16-
"allSupported": false,
17-
"includeGlobalResourceTypes": false,
18-
"resourceTypes": [
19-
"AWS::EC2::EIP",
20-
"AWS::EC2::Instance",
21-
"AWS::EC2::NetworkAcl",
22-
"AWS::EC2::SecurityGroup",
23-
"AWS::CloudTrail::Trail",
24-
"AWS::EC2::Volume",
25-
"AWS::EC2::VPC",
26-
"AWS::IAM::User",
27-
"AWS::IAM::Policy"
28-
]
24+
"allSupported": false,
25+
"includeGlobalResourceTypes": false,
26+
"resourceTypes": [
27+
"AWS::EC2::EIP",
28+
"AWS::EC2::Instance",
29+
"AWS::EC2::NetworkAcl",
30+
"AWS::EC2::SecurityGroup",
31+
"AWS::CloudTrail::Trail",
32+
"AWS::EC2::Volume",
33+
"AWS::EC2::VPC",
34+
"AWS::IAM::User",
35+
"AWS::IAM::Policy"
36+
]
2937
}
3038

3139
Before you can specify resource types for the `resourceTypes` key, you must set the `allSupported` and `includeGlobalResourceTypes` options to false or omit them.
3240

3341
If the command succeeds, AWS Config returns no output. To verify the settings of your configuration recorder, run the `describe-configuration-recorders`__ command.
3442

43+
.. __: http://docs.aws.amazon.com/cli/latest/reference/configservice/describe-configuration-recorders.html
44+
45+
**Example 3: To select all supported resources excluding specific types of resources**
46+
47+
The following command creates a configuration recorder that tracks changes to all current and future supported resource types excluding those types of resources that are specified in the JSON file for the `--recording-group` option::
48+
49+
aws configservice put-configuration-recorder \
50+
--configuration-recorder name=default,roleARN=arn:aws:iam::123456789012:role/config-role \
51+
--recording-group file://recordingGroup.json
52+
53+
`recordingGroup.json` is a JSON file that specifies the types of resources that AWS Config will record::
54+
55+
{
56+
"allSupported": false,
57+
"exclusionByResourceTypes": {
58+
"resourceTypes": [
59+
"AWS::Redshift::ClusterSnapshot",
60+
"AWS::RDS::DBClusterSnapshot",
61+
"AWS::CloudFront::StreamingDistribution"
62+
]
63+
},
64+
"includeGlobalResourceTypes": false,
65+
"recordingStrategy": {
66+
"useOnly": "EXCLUSION_BY_RESOURCE_TYPES"
67+
},
68+
}
69+
70+
Before you can specify resource types to excluding from recording: 1) You must set the allSupported and includeGlobalResourceTypes options to false or omit them, and 2) You must set the useOnly field of RecordingStrategy to EXCLUSION_BY_RESOURCE_TYPES.
71+
72+
If the command succeeds, AWS Config returns no output. To verify the settings of your configuration recorder, run the `describe-configuration-recorders`__ command.
73+
3574
.. __: http://docs.aws.amazon.com/cli/latest/reference/configservice/describe-configuration-recorders.html
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,76 @@
1-
**Example 1: To describe one or more of your capacity reservations**
2-
3-
The following ``describe-capacity-reservations`` example displays details about all of your capacity reservations in the current AWS Region. ::
4-
5-
aws ec2 describe-capacity-reservations
6-
7-
Output::
8-
9-
{
10-
"CapacityReservations": [
11-
{
12-
"CapacityReservationId": "cr-1234abcd56EXAMPLE ",
13-
"EndDateType": "unlimited",
14-
"AvailabilityZone": "eu-west-1a",
15-
"InstanceMatchCriteria": "open",
16-
"Tags": [],
17-
"EphemeralStorage": false,
18-
"CreateDate": "2019-08-16T09:03:18.000Z",
19-
"AvailableInstanceCount": 1,
20-
"InstancePlatform": "Linux/UNIX",
21-
"TotalInstanceCount": 1,
22-
"State": "active",
23-
"Tenancy": "default",
24-
"EbsOptimized": true,
25-
"InstanceType": "a1.medium"
26-
},
27-
{
28-
"CapacityReservationId": "cr-abcdEXAMPLE9876ef ",
29-
"EndDateType": "unlimited",
30-
"AvailabilityZone": "eu-west-1a",
31-
"InstanceMatchCriteria": "open",
32-
"Tags": [],
33-
"EphemeralStorage": false,
34-
"CreateDate": "2019-08-07T11:34:19.000Z",
35-
"AvailableInstanceCount": 3,
36-
"InstancePlatform": "Linux/UNIX",
37-
"TotalInstanceCount": 3,
38-
"State": "cancelled",
39-
"Tenancy": "default",
40-
"EbsOptimized": true,
41-
"InstanceType": "m5.large"
42-
}
43-
]
44-
}
45-
46-
**Example 2: To describe one or more of your capacity reservations**
47-
48-
The following ``describe-capacity-reservations`` example displays details about the specified capacity reservation. ::
49-
50-
aws ec2 describe-capacity-reservations \
51-
--capacity-reservation-id cr-1234abcd56EXAMPLE
52-
53-
Output::
54-
55-
{
56-
"CapacityReservations": [
57-
{
58-
"CapacityReservationId": "cr-1234abcd56EXAMPLE",
59-
"EndDateType": "unlimited",
60-
"AvailabilityZone": "eu-west-1a",
61-
"InstanceMatchCriteria": "open",
62-
"Tags": [],
63-
"EphemeralStorage": false,
64-
"CreateDate": "2019-08-16T09:03:18.000Z",
65-
"AvailableInstanceCount": 1,
66-
"InstancePlatform": "Linux/UNIX",
67-
"TotalInstanceCount": 1,
68-
"State": "active",
69-
"Tenancy": "default",
70-
"EbsOptimized": true,
71-
"InstanceType": "a1.medium"
72-
}
73-
]
74-
}
75-
76-
For more information, see `Viewing a Capacity Reservation <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/capacity-reservations-using.html#capacity-reservations-view>`__ in the *Amazon Elastic Compute Cloud User Guide for Linux Instances*.
1+
**Example 1: To describe one or more of your capacity reservations**
2+
3+
The following ``describe-capacity-reservations`` example displays details about all of your capacity reservations in the current AWS Region. ::
4+
5+
aws ec2 describe-capacity-reservations
6+
7+
Output::
8+
9+
{
10+
"CapacityReservations": [
11+
{
12+
"CapacityReservationId": "cr-1234abcd56EXAMPLE ",
13+
"EndDateType": "unlimited",
14+
"AvailabilityZone": "eu-west-1a",
15+
"InstanceMatchCriteria": "open",
16+
"Tags": [],
17+
"EphemeralStorage": false,
18+
"CreateDate": "2019-08-16T09:03:18.000Z",
19+
"AvailableInstanceCount": 1,
20+
"InstancePlatform": "Linux/UNIX",
21+
"TotalInstanceCount": 1,
22+
"State": "active",
23+
"Tenancy": "default",
24+
"EbsOptimized": true,
25+
"InstanceType": "a1.medium"
26+
},
27+
{
28+
"CapacityReservationId": "cr-abcdEXAMPLE9876ef ",
29+
"EndDateType": "unlimited",
30+
"AvailabilityZone": "eu-west-1a",
31+
"InstanceMatchCriteria": "open",
32+
"Tags": [],
33+
"EphemeralStorage": false,
34+
"CreateDate": "2019-08-07T11:34:19.000Z",
35+
"AvailableInstanceCount": 3,
36+
"InstancePlatform": "Linux/UNIX",
37+
"TotalInstanceCount": 3,
38+
"State": "cancelled",
39+
"Tenancy": "default",
40+
"EbsOptimized": true,
41+
"InstanceType": "m5.large"
42+
}
43+
]
44+
}
45+
46+
**Example 2: To describe one or more of your capacity reservations**
47+
48+
The following ``describe-capacity-reservations`` example displays details about the specified capacity reservation. ::
49+
50+
aws ec2 describe-capacity-reservations \
51+
--capacity-reservation-ids cr-1234abcd56EXAMPLE
52+
53+
Output::
54+
55+
{
56+
"CapacityReservations": [
57+
{
58+
"CapacityReservationId": "cr-1234abcd56EXAMPLE",
59+
"EndDateType": "unlimited",
60+
"AvailabilityZone": "eu-west-1a",
61+
"InstanceMatchCriteria": "open",
62+
"Tags": [],
63+
"EphemeralStorage": false,
64+
"CreateDate": "2019-08-16T09:03:18.000Z",
65+
"AvailableInstanceCount": 1,
66+
"InstancePlatform": "Linux/UNIX",
67+
"TotalInstanceCount": 1,
68+
"State": "active",
69+
"Tenancy": "default",
70+
"EbsOptimized": true,
71+
"InstanceType": "a1.medium"
72+
}
73+
]
74+
}
75+
76+
For more information, see `Viewing a Capacity Reservation <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/capacity-reservations-using.html#capacity-reservations-view>`__ in the *Amazon Elastic Compute Cloud User Guide for Linux Instances*.

awscli/examples/ec2/describe-export-image-tasks.rst

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
**To monitor an export image task**
22

3-
The following ``describe-export-image-tasks`` example checks the status of the specified export image task. ::
3+
The following ``describe-export-image-tasks`` example checks the status of the specified export image task. The resulting image file in Amazon S3 is ``my-export-bucket/exports/export-ami-1234567890abcdef0.vmdk``. ::
44

55
aws ec2 describe-export-image-tasks \
6-
--export-image-task-id export-ami-1234567890abcdef0
6+
--export-image-task-ids export-ami-1234567890abcdef0
77

8-
Output for an export image task that is in progress::
8+
Output for an export image task that is in progress. ::
99

1010
{
1111
"ExportImageTasks": [
@@ -22,7 +22,7 @@ Output for an export image task that is in progress::
2222
]
2323
}
2424

25-
Output for an export image task that is completed. The resulting image file in Amazon S3 is ``my-export-bucket/exports/export-ami-1234567890abcdef0.vmdk``. ::
25+
Output for an export image task that is completed. ::
2626

2727
{
2828
"ExportImageTasks": [
@@ -36,3 +36,5 @@ Output for an export image task that is completed. The resulting image file in A
3636
}
3737
]
3838
}
39+
40+
For more information, see `Export a VM from an AMI <https://docs.aws.amazon.com/vm-import/latest/userguide/vmexport_image.html>`__ in the *VM Import/Export User Guide*.

awscli/examples/ec2/describe-fleet-history.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
The following ``describe-fleet-history`` example returns the history for the specified EC2 Fleet starting at the specified time. The output is for an EC2 Fleet with two running instances. ::
44

55
aws ec2 describe-fleet-history \
6-
--fleet-ids fleet-12a34b55-67cd-8ef9-ba9b-9208dEXAMPLE \
6+
--fleet-id fleet-12a34b55-67cd-8ef9-ba9b-9208dEXAMPLE \
77
--start-time 2020-09-01T00:00:00Z
88

99
Output::
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
1-
**To describe the credit option for CPU usage of one or more instances**
2-
3-
This example describes the current credit option for CPU usage of the specified instance.
4-
5-
Command::
6-
7-
aws ec2 describe-instance-credit-specifications --instance-id i-1234567890abcdef0
8-
9-
Output::
10-
11-
{
12-
"InstanceCreditSpecifications": [
13-
{
14-
"InstanceId": "i-1234567890abcdef0",
15-
"CpuCredits": "unlimited"
16-
}
17-
]
18-
}
1+
**To describe the credit option for CPU usage of one or more instances**
2+
3+
The following ``describe-instance-credit-specifications`` example describes the CPU credit option for the specified instance. ::
4+
5+
aws ec2 describe-instance-credit-specifications \
6+
--instance-ids i-1234567890abcdef0
7+
8+
Output::
9+
10+
{
11+
"InstanceCreditSpecifications": [
12+
{
13+
"InstanceId": "i-1234567890abcdef0",
14+
"CpuCredits": "unlimited"
15+
}
16+
]
17+
}
18+
19+
For more information, see `Work with burstable performance instances <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances-how-to.html>`__ in the *Amazon EC2 User Guide*.

awscli/examples/ec2/describe-instance-event-windows.rst

+3-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
**Example 1: To describe all event windows**
22

3-
The following ``describe-instance-event-windows`` example describes all event windows. ::
3+
The following ``describe-instance-event-windows`` example describes all event windows in the specified Region. ::
44

55
aws ec2 describe-instance-event-windows \
66
--region us-east-1
@@ -31,15 +31,13 @@ Output::
3131
"NextToken": "9d624e0c-388b-4862-a31e-a85c64fc1d4a"
3232
}
3333

34-
For event window constraints, see `Considerations <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/event-windows.html#event-windows-considerations>`__ in the Scheduled Events section of the *Amazon EC2 User Guide*.
35-
3634
**Example 2: To describe a specific event window**
3735

3836
The following ``describe-instance-event-windows`` example describes a specific event by using the ``instance-event-window`` parameter to describe a specific event window. ::
3937

4038
aws ec2 describe-instance-event-windows \
4139
--region us-east-1 \
42-
--instance-event-window-id iew-0abcdef1234567890
40+
--instance-event-window-ids iew-0abcdef1234567890
4341

4442
Output::
4543

@@ -62,8 +60,6 @@ Output::
6260
}
6361
}
6462

65-
For event window constraints, see `Considerations <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/event-windows.html#event-windows-considerations>`__ in the Scheduled Events section of the *Amazon EC2 User Guide*.
66-
6763
**Example 3: To describe event windows that match one or more filters**
6864

6965
The following ``describe-instance-event-windows`` example describes event windows that match one or more filters using the ``filter`` parameter. The ``instance-id`` filter is used to describe all of the event windows that are associated with the specified instance. When a filter is used, it performs a direct match. However, the ``instance-id`` filter is different. If there is no direct match to the instance ID, then it falls back to indirect associations with the event window, such as the tags of the instance or Dedicated Host ID (if the instance is a Dedicated Host). ::
@@ -104,4 +100,4 @@ Output::
104100

105101
In the example output, the instance is on a Dedicated Host, which is associated with the event window.
106102

107-
For event window constraints, see `Considerations <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/event-windows.html#event-windows-considerations>`__ in the Scheduled Events section of the *Amazon EC2 User Guide*.
103+
For event window constraints, see `Considerations <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/event-windows.html#event-windows-considerations>`__ in the *Amazon EC2 User Guide*.

0 commit comments

Comments
 (0)