getTrail method
Returns settings information for a specified trail.
May throw TrailNotFoundException. May throw InvalidTrailNameException. May throw UnsupportedOperationException. May throw OperationNotPermittedException.
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 {
ArgumentError.checkNotNull(name, 'name');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target':
'com.amazonaws.cloudtrail.v20131101.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);
}