describeResourcePolicy method

Future<DescribeResourcePolicyResponse> describeResourcePolicy({
  1. required String resourceArn,
})

Gets the details of a resource-based policy that is attached to a custom model, including the JSON body of the policy.

May throw InternalServerException. May throw InvalidRequestException. May throw ResourceNotFoundException.

Parameter resourceArn : The Amazon Resource Name (ARN) of the custom model version that has the resource policy.

Implementation

Future<DescribeResourcePolicyResponse> describeResourcePolicy({
  required String resourceArn,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'Comprehend_20171127.DescribeResourcePolicy'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ResourceArn': resourceArn,
    },
  );

  return DescribeResourcePolicyResponse.fromJson(jsonResponse.body);
}