:doc:`CodeDeploy <../../codedeploy>` / Client / register_on_premises_instance

*****************************
register_on_premises_instance
*****************************



.. py:method:: CodeDeploy.Client.register_on_premises_instance(**kwargs)

  

  Registers an on-premises instance.

   

  .. note::

    

    Only one IAM ARN (an IAM session ARN or IAM user ARN) is supported in the request. You cannot use both.

    

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/codedeploy-2014-10-06/RegisterOnPremisesInstance>`_  


  **Request Syntax**
  ::

    response = client.register_on_premises_instance(
        instanceName='string',
        iamSessionArn='string',
        iamUserArn='string'
    )
    
  :type instanceName: string
  :param instanceName: **[REQUIRED]** 

    The name of the on-premises instance to register.

    

  
  :type iamSessionArn: string
  :param iamSessionArn: 

    The ARN of the IAM session to associate with the on-premises instance.

    

  
  :type iamUserArn: string
  :param iamUserArn: 

    The ARN of the user to associate with the on-premises instance.

    

  
  
  :returns: None
  **Exceptions**
  
  *   :py:class:`CodeDeploy.Client.exceptions.InstanceNameAlreadyRegisteredException`

  
  *   :py:class:`CodeDeploy.Client.exceptions.IamArnRequiredException`

  
  *   :py:class:`CodeDeploy.Client.exceptions.IamSessionArnAlreadyRegisteredException`

  
  *   :py:class:`CodeDeploy.Client.exceptions.IamUserArnAlreadyRegisteredException`

  
  *   :py:class:`CodeDeploy.Client.exceptions.InstanceNameRequiredException`

  
  *   :py:class:`CodeDeploy.Client.exceptions.IamUserArnRequiredException`

  
  *   :py:class:`CodeDeploy.Client.exceptions.InvalidInstanceNameException`

  
  *   :py:class:`CodeDeploy.Client.exceptions.InvalidIamSessionArnException`

  
  *   :py:class:`CodeDeploy.Client.exceptions.InvalidIamUserArnException`

  
  *   :py:class:`CodeDeploy.Client.exceptions.MultipleIamArnsProvidedException`

  