enableCAEnrollmentPolicy method

Future<void> enableCAEnrollmentPolicy({
  1. required String directoryId,
  2. required String pcaConnectorArn,
})

Enables certificate authority (CA) enrollment policy for the specified directory. This allows domain-joined clients to automatically request and receive certificates from the specified Amazon Web Services Private Certificate Authority.

May throw AccessDeniedException. May throw ClientException. May throw DirectoryDoesNotExistException. May throw DirectoryUnavailableException. May throw EnableAlreadyInProgressException. May throw EntityAlreadyExistsException. May throw EntityDoesNotExistException. May throw InvalidParameterException. May throw ServiceException.

Parameter directoryId : The identifier of the directory for which to enable the CA enrollment policy.

Parameter pcaConnectorArn : The Amazon Resource Name (ARN) of the Private Certificate Authority (PCA) connector to use for automatic certificate enrollment. This connector must be properly configured and accessible from the directory.

The ARN format is: arn:aws:pca-connector-ad:region:account-id:connector/connector-id

Implementation

Future<void> enableCAEnrollmentPolicy({
  required String directoryId,
  required String pcaConnectorArn,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'DirectoryService_20150416.EnableCAEnrollmentPolicy'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'DirectoryId': directoryId,
      'PcaConnectorArn': pcaConnectorArn,
    },
  );
}