describeTunnel method
Gets information about a tunnel identified by the unique tunnel id.
May throw ResourceNotFoundException.
Parameter tunnelId
:
The tunnel to describe.
Implementation
Future<DescribeTunnelResponse> describeTunnel({
required String tunnelId,
}) async {
ArgumentError.checkNotNull(tunnelId, 'tunnelId');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'IoTSecuredTunneling.DescribeTunnel'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'tunnelId': tunnelId,
},
);
return DescribeTunnelResponse.fromJson(jsonResponse.body);
}