enableDirectory method

Future<EnableDirectoryResponse> enableDirectory({
  1. required String directoryArn,
})

Enables the specified directory. Only disabled directories can be enabled. Once enabled, the directory can then be read and written to.

May throw ResourceNotFoundException. May throw DirectoryDeletedException. May throw InternalServiceException. May throw ValidationException. May throw LimitExceededException. May throw AccessDeniedException. May throw RetryableConflictException. May throw InvalidArnException.

Parameter directoryArn : The ARN of the directory to enable.

Implementation

Future<EnableDirectoryResponse> enableDirectory({
  required String directoryArn,
}) async {
  ArgumentError.checkNotNull(directoryArn, 'directoryArn');
  final headers = <String, String>{
    'x-amz-data-partition': directoryArn.toString(),
  };
  final response = await _protocol.send(
    payload: null,
    method: 'PUT',
    requestUri: '/amazonclouddirectory/2017-01-11/directory/enable',
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
  return EnableDirectoryResponse.fromJson(response);
}