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

***************
create_computer
***************



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

  

  Creates an Active Directory computer object in the specified directory.

  

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


  **Request Syntax**
  ::

    response = client.create_computer(
        DirectoryId='string',
        ComputerName='string',
        Password='string',
        OrganizationalUnitDistinguishedName='string',
        ComputerAttributes=[
            {
                'Name': 'string',
                'Value': 'string'
            },
        ]
    )
    
  :type DirectoryId: string
  :param DirectoryId: **[REQUIRED]** 

    The identifier of the directory in which to create the computer account.

    

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

    The name of the computer account.

    

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

    A one-time password that is used to join the computer to the directory. You should generate a random, strong password to use for this parameter.

    

  
  :type OrganizationalUnitDistinguishedName: string
  :param OrganizationalUnitDistinguishedName: 

    The fully-qualified distinguished name of the organizational unit to place the computer account in.

    

  
  :type ComputerAttributes: list
  :param ComputerAttributes: 

    An array of  Attribute objects that contain any LDAP attributes to apply to the computer account.

    

  
    - *(dict) --* 

      Represents a named directory attribute.

      

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

        The name of the attribute.

        

      
      - **Value** *(string) --* 

        The value of the attribute.

        

      
    

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

    
    ::

      {
          'Computer': {
              'ComputerId': 'string',
              'ComputerName': 'string',
              'ComputerAttributes': [
                  {
                      'Name': 'string',
                      'Value': 'string'
                  },
              ]
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 

      Contains the results for the  CreateComputer operation.

      
      

      - **Computer** *(dict) --* 

        A  Computer object that represents the computer account.

        
        

        - **ComputerId** *(string) --* 

          The identifier of the computer.

          
        

        - **ComputerName** *(string) --* 

          The computer name.

          
        

        - **ComputerAttributes** *(list) --* 

          An array of  Attribute objects containing the LDAP attributes that belong to the computer account.

          
          

          - *(dict) --* 

            Represents a named directory attribute.

            
            

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

              The name of the attribute.

              
            

            - **Value** *(string) --* 

              The value of the attribute.

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

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

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

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

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

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

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

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

  