:doc:`EC2 <../../ec2>` / Client / confirm_product_instance

************************
confirm_product_instance
************************



.. py:method:: EC2.Client.confirm_product_instance(**kwargs)

  

  Determines whether a product code is associated with an instance. This action can only be used by the owner of the product code. It is useful when a product code owner must verify whether another user's instance is eligible for support.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ConfirmProductInstance>`_  


  **Request Syntax**
  ::

    response = client.confirm_product_instance(
        InstanceId='string',
        ProductCode='string',
        DryRun=True|False
    )
    
  :type InstanceId: string
  :param InstanceId: **[REQUIRED]** 

    The ID of the instance.

    

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

    The product code. This must be a product code that you own.

    

  
  :type DryRun: boolean
  :param DryRun: 

    Checks whether you have the required permissions for the operation, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation``. Otherwise, it is ``UnauthorizedOperation``.

    

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

    
    ::

      {
          'Return': True|False,
          'OwnerId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Return** *(boolean) --* 

        The return value of the request. Returns ``true`` if the specified product code is owned by the requester and associated with the specified instance.

        
      

      - **OwnerId** *(string) --* 

        The Amazon Web Services account ID of the instance owner. This is only present if the product code is attached to the instance.

        
  

  **Examples**

  This example determines whether the specified product code is associated with the specified instance.
  ::

    response = client.confirm_product_instance(
        InstanceId='i-1234567890abcdef0',
        ProductCode='774F4FF8',
    )
    
    print(response)

  
  Expected Output:
  ::

    {
        'OwnerId': '123456789012',
        'ResponseMetadata': {
            '...': '...',
        },
    }

  