getPolicy method
Gets information about the specified policy with the policy document of the default version.
Requires permission to access the GetPolicy action.
May throw InternalFailureException.
May throw InvalidRequestException.
May throw ResourceNotFoundException.
May throw ServiceUnavailableException.
May throw ThrottlingException.
May throw UnauthorizedException.
Parameter policyName :
The name of the policy.
Implementation
Future<GetPolicyResponse> getPolicy({
required String policyName,
}) async {
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/policies/${Uri.encodeComponent(policyName)}',
exceptionFnMap: _exceptionFns,
);
return GetPolicyResponse.fromJson(response);
}