associateMemberToFleet method

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

Assigns a fleet 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 fleet to associate with the member.

Parameter fleetId : The ID of the fleet to associate with a member.

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

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

Parameter principalId : The member's principal ID to associate with a fleet.

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

Implementation

Future<void> associateMemberToFleet({
  required String farmId,
  required String fleetId,
  required String identityStoreId,
  required MembershipLevel membershipLevel,
  required String principalId,
  required DeadlinePrincipalType principalType,
}) 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)}/fleets/${Uri.encodeComponent(fleetId)}/members/${Uri.encodeComponent(principalId)}',
    exceptionFnMap: _exceptionFns,
  );
}