Processing files with usage details in Yandex Cloud Billing
In Yandex Cloud Billing, you can get information about the amount of used resources, monitor your expenses, and pay for resource usage. You can send your usage details to Yandex Object Storage and then process them using Yandex Query.
Yandex Cloud Billing and Query are integrated with each other. You can use preset queries to perform routine tasks for analyzing details of payments for resources or write custom YQL queries.
Query provides ready-made queries to get the following information:
- Usage by month.
- Usage in the current month by service and product.
- Usage in the current month by cloud and folder.
- Top 10 most expensive resources.
- Payment for fixed usage.
- Fixed usage utilization.
- Details by Managed Service for Kubernetes cluster.
Getting started
Sign up in Yandex Cloud and create a billing account:
- Navigate to the management console
and log in to Yandex Cloud or register a new account. - 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 and link a cloud to it.
If you have an active billing account, you can navigate 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 for reading data from Object Storage in the connection creation dialog box and click Create.
- In the Query interface, check the preset settings by clicking Preview in the binding creation dialog. Next, click Create to complete the integration.
- Once you configure the integration, you will be redirected to Billing.
Query the data
To query analytical data from Yandex Cloud Billing 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 user interface by clicking Export.
- Save them to an Object Storage bucket.
- Get and process them via the Query HTTP API.