:doc:`DirectoryService <../../ds>` / Client / create_hybrid_ad

****************
create_hybrid_ad
****************



.. py:method:: DirectoryService.Client.create_hybrid_ad(**kwargs)

  

  Creates a hybrid directory that connects your self-managed Active Directory (AD) infrastructure and Amazon Web Services.

   

  You must have a successful directory assessment using  StartADAssessment to validate your environment compatibility before you use this operation.

   

  Updates are applied asynchronously. Use  DescribeDirectories to monitor the progress of directory creation.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/CreateHybridAD>`_  


  **Request Syntax**
  ::

    response = client.create_hybrid_ad(
        SecretArn='string',
        AssessmentId='string',
        Tags=[
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    )
    
  :type SecretArn: string
  :param SecretArn: **[REQUIRED]** 

    The Amazon Resource Name (ARN) of the Amazon Web Services Secrets Manager secret that contains the credentials for the service account used to join hybrid domain controllers to your self-managed AD domain. This secret is used once and not stored.

     

    The secret must contain key-value pairs with keys matching ``customerAdAdminDomainUsername`` and ``customerAdAdminDomainPassword``. For example: ``{"customerAdAdminDomainUsername":"carlos_salazar","customerAdAdminDomainPassword":"ExamplePassword123!"}``.

    

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

    The unique identifier of the successful directory assessment that validates your self-managed AD environment. You must have a successful directory assessment before you create a hybrid directory.

    

  
  :type Tags: list
  :param Tags: 

    The tags to be assigned to the directory. Each tag consists of a key and value pair. You can specify multiple tags as a list.

    

  
    - *(dict) --* 

      Metadata assigned to a directory consisting of a key-value pair.

      

    
      - **Key** *(string) --* **[REQUIRED]** 

        Required name of the tag. The string value can be Unicode characters and cannot be prefixed with "aws:". The string can contain only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-', ':', '@'(Java regex: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$").

        

      
      - **Value** *(string) --* **[REQUIRED]** 

        The optional value of the tag. The string value can be Unicode characters. The string can contain only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-', ':', '@' (Java regex: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$").

        

      
    

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

    
    ::

      {
          'DirectoryId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **DirectoryId** *(string) --* 

        The unique identifier of the newly created hybrid directory.

        
  
  **Exceptions**
  
  *   :py:class:`DirectoryService.Client.exceptions.ClientException`

  
  *   :py:class:`DirectoryService.Client.exceptions.ServiceException`

  
  *   :py:class:`DirectoryService.Client.exceptions.InvalidParameterException`

  
  *   :py:class:`DirectoryService.Client.exceptions.UnsupportedOperationException`

  
  *   :py:class:`DirectoryService.Client.exceptions.DirectoryLimitExceededException`

  
  *   :py:class:`DirectoryService.Client.exceptions.ADAssessmentLimitExceededException`

  
  *   :py:class:`DirectoryService.Client.exceptions.EntityDoesNotExistException`

  