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

************************
get_on_premises_instance
************************



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

  

  Gets information about an on-premises instance.

  

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


  **Request Syntax**
  ::

    response = client.get_on_premises_instance(
        instanceName='string'
    )
    
  :type instanceName: string
  :param instanceName: **[REQUIRED]** 

    The name of the on-premises instance about which to get information.

    

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

    
    ::

      {
          'instanceInfo': {
              'instanceName': 'string',
              'iamSessionArn': 'string',
              'iamUserArn': 'string',
              'instanceArn': 'string',
              'registerTime': datetime(2015, 1, 1),
              'deregisterTime': datetime(2015, 1, 1),
              'tags': [
                  {
                      'Key': 'string',
                      'Value': 'string'
                  },
              ]
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 

      Represents the output of a ``GetOnPremisesInstance`` operation.

      
      

      - **instanceInfo** *(dict) --* 

        Information about the on-premises instance.

        
        

        - **instanceName** *(string) --* 

          The name of the on-premises instance.

          
        

        - **iamSessionArn** *(string) --* 

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

          
        

        - **iamUserArn** *(string) --* 

          The user ARN associated with the on-premises instance.

          
        

        - **instanceArn** *(string) --* 

          The ARN of the on-premises instance.

          
        

        - **registerTime** *(datetime) --* 

          The time at which the on-premises instance was registered.

          
        

        - **deregisterTime** *(datetime) --* 

          If the on-premises instance was deregistered, the time at which the on-premises instance was deregistered.

          
        

        - **tags** *(list) --* 

          The tags currently associated with the on-premises instance.

          
          

          - *(dict) --* 

            Information about a tag.

            
            

            - **Key** *(string) --* 

              The tag's key.

              
            

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

              The tag's value.

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

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

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

  