enableAWSServiceAccess method

Future<void> enableAWSServiceAccess({
  1. required String servicePrincipal,
})

Provides an Amazon Web Services service (the service that is specified by ServicePrincipal) with permissions to view the structure of an organization, create a service-linked role in all the accounts in the organization, and allow the service to perform operations on behalf of the organization and its accounts. Establishing these permissions can be a first step in enabling the integration of an Amazon Web Services service with Organizations. For more information about enabling services to integrate with Organizations, see Using Organizations with other Amazon Web Services services in the Organizations User Guide.

You can only call this operation from the management account.

May throw AccessDeniedException. May throw AWSOrganizationsNotInUseException. May throw ConcurrentModificationException. May throw ConstraintViolationException. May throw InvalidInputException. May throw ServiceException. May throw TooManyRequestsException. May throw UnsupportedAPIEndpointException.

Parameter servicePrincipal : The service principal name of the Amazon Web Services service for which you want to enable integration with your organization. This is typically in the form of a URL, such as service-abbreviation.amazonaws.com.

Implementation

Future<void> enableAWSServiceAccess({
  required String servicePrincipal,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSOrganizationsV20161128.EnableAWSServiceAccess'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ServicePrincipal': servicePrincipal,
    },
  );
}