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.
Parameters:
-
account_id
(string)
–
The AccountId value 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 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 specify your account ID, do not include any hyphens ('-') in the ID.
Raises:
Examples:
To get the current data retrieval policy for an account
The example returns the current data retrieval policy for the account.
>>> await client.get_data_retrieval_policy(account_id='-')
Source code in docs_src/capo_glacier/_services/async_glacier.py
| async def get_data_retrieval_policy(
self,
account_id: "capo_glacier.types.string.string",
*,
config_overrides: Optional[AsyncGlacierClientConfig] = None,
) -> "capo_glacier.types.get_data_retrieval_policy_output.GetDataRetrievalPolicyOutput":
"""<p>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 <a href="https://docs.aws.amazon.com/amazonglacier/latest/dev/data-retrieval-policy.html">Amazon Glacier Data Retrieval Policies</a>.</p>
Args:
account_id: <p>The <code>AccountId</code> value 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 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 specify your account ID, do not include any hyphens ('-') in the ID. </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.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 get the current data retrieval policy for an account
The example returns the current data retrieval policy for the account.
>>> await client.get_data_retrieval_policy(account_id='-')
"""
async def _handler(
req: "AsyncOperationRequest[capo_glacier.types.get_data_retrieval_policy_input.GetDataRetrievalPolicyInput]",
) -> AsyncOperationResponse[
"capo_glacier.types.get_data_retrieval_policy_output.GetDataRetrievalPolicyOutput"
]:
import capo_glacier._operations.glacier.get_data_retrieval_policy
(
output,
http_response,
) = await capo_glacier._operations.glacier.get_data_retrieval_policy.async_get_data_retrieval_policy(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetDataRetrievalPolicy")
)
input_: capo_glacier.types.get_data_retrieval_policy_input.GetDataRetrievalPolicyInput = {
"account_id": account_id
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|