Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex Cloud Marketplace
    • Getting started
    • Access management
      • Getting started with the API
        • Overview
          • Overview
          • Write
    • Access management
    • Audit Trails events

In this article:

  • gRPC request
  • WriteImageProductUsageRequest
  • UsageRecord
  • WriteImageProductUsageResponse
  • AcceptedUsageRecord
  • RejectedUsageRecord
  1. Partners
  2. Metering API reference
  3. gRPC
  4. ImageProductUsage
  5. Write

Marketplace Metering API, gRPC: ImageProductUsageService.Write

Written by
Yandex Cloud
Updated at November 26, 2024
  • gRPC request
  • WriteImageProductUsageRequest
  • UsageRecord
  • WriteImageProductUsageResponse
  • AcceptedUsageRecord
  • RejectedUsageRecord

Writes image product's usage. Authentication is by user's service account.

gRPC requestgRPC request

rpc Write (WriteImageProductUsageRequest) returns (WriteImageProductUsageResponse)

WriteImageProductUsageRequestWriteImageProductUsageRequest

{
  "validate_only": "bool",
  "product_id": "string",
  "usage_records": [
    {
      "uuid": "string",
      "sku_id": "string",
      "quantity": "int64",
      "timestamp": "google.protobuf.Timestamp"
    }
  ]
}

Field

Description

validate_only

bool

Checks whether you have the access required for the emit usage.

product_id

string

Required field. Marketplace Product's ID.

usage_records[]

UsageRecord

List of product usage records (up to 25 per request).

UsageRecordUsageRecord

Field

Description

uuid

string

Required field. Unique identifier of the usage record (UUID format).

sku_id

string

Required field. Consumed Marketplace SKU ID, linked to UsageRecord.product_id.

quantity

int64

Quantity of SKU consumed, measured in sku.usage_unit units (e.g. bytes).

timestamp

google.protobuf.Timestamp

Required field. Timestamp in UTC for which the usage is being reported.

WriteImageProductUsageResponseWriteImageProductUsageResponse

{
  "accepted": [
    {
      "uuid": "string"
    }
  ],
  "rejected": [
    {
      "uuid": "string",
      "reason": "Reason"
    }
  ]
}

Field

Description

accepted[]

AcceptedUsageRecord

List of accepted product usage records.

rejected[]

RejectedUsageRecord

List of rejected product usage records (with reason).

AcceptedUsageRecordAcceptedUsageRecord

Field

Description

uuid

string

Unique identifier of the usage record (UUID format).

RejectedUsageRecordRejectedUsageRecord

Field

Description

uuid

string

Unique identifier of the usage record (UUID format).

reason

enum Reason

The reason of rejection.

  • REASON_UNSPECIFIED
  • DUPLICATE
  • EXPIRED
  • INVALID_TIMESTAMP
  • INVALID_SKU_ID
  • INVALID_PRODUCT_ID
  • INVALID_QUANTITY
  • INVALID_ID

Was the article helpful?

Previous
Overview
Next
Overview
Yandex project
© 2025 Yandex.Cloud LLC