getPolicy method
Returns information about the specified Firewall Manager policy.
May throw InternalErrorException.
May throw InvalidOperationException.
May throw InvalidTypeException.
May throw ResourceNotFoundException.
Parameter policyId :
The ID of the Firewall Manager policy that you want the details for.
Implementation
Future<GetPolicyResponse> getPolicy({
required String policyId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSFMS_20180101.GetPolicy'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'PolicyId': policyId,
},
);
return GetPolicyResponse.fromJson(jsonResponse.body);
}