:doc:`CloudDirectory <../../clouddirectory>` / Client / create_directory

****************
create_directory
****************



.. py:method:: CloudDirectory.Client.create_directory(**kwargs)

  

  Creates a  Directory by copying the published schema into the directory. A directory cannot be created without a schema.

   

  You can also quickly create a directory using a managed schema, called the ``QuickStartSchema``. For more information, see `Managed Schema <https://docs.aws.amazon.com/clouddirectory/latest/developerguide/schemas_managed.html>`__ in the *Amazon Cloud Directory Developer Guide*.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/clouddirectory-2017-01-11/CreateDirectory>`_  


  **Request Syntax**
  ::

    response = client.create_directory(
        Name='string',
        SchemaArn='string'
    )
    
  :type Name: string
  :param Name: **[REQUIRED]** 

    The name of the  Directory. Should be unique per account, per region.

    

  
  :type SchemaArn: string
  :param SchemaArn: **[REQUIRED]** 

    The Amazon Resource Name (ARN) of the published schema that will be copied into the data  Directory. For more information, see  arns.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'DirectoryArn': 'string',
          'Name': 'string',
          'ObjectIdentifier': 'string',
          'AppliedSchemaArn': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **DirectoryArn** *(string) --* 

        The ARN that is associated with the  Directory. For more information, see  arns.

        
      

      - **Name** *(string) --* 

        The name of the  Directory.

        
      

      - **ObjectIdentifier** *(string) --* 

        The root object node of the created directory.

        
      

      - **AppliedSchemaArn** *(string) --* 

        The ARN of the published schema in the  Directory. Once a published schema is copied into the directory, it has its own ARN, which is referred to applied schema ARN. For more information, see  arns.

        
  
  **Exceptions**
  
  *   :py:class:`CloudDirectory.Client.exceptions.InternalServiceException`

  
  *   :py:class:`CloudDirectory.Client.exceptions.InvalidArnException`

  
  *   :py:class:`CloudDirectory.Client.exceptions.RetryableConflictException`

  
  *   :py:class:`CloudDirectory.Client.exceptions.ValidationException`

  
  *   :py:class:`CloudDirectory.Client.exceptions.LimitExceededException`

  
  *   :py:class:`CloudDirectory.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`CloudDirectory.Client.exceptions.DirectoryAlreadyExistsException`

  
  *   :py:class:`CloudDirectory.Client.exceptions.ResourceNotFoundException`

  