| « PreviousNext » | |
![]() ![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
This operation lists all vaults owned by the calling user’s account. The list returned in the response is ASCII-sorted by vault name.
By default, this operation returns up to 1,000 items. If there are more vaults to list, the
marker field in the response body contains the vault Amazon Resource
Name (ARN) at which to continue the list with a new List Vaults request; otherwise, the
marker field is null. In your next List Vaults request you
set the marker parameter to the value Amazon Glacier returned in the
responses to your previous List Vaults request. You can also limit the number of vaults
returned in the response by specifying the limit parameter in the request.
To get a list of vaults, you send a GET request to the
vaults resource.
GET /AccountId/vaults HTTP/1.1 Host: glacier.Region.amazonaws.com Date:DateAuthorization:SignatureValuex-amz-glacier-version: 2012-06-01
Note
The AccountId is the AWS Account ID. This value must match the AWS Account ID associated with the credentials used to sign the request. You can either specify AWS Account ID or optionally a '-' in which case Amazon Glacier uses the AWS Account ID associated with the credentials used to sign the request. If you specify your Account ID, do not include dashes in it.
This operation uses the following request parameters.
| Name | Description | Required |
|---|---|---|
limit
|
The maximum number of items returned in the response. If you don't specify a value, the List Vaults operation returns up to 1,000 items. Type: Number. Constraints: Minimum value of 1. Maximum value of 1000. | No |
marker
|
A string used for pagination. Type: String Constraints: None | No |
This operation uses only request headers that are common to all operations. For information about common request headers, see Common Request Headers.
This operation does not have a request body.
HTTP/1.1 200 OK x-amzn-RequestId: x-amzn-RequestId Date: Date Content-Type: application/json Content-Length: Length { "Marker": String "VaultList": [ { "CreationDate": String, "LastInventoryDate": String, "NumberOfArchives": Number, "SizeInBytes": Number, "VaultARN": String, "VaultName": String }, ... ] }
This operation uses only response headers that are common to most responses. For information about common response headers, see Common Response Headers.
The response body contains the following JSON fields.
The date the vault was created, in Coordinated Universal Time (UTC).
Type: String. A string representation of ISO 8601 date format, for example, 2012-03-20T17:03:43.221Z.
The date of the last vault inventory, in Coordinated Universal Time (UTC). This field can be null if an inventory has not yet run on the vault, for example, if you just created the vault. For information about initiating an inventory for a vault, see Initiate a Job (POST jobs).
Type: A string representation of ISO 8601 date format, for example, 2012-03-20T17:03:43.221Z.
The vaultARN that represents where to continue pagination of the results.
You use the marker in another List Vaults request to
obtain more vaults in the list. If there are no more vaults, this
value is null.
Type: String
The number of archives in the vault as of the last inventory date.
Type: Number
The total size, in bytes, of all the archives in the vault including any per-archive overhead, as of the last inventory date.
Type: Number
The Amazon Resource Name (ARN) of the vault.
Type: String
An array of objects, with each object providing a description of a vault.
Type: Array
The vault name.
Type: String
For information about Amazon Glacier exceptions and error messages, see Error Responses.
The following example lists vaults. Because the marker and limit
parameters are not specified in the request, up to 1,000 vaults are returned.
GET /-/vaults HTTP/1.1 Host: glacier.us-east-1.amazonaws.com x-amz-Date: 20120325T120000Z x-amz-glacier-version: 2012-06-01 Authorization: AWS4-HMAC-SHA256 Credential=AKIAIOSFODNN7EXAMPLE/20120525/us-east-1/glacier/aws4_request,SignedHeaders=host;x-amz-date;x-amz-glacier-version,Signature=9257c16da6b25a715ce900a5b45b03da0447acf430195dcb540091b12966f2a2
The Marker is null indicating there are no more vaults to
list.
HTTP/1.1 200 OK
x-amzn-RequestId: AAABZpJrTyioDC_HsOmHae8EZp_uBSJr6cnGOLKp_XJCl-Q
Date: Sun, 25 Mar 2012 12:02:00 GMT
Content-Type: application/json
Content-Length: 497
{
"Marker": null,
"VaultList": [
{
"CreationDate": "2012-03-16T22:22:47.214Z",
"LastInventoryDate": "2012-03-21T22:06:51.218Z",
"NumberOfArchives": 2,
"SizeInBytes": 12334,
"VaultARN": "arn:aws:glacier:us-east-1:012345678901:vaults/examplevault1",
"VaultName": "examplevault1"
},
{
"CreationDate": "2012-03-19T22:06:51.218Z",
"LastInventoryDate": "2012-03-21T22:06:51.218Z",
"NumberOfArchives": 0,
"SizeInBytes": 0,
"VaultARN": "arn:aws:glacier:us-east-1:012345678901:vaults/examplevault2",
"VaultName": "examplevault2"
},
{
"CreationDate": "2012-03-19T22:06:51.218Z",
"LastInventoryDate": "2012-03-25T12:14:31.121Z",
"NumberOfArchives": 0,
"SizeInBytes": 0,
"VaultARN": "arn:aws:glacier:us-east-1:012345678901:vaults/examplevault3",
"VaultName": "examplevault3"
}
]
}The following example returns two vaults starting at the vault specified by the
marker.
GET /-/vaults?limit=2&marker=arn:aws:glacier:us-east-1:012345678901:vaults/examplevault1 HTTP/1.1 Host: glacier.us-east-1.amazonaws.com x-amz-Date: 20120325T120000Z x-amz-glacier-version: 2012-06-01 Authorization: AWS4-HMAC-SHA256 Credential=AKIAIOSFODNN7EXAMPLE/20120525/us-east-1/glacier/aws4_request,SignedHeaders=host;x-amz-date;x-amz-glacier-version,Signature=9257c16da6b25a715ce900a5b45b03da0447acf430195dcb540091b12966f2a2
Two vaults are returned in the list. The Marker contains the
vault ARN to continue pagination in another List Vaults request.
HTTP/1.1 200 OK
x-amzn-RequestId: AAABZpJrTyioDC_HsOmHae8EZp_uBSJr6cnGOLKp_XJCl-Q
Date: Sun, 25 Mar 2012 12:02:00 GMT
Content-Type: application/json
Content-Length: 497
{
"Marker": "arn:aws:glacier:us-east-1:012345678901:vaults/examplevault3",
"VaultList": [
{
"CreationDate": "2012-03-16T22:22:47.214Z",
"LastInventoryDate": "2012-03-21T22:06:51.218Z",
"NumberOfArchives": 2,
"SizeInBytes": 12334,
"VaultARN": "arn:aws:glacier:us-east-1:012345678901:vaults/examplevault1",
"VaultName": "examplevault1"
},
{
"CreationDate": "2012-03-19T22:06:51.218Z",
"LastInventoryDate": "2012-03-21T22:06:51.218Z",
"NumberOfArchives": 0,
"SizeInBytes": 0,
"VaultARN": "arn:aws:glacier:us-east-1:012345678901:vaults/examplevault2",
"VaultName": "examplevault2"
}
]
}