updateJobPriority method

Future<UpdateJobPriorityResult> updateJobPriority({
  1. required String accountId,
  2. required String jobId,
  3. required int priority,
})

Updates an existing S3 Batch Operations job's priority. For more information, see S3 Batch Operations in the Amazon Simple Storage Service Developer Guide.

Related actions include:

May throw BadRequestException. May throw TooManyRequestsException. May throw NotFoundException. May throw InternalServiceException.

Parameter accountId :

Parameter jobId : The ID for the job whose priority you want to update.

Parameter priority : The priority you want to assign to this job.

Implementation

Future<UpdateJobPriorityResult> updateJobPriority({
  required String accountId,
  required String jobId,
  required int priority,
}) async {
  ArgumentError.checkNotNull(accountId, 'accountId');
  _s.validateStringLength(
    'accountId',
    accountId,
    0,
    64,
    isRequired: true,
  );
  ArgumentError.checkNotNull(jobId, 'jobId');
  _s.validateStringLength(
    'jobId',
    jobId,
    5,
    36,
    isRequired: true,
  );
  ArgumentError.checkNotNull(priority, 'priority');
  _s.validateNumRange(
    'priority',
    priority,
    0,
    2147483647,
    isRequired: true,
  );
  final headers = <String, String>{
    'x-amz-account-id': accountId.toString(),
  };
  final $query = <String, List<String>>{
    'priority': [priority.toString()],
  };
  final $result = await _protocol.send(
    method: 'POST',
    requestUri: '/v20180820/jobs/${Uri.encodeComponent(jobId)}/priority',
    queryParams: $query,
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
  return UpdateJobPriorityResult.fromXml($result.body);
}