目录
简单参数示范
时间戳
aws ec2 describe-spot-price-history \
--start-time 2014-10-13T19:00:00Z
-
YYYY
-MM
-DD
Thh
:mm
:ss.sss
TZD (UTC)
,例如,2014-10-01T20:30:00.000Z -
YYYY
-MM
-DD
Thh
:mm
:ss.sss
TZD(带偏移量)
,例如,2014-10-01T12:30:00.000-08:00 -
YYYY
-MM
-DD
,例如,2014-10-01 - 以秒为单位的 Unix 时间,如 1412195400。这有时称为 Unix 纪元时间,表示自 1970 年 1 月 1 日午夜 (UTC) 以来经历的秒数。
默认 ISO 8601,你可以使用 cli_timestamp_format
文件设置来设置时间戳格式。
列表
aws ec2 describe-spot-price-history 、
--instance-types m1.xlarge m1.medium
Bool
aws ec2 describe-spot-price-history --dry-run
整数
aws ec2 describe-spot-price-history --max-items 5
Blob
aws kms encrypt \
--key-id 1234abcd-12ab-34cd-56ef-1234567890ab \
--plaintext fileb://ExamplePlaintextFile \
--output text \
--query CiphertextBlob | base64 \
--decode > ExampleEncryptedFile
dd if=/dev/urandom bs=1 count=32 > sse.key
aws s3api put-object \
--bucket my-bucket \
--key test.txt \
--body test.txt \
--sse-customer-key fileb://sse.key \
--sse-customer-algorithm AES256
Map
aws dynamodb get-item --table-name my-table \
--key '{"id": {"N":"1"}}'
{
"Item": {
"name": {
"S": "John"
},
"id": {
"N": "1"
}
}
}
Map 内字段示范
--- 字符串
--option '"value"'
--- 数字
--option 123
--option 123.456
--- 布尔值
--option true
--- Null
--option null
--- 数组
--option '["value1", "value2", "value3"]'
--option '["value", 1, true, null, ["key1", 2.34], {"key2": "value2"}]'
--- 对象
--option '{"key": "value"}'
--option '{"key1": "value1", "key2": 123, "key3": true, "key4": null, "key5": ["value3", "value4"], "key6": {"value5": "value6"}'
文件作为参数范例
输出骨架到 stdout
输出 json 骨架
aws ec2 run-instances --generate-cli-skeleton
输出 Yaml 骨架
aws ec2 run-instances --generate-cli-skeleton yaml-input
BlockDeviceMappings: # The block device mapping entries.
- DeviceName: '' # The device name (for example, /dev/sdh or xvdh).
VirtualName: '' # The virtual device name (ephemeralN).
Ebs: # Parameters used to automatically set up Amazon EBS volumes when the instance is launched.
DeleteOnTermination: true # Indicates whether the EBS volume is deleted on instance termination.
Iops: 0 # The number of I/O operations per second (IOPS) that the volume supports.
SnapshotId: '' # The ID of the snapshot.
VolumeSize: 0 # The size of the volume, in GiB.
VolumeType: st1 # The volume type. Valid values are: standard, io1, gp2, sc1, st1.
Encrypted: true # Indicates whether the encryption state of an EBS volume is changed while being restored from a backing snapshot.
KmsKeyId: '' # Identifier (key ID, key alias, ID ARN, or alias ARN) for a customer managed KMS key under which the EBS volume is encrypted.
NoDevice: '' # Suppresses the sp