getContact method

Future<GetContactResponse> getContact({
  1. required String contactArn,
})

Gets the contact details by the contact ARN.

May throw NotFoundException.

Parameter contactArn : The ARN of the contact for which to request details.

Implementation

Future<GetContactResponse> getContact({
  required String contactArn,
}) async {
  ArgumentError.checkNotNull(contactArn, 'contactArn');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AlexaForBusiness.GetContact'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ContactArn': contactArn,
    },
  );

  return GetContactResponse.fromJson(jsonResponse.body);
}