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
Request Syntax
response = client.confirm_product_instance(
InstanceId='string',
ProductCode='string',
DryRun=True|False
)
[REQUIRED]
The ID of the instance.
[REQUIRED]
The product code. This must be a product code that you own.
DryRunOperation
. Otherwise, it is UnauthorizedOperation
.dict
Response Syntax
{
'OwnerId': 'string',
'Return': True|False
}
Response Structure
(dict) --
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.
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.
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': {
'...': '...',
},
}