getTrail method
Returns settings information for a specified trail.
May throw CloudTrailARNInvalidException.
May throw InvalidTrailNameException.
May throw OperationNotPermittedException.
May throw TrailNotFoundException.
May throw UnsupportedOperationException.
Parameter name :
The name or the Amazon Resource Name (ARN) of the trail for which you want
to retrieve settings information.
Implementation
Future<GetTrailResponse> getTrail({
required String name,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'CloudTrail_20131101.GetTrail'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Name': name,
},
);
return GetTrailResponse.fromJson(jsonResponse.body);
}