getRelay method

Future<GetRelayResponse> getRelay({
  1. required String relayId,
})

Fetch the relay resource and it's attributes.

May throw ResourceNotFoundException. May throw ValidationException.

Parameter relayId : A unique relay identifier.

Implementation

Future<GetRelayResponse> getRelay({
  required String relayId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'MailManagerSvc.GetRelay'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'RelayId': relayId,
    },
  );

  return GetRelayResponse.fromJson(jsonResponse.body);
}