[ aws . glacier ]

get-vault-lock

Description

This operation retrieves the following attributes from the lock-policy subresource set on the specified vault:

  • The vault lock policy set on the vault.

  • The state of the vault lock, which is either InProgess or Locked .

  • When the lock ID expires. The lock ID is used to complete the vault locking process.

  • When the vault lock was initiated and put into the InProgress state.

A vault lock is put into the InProgress state by calling InitiateVaultLock . A vault lock is put into the Locked state by calling CompleteVaultLock . You can abort the vault locking process by calling AbortVaultLock . For more information about the vault locking process, Amazon Glacier Vault Lock .

If there is no vault lock policy set on the vault, the operation returns a 404 Not found error. For more information about vault lock policies, Amazon Glacier Access Control with Vault Lock Policies .

See also: AWS API Documentation

See ‘aws help’ for descriptions of global parameters.

Synopsis

  get-vault-lock
--account-id <value>
--vault-name <value>
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]

Options

--account-id (string)

The AccountId value is the AWS account ID of the account that owns the vault. You can either specify an AWS account ID or optionally a single ‘- ‘ (hyphen), in which case Amazon S3 Glacier uses the AWS account ID associated with the credentials used to sign the request. If you use an account ID, do not include any hyphens (‘-‘) in the ID.

--vault-name (string)

The name of the vault.

--cli-input-json | --cli-input-yaml (string) Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. Similarly, if provided yaml-input it will print a sample input YAML that can be used with --cli-input-yaml. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See ‘aws help’ for descriptions of global parameters.

Examples

To get the details of a vault lock

The following get-vault-lock example retrieved the details about the lock for the specified vault.

aws glacier get-vault-lock \
    --account-id - \
    --vault-name MyVaultName

Output:

{
    "Policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Define-vault-lock\",\"Effect\":\"Deny\",\"Principal\":{\"AWS\":\"arn:aws:iam::999999999999:root\"},\"Action\":\"glacier:DeleteArchive\",\"Resource\":\"arn:aws:glacier:us-west-2:99999999999:vaults/MyVaultName\",\"Condition\":{\"NumericLessThanEquals\":{\"glacier:ArchiveAgeinDays\":\"365\"}}}]}",
    "State": "Locked",
    "CreationDate": "2019-07-29T22:25:28.640Z"
}

For more information, see Get Vault Lock (GET lock-policy) in the Amazon Glacier API Developer Guide.

Output

Policy -> (string)

The vault lock policy as a JSON string, which uses “” as an escape character.

State -> (string)

The state of the vault lock. InProgress or Locked .

ExpirationDate -> (string)

The UTC date and time at which the lock ID expires. This value can be null if the vault lock is in a Locked state.

CreationDate -> (string)

The UTC date and time at which the vault lock was put into the InProgress state.