describeResourcePolicy method

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

Provides the details of a resource policy attached to a resource.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter resourceArn : The Amazon Resource Name (ARN) of the resource that is associated with the resource policy.

Implementation

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

  return DescribeResourcePolicyResponse.fromJson(jsonResponse.body);
}