MarketplaceMeteringClient#
Index > MarketplaceMetering > MarketplaceMeteringClient
Auto-generated documentation for MarketplaceMetering type annotations stubs module types-aiobotocore-meteringmarketplace.
MarketplaceMeteringClient#
Type annotations and code completion for session.create_client("meteringmarketplace")
boto3 documentation
# MarketplaceMeteringClient usage example
from aiobotocore.session import get_session
from types_aiobotocore_meteringmarketplace.client import MarketplaceMeteringClient
session = get_session()
async with session.create_client("meteringmarketplace") as client:
client: MarketplaceMeteringClient
Exceptions#
aiobotocore
client exceptions are generated in runtime.
This class provides code completion for session.create_client("meteringmarketplace").exceptions
structure.
# MarketplaceMeteringClient.exceptions usage example
async with session.create_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)
# MarketplaceMeteringClient usage type checking example
from types_aiobotocore_meteringmarketplace.client import Exceptions
def handle_error(exc: Exceptions.ClientError) -> None:
...
Methods#
can_paginate#
Type annotations and code completion for session.create_client("meteringmarketplace").can_paginate
method.
boto3 documentation
# can_paginate method definition
def can_paginate(
self,
operation_name: str,
) -> bool:
...
generate_presigned_url#
Type annotations and code completion for session.create_client("meteringmarketplace").generate_presigned_url
method.
boto3 documentation
# generate_presigned_url method definition
await def generate_presigned_url(
self,
ClientMethod: str,
Params: Mapping[str, Any] = ...,
ExpiresIn: int = 3600,
HttpMethod: str = ...,
) -> str:
...
batch_meter_usage#
The CustomerIdentifier
parameter is scheduled for deprecation.
Type annotations and code completion for session.create_client("meteringmarketplace").batch_meter_usage
method.
boto3 documentation
# batch_meter_usage method definition
await def batch_meter_usage(
self,
*,
UsageRecords: Sequence[UsageRecordUnionTypeDef], # (1)
ProductCode: str,
) -> BatchMeterUsageResultTypeDef: # (2)
...
- See
Sequence[UsageRecordUnionTypeDef]
- See BatchMeterUsageResultTypeDef
# batch_meter_usage method usage example with argument unpacking
kwargs: BatchMeterUsageRequestTypeDef = { # (1)
"UsageRecords": ...,
"ProductCode": ...,
}
parent.batch_meter_usage(**kwargs)
meter_usage#
API to emit metering records.
Type annotations and code completion for session.create_client("meteringmarketplace").meter_usage
method.
boto3 documentation
# meter_usage method definition
await def meter_usage(
self,
*,
ProductCode: str,
Timestamp: TimestampTypeDef,
UsageDimension: str,
UsageQuantity: int = ...,
DryRun: bool = ...,
UsageAllocations: Sequence[UsageAllocationUnionTypeDef] = ..., # (1)
) -> MeterUsageResultTypeDef: # (2)
...
- See
Sequence[UsageAllocationUnionTypeDef]
- See MeterUsageResultTypeDef
# meter_usage method usage example with argument unpacking
kwargs: MeterUsageRequestTypeDef = { # (1)
"ProductCode": ...,
"Timestamp": ...,
"UsageDimension": ...,
}
parent.meter_usage(**kwargs)
register_usage#
Paid container software products sold through Amazon Web Services Marketplace
must integrate with the Amazon Web Services Marketplace Metering Service and
call the RegisterUsage
operation for software entitlement and
metering.
Type annotations and code completion for session.create_client("meteringmarketplace").register_usage
method.
boto3 documentation
# register_usage method definition
await def register_usage(
self,
*,
ProductCode: str,
PublicKeyVersion: int,
Nonce: str = ...,
) -> RegisterUsageResultTypeDef: # (1)
...
# register_usage method usage example with argument unpacking
kwargs: RegisterUsageRequestTypeDef = { # (1)
"ProductCode": ...,
"PublicKeyVersion": ...,
}
parent.register_usage(**kwargs)
resolve_customer#
ResolveCustomer
is called by a SaaS application during the
registration process.
Type annotations and code completion for session.create_client("meteringmarketplace").resolve_customer
method.
boto3 documentation
# resolve_customer method definition
await def resolve_customer(
self,
*,
RegistrationToken: str,
) -> ResolveCustomerResultTypeDef: # (1)
...
# resolve_customer method usage example with argument unpacking
kwargs: ResolveCustomerRequestTypeDef = { # (1)
"RegistrationToken": ...,
}
parent.resolve_customer(**kwargs)
__aenter__#
Type annotations and code completion for session.create_client("meteringmarketplace").__aenter__
method.
boto3 documentation
# __aenter__ method definition
await def __aenter__(
self,
) -> Self:
...
__aexit__#
Type annotations and code completion for session.create_client("meteringmarketplace").__aexit__
method.
boto3 documentation
# __aexit__ method definition
await def __aexit__(
self,
exc_type: Type[BaseException] | None,
exc_val: BaseException | None,
exc_tb: types.TracebackType | None,
) -> None:
...