getGateway method

Future<GetGatewayResponse> getGateway({
  1. required String gatewayArn,
})

Retrieves the details of a gateway.

May throw NotFoundException.

Parameter gatewayArn : The ARN of the gateway to get.

Implementation

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

  return GetGatewayResponse.fromJson(jsonResponse.body);
}