getResourcePolicy method
Returns details about a policy for a resource.
May throw AccessDeniedException.
May throw InvalidParameterException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter policyName :
Name of the policy.
Parameter policyType :
The type of policy.
Parameter resourceArn :
Amazon Resource Name (ARN) for the resource.
Implementation
Future<GetResourcePolicyResponse> getResourcePolicy({
required String policyName,
required PolicyType policyType,
required String resourceArn,
}) async {
final $payload = <String, dynamic>{
'PolicyName': policyName,
'PolicyType': policyType.value,
'ResourceArn': resourceArn,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/GetResourcePolicy',
exceptionFnMap: _exceptionFns,
);
return GetResourcePolicyResponse.fromJson(response);
}