Yandex Cloud
Search
Contact UsGet started
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • AI for business
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
Yandex Cloud Billing
  • Getting started
  • Access management
  • Pricing policy
  • Terraform reference
    • API authentication
        • Overview
          • Overview
          • GetBillingAccountUsageReport
          • GetCloudUsageReport
          • GetFolderUsageReport
          • GetServiceUsageReport
          • GetSKUUsageReport
          • GetResourceUsageReport
          • GetLabelKeyUsageReport
  • Audit Trails events

In this article:

  • gRPC request
  • UsageReportRequest
  • LabelList
  • ResourceUsageReportResponse
  • StringDecimal
  • CreditDetails
  • ResourceUsageReportEntityData
  • Resource
  • UsageReportPeriodicData
  1. API reference
  2. gRPC
  3. Billing usage
  4. ConsumptionCore
  5. GetResourceUsageReport

Billing Usage API, gRPC: ConsumptionCoreService.GetResourceUsageReport

Written by
Yandex Cloud
Updated at October 30, 2025
  • gRPC request
  • UsageReportRequest
  • LabelList
  • ResourceUsageReportResponse
  • StringDecimal
  • CreditDetails
  • ResourceUsageReportEntityData
  • Resource
  • UsageReportPeriodicData

Returns aggregated usage report by individual resource
under the specified billing account.

This method provides detailed usage and cost information grouped by individual resources
within the specified billing account. The data can be filtered by various
entity types and aggregated at different time granularities.

Implementation details:

  • Results are organized by resource, with each resource's usage, costs, and credits detailed
  • If resource_ids are specified, only data for those resources is included (using OR logic)
  • When no resource_ids are specified, data for all resources under the billing account is returned
  • Other filters (cloud_ids, folder_ids, service_ids, sku_ids, labels) are always applied if present
  • This provides the most granular view of costs as it breaks down to the individual resource level
  • Enables precise cost analysis at the individual resource instance level (specific VMs, disks, etc.)

Error handling:

  • Returns INVALID_ARGUMENT if the request parameters fail validation
  • Returns UNAUTHENTICATED if the user is not authenticated or the billing account does not exist
  • Returns PERMISSION_DENIED if the user lacks required permissions
  • Returns INTERNAL for internal server errors

gRPC requestgRPC request

rpc GetResourceUsageReport (UsageReportRequest) returns (ResourceUsageReportResponse)

UsageReportRequestUsageReportRequest

{
  "billing_account_id": "string",
  "start_date": "google.protobuf.Timestamp",
  "end_date": "google.protobuf.Timestamp",
  "cloud_ids": [
    "string"
  ],
  "folder_ids": [
    "string"
  ],
  "service_ids": [
    "string"
  ],
  "sku_ids": [
    "string"
  ],
  "labels": "map<string, LabelList>",
  "resource_ids": [
    "string"
  ],
  "aggregation_period": "TimeGrouping"
}

Request for retrieving usage report data.

This message defines the parameters for requesting usage reports across
all ConsumptionCoreService methods. It supports filtering by various
entity types and specifying the time range and aggregation period.

Field

Description

billing_account_id

string

Required field. Required. Billing account identifier.

start_date

google.protobuf.Timestamp

Required field. Required. Inclusive start date for metrics selection (UTC).
This timestamp defines the beginning of the reporting period.
All usage data starting from this timestamp will be included in the report.
Note: The time component (hours/minutes/seconds) is ignored since the smallest
aggregation period is a day. For example, both 2023-04-15T00:00:00 and
2023-04-15T23:59:59 will include the entire day of April 15, 2023.
For best results, align with natural time boundaries (start of day, month)
based on your aggregation_period value.

end_date

google.protobuf.Timestamp

Required field. Required. Inclusive end date for metrics selection (UTC).
This timestamp defines the end of the reporting period.
All usage data up to and including this timestamp will be included in the report.
Note: The time component (hours/minutes/seconds) is ignored since the smallest
aggregation period is a day. For example, both 2023-04-15T00:00:00 and
2023-04-15T23:59:59 will include the entire day of April 15, 2023.
For best results, align with natural time boundaries (end of day, month)
based on your aggregation_period value.

cloud_ids[]

string

Optional. List of cloud IDs to filter the data.
If specified, only usage data from these clouds will be included in the report.
If omitted, data from all clouds available to the billing account will be included.
The filter is applied with OR logic (results include data matching any of the specified cloud IDs).

folder_ids[]

string

Optional. List of folder IDs to filter the data.
If specified, only usage data from these folders will be included in the report.
If omitted, data from all folders available to the billing account will be included.
The filter is applied with OR logic (results include data matching any of the specified folder IDs).

service_ids[]

string

Optional. List of Service IDs to filter the data.
If specified, only usage data from these services (e.g., Compute, Storage, AI) will be included.
If omitted, data from all services used by the billing account will be included.
The filter is applied with OR logic (results include data matching any of the specified service IDs).

sku_ids[]

string

Optional. List of SKU (Stock Keeping Unit) IDs to filter the data.
If specified, only usage data from these specific SKUs will be included.
If omitted, data from all SKUs used by the billing account will be included.
The filter is applied with OR logic (results include data matching any of the specified SKU IDs).

labels

object (map<string, LabelList>)

Optional. Filter by labels: key is label key (e.g., "env", "team", "region"),
value is list of label values to match (e.g., ["prod", "stage"] for key "env").
This allows filtering resources based on their attached labels.

Example: To filter resources that have either (env=prod OR env=test) AND (team=finance),
use the following filter:
{
"env": { "values": ["prod", "test"] },
"team": { "values": ["finance"] }
}

Note: The filter logic is (value1 OR value2 OR ...) for each key,
and (key1 AND key2 AND ...) between different keys.

resource_ids[]

string

Optional. List of resource IDs to filter the data.
If specified, only usage data from these specific resources (e.g., individual VMs, disks) will be included.
If omitted, data from all resources used by the billing account will be included.
Filter is applied with OR logic (results include data matching any of the specified resource IDs).

aggregation_period

enum TimeGrouping

Optional. Aggregation granularity for the report, controlling how data points are grouped
in time series results. Available options include:

  • DAY: Group metrics by day, providing daily breakdowns
  • WEEK: Group metrics by week, providing weekly breakdowns
  • MONTH: Group metrics by month, providing monthly breakdowns
  • QUARTER: Group metrics by quarter, providing quarterly breakdowns
  • YEAR: Group metrics by year, providing yearly breakdowns

This setting affects the time series data returned in the periodic field of each entity.
If omitted, the service will typically use DAY as the default granularity.

  • TIME_GROUPING_UNSPECIFIED: Default unspecified value. Typically treated as DAY.
  • DAY: Group reports by day.
  • WEEK: Group reports by week.
  • MONTH: Group reports by month.
  • QUARTER: Group reports by quarter (3-month periods).
  • YEAR: Group reports by year.

LabelListLabelList

Represents a list of label values for filtering or grouping in usage reports.
For example, to filter resources with label key "env" that have value "prod" or "test",
a LabelList with values ["prod", "test"] would be used for the key "env".

Field

Description

values[]

string

List of label values associated with a specific label key.

ResourceUsageReportResponseResourceUsageReportResponse

{
  "currency": "Currency",
  "cost": {
    "value": "string"
  },
  "credit_details": {
    "credit": {
      "value": "string"
    },
    "monetary_grant_credit": {
      "value": "string"
    },
    "volume_incentive_credit": {
      "value": "string"
    },
    "cud_credit": {
      "value": "string"
    },
    "free_credit": {
      "value": "string"
    }
  },
  "expense": {
    "value": "string"
  },
  "entities_data": [
    {
      "cost": {
        "value": "string"
      },
      "credit_details": {
        "credit": {
          "value": "string"
        },
        "monetary_grant_credit": {
          "value": "string"
        },
        "volume_incentive_credit": {
          "value": "string"
        },
        "cud_credit": {
          "value": "string"
        },
        "free_credit": {
          "value": "string"
        }
      },
      "expense": {
        "value": "string"
      },
      "resource": {
        "id": "string"
      },
      "periodic": [
        {
          "cost": {
            "value": "string"
          },
          "credit_details": {
            "credit": {
              "value": "string"
            },
            "monetary_grant_credit": {
              "value": "string"
            },
            "volume_incentive_credit": {
              "value": "string"
            },
            "cud_credit": {
              "value": "string"
            },
            "free_credit": {
              "value": "string"
            }
          },
          "expense": {
            "value": "string"
          },
          "timestamp": "google.protobuf.Timestamp"
        }
      ]
    }
  ]
}

Response for usage report requests by resource.

Contains aggregated usage, cost, and credit information organized by resource entities,
with both summary totals and detailed breakdowns for each individual resource.
The response includes:

  1. Overall totals for the entire period (cost, credits, expense)
  2. Entity-level totals for each resource
  3. Time series breakdown for each resource according to the requested aggregation period

Field

Description

currency

enum Currency

Currency code (e.g., "RUB", "USD") for all monetary values in the response.
Determined by the billing account's settings.

  • CURRENCY_UNSPECIFIED: Unspecified or unknown currency.
  • RUB: Russian Ruble
  • USD: US Dollar
  • KZT: Kazakhstani Tenge
  • EUR: Euro

cost

StringDecimal

Total usage cost for the selected time period.
This represents the raw cost before any credits or discounts are applied.
Calculated based on the resource consumption and the corresponding price rates.

credit_details

CreditDetails

Total credits (monetary grants, volume incentives, committed use discounts, and free credits) applied in the selected period.
Contains a detailed breakdown of all credit types that reduced the final billable amount.

expense

StringDecimal

Total expense (including cost and credit) for the selected time period.
This is the final billable amount after all credits have been applied.
Formula: expense = cost - sum of all credits.

entities_data[]

ResourceUsageReportEntityData

Detailed usage and billing data for each resource entity.
This field contains a structured breakdown of costs, credits, and expenses
for each individual resource, including:

  1. Entity-level totals for the entire period (cost, credits, expense)
  2. Time series data broken down by the specified aggregation period (day/week/month/quarter/year)
    This represents the second and third levels in the overall three-level response structure.

StringDecimalStringDecimal

StringDecimal representation for financial values
Used to ensure precise handling of monetary values

Field

Description

value

string

String representation of the decimal value to avoid floating-point precision issues

CreditDetailsCreditDetails

Detailed breakdown of credits (discounts, incentives, grants, etc.) applied to an entity.
Credits reduce the effective cost that customers pay for cloud resources.
The 'credit' field is the total amount of credits (the sum of all credit types below).
This breakdown allows for detailed analysis of different discount types affecting billing.

Field

Description

credit

StringDecimal

Total amount of credits (sum of all credit types) applied to the entity.
This is the overall discount applied, reducing the cost to arrive at the final expense.
Formula: expense = cost + credit

monetary_grant_credit

StringDecimal

Credits granted as a one-time monetary grant.

volume_incentive_credit

StringDecimal

Credits given as a volume-based incentive.

cud_credit

StringDecimal

Committed Use Discount credits.

free_credit

StringDecimal

Credits provided as part of a 'free' program.

ResourceUsageReportEntityDataResourceUsageReportEntityData

Usage and billing data for a resource entity in the report.
This represents the second level in the response structure hierarchy (entity-level totals),
containing both summary data for the entity across the entire period and a time series breakdown.

Field

Description

cost

StringDecimal

Total cost associated with this label group.

credit_details

CreditDetails

Total credits (discounts, grants, adjustments) applied to this label group.

expense

StringDecimal

Total expense (including cost and credit) for this label group.

resource

Resource

Metadata for the label-based grouping.

periodic[]

UsageReportPeriodicData

Time series with usage and billing details for each TimeGrouping period (e.g., daily).

ResourceResource

Represents a resource entity

Field

Description

id

string

Unique identifier of the resource entity.

UsageReportPeriodicDataUsageReportPeriodicData

Represents usage and billing data for a specific aggregation period (e.g., a single day, month).
This message is part of the third level in the response structure hierarchy, providing the
time series breakdown for entities. It appears in the 'periodic' field of each entity data object,
containing financial metrics for each time interval within the requested date range.

Field

Description

cost

StringDecimal

Cost incurred during this specific period.
This is the raw cost before any credits are applied.

credit_details

CreditDetails

Credits applied during this period.
Contains a detailed breakdown of all credit types (monetary grants, volume incentives, etc.)
that were applied during this specific time interval.

expense

StringDecimal

Total expense (including cost and credit) for this period.
This is the final billable amount after all credits have been applied.
Formula: expense = cost + credit_details.credit

timestamp

google.protobuf.Timestamp

Timestamp indicating the beginning of the TimeGrouping period.

Was the article helpful?

Previous
GetSKUUsageReport
Next
GetLabelKeyUsageReport
© 2025 Direct Cursus Technology L.L.C.