updateProtectedJob method

Future<UpdateProtectedJobOutput> updateProtectedJob({
  1. required String membershipIdentifier,
  2. required String protectedJobIdentifier,
  3. required TargetProtectedJobStatus targetStatus,
})

Updates the processing of a currently running job.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter membershipIdentifier : The identifier for a member of a protected job instance.

Parameter protectedJobIdentifier : The identifier of the protected job to update.

Parameter targetStatus : The target status of a protected job. Used to update the execution status of a currently running job.

Implementation

Future<UpdateProtectedJobOutput> updateProtectedJob({
  required String membershipIdentifier,
  required String protectedJobIdentifier,
  required TargetProtectedJobStatus targetStatus,
}) async {
  final $payload = <String, dynamic>{
    'targetStatus': targetStatus.value,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri:
        '/memberships/${Uri.encodeComponent(membershipIdentifier)}/protectedJobs/${Uri.encodeComponent(protectedJobIdentifier)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateProtectedJobOutput.fromJson(response);
}