DeleteVaultAccessPolicyCommand

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.

This operation is idempotent. You can invoke delete multiple times, even if there is no policy associated with the vault. For more information about vault access policies, see Amazon Glacier Access Control with Vault Access Policies .

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { GlacierClient, DeleteVaultAccessPolicyCommand } from "@aws-sdk/client-glacier"; // ES Modules import
// const { GlacierClient, DeleteVaultAccessPolicyCommand } = require("@aws-sdk/client-glacier"); // CommonJS import
const client = new GlacierClient(config);
const input = { // DeleteVaultAccessPolicyInput
  accountId: "STRING_VALUE", // required
  vaultName: "STRING_VALUE", // required
};
const command = new DeleteVaultAccessPolicyCommand(input);
const response = await client.send(command);
// {};

Example Usage

 Loading code editor

DeleteVaultAccessPolicyCommand Input

Parameter
Type
Description
accountId
Required
string | undefined

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.

vaultName
Required
string | undefined

The name of the vault.

DeleteVaultAccessPolicyCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.

Throws

Name
Fault
Details
InvalidParameterValueException
client

Returned if a parameter of the request is incorrectly specified.

MissingParameterValueException
client

Returned if a required header or parameter is missing from the request.

ResourceNotFoundException
client

Returned if the specified resource (such as a vault, upload ID, or job ID) doesn't exist.

ServiceUnavailableException
server

Returned if the service cannot complete the request.

GlacierServiceException
Base exception class for all service exceptions from Glacier service.