Searching for data in usage details with Yandex Query queries
Written by
Updated at July 8, 2024
Yandex Cloud Billing and Query are integrated with each other. You can use preset queries to enable standard tasks for analyzing details of payments for resources or write custom YQL queries.
Query provides ready-made queries to obtain the following information:
- Consumption by month.
- Consumption in the current month broken down by service and product.
- Consumption in the current month broken down by cloud and folder.
- Top 10 most expensive resources.
- Payment for fixed consumption.
- Utilization of fixed consumption.
- Details by Managed Service for Kubernetes cluster.
Getting started
Sign up for Yandex Cloud and create a billing account:
- Go to the management console
and log in to Yandex Cloud or create an account if you do not have one yet. - On the Yandex Cloud Billing
page, make sure you have a billing account linked and it has theACTIVE
orTRIAL_ACTIVE
status. If you do not have a billing account, create one.
If you have an active billing account, you can go to the cloud page
Learn more about clouds and folders.
Set up integration between Yandex Cloud Billing and Query
To set up integration:
- Open the list of expense detail exports in the Yandex Cloud console.
- Select the required details and click Process in YQ.
- When switching from Yandex Cloud Billing to Yandex Query for the first time, set up integration:
- In the Query interface, select the service account to be used to read data from Object Storage in the connection creation dialog box and click Create.
- In the Query interface, check the preset parameters by clicking Preview in the binding creation dialog. Next, click Create to complete the integration.
- After the integration is set up, you will be redirected to Billing.
Run a data query
To query Yandex Cloud Billing analytical data stored in Object Storage:
- Under Billing in the Query interface, select the required data binding from the list.
- Select a query to Object Storage data from the list and click Run.
You can do the following with data processing results:
- Download them through the Yandex Query UI by clicking Export.
- Save them to an Object Storage bucket.
- Get and process them via the Query HTTP API.