getResourcePolicy method

Future<GetResourcePolicyResult> getResourcePolicy({
  1. required String resourceArn,
})

Get the resource policy for a specified resource.

May throw InvalidPolicyFault. May throw ResourceNotFoundFault. May throw UnsupportedOperationFault.

Parameter resourceArn : The Amazon Resource Name (ARN) of the resource of which its resource policy is fetched.

Implementation

Future<GetResourcePolicyResult> getResourcePolicy({
  required String resourceArn,
}) async {
  final $request = <String, String>{
    'ResourceArn': resourceArn,
  };
  final $result = await _protocol.send(
    $request,
    action: 'GetResourcePolicy',
    version: '2012-12-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    resultWrapper: 'GetResourcePolicyResult',
  );
  return GetResourcePolicyResult.fromXml($result);
}