associateMemberToJob method

Future<void> associateMemberToJob({
  1. required String farmId,
  2. required String identityStoreId,
  3. required String jobId,
  4. required MembershipLevel membershipLevel,
  5. required String principalId,
  6. required DeadlinePrincipalType principalType,
  7. required String queueId,
})

Assigns a job membership level to a member

May throw AccessDeniedException. May throw InternalServerErrorException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter farmId : The farm ID of the job to associate with the member.

Parameter identityStoreId : The member's identity store ID to associate with the job.

Parameter jobId : The job ID to associate with the member.

Parameter membershipLevel : The principal's membership level for the associated job.

Parameter principalId : The member's principal ID to associate with the job.

Parameter principalType : The member's principal type to associate with the job.

Parameter queueId : The queue ID to associate to the member.

Implementation

Future<void> associateMemberToJob({
  required String farmId,
  required String identityStoreId,
  required String jobId,
  required MembershipLevel membershipLevel,
  required String principalId,
  required DeadlinePrincipalType principalType,
  required String queueId,
}) async {
  final $payload = <String, dynamic>{
    'identityStoreId': identityStoreId,
    'membershipLevel': membershipLevel.value,
    'principalType': principalType.value,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/2023-10-12/farms/${Uri.encodeComponent(farmId)}/queues/${Uri.encodeComponent(queueId)}/jobs/${Uri.encodeComponent(jobId)}/members/${Uri.encodeComponent(principalId)}',
    exceptionFnMap: _exceptionFns,
  );
}