describeJob method

Future<GlacierJobDescription> describeJob({
  1. required String accountId,
  2. required String jobId,
  3. required String vaultName,
})

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 S3 Glacier (Glacier) completes the job. For more information about initiating a job, see InitiateJob. 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.

May throw ResourceNotFoundException. May throw InvalidParameterValueException. May throw MissingParameterValueException. May throw ServiceUnavailableException.

Parameter accountId : 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.

Parameter jobId : The ID of the job to describe.

Parameter vaultName : The name of the vault.

Implementation

Future<GlacierJobDescription> describeJob({
  required String accountId,
  required String jobId,
  required String vaultName,
}) async {
  ArgumentError.checkNotNull(accountId, 'accountId');
  ArgumentError.checkNotNull(jobId, 'jobId');
  ArgumentError.checkNotNull(vaultName, 'vaultName');
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/${Uri.encodeComponent(accountId)}/vaults/${Uri.encodeComponent(vaultName)}/jobs/${Uri.encodeComponent(jobId)}',
    exceptionFnMap: _exceptionFns,
  );
  return GlacierJobDescription.fromJson(response);
}