describeResourcePolicy method

Future<DescribeResourcePolicyResponse> describeResourcePolicy()

Retrieves information about a resource policy.

You can only call this operation from the management account or a member account that is a delegated administrator.

May throw AccessDeniedException. May throw AWSOrganizationsNotInUseException. May throw ConstraintViolationException. May throw ResourcePolicyNotFoundException. May throw ServiceException. May throw TooManyRequestsException. May throw UnsupportedAPIEndpointException.

Implementation

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

  return DescribeResourcePolicyResponse.fromJson(jsonResponse.body);
}