getProfile method

Future<GetProfileResponse> getProfile({
  1. String? profileArn,
})

Gets the details of a room profile by profile ARN.

May throw NotFoundException.

Parameter profileArn : The ARN of the room profile for which to request details. Required.

Implementation

Future<GetProfileResponse> getProfile({
  String? profileArn,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AlexaForBusiness.GetProfile'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (profileArn != null) 'ProfileArn': profileArn,
    },
  );

  return GetProfileResponse.fromJson(jsonResponse.body);
}