Glacier class

Amazon S3 Glacier (Glacier) is a storage solution for "cold data."

Glacier is an extremely low-cost storage service that provides secure, durable, and easy-to-use storage for data backup and archival. With Glacier, customers can store their data cost effectively for months, years, or decades. Glacier also enables customers to offload the administrative burdens of operating and scaling storage to AWS, so they don't have to worry about capacity planning, hardware provisioning, data replication, hardware failure and recovery, or time-consuming hardware migrations.

Glacier is a great storage choice when low storage cost is paramount and your data is rarely retrieved. If your application requires fast or frequent access to your data, consider using Amazon S3. For more information, see Amazon Simple Storage Service (Amazon S3).

You can store any kind of data in any format. There is no maximum limit on the total amount of data you can store in Glacier.

If you are a first-time user of Glacier, we recommend that you begin by reading the following sections in the Amazon S3 Glacier Developer Guide:

  • What is Amazon S3 Glacier - This section of the Developer Guide describes the underlying data model, the operations it supports, and the AWS SDKs that you can use to interact with the service.
  • Getting Started with Amazon S3 Glacier - The Getting Started section walks you through the process of creating a vault, uploading archives, creating jobs to download archives, retrieving the job output, and deleting archives.

Constructors

Glacier({required String region, AwsClientCredentials? credentials, AwsClientCredentialsProvider? credentialsProvider, Client? client, String? endpointUrl})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

abortMultipartUpload({required String accountId, required String uploadId, required String vaultName}) Future<void>
This operation aborts a multipart upload identified by the upload ID.
abortVaultLock({required String accountId, required String vaultName}) Future<void>
This operation aborts the vault locking process if the vault lock is not in the Locked state. If the vault lock is in the Locked state when this operation is requested, the operation returns an AccessDeniedException error. Aborting the vault locking process removes the vault lock policy from the specified vault.
addTagsToVault({required String accountId, required String vaultName, Map<String, String>? tags}) Future<void>
This operation adds the specified tags to a vault. Each tag is composed of a key and a value. Each vault can have up to 10 tags. If your request would cause the tag limit for the vault to be exceeded, the operation throws the LimitExceededException error. If a tag already exists on the vault under a specified key, the existing key value will be overwritten. For more information about tags, see Tagging Amazon S3 Glacier Resources.
close() → void
Closes the internal HTTP client if none was provided at creation. If a client was passed as a constructor argument, this becomes a noop.
completeMultipartUpload({required String accountId, required String uploadId, required String vaultName, String? archiveSize, String? checksum}) Future<ArchiveCreationOutput>
You call this operation to inform Amazon S3 Glacier (Glacier) that all the archive parts have been uploaded and that Glacier can now assemble the archive from the uploaded parts. After assembling and saving the archive to the vault, Glacier returns the URI path of the newly created archive resource. Using the URI path, you can then access the archive. After you upload an archive, you should save the archive ID returned to retrieve the archive at a later point. You can also get the vault inventory to obtain a list of archive IDs in a vault. For more information, see InitiateJob.
completeVaultLock({required String accountId, required String lockId, required String vaultName}) Future<void>
This operation completes the vault locking process by transitioning the vault lock from the InProgress state to the Locked state, which causes the vault lock policy to become unchangeable. A vault lock is put into the InProgress state by calling InitiateVaultLock. You can obtain the state of the vault lock by calling GetVaultLock. For more information about the vault locking process, Amazon Glacier Vault Lock.
createVault({required String accountId, required String vaultName}) Future<CreateVaultOutput>
This operation creates a new vault with the specified name. The name of the vault must be unique within a region for an AWS account. You can create up to 1,000 vaults per account. If you need to create more vaults, contact Amazon S3 Glacier.
deleteArchive({required String accountId, required String archiveId, required String vaultName}) Future<void>
This operation deletes an archive from a vault. Subsequent requests to initiate a retrieval of this archive will fail. Archive retrievals that are in progress for this archive ID may or may not succeed according to the following scenarios:
deleteVault({required String accountId, required String vaultName}) Future<void>
This operation deletes a vault. Amazon S3 Glacier will delete a vault only if there are no archives in the vault as of the last inventory and there have been no writes to the vault since the last inventory. If either of these conditions is not satisfied, the vault deletion fails (that is, the vault is not removed) and Amazon S3 Glacier returns an error. You can use DescribeVault to return the number of archives in a vault, and you can use Initiate a Job (POST jobs) to initiate a new inventory retrieval for a vault. The inventory contains the archive IDs you use to delete archives using Delete Archive (DELETE archive).
deleteVaultAccessPolicy({required String accountId, required String vaultName}) Future<void>
This operation deletes the access policy associated with the specified vault. The operation is eventually consistent; that is, it might take some time for Amazon S3 Glacier to completely remove the access policy, and you might still see the effect of the policy for a short time after you send the delete request.
deleteVaultNotifications({required String accountId, required String vaultName}) Future<void>
This operation deletes the notification configuration set for a vault. The operation is eventually consistent; that is, it might take some time for Amazon S3 Glacier to completely disable the notifications and you might still receive some notifications for a short time after you send the delete request.
describeJob({required String accountId, required String jobId, required String vaultName}) Future<GlacierJobDescription>
This operation returns information about a job you previously initiated, including the job initiation date, the user who initiated the job, the job status code/message and the Amazon SNS topic to notify after Amazon S3 Glacier (Glacier) completes the job. For more information about initiating a job, see InitiateJob. A job ID will not expire for at least 24 hours after Glacier completes the job.
describeVault({required String accountId, required String vaultName}) Future<DescribeVaultOutput>
This operation returns information about a vault, including the vault's Amazon Resource Name (ARN), the date the vault was created, the number of archives it contains, and the total size of all the archives in the vault. The number of archives and their total size are as of the last inventory generation. This means that if you add or remove an archive from a vault, and then immediately use Describe Vault, the change in contents will not be immediately reflected. If you want to retrieve the latest inventory of the vault, use InitiateJob. Amazon S3 Glacier generates vault inventories approximately daily. For more information, see Downloading a Vault Inventory in Amazon S3 Glacier.
getDataRetrievalPolicy({required String accountId}) Future<GetDataRetrievalPolicyOutput>
This operation returns the current data retrieval policy for the account and region specified in the GET request. For more information about data retrieval policies, see Amazon Glacier Data Retrieval Policies.
getJobOutput({required String accountId, required String jobId, required String vaultName, String? range}) Future<GetJobOutputOutput>
This operation downloads the output of the job you initiated using InitiateJob. Depending on the job type you specified when you initiated the job, the output will be either the content of an archive or a vault inventory.
getVaultAccessPolicy({required String accountId, required String vaultName}) Future<GetVaultAccessPolicyOutput>
This operation retrieves the access-policy subresource set on the vault; for more information on setting this subresource, see Set Vault Access Policy (PUT access-policy). If there is no access policy set on the vault, the operation returns a 404 Not found error. For more information about vault access policies, see Amazon Glacier Access Control with Vault Access Policies.
getVaultLock({required String accountId, required String vaultName}) Future<GetVaultLockOutput>
This operation retrieves the following attributes from the lock-policy subresource set on the specified vault:
getVaultNotifications({required String accountId, required String vaultName}) Future<GetVaultNotificationsOutput>
This operation retrieves the notification-configuration subresource of the specified vault.
initiateJob({required String accountId, required String vaultName, JobParameters? jobParameters}) Future<InitiateJobOutput>
This operation initiates a job of the specified type, which can be a select, an archival retrieval, or a vault retrieval. For more information about using this operation, see the documentation for the underlying REST API Initiate a Job.
initiateMultipartUpload({required String accountId, required String vaultName, String? archiveDescription, String? partSize}) Future<InitiateMultipartUploadOutput>
This operation initiates a multipart upload. Amazon S3 Glacier creates a multipart upload resource and returns its ID in the response. The multipart upload ID is used in subsequent requests to upload parts of an archive (see UploadMultipartPart).
initiateVaultLock({required String accountId, required String vaultName, VaultLockPolicy? policy}) Future<InitiateVaultLockOutput>
This operation initiates the vault locking process by doing the following:
listJobs({required String accountId, required String vaultName, String? completed, String? limit, String? marker, String? statuscode}) Future<ListJobsOutput>
This operation lists jobs for a vault, including jobs that are in-progress and jobs that have recently finished. The List Job operation returns a list of these jobs sorted by job initiation time. The List Jobs operation supports pagination. You should always check the response Marker field. If there are no more jobs to list, the Marker field is set to null. If there are more jobs to list, the Marker field is set to a non-null value, which you can use to continue the pagination of the list. To return a list of jobs that begins at a specific job, set the marker request parameter to the Marker value for that job that you obtained from a previous List Jobs request.
listMultipartUploads({required String accountId, required String vaultName, String? limit, String? marker}) Future<ListMultipartUploadsOutput>
This operation lists in-progress multipart uploads for the specified vault. An in-progress multipart upload is a multipart upload that has been initiated by an InitiateMultipartUpload request, but has not yet been completed or aborted. The list returned in the List Multipart Upload response has no guaranteed order.
listParts({required String accountId, required String uploadId, required String vaultName, String? limit, String? marker}) Future<ListPartsOutput>
This operation lists the parts of an archive that have been uploaded in a specific multipart upload. You can make this request at any time during an in-progress multipart upload before you complete the upload (see CompleteMultipartUpload. List Parts returns an error for completed uploads. The list returned in the List Parts response is sorted by part range.
listProvisionedCapacity({required String accountId}) Future<ListProvisionedCapacityOutput>
This operation lists the provisioned capacity units for the specified AWS account.
listTagsForVault({required String accountId, required String vaultName}) Future<ListTagsForVaultOutput>
This operation lists all the tags attached to a vault. The operation returns an empty map if there are no tags. For more information about tags, see Tagging Amazon S3 Glacier Resources.
listVaults({required String accountId, String? limit, String? marker}) Future<ListVaultsOutput>
This operation lists all vaults owned by the calling user's account. The list returned in the response is ASCII-sorted by vault name.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
purchaseProvisionedCapacity({required String accountId}) Future<PurchaseProvisionedCapacityOutput>
This operation purchases a provisioned capacity unit for an AWS account.
removeTagsFromVault({required String accountId, required String vaultName, List<String>? tagKeys}) Future<void>
This operation removes one or more tags from the set of tags attached to a vault. For more information about tags, see Tagging Amazon S3 Glacier Resources. This operation is idempotent. The operation will be successful, even if there are no tags attached to the vault.
setDataRetrievalPolicy({required String accountId, DataRetrievalPolicy? policy}) Future<void>
This operation sets and then enacts a data retrieval policy in the region specified in the PUT request. You can set one policy per region for an AWS account. The policy is enacted within a few minutes of a successful PUT operation.
setVaultAccessPolicy({required String accountId, required String vaultName, VaultAccessPolicy? policy}) Future<void>
This operation configures an access policy for a vault and will overwrite an existing policy. To configure a vault access policy, send a PUT request to the access-policy subresource of the vault. An access policy is specific to a vault and is also called a vault subresource. You can set one access policy per vault and the policy can be up to 20 KB in size. For more information about vault access policies, see Amazon Glacier Access Control with Vault Access Policies.
setVaultNotifications({required String accountId, required String vaultName, VaultNotificationConfig? vaultNotificationConfig}) Future<void>
This operation configures notifications that will be sent when specific events happen to a vault. By default, you don't get any notifications.
toString() String
A string representation of this object.
inherited
uploadArchive({required String accountId, required String vaultName, String? archiveDescription, Uint8List? body, String? checksum}) Future<ArchiveCreationOutput>
This operation adds an archive to a vault. This is a synchronous operation, and for a successful upload, your data is durably persisted. Amazon S3 Glacier returns the archive ID in the x-amz-archive-id header of the response.
uploadMultipartPart({required String accountId, required String uploadId, required String vaultName, Uint8List? body, String? checksum, String? range}) Future<UploadMultipartPartOutput>
This operation uploads a part of an archive. You can upload archive parts in any order. You can also upload them in parallel. You can upload up to 10,000 parts for a multipart upload.

Operators

operator ==(Object other) bool
The equality operator.
inherited