forked from aws/aws-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* release-1.7.41: Bumping version to 1.7.41 Update CHANGELOG Fix preview snippet for operation commands fix formatting errors glacier get-job-output example new SNS examples More examples New examples for Amazon Glacier
- Loading branch information
Showing
31 changed files
with
428 additions
and
15 deletions.
There are no files selected for viewing
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
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,5 @@ | ||
The following command adds two tags to a vault named ``my-vault``:: | ||
|
||
aws glacier add-tags-to-vault --account-id - --vault-name my-vault --tags id=1234,date=july2015 | ||
|
||
Amazon Glacier requires an account ID argument when performing operations, but you can use a hyphen to specify the in-use account. |
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,20 @@ | ||
The following command retrieves information about an inventory retrieval job on a vault named ``my-vault``:: | ||
|
||
aws glacier describe-job --account-id - --vault-name my-vault --job-id zbxcm3Z_3z5UkoroF7SuZKrxgGoDc3RloGduS7Eg-RO47Yc6FxsdGBgf_Q2DK5Ejh18CnTS5XW4_XqlNHS61dsO4CnMW | ||
|
||
Output:: | ||
|
||
{ | ||
"InventoryRetrievalParameters": { | ||
"Format": "JSON" | ||
}, | ||
"VaultARN": "arn:aws:glacier:us-west-2:0123456789012:vaults/my-vault", | ||
"Completed": false, | ||
"JobId": "zbxcm3Z_3z5UkoroF7SuZKrxgGoDc3RloGduS7Eg-RO47Yc6FxsdGBgf_Q2DK5Ejh18CnTS5XW4_XqlNHS61dsO4CnMW", | ||
"Action": "InventoryRetrieval", | ||
"CreationDate": "2015-07-17T20:23:41.616Z", | ||
"StatusCode": "InProgress" | ||
} | ||
|
||
The job ID can be found in the output of ``aws glacier initiate-job`` and ``aws glacier list-jobs``. | ||
Amazon Glacier requires an account ID argument when performing operations, but you can use a hyphen to specify the in-use account. |
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,18 @@ | ||
The following command gets the data retrieval policy for the in-use account:: | ||
|
||
aws glacier get-data-retrieval-policy --account-id - | ||
|
||
Output:: | ||
|
||
{ | ||
"Policy": { | ||
"Rules": [ | ||
{ | ||
"BytesPerHour": 10737418240, | ||
"Strategy": "BytesPerHour" | ||
} | ||
] | ||
} | ||
} | ||
|
||
Amazon Glacier requires an account ID argument when performing operations, but you can use a hyphen to specify the in-use account. |
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,17 @@ | ||
The following command saves the output from a vault inventory job to a file in the current directory named ``output.json``:: | ||
|
||
aws glacier get-job-output --account-id - --vault-name my-vault --job-id zbxcm3Z_3z5UkoroF7SuZKrxgGoDc3RloGduS7Eg-RO47Yc6FxsdGBgf_Q2DK5Ejh18CnTS5XW4_XqlNHS61dsO4CnMW output.json | ||
|
||
The ``job-id`` is available in the output of ``aws glacier list-jobs``. Note that the output file name is a positional argument that is not prefixed by an option name. Amazon Glacier requires an account ID argument when performing operations, but you can use a hyphen to specify the in-use account. | ||
|
||
Output:: | ||
|
||
{ | ||
"status": 200, | ||
"acceptRanges": "bytes", | ||
"contentType": "application/json" | ||
} | ||
|
||
``output.json``:: | ||
|
||
{"VaultARN":"arn:aws:glacier:us-west-2:0123456789012:vaults/my-vault","InventoryDate":"2015-04-07T00:26:18Z","ArchiveList":[{"ArchiveId":"kKB7ymWJVpPSwhGP6ycSOAekp9ZYe_--zM_mw6k76ZFGEIWQX-ybtRDvc2VkPSDtfKmQrj0IRQLSGsNuDp-AJVlu2ccmDSyDUmZwKbwbpAdGATGDiB3hHO0bjbGehXTcApVud_wyDw","ArchiveDescription":"multipart upload test","CreationDate":"2015-04-06T22:24:34Z","Size":3145728,"SHA256TreeHash":"9628195fcdbcbbe76cdde932d4646fa7de5f219fb39823836d81f0cc0e18aa67"}]} |
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,17 @@ | ||
The following command gets a description of the notification configuration for a vault named ``my-vault``:: | ||
|
||
aws glacier get-vault-notifications --account-id - --vault-name my-vault | ||
|
||
Output:: | ||
|
||
{ | ||
"vaultNotificationConfig": { | ||
"Events": [ | ||
"InventoryRetrievalCompleted", | ||
"ArchiveRetrievalCompleted" | ||
], | ||
"SNSTopic": "arn:aws:sns:us-west-2:0123456789012:my-vault" | ||
} | ||
} | ||
|
||
If no notifications have been configured for the vault, an error is returned. Amazon Glacier requires an account ID argument when performing operations, but you can use a hyphen to specify the in-use account. |
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,38 @@ | ||
The following command initiates a job to get an inventory of the vault ``my-vault``:: | ||
|
||
aws glacier initiate-job --account-id - --vault-name my-vault --job-parameters '{"Type": "inventory-retrieval"}' | ||
|
||
Output:: | ||
|
||
{ | ||
"location": "/0123456789012/vaults/my-vault/jobs/zbxcm3Z_3z5UkoroF7SuZKrxgGoDc3RloGduS7Eg-RO47Yc6FxsdGBgf_Q2DK5Ejh18CnTS5XW4_XqlNHS61dsO4CnMW", | ||
"jobId": "zbxcm3Z_3z5UkoroF7SuZKrxgGoDc3RloGduS7Eg-RO47Yc6FxsdGBgf_Q2DK5Ejh18CnTS5XW4_XqlNHS61dsO4CnMW" | ||
} | ||
|
||
Amazon Glacier requires an account ID argument when performing operations, but you can use a hyphen to specify the in-use account. | ||
|
||
The following command initiates a job to retrieve an archive from the vault ``my-vault``:: | ||
|
||
aws glacier initiate-job --account-id - --vault-name my-vault --job-parameters file://job-archive-retrieval.json | ||
|
||
``job-archive-retrieval.json`` is a JSON file in the local folder that specifies the type of job, archive ID, and some optional parameters:: | ||
|
||
{ | ||
"Type": "archive-retrieval", | ||
"ArchiveId": "kKB7ymWJVpPSwhGP6ycSOAekp9ZYe_--zM_mw6k76ZFGEIWQX-ybtRDvc2VkPSDtfKmQrj0IRQLSGsNuDp-AJVlu2ccmDSyDUmZwKbwbpAdGATGDiB3hHO0bjbGehXTcApVud_wyDw", | ||
"Description": "Retrieve archive on 2015-07-17", | ||
"SNSTopic": "arn:aws:sns:us-west-2:0123456789012:my-topic" | ||
} | ||
|
||
Archive IDs are available in the output of ``aws glacier upload-archive`` and ``aws glacier get-job-output``. | ||
|
||
Output:: | ||
|
||
{ | ||
"location": "/011685312445/vaults/mwunderl/jobs/l7IL5-EkXyEY9Ws95fClzIbk2O5uLYaFdAYOi-azsX_Z8V6NH4yERHzars8wTKYQMX6nBDI9cMNHzyZJO59-8N9aHWav", | ||
"jobId": "l7IL5-EkXy2O5uLYaFdAYOiEY9Ws95fClzIbk-azsX_Z8V6NH4yERHzars8wTKYQMX6nBDI9cMNHzyZJO59-8N9aHWav" | ||
} | ||
|
||
See `Initiate Job`_ in the *Amazon Glacier API Reference* for details on the job parameters format. | ||
|
||
.. _`Initiate Job`: http://docs.aws.amazon.com/amazonglacier/latest/dev/api-initiate-job-post.html |
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,38 @@ | ||
The following command lists in-progress and recently completed jobs for a vault named ``my-vault``:: | ||
|
||
aws glacier list-jobs --account-id - --vault-name my-vault | ||
|
||
Output:: | ||
|
||
{ | ||
"JobList": [ | ||
{ | ||
"VaultARN": "arn:aws:glacier:us-west-2:0123456789012:vaults/my-vault", | ||
"RetrievalByteRange": "0-3145727", | ||
"SNSTopic": "arn:aws:sns:us-west-2:0123456789012:my-vault", | ||
"Completed": false, | ||
"SHA256TreeHash": "9628195fcdbcbbe76cdde932d4646fa7de5f219fb39823836d81f0cc0e18aa67", | ||
"JobId": "l7IL5-EkXyEY9Ws95fClzIbk2O5uLYaFdAYOi-azsX_Z8V6NH4yERHzars8wTKYQMX6nBDI9cMNHzyZJO59-8N9aHWav", | ||
"ArchiveId": "kKB7ymWJVpPSwhGP6ycSOAekp9ZYe_--zM_mw6k76ZFGEIWQX-ybtRDvc2VkPSDtfKmQrj0IRQLSGsNuDp-AJVlu2ccmDSyDUmZwKbwbpAdGATGDiB3hHO0bjbGehXTcApVud_wyDw", | ||
"JobDescription": "Retrieve archive on 2015-07-17", | ||
"ArchiveSizeInBytes": 3145728, | ||
"Action": "ArchiveRetrieval", | ||
"ArchiveSHA256TreeHash": "9628195fcdbcbbe76cdde932d4646fa7de5f219fb39823836d81f0cc0e18aa67", | ||
"CreationDate": "2015-07-17T21:16:13.840Z", | ||
"StatusCode": "InProgress" | ||
}, | ||
{ | ||
"InventoryRetrievalParameters": { | ||
"Format": "JSON" | ||
}, | ||
"VaultARN": "arn:aws:glacier:us-west-2:0123456789012:vaults/my-vault", | ||
"Completed": false, | ||
"JobId": "zbxcm3Z_3z5UkoroF7SuZKrxgGoDc3RloGduS7Eg-RO47Yc6FxsdGBgf_Q2DK5Ejh18CnTS5XW4_XqlNHS61dsO4CnMW", | ||
"Action": "InventoryRetrieval", | ||
"CreationDate": "2015-07-17T20:23:41.616Z", | ||
"StatusCode": ""InProgress"" | ||
} | ||
] | ||
} | ||
|
||
Amazon Glacier requires an account ID argument when performing operations, but you can use a hyphen to specify the in-use account. |
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,28 @@ | ||
The following command lists the uploaded parts for a multipart upload to a vault named ``my-vault``:: | ||
|
||
aws glacier list-parts --account-id - --vault-name my-vault --upload-id "SYZi7qnL-YGqGwAm8Kn3BLP2ElNCvnB-5961R09CSaPmPwkYGHOqeN_nX3-Vhnd2yF0KfB5FkmbnBU9GubbdrCs8ut-D" | ||
|
||
Output:: | ||
|
||
{ | ||
"MultipartUploadId": "SYZi7qnL-YGqGwAm8Kn3BLP2ElNCvnB-5961R09CSaPmPwkYGHOqeN_nX3-Vhnd2yF0KfB5FkmbnBU9GubbdrCs8ut-D", | ||
"Parts": [ | ||
{ | ||
"RangeInBytes": "0-1048575", | ||
"SHA256TreeHash": "e1f2a7cd6e047350f69b9f8cfa60fa606fe2f02802097a9a026360a7edc1f553" | ||
}, | ||
{ | ||
"RangeInBytes": "1048576-2097151", | ||
"SHA256TreeHash": "43cf3061fb95796aed99a11a6aa3cd8f839eed15e655ab0a597126210636aee6" | ||
} | ||
], | ||
"VaultARN": "arn:aws:glacier:us-west-2:0123456789012:vaults/my-vault", | ||
"CreationDate": "2015-07-18T00:05:23.830Z", | ||
"PartSizeInBytes": 1048576 | ||
} | ||
|
||
Amazon Glacier requires an account ID argument when performing operations, but you can use a hyphen to specify the in-use account. | ||
|
||
For more information on multipart uploads to Amazon Glacier using the AWS CLI, see `Using Amazon Glacier`_ in the *AWS CLI User Guide*. | ||
|
||
.. _`Using Amazon Glacier`: http://docs.aws.amazon.com/cli/latest/userguide/cli-using-glacier.html |
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,14 @@ | ||
The following command lists the tags applied to a vault named ``my-vault``:: | ||
|
||
aws glacier list-tags-for-vault --account-id - --vault-name my-vault | ||
|
||
Output:: | ||
|
||
{ | ||
"Tags": { | ||
"date": "july2015", | ||
"id": "1234" | ||
} | ||
} | ||
|
||
Amazon Glacier requires an account ID argument when performing operations, but you can use a hyphen to specify the in-use account. |
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,20 @@ | ||
The following command lists the vaults in the default account and region:: | ||
|
||
aws glacier list-vaults --account-id - | ||
|
||
Output:: | ||
|
||
{ | ||
"VaultList": [ | ||
{ | ||
"SizeInBytes": 3178496, | ||
"VaultARN": "arn:aws:glacier:us-west-2:0123456789012:vaults/my-vault", | ||
"LastInventoryDate": "2015-04-07T00:26:19.028Z", | ||
"VaultName": "my-vault", | ||
"NumberOfArchives": 1, | ||
"CreationDate": "2015-04-06T21:23:45.708Z" | ||
} | ||
] | ||
} | ||
|
||
Amazon Glacier requires an account ID argument when performing operations, but you can use a hyphen to specify the in-use account. |
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,5 @@ | ||
The following command removes a tag with the key ``date`` from a vault named ``my-vault``:: | ||
|
||
aws glacier remove-tags-from-vault --account-id - --vault-name my-vault --tag-keys date | ||
|
||
Amazon Glacier requires an account ID argument when performing operations, but you can use a hyphen to specify the in-use account. |
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,24 @@ | ||
The following command configures a data retrieval policy for the in-use account:: | ||
|
||
aws glacier set-data-retrieval-policy --account-id - --policy file://data-retrieval-policy.json | ||
|
||
``data-retrieval-policy.json`` is a JSON file in the current folder that specifies a data retrieval policy:: | ||
|
||
{ | ||
"Rules":[ | ||
{ | ||
"Strategy":"BytesPerHour", | ||
"BytesPerHour":10737418240 | ||
} | ||
] | ||
} | ||
|
||
Amazon Glacier requires an account ID argument when performing operations, but you can use a hyphen to specify the in-use account. | ||
|
||
The following command sets the data retrieval policy to ``FreeTier`` using inline JSON:: | ||
|
||
aws glacier set-data-retrieval-policy --account-id - --policy '{"Rules":[{"Strategy":"FreeTier"}]}' | ||
|
||
See `Set Data Retrieval Policy`_ in the *Amazon Glacier API Reference* for details on the policy format. | ||
|
||
.. _`Set Data Retrieval Policy`: http://docs.aws.amazon.com/amazonglacier/latest/dev/api-SetDataRetrievalPolicy.html |
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,12 @@ | ||
The following command configures SNS notifications for a vault named ``my-vault``:: | ||
|
||
aws glacier set-vault-notifications --account-id - --vault-name my-vault --vault-notification-config file://notificationconfig.json | ||
|
||
``notificationconfig.json`` is a JSON file in the current folder that specifies an SNS topic and the events to publish:: | ||
|
||
{ | ||
"SNSTopic": "arn:aws:sns:us-west-2:0123456789012:my-vault", | ||
"Events": ["ArchiveRetrievalCompleted", "InventoryRetrievalCompleted"] | ||
} | ||
|
||
Amazon Glacier requires an account ID argument when performing operations, but you can use a hyphen to specify the in-use account. |
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,13 @@ | ||
The following command uploads an archive in the current folder named ``archive.zip`` to a vault named ``my-vault``:: | ||
|
||
aws glacier upload-archive --account-id - --vault-name my-vault --body archive.zip | ||
|
||
Output:: | ||
|
||
{ | ||
"archiveId": "kKB7ymWJVpPSwhGP6ycSOAekp9ZYe_--zM_mw6k76ZFGEIWQX-ybtRDvc2VkPSDtfKmQrj0IRQLSGsNuDp-AJVlu2ccmDSyDUmZwKbwbpAdGATGDiB3hHO0bjbGehXTcApVud_wyDw", | ||
"checksum": "969fb39823836d81f0cc028195fcdbcbbe76cdde932d4646fa7de5f21e18aa67", | ||
"location": "/0123456789012/vaults/my-vault/archives/kKB7ymWJVpPSwhGP6ycSOAekp9ZYe_--zM_mw6k76ZFGEIWQX-ybtRDvc2VkPSDtfKmQrj0IRQLSGsNuDp-AJVlu2ccmDSyDUmZwKbwbpAdGATGDiB3hHO0bjbGehXTcApVud_wyDw" | ||
} | ||
|
||
Amazon Glacier requires an account ID argument when performing operations, but you can use a hyphen to specify the in-use account. |
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,11 @@ | ||
The following command confirms a subscription to an SNS topic named ``my-topic``:: | ||
|
||
aws sns confirm-subscription --topic-arn arn:aws:sns:us-west-2:0123456789012:my-topic --token 2336412f37fb687f5d51e6e241d7700ae02f7124d8268910b858cb4db727ceeb2474bb937929d3bdd7ce5d0cce19325d036bc858d3c217426bcafa9c501a2cace93b83f1dd3797627467553dc438a8c974119496fc3eff026eaa5d14472ded6f9a5c43aec62d83ef5f49109da7176391 | ||
|
||
The token is included in the confirmation message sent to the notification endpoint specified in the subscribe call. | ||
|
||
Output:: | ||
|
||
{ | ||
"SubscriptionArn": "arn:aws:sns:us-west-2:0123456789012:my-topic:8a21d249-4329-4871-acc6-7be709c6ea7f" | ||
} |
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,3 @@ | ||
The following command deletes an SNS topic named ``my-topic``:: | ||
|
||
aws sns delete-topic --topic-arn "arn:aws:sns:us-west-2:0123456789012:my-topic" |
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 @@ | ||
The following command gets the attributes of a subscription to a topic named ``my-topic``:: | ||
|
||
aws sns get-subscription-attributes --subscription-arn "arn:aws:sns:us-west-2:0123456789012:my-topic:8a21d249-4329-4871-acc6-7be709c6ea7f" | ||
|
||
The ``subscription-arn`` is available in the output of ``aws sns list-subscriptions``. | ||
|
||
Output:: | ||
|
||
{ | ||
"Attributes": { | ||
"Endpoint": "[email protected]", | ||
"Protocol": "email", | ||
"RawMessageDelivery": "false", | ||
"ConfirmationWasAuthenticated": "false", | ||
"Owner": "0123456789012", | ||
"SubscriptionArn": "arn:aws:sns:us-west-2:0123456789012:my-topic:8a21d249-4329-4871-acc6-7be709c6ea7f", | ||
"TopicArn": "arn:aws:sns:us-west-2:0123456789012:my-topic" | ||
} | ||
} |
Oops, something went wrong.