delete_vault_access_policy(
account_id: string,
vault_name: string,
*,
config_overrides: Optional[GlacierClientConfig] = None,
) -> None
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 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.
Parameters:
-
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 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)
–
Raises:
Examples:
To delete the vault access policy
The example deletes the access policy associated with the vault named examplevault.
>>> client.delete_vault_access_policy(account_id='-', vault_name='examplevault')
Source code in docs_src/capo_glacier/_services/glacier.py
| def delete_vault_access_policy(
self,
account_id: "capo_glacier.types.string.string",
vault_name: "capo_glacier.types.string.string",
*,
config_overrides: Optional[GlacierClientConfig] = None,
) -> None:
"""<p>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 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.</p> <p>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 <a href="https://docs.aws.amazon.com/amazonglacier/latest/dev/vault-access-policy.html">Amazon Glacier Access Control with Vault Access Policies</a>. </p>
Args:
account_id: <p>The <code>AccountId</code> 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 '<code>-</code>' (hyphen), in which case Amazon 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. </p>
vault_name: <p>The name of the vault.</p>
Raises:
capo_glacier.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>Returned if a parameter of the request is incorrectly specified.</p>
capo_glacier.errors.missing_parameter_value_exception.MissingParameterValueException: <p>Returned if a required header or parameter is missing from the request.</p>
capo_glacier.errors.no_longer_supported_exception.NoLongerSupportedException: <p>Returned if the request was made by a customer with no Amazon Glacier storage. The request is denied as the API is no longer supported for new customers. Please use Amazon S3 Glacier storage classes instead.</p>
capo_glacier.errors.resource_not_found_exception.ResourceNotFoundException: <p>Returned if the specified resource (such as a vault, upload ID, or job ID) doesn't exist.</p>
capo_glacier.errors.service_unavailable_exception.ServiceUnavailableException: <p>Returned if the service cannot complete the request.</p>
capo_glacier.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
To delete the vault access policy
The example deletes the access policy associated with the vault named examplevault.
>>> client.delete_vault_access_policy(account_id='-', vault_name='examplevault')
"""
def _handler(
req: "OperationRequest[capo_glacier.types.delete_vault_access_policy_input.DeleteVaultAccessPolicyInput]",
) -> OperationResponse[None]:
import capo_glacier._operations.glacier.delete_vault_access_policy
output, http_response = (
capo_glacier._operations.glacier.delete_vault_access_policy.delete_vault_access_policy(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteVaultAccessPolicy")
)
input_: capo_glacier.types.delete_vault_access_policy_input.DeleteVaultAccessPolicyInput = {
"account_id": account_id,
"vault_name": vault_name,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|