Marketplace Metering API, gRPC: ImageProductUsageService
Статья создана
Обновлена 25 сентября 2023 г.
A set of methods for managing image product's usage.
Call | Description |
---|---|
Write | Writes image product's usage. |
Calls ImageProductUsageService
Write
Writes image product's usage. Authentication is by user's service account.
rpc Write (WriteImageProductUsageRequest) returns (WriteImageProductUsageResponse)
WriteImageProductUsageRequest
Field | Description |
---|---|
validate_only | bool Checks whether you have the access required for the emit usage. |
product_id | string Required. Marketplace Product's ID. The maximum string length in characters is 50. |
usage_records[] | UsageRecord List of product usage records (up to 25 per request). The number of elements must be in the range 1-25. |
UsageRecord
Field | Description |
---|---|
uuid | string Required. Unique identifier of the usage record (UUID format). The maximum string length in characters is 36. |
sku_id | string Required. Consumed Marketplace SKU ID, linked to UsageRecord.product_id . The maximum string length in characters is 50. |
quantity | int64 Quantity of SKU consumed, measured in sku.usage_unit units (e.g. bytes). Value must be greater than 0. |
timestamp | google.protobuf.Timestamp Required. Timestamp in UTC for which the usage is being reported. |
WriteImageProductUsageResponse
Field | Description |
---|---|
accepted[] | AcceptedUsageRecord List of accepted product usage records. |
rejected[] | RejectedUsageRecord List of rejected product usage records (with reason). |
AcceptedUsageRecord
Field | Description |
---|---|
uuid | string Unique identifier of the usage record (UUID format). |
RejectedUsageRecord
Field | Description |
---|---|
uuid | string Unique identifier of the usage record (UUID format). |
reason | enum Reason The reason of rejection. |