Skip to content

MeterUsageRequest

Source code in docs_src/capo_marketplace_metering/types/meter_usage_request.py
class MeterUsageRequest(TypedDict, closed=True):
    product_code: "capo_marketplace_metering.types.product_code.ProductCode"
    """<p>Product code is used to uniquely identify a product in Amazon Web Services Marketplace. The product code should be the same as the one used during the publishing of a new product.</p>"""
    timestamp: "capo_marketplace_metering.types.timestamp.Timestamp"
    """<p>Timestamp, in UTC, for which the usage is being reported. Your application can meter usage for up to six hours in the past. Make sure the <code>timestamp</code> value is not before the start of the software usage.</p>"""
    usage_dimension: "capo_marketplace_metering.types.usage_dimension.UsageDimension"
    """<p>It will be one of the fcp dimension name provided during the publishing of the product.</p>"""
    usage_quantity: NotRequired[
        "capo_marketplace_metering.types.usage_quantity.UsageQuantity"
    ]
    """<p>The consumption value for the hour, as a whole number. Defaults to <code>0</code> if neither <code>UsageQuantity</code> nor <code>UsageQuantityAsDecimal</code> is specified.</p> <p>Use <code>UsageQuantityAsDecimal</code> instead. You can't specify both <code>UsageQuantity</code> and <code>UsageQuantityAsDecimal</code>.</p>"""
    usage_quantity_as_decimal: NotRequired[
        "capo_marketplace_metering.types.usage_quantity_as_decimal_string.UsageQuantityAsDecimalString"
    ]
    """<p>The consumption value for the hour, as a decimal string. Use this instead of <code>UsageQuantity</code> to report fractional usage.</p> <p>A non-negative decimal number, for example <code>17.42</code>.</p> <p>You can't specify both <code>UsageQuantity</code> and <code>UsageQuantityAsDecimal</code>. If you provide <code>UsageAllocations</code>, each allocation must use <code>AllocatedUsageQuantityAsDecimal</code>.</p> <p>Quantities are compared by value when checking for duplicate or retried requests, so <code>17</code>, <code>17.0</code>, and <code>17.00</code> are the same quantity, whether you send it in <code>UsageQuantity</code> or <code>UsageQuantityAsDecimal</code>.</p>"""
    dry_run: NotRequired["capo_marketplace_metering.types.boolean.Boolean"]
    """<p>Checks whether you have the permissions required for the action, but does not make the request. If you have the permissions, the request returns <code>DryRunOperation</code>; otherwise, it returns <code>UnauthorizedException</code>. Defaults to <code>false</code> if not specified.</p>"""
    usage_allocations: NotRequired[
        "capo_marketplace_metering.types.usage_allocations.UsageAllocations"
    ]
    """<p>The set of <code>UsageAllocations</code> to submit.</p> <p>The sum of all <code>UsageAllocation</code> quantities must equal the usage quantity of the <code>MeterUsage</code> request (<code>UsageQuantity</code> or <code>UsageQuantityAsDecimal</code>), and each <code>UsageAllocation</code> must have a unique set of tags (include no tags). Allocations must use the same type of quantity as the request: <code>AllocatedUsageQuantity</code> with <code>UsageQuantity</code>, or <code>AllocatedUsageQuantityAsDecimal</code> with <code>UsageQuantityAsDecimal</code>.</p>"""
    client_token: NotRequired[
        "capo_marketplace_metering.types.client_token.ClientToken"
    ]
    """<p>Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a <a href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID type of value</a>.</p> <p>If you don't provide this value, then Amazon Web Services generates a random one for you.</p> <p>If you retry the operation with the same <code>ClientToken</code>, but with different parameters, the retry fails with an <code>IdempotencyConflictException</code> error.</p>"""

client_token instance-attribute

client_token: NotRequired[ClientToken]

Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value.

If you don't provide this value, then Amazon Web Services generates a random one for you.

If you retry the operation with the same ClientToken, but with different parameters, the retry fails with an IdempotencyConflictException error.

dry_run instance-attribute

dry_run: NotRequired[Boolean]

Checks whether you have the permissions required for the action, but does not make the request. If you have the permissions, the request returns DryRunOperation; otherwise, it returns UnauthorizedException. Defaults to false if not specified.

product_code instance-attribute

product_code: ProductCode

Product code is used to uniquely identify a product in Amazon Web Services Marketplace. The product code should be the same as the one used during the publishing of a new product.

timestamp instance-attribute

timestamp: Timestamp

Timestamp, in UTC, for which the usage is being reported. Your application can meter usage for up to six hours in the past. Make sure the timestamp value is not before the start of the software usage.

usage_allocations instance-attribute

usage_allocations: NotRequired[UsageAllocations]

The set of UsageAllocations to submit.

The sum of all UsageAllocation quantities must equal the usage quantity of the MeterUsage request (UsageQuantity or UsageQuantityAsDecimal), and each UsageAllocation must have a unique set of tags (include no tags). Allocations must use the same type of quantity as the request: AllocatedUsageQuantity with UsageQuantity, or AllocatedUsageQuantityAsDecimal with UsageQuantityAsDecimal.

usage_dimension instance-attribute

usage_dimension: UsageDimension

It will be one of the fcp dimension name provided during the publishing of the product.

usage_quantity instance-attribute

usage_quantity: NotRequired[UsageQuantity]

The consumption value for the hour, as a whole number. Defaults to 0 if neither UsageQuantity nor UsageQuantityAsDecimal is specified.

Use UsageQuantityAsDecimal instead. You can't specify both UsageQuantity and UsageQuantityAsDecimal.

usage_quantity_as_decimal instance-attribute

usage_quantity_as_decimal: NotRequired[UsageQuantityAsDecimalString]

The consumption value for the hour, as a decimal string. Use this instead of UsageQuantity to report fractional usage.

A non-negative decimal number, for example 17.42.

You can't specify both UsageQuantity and UsageQuantityAsDecimal. If you provide UsageAllocations, each allocation must use AllocatedUsageQuantityAsDecimal.

Quantities are compared by value when checking for duplicate or retried requests, so 17, 17.0, and 17.00 are the same quantity, whether you send it in UsageQuantity or UsageQuantityAsDecimal.