getResourcePolicy method
Retrieves the resource policy for the specified CloudFront resource that you own and have shared.
May throw AccessDenied.
May throw EntityNotFound.
May throw InvalidArgument.
May throw UnsupportedOperation.
Parameter resourceArn :
The Amazon Resource Name (ARN) of the CloudFront resource that is
associated with the resource policy.
Implementation
Future<GetResourcePolicyResult> getResourcePolicy({
required String resourceArn,
}) async {
final $result = await _protocol.send(
method: 'POST',
requestUri: '/2020-05-31/get-resource-policy',
payload: GetResourcePolicyRequest(resourceArn: resourceArn)
.toXml('GetResourcePolicyRequest'),
exceptionFnMap: _exceptionFns,
);
return GetResourcePolicyResult.fromXml($result.body);
}