Skip to content

MarketplaceMeteringClient

Index > MarketplaceMetering > MarketplaceMeteringClient

Auto-generated documentation for MarketplaceMetering type annotations stubs module types-aiobotocore-meteringmarketplace.

MarketplaceMeteringClient

Type annotations and code completion for session.client("meteringmarketplace") boto3 documentation

Usage example
from aioboto3.session import Session
from types_aiobotocore_meteringmarketplace.client import MarketplaceMeteringClient

session = Session()
async with session.client("meteringmarketplace") as client:
    client: MarketplaceMeteringClient

Exceptions

aioboto3 client exceptions are generated in runtime. This class provides code completion for session.client("meteringmarketplace").exceptions structure.

Usage example
async with session.client("meteringmarketplace") as client:
    try:
        do_something(client)
    except (
            client.ClientError,
        client.CustomerNotEntitledException,
        client.DisabledApiException,
        client.DuplicateRequestException,
        client.ExpiredTokenException,
        client.InternalServiceErrorException,
        client.InvalidCustomerIdentifierException,
        client.InvalidEndpointRegionException,
        client.InvalidProductCodeException,
        client.InvalidPublicKeyVersionException,
        client.InvalidRegionException,
        client.InvalidTagException,
        client.InvalidTokenException,
        client.InvalidUsageAllocationsException,
        client.InvalidUsageDimensionException,
        client.PlatformNotSupportedException,
        client.ThrottlingException,
        client.TimestampOutOfBoundsException,
    ) as e:
        print(e)
Type checking example
from types_aiobotocore_meteringmarketplace.client import Exceptions

def handle_error(exc: Exceptions.ClientError) -> None:
    ...

Methods

batch_meter_usage

BatchMeterUsage is called from a SaaS application listed on AWS Marketplace to post metering records for a set of customers.

Type annotations and code completion for session.client("meteringmarketplace").batch_meter_usage method. boto3 documentation

Method definition
await def batch_meter_usage(
    self,
    *,
    UsageRecords: Sequence[UsageRecordTypeDef],  # (1)
    ProductCode: str,
) -> BatchMeterUsageResultTypeDef:  # (2)
    ...
  1. See UsageRecordTypeDef
  2. See BatchMeterUsageResultTypeDef
Usage example with kwargs
kwargs: BatchMeterUsageRequestRequestTypeDef = {  # (1)
    "UsageRecords": ...,
    "ProductCode": ...,
}

parent.batch_meter_usage(**kwargs)
  1. See BatchMeterUsageRequestRequestTypeDef

can_paginate

Check if an operation can be paginated.

Type annotations and code completion for session.client("meteringmarketplace").can_paginate method. boto3 documentation

Method definition
def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

close

Closes underlying endpoint connections.

Type annotations and code completion for session.client("meteringmarketplace").close method. boto3 documentation

Method definition
await def close(
    self,
) -> None:
    ...

generate_presigned_url

Generate a presigned url given a client, its method, and arguments.

Type annotations and code completion for session.client("meteringmarketplace").generate_presigned_url method. boto3 documentation

Method definition
await def generate_presigned_url(
    self,
    ClientMethod: str,
    Params: Mapping[str, Any] = ...,
    ExpiresIn: int = 3600,
    HttpMethod: str = ...,
) -> str:
    ...

meter_usage

API to emit metering records.

Type annotations and code completion for session.client("meteringmarketplace").meter_usage method. boto3 documentation

Method definition
await def meter_usage(
    self,
    *,
    ProductCode: str,
    Timestamp: Union[datetime, str],
    UsageDimension: str,
    UsageQuantity: int = ...,
    DryRun: bool = ...,
    UsageAllocations: Sequence[UsageAllocationTypeDef] = ...,  # (1)
) -> MeterUsageResultTypeDef:  # (2)
    ...
  1. See UsageAllocationTypeDef
  2. See MeterUsageResultTypeDef
Usage example with kwargs
kwargs: MeterUsageRequestRequestTypeDef = {  # (1)
    "ProductCode": ...,
    "Timestamp": ...,
    "UsageDimension": ...,
}

parent.meter_usage(**kwargs)
  1. See MeterUsageRequestRequestTypeDef

register_usage

Paid container software products sold through AWS Marketplace must integrate with the AWS Marketplace Metering Service and call the RegisterUsage operation for software entitlement and metering.

Type annotations and code completion for session.client("meteringmarketplace").register_usage method. boto3 documentation

Method definition
await def register_usage(
    self,
    *,
    ProductCode: str,
    PublicKeyVersion: int,
    Nonce: str = ...,
) -> RegisterUsageResultTypeDef:  # (1)
    ...
  1. See RegisterUsageResultTypeDef
Usage example with kwargs
kwargs: RegisterUsageRequestRequestTypeDef = {  # (1)
    "ProductCode": ...,
    "PublicKeyVersion": ...,
}

parent.register_usage(**kwargs)
  1. See RegisterUsageRequestRequestTypeDef

resolve_customer

ResolveCustomer is called by a SaaS application during the registration process.

Type annotations and code completion for session.client("meteringmarketplace").resolve_customer method. boto3 documentation

Method definition
await def resolve_customer(
    self,
    *,
    RegistrationToken: str,
) -> ResolveCustomerResultTypeDef:  # (1)
    ...
  1. See ResolveCustomerResultTypeDef
Usage example with kwargs
kwargs: ResolveCustomerRequestRequestTypeDef = {  # (1)
    "RegistrationToken": ...,
}

parent.resolve_customer(**kwargs)
  1. See ResolveCustomerRequestRequestTypeDef

__aenter__

Type annotations and code completion for session.client("meteringmarketplace").__aenter__ method. boto3 documentation

Method definition
await def __aenter__(
    self,
) -> MarketplaceMeteringClient:
    ...

__aexit__

Type annotations and code completion for session.client("meteringmarketplace").__aexit__ method. boto3 documentation

Method definition
await def __aexit__(
    self,
    exc_type: Any,
    exc_val: Any,
    exc_tb: Any,
) -> Any:
    ...