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 Glacier (Glacier) completes the job. For more information about initiating a job, see InitiateJob.
This operation enables you to check the status of your job. However, it is strongly recommended that you set up an Amazon SNS topic and specify it in your initiate job request so that Glacier can notify the topic after it completes the job.
A job ID will not expire for at least 24 hours after Glacier completes the job.
An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform specific actions. For more information, see Access Control Using AWS Identity and Access Management (IAM).
For more information about using this operation, see the documentation for the underlying REST API Describe Job in the Amazon Glacier Developer Guide.
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)
–
-
job_id
(string)
–
The ID of the job to describe.
Raises:
Examples:
To get information about a previously initiated job
The example returns information about the previously initiated job specified by the job ID.
>>> await client.describe_job(account_id='-', vault_name='my-vault', job_id='zbxcm3Z_3z5UkoroF7SuZKrxgGoDc3RloGduS7Eg-RO47Yc6FxsdGBgf_Q2DK5Ejh18CnTS5XW4_XqlNHS61dsO4Cn')
Source code in docs_src/capo_glacier/_services/async_glacier.py
| async def describe_job(
self,
account_id: "capo_glacier.types.string.string",
vault_name: "capo_glacier.types.string.string",
job_id: "capo_glacier.types.string.string",
*,
config_overrides: Optional[AsyncGlacierClientConfig] = None,
) -> "capo_glacier.types.glacier_job_description.GlacierJobDescription":
"""<p>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 Glacier (Glacier) completes the job. For more information about initiating a job, see <a>InitiateJob</a>. </p> <note> <p>This operation enables you to check the status of your job. However, it is strongly recommended that you set up an Amazon SNS topic and specify it in your initiate job request so that Glacier can notify the topic after it completes the job.</p> </note> <p>A job ID will not expire for at least 24 hours after Glacier completes the job.</p> <p>An AWS account has full permission to perform all operations (actions). However, AWS Identity and Access Management (IAM) users don't have any permissions by default. You must grant them explicit permission to perform specific actions. For more information, see <a href="https://docs.aws.amazon.com/amazonglacier/latest/dev/using-iam-with-amazon-glacier.html">Access Control Using AWS Identity and Access Management (IAM)</a>.</p> <p> For more information about using this operation, see the documentation for the underlying REST API <a href="https://docs.aws.amazon.com/amazonglacier/latest/dev/api-describe-job-get.html">Describe Job</a> in the <i>Amazon Glacier Developer Guide</i>. </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>
job_id: <p>The ID of the job to describe.</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 get information about a previously initiated job
The example returns information about the previously initiated job specified by the job ID.
>>> await client.describe_job(account_id='-', vault_name='my-vault', job_id='zbxcm3Z_3z5UkoroF7SuZKrxgGoDc3RloGduS7Eg-RO47Yc6FxsdGBgf_Q2DK5Ejh18CnTS5XW4_XqlNHS61dsO4Cn')
"""
async def _handler(
req: "AsyncOperationRequest[capo_glacier.types.describe_job_input.DescribeJobInput]",
) -> AsyncOperationResponse[
"capo_glacier.types.glacier_job_description.GlacierJobDescription"
]:
import capo_glacier._operations.glacier.describe_job
(
output,
http_response,
) = await capo_glacier._operations.glacier.describe_job.async_describe_job(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DescribeJob")
)
input_: capo_glacier.types.describe_job_input.DescribeJobInput = {
"account_id": account_id,
"vault_name": vault_name,
"job_id": job_id,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|