Yandex Cloud
  • Services
  • Solutions
  • Why Yandex Cloud
  • Pricing
  • Documentation
  • Contact us
Get started
Language / Region
© 2022 Yandex.Cloud LLC
Billing
  • Getting started
  • Step-by-step instructions
    • All instructions
    • Activate the paid version
    • Purchase a committed volume of services (CVoS)
    • Activate a promo code
    • View usage details
    • Top up your personal account
    • Link another bank card
    • Unlink a card
    • Link a cloud to a billing account
    • Change the payment method
    • Understand your payment invoice
    • View your payment history
    • Change your billing account data
    • Create a new billing account
    • Delete billing account
    • Get expense details by folder
    • View details in Yandex DataLens
    • Enable notifications
    • Enable electronic document management
    • Download reporting documents
  • Concepts
    • All concepts
    • Promo code
    • Billing threshold
    • Billing accounts
      • Overview
      • Statuses
    • Personal account
    • Grant
    • Trial period
    • Committed volume of services (CVoS)
    • Free tier of serverless ecosystem
    • Budget
    • Agreement
    • Glossary
  • Paying for resources
    • General information
    • Payment methods
      • General information
      • For individuals
      • For businesses and individual entrepreneurs
        • Bank account transfers
        • Bank card transfer
    • Billing cycle
      • General information
      • For individuals
      • For businesses and individual entrepreneurs
    • Reporting documents
      • General information
      • Report
      • Payment invoice
      • Invoice
      • Electronic document management
    • Payment currency
  • Access management
  • Pricing policy
  • Questions and answers
    • General questions
    • Questions about an agreement
    • Questions about payment
    • Questions about the billing account
    • Questions about the trial period and paid version
    • Questions about working with non-residents of Russia or Kazakhstan
    • All questions on one page
  • API reference
    • Authentication in the API
    • gRPC
      • Overview
      • BillingAccountService
      • BudgetService
      • CustomerService
      • ServiceService
      • SkuService
      • OperationService
    • REST
      • Overview
      • BillingAccount
        • Overview
        • bindBillableObject
        • get
        • list
        • listAccessBindings
        • listBillableObjectBindings
        • updateAccessBindings
      • Budget
        • Overview
        • create
        • get
        • list
      • Customer
        • Overview
        • activate
        • invite
        • list
        • suspend
      • Service
        • Overview
        • get
        • list
      • Sku
        • Overview
        • get
        • list
  1. API reference
  2. gRPC
  3. BillingAccountService

BillingAccountService

Written by
Yandex Cloud
  • Calls BillingAccountService
  • Get
    • GetBillingAccountRequest
    • BillingAccount
  • List
    • ListBillingAccountsRequest
    • ListBillingAccountsResponse
    • BillingAccount
  • ListBillableObjectBindings
    • ListBillableObjectBindingsRequest
    • ListBillableObjectBindingsResponse
    • BillableObjectBinding
    • BillableObject
  • BindBillableObject
    • BindBillableObjectRequest
    • BillableObject
    • Operation
    • BindBillableObjectMetadata
    • BillableObjectBinding
    • BillableObject
  • ListAccessBindings
    • ListAccessBindingsRequest
    • ListAccessBindingsResponse
    • AccessBinding
    • Subject
  • UpdateAccessBindings
    • UpdateAccessBindingsRequest
    • AccessBindingDelta
    • AccessBinding
    • Subject
    • Operation
    • UpdateAccessBindingsMetadata

A set of methods for managing BillingAccount resources.

Call Description
Get Returns the specified billing account.
List Retrieves the list of billing accounts available for current user.
ListBillableObjectBindings Retrieves the list of billable object bindings associated with the specified billing account.
BindBillableObject Binds billable object to the specified billing account.
ListAccessBindings Lists access bindings for the specified billing account.
UpdateAccessBindings Updates access bindings for the specified billing account.

Calls BillingAccountService

Get

Returns the specified billing account.

rpc Get (GetBillingAccountRequest) returns (BillingAccount)

GetBillingAccountRequest

Field Description
id string
Required. ID of the billing account to return. To get the billing account ID, use BillingAccountService.List request. The maximum string length in characters is 50.

BillingAccount

Field Description
id string
ID of the billing account.
name string
Name of the billing account.
created_at google.protobuf.Timestamp
Creation timestamp.
country_code string
ISO 3166-1 alpha-2 country code of the billing account.
currency string
Currency of the billing account. Can be one of the following:
  • RUB
  • USD
  • KZT
active bool
Represents whether corresponding billable objects can be used or not.
balance string
Current balance of the billing account.

List

Retrieves the list of billing accounts available for current user.

rpc List (ListBillingAccountsRequest) returns (ListBillingAccountsResponse)

ListBillingAccountsRequest

Field Description
page_size int64
The maximum number of results per page to return. If the number of available results is larger than page_size, the service returns a ListBillingAccountsResponse.next_page_token that can be used to get the next page of results in subsequent list requests. The maximum value is 1000.
page_token string
Page token. To get the next page of results, set page_token to the ListBillingAccountsResponse.next_page_token returned by a previous list request. The maximum string length in characters is 100.

ListBillingAccountsResponse

Field Description
billing_accounts[] BillingAccount
List of billing accounts.
next_page_token string
This token allows you to get the next page of results for list requests. If the number of results is larger than ListBillingAccountsRequest.page_size, use next_page_token as the value for the ListBillingAccountsRequest.page_token query parameter in the next list request. Each subsequent list request will have its own next_page_token to continue paging through the results.

BillingAccount

Field Description
id string
ID of the billing account.
name string
Name of the billing account.
created_at google.protobuf.Timestamp
Creation timestamp.
country_code string
ISO 3166-1 alpha-2 country code of the billing account.
currency string
Currency of the billing account. Can be one of the following:
  • RUB
  • USD
  • KZT
active bool
Represents whether corresponding billable objects can be used or not.
balance string
Current balance of the billing account.

ListBillableObjectBindings

Retrieves the list of billable object bindings associated with the specified billing account.

rpc ListBillableObjectBindings (ListBillableObjectBindingsRequest) returns (ListBillableObjectBindingsResponse)

ListBillableObjectBindingsRequest

Field Description
billing_account_id string
Required. ID of the billing account to list associated billable object bindings. To get the billing account ID, use BillingAccountService.List request. The maximum string length in characters is 50.
page_size int64
The maximum number of results per page to return. If the number of available results is larger than page_size, the service returns a ListBillableObjectBindingsResponse.next_page_token that can be used to get the next page of results in subsequent list requests. The maximum value is 1000.
page_token string
Page token. To get the next page of results, set page_token to the ListBillableObjectBindingsResponse.next_page_token returned by a previous list request. The maximum string length in characters is 100.

ListBillableObjectBindingsResponse

Field Description
billable_object_bindings[] BillableObjectBinding
List of billable object bindings.
next_page_token string
This token allows you to get the next page of results for list requests. If the number of results is larger than ListBillableObjectBindingsRequest.page_size, use next_page_token as the value for the ListBillableObjectBindingsRequest.page_token query parameter in the next list request. Each subsequent list request will have its own next_page_token to continue paging through the results.

BillableObjectBinding

Field Description
effective_time google.protobuf.Timestamp
Timestamp when binding was created.
billable_object BillableObject
Object that is bound to billing account.

BillableObject

Field Description
id string
ID of the object in other service.
type string
Billable object type. Can be one of the following:
  • cloud

BindBillableObject

Binds billable object to the specified billing account.

rpc BindBillableObject (BindBillableObjectRequest) returns (operation.Operation)

Metadata and response of Operation:

    Operation.metadata:BindBillableObjectMetadata

    Operation.response:BillableObjectBinding

BindBillableObjectRequest

Field Description
billing_account_id string
Required. ID of the billing account to bind billable object. To get the billing account ID, use BillingAccountService.List request. The maximum string length in characters is 50.
billable_object BillableObject
yandex.cloud.billing.v1.BillableObject to bind with billing account.

BillableObject

Field Description
id string
ID of the object in other service.
type string
Billable object type. Can be one of the following:
  • cloud

Operation

Field Description
id string
ID of the operation.
description string
Description of the operation. 0-256 characters long.
created_at google.protobuf.Timestamp
Creation timestamp.
created_by string
ID of the user or service account who initiated the operation.
modified_at google.protobuf.Timestamp
The time when the Operation resource was last modified.
done bool
If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.
metadata google.protobuf.Any<BindBillableObjectMetadata>
Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any.
result oneof: error or response
The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true, exactly one of error or response is set.
  error google.rpc.Status
The error result of the operation in case of failure or cancellation.
  response google.protobuf.Any<BillableObjectBinding>
if operation finished successfully.

BindBillableObjectMetadata

Field Description
billable_object_id string
ID of the yandex.cloud.billing.v1.BillableObject that was bound to billing account.

BillableObjectBinding

Field Description
effective_time google.protobuf.Timestamp
Timestamp when binding was created.
billable_object BillableObject
Object that is bound to billing account.

BillableObject

Field Description
id string
ID of the object in other service.
type string
Billable object type. Can be one of the following:
  • cloud

ListAccessBindings

Lists access bindings for the specified billing account.

rpc ListAccessBindings (ListAccessBindingsRequest) returns (ListAccessBindingsResponse)

ListAccessBindingsRequest

Field Description
resource_id string
Required. ID of the resource to list access bindings for.
To get the resource ID, use a corresponding List request. For example, use the yandex.cloud.resourcemanager.v1.CloudService.List request to get the Cloud resource ID. The maximum string length in characters is 50.
page_size int64
The maximum number of results per page that should be returned. If the number of available results is larger than page_size, the service returns a ListAccessBindingsResponse.next_page_token that can be used to get the next page of results in subsequent list requests. Default value: 100. The maximum value is 1000.
page_token string
Page token. Set page_token to the ListAccessBindingsResponse.next_page_token returned by a previous list request to get the next page of results. The maximum string length in characters is 100.

ListAccessBindingsResponse

Field Description
access_bindings[] AccessBinding
List of access bindings for the specified resource.
next_page_token string
This token allows you to get the next page of results for list requests. If the number of results is larger than ListAccessBindingsRequest.page_size, use the next_page_token as the value for the ListAccessBindingsRequest.page_token query parameter in the next list request. Each subsequent list request will have its own next_page_token to continue paging through the results.

AccessBinding

Field Description
role_id string
Required. ID of the yandex.cloud.iam.v1.Role that is assigned to the subject. The maximum string length in characters is 50.
subject Subject
Required. Identity for which access binding is being created. It can represent an account with a unique ID or several accounts with a system identifier.

Subject

Field Description
id string
Required. ID of the subject.
It can contain one of the following values:
  • allAuthenticatedUsers: A special system identifier that represents anyone
who is authenticated. It can be used only if the type is system.
  • allUsers: A special system identifier that represents anyone. No authentication is required.
For example, you don't need to specify the IAM token in an API query.
  • <cloud generated id>: An identifier that represents a user account.
It can be used only if the type is userAccount, federatedUser or serviceAccount. The maximum string length in characters is 50.
type string
Required. Type of the subject.
It can contain one of the following values:
  • userAccount: An account on Yandex or Yandex.Connect, added to Yandex.Cloud.
  • serviceAccount: A service account. This type represents the yandex.cloud.iam.v1.ServiceAccount resource.
  • federatedUser: A federated account. This type represents a user from an identity federation, like Active Directory.
  • system: System group. This type represents several accounts with a common system identifier.

For more information, see Subject to which the role is assigned. The maximum string length in characters is 100.

UpdateAccessBindings

Updates access bindings for the specified billing account.

rpc UpdateAccessBindings (UpdateAccessBindingsRequest) returns (operation.Operation)

Metadata and response of Operation:

    Operation.metadata:UpdateAccessBindingsMetadata

    Operation.response:google.protobuf.Empty

UpdateAccessBindingsRequest

Field Description
resource_id string
Required. ID of the resource for which access bindings are being updated. The maximum string length in characters is 50.
access_binding_deltas[] AccessBindingDelta
Required. Updates to access bindings. The number of elements must be greater than 0.

AccessBindingDelta

Field Description
action enum AccessBindingAction
Required. The action that is being performed on an access binding.
  • ADD: Addition of an access binding.
  • REMOVE: Removal of an access binding.
access_binding AccessBinding
Required. Access binding. For more information, see Access Bindings.

AccessBinding

Field Description
role_id string
Required. ID of the yandex.cloud.iam.v1.Role that is assigned to the subject. The maximum string length in characters is 50.
subject Subject
Required. Identity for which access binding is being created. It can represent an account with a unique ID or several accounts with a system identifier.

Subject

Field Description
id string
Required. ID of the subject.
It can contain one of the following values:
  • allAuthenticatedUsers: A special system identifier that represents anyone
who is authenticated. It can be used only if the type is system.
  • allUsers: A special system identifier that represents anyone. No authentication is required.
For example, you don't need to specify the IAM token in an API query.
  • <cloud generated id>: An identifier that represents a user account.
It can be used only if the type is userAccount, federatedUser or serviceAccount. The maximum string length in characters is 50.
type string
Required. Type of the subject.
It can contain one of the following values:
  • userAccount: An account on Yandex or Yandex.Connect, added to Yandex.Cloud.
  • serviceAccount: A service account. This type represents the yandex.cloud.iam.v1.ServiceAccount resource.
  • federatedUser: A federated account. This type represents a user from an identity federation, like Active Directory.
  • system: System group. This type represents several accounts with a common system identifier.

For more information, see Subject to which the role is assigned. The maximum string length in characters is 100.

Operation

Field Description
id string
ID of the operation.
description string
Description of the operation. 0-256 characters long.
created_at google.protobuf.Timestamp
Creation timestamp.
created_by string
ID of the user or service account who initiated the operation.
modified_at google.protobuf.Timestamp
The time when the Operation resource was last modified.
done bool
If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.
metadata google.protobuf.Any<UpdateAccessBindingsMetadata>
Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any.
result oneof: error or response
The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true, exactly one of error or response is set.
  error google.rpc.Status
The error result of the operation in case of failure or cancellation.
  response google.protobuf.Any<google.protobuf.Empty>
if operation finished successfully.

UpdateAccessBindingsMetadata

Field Description
resource_id string
ID of the resource for which access bindings are being updated.

Was the article helpful?

Language / Region
© 2022 Yandex.Cloud LLC
In this article:
  • Calls BillingAccountService
  • Get
  • GetBillingAccountRequest
  • BillingAccount
  • List
  • ListBillingAccountsRequest
  • ListBillingAccountsResponse
  • BillingAccount
  • ListBillableObjectBindings
  • ListBillableObjectBindingsRequest
  • ListBillableObjectBindingsResponse
  • BillableObjectBinding
  • BillableObject
  • BindBillableObject
  • BindBillableObjectRequest
  • BillableObject
  • Operation
  • BindBillableObjectMetadata
  • BillableObjectBinding
  • BillableObject
  • ListAccessBindings
  • ListAccessBindingsRequest
  • ListAccessBindingsResponse
  • AccessBinding
  • Subject
  • UpdateAccessBindings
  • UpdateAccessBindingsRequest
  • AccessBindingDelta
  • AccessBinding
  • Subject
  • Operation
  • UpdateAccessBindingsMetadata