MarketplaceMeteringClient#
Index > MarketplaceMetering > MarketplaceMeteringClient
Auto-generated documentation for MarketplaceMetering type annotations stubs module mypy-boto3-meteringmarketplace.
MarketplaceMeteringClient#
Type annotations and code completion for boto3.client("meteringmarketplace")
.
boto3 documentation
# MarketplaceMeteringClient usage example
from boto3.session import Session
from mypy_boto3_meteringmarketplace.client import MarketplaceMeteringClient
def get_meteringmarketplace_client() -> MarketplaceMeteringClient:
return Session().client("meteringmarketplace")
Exceptions#
boto3
client exceptions are generated in runtime.
This class provides code completion for boto3.client("meteringmarketplace").exceptions
structure.
# Exceptions.exceptions usage example
client = boto3.client("meteringmarketplace")
try:
do_something(client)
except (
client.exceptions.ClientError,
client.exceptions.CustomerNotEntitledException,
client.exceptions.DisabledApiException,
client.exceptions.DuplicateRequestException,
client.exceptions.ExpiredTokenException,
client.exceptions.InternalServiceErrorException,
client.exceptions.InvalidCustomerIdentifierException,
client.exceptions.InvalidEndpointRegionException,
client.exceptions.InvalidProductCodeException,
client.exceptions.InvalidPublicKeyVersionException,
client.exceptions.InvalidRegionException,
client.exceptions.InvalidTagException,
client.exceptions.InvalidTokenException,
client.exceptions.InvalidUsageAllocationsException,
client.exceptions.InvalidUsageDimensionException,
client.exceptions.PlatformNotSupportedException,
client.exceptions.ThrottlingException,
client.exceptions.TimestampOutOfBoundsException,
) as e:
print(e)
# Exceptions.exceptions type checking example
from mypy_boto3_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 boto3.client("meteringmarketplace").batch_meter_usage
method.
boto3 documentation
# batch_meter_usage method definition
def batch_meter_usage(
self,
*,
UsageRecords: Sequence[UsageRecordUnionTypeDef], # (1)
ProductCode: str,
) -> BatchMeterUsageResultTypeDef: # (2)
...
# batch_meter_usage method usage example with argument unpacking
kwargs: BatchMeterUsageRequestRequestTypeDef = { # (1)
"UsageRecords": ...,
"ProductCode": ...,
}
parent.batch_meter_usage(**kwargs)
can_paginate#
Check if an operation can be paginated.
Type annotations and code completion for boto3.client("meteringmarketplace").can_paginate
method.
boto3 documentation
# can_paginate method definition
def can_paginate(
self,
operation_name: str,
) -> bool:
...
close#
Closes underlying endpoint connections.
Type annotations and code completion for boto3.client("meteringmarketplace").close
method.
boto3 documentation
# close method definition
def close(
self,
) -> None:
...
generate_presigned_url#
Generate a presigned url given a client, its method, and arguments.
Type annotations and code completion for boto3.client("meteringmarketplace").generate_presigned_url
method.
boto3 documentation
# generate_presigned_url method definition
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 boto3.client("meteringmarketplace").meter_usage
method.
boto3 documentation
# meter_usage method definition
def meter_usage(
self,
*,
ProductCode: str,
Timestamp: TimestampTypeDef,
UsageDimension: str,
UsageQuantity: int = ...,
DryRun: bool = ...,
UsageAllocations: Sequence[UsageAllocationUnionTypeDef] = ..., # (1)
) -> MeterUsageResultTypeDef: # (2)
...
# meter_usage method usage example with argument unpacking
kwargs: MeterUsageRequestRequestTypeDef = { # (1)
"ProductCode": ...,
"Timestamp": ...,
"UsageDimension": ...,
}
parent.meter_usage(**kwargs)
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 boto3.client("meteringmarketplace").register_usage
method.
boto3 documentation
# register_usage method definition
def register_usage(
self,
*,
ProductCode: str,
PublicKeyVersion: int,
Nonce: str = ...,
) -> RegisterUsageResultTypeDef: # (1)
...
# register_usage method usage example with argument unpacking
kwargs: RegisterUsageRequestRequestTypeDef = { # (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 boto3.client("meteringmarketplace").resolve_customer
method.
boto3 documentation
# resolve_customer method definition
def resolve_customer(
self,
*,
RegistrationToken: str,
) -> ResolveCustomerResultTypeDef: # (1)
...
# resolve_customer method usage example with argument unpacking
kwargs: ResolveCustomerRequestRequestTypeDef = { # (1)
"RegistrationToken": ...,
}
parent.resolve_customer(**kwargs)