acceptAccountLinkInvitation method

Future<AcceptAccountLinkInvitationResult> acceptAccountLinkInvitation({
  1. required String linkId,
  2. String? clientToken,
})

Accepts the account link invitation.

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

Parameter linkId : The identifier of the account link.

Parameter clientToken : A string of up to 64 ASCII characters that Amazon WorkSpaces uses to ensure idempotent creation.

Implementation

Future<AcceptAccountLinkInvitationResult> acceptAccountLinkInvitation({
  required String linkId,
  String? clientToken,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'WorkspacesService.AcceptAccountLinkInvitation'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'LinkId': linkId,
      if (clientToken != null) 'ClientToken': clientToken,
    },
  );

  return AcceptAccountLinkInvitationResult.fromJson(jsonResponse.body);
}