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

*******************
create_microsoft_ad
*******************



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

  

  Creates a Microsoft AD directory in the Amazon Web Services Cloud. For more information, see `Managed Microsoft AD <https://docs.aws.amazon.com/directoryservice/latest/admin-guide/directory_microsoft_ad.html>`__ in the *Directory Service Admin Guide*.

   

  Before you call *CreateMicrosoftAD*, ensure that all of the required permissions have been explicitly granted through a policy. For details about what permissions are required to run the *CreateMicrosoftAD* operation, see `Directory Service API Permissions\: Actions, Resources, and Conditions Reference <http://docs.aws.amazon.com/directoryservice/latest/admin-guide/UsingWithDS_IAM_ResourcePermissions.html>`__.

  

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


  **Request Syntax**
  ::

    response = client.create_microsoft_ad(
        Name='string',
        ShortName='string',
        Password='string',
        Description='string',
        VpcSettings={
            'VpcId': 'string',
            'SubnetIds': [
                'string',
            ]
        },
        Edition='Enterprise'|'Standard'|'Hybrid',
        Tags=[
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        NetworkType='Dual-stack'|'IPv4'|'IPv6'
    )
    
  :type Name: string
  :param Name: **[REQUIRED]** 

    The fully qualified domain name for the Managed Microsoft AD directory, such as ``corp.example.com``. This name will resolve inside your VPC only. It does not need to be publicly resolvable.

    

  
  :type ShortName: string
  :param ShortName: 

    The NetBIOS name for your domain, such as ``CORP``. If you don't specify a NetBIOS name, it will default to the first part of your directory DNS. For example, ``CORP`` for the directory DNS ``corp.example.com``.

    

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

    The password for the default administrative user named ``Admin``.

     

    If you need to change the password for the administrator account, you can use the  ResetUserPassword API call.

    

  
  :type Description: string
  :param Description: 

    A description for the directory. This label will appear on the Amazon Web Services console ``Directory Details`` page after the directory is created.

    

  
  :type VpcSettings: dict
  :param VpcSettings: **[REQUIRED]** 

    Contains VPC information for the  CreateDirectory or  CreateMicrosoftAD operation.

    

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

      The identifier of the VPC in which to create the directory.

      

    
    - **SubnetIds** *(list) --* **[REQUIRED]** 

      The identifiers of the subnets for the directory servers. The two subnets must be in different Availability Zones. Directory Service creates a directory server and a DNS server in each of these subnets.

      

    
      - *(string) --* 

      
  
  
  :type Edition: string
  :param Edition: 

    Managed Microsoft AD is available in two editions: ``Standard`` and ``Enterprise``. ``Enterprise`` is the default.

    

  
  :type Tags: list
  :param Tags: 

    The tags to be assigned to the Managed Microsoft AD directory.

    

  
    - *(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}_.:/=+\\-]*)$").

        

      
    

  :type NetworkType: string
  :param NetworkType: 

    The network type for your domain. The default value is ``IPv4`` or ``IPv6`` based on the provided subnet capabilities.

    

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

    
    ::

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

    

    - *(dict) --* 

      Result of a CreateMicrosoftAD request.

      
      

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

        The identifier of the directory that was created.

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

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

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

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

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

  