1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
syntax = "proto3";
package yandex.cloud.billing.v1;
import "google/api/annotations.proto";
import "yandex/cloud/access/access.proto";
import "yandex/cloud/billing/v1/billing_account.proto";
import "yandex/cloud/billing/v1/billable_object.proto";
import "yandex/cloud/operation/operation.proto";
import "yandex/cloud/api/operation.proto";
import "yandex/cloud/validation.proto";
option go_package = "github.com/yandex-cloud/go-genproto/yandex/cloud/billing/v1;billing";
option java_package = "yandex.cloud.api.billing.v1";
// A set of methods for managing BillingAccount resources.
service BillingAccountService {
// Returns the specified billing account.
rpc Get(GetBillingAccountRequest) returns (BillingAccount) {
option (google.api.http) = { get: "/billing/v1/billingAccounts/{id}" };
};
// Retrieves the list of billing accounts available for current user.
rpc List(ListBillingAccountsRequest) returns (ListBillingAccountsResponse) {
option (google.api.http) = { get: "/billing/v1/billingAccounts" };
};
// Retrieves the list of billable object bindings associated with the specified billing account.
rpc ListBillableObjectBindings(ListBillableObjectBindingsRequest) returns (ListBillableObjectBindingsResponse) {
option (google.api.http) = { get: "/billing/v1/billingAccounts/{billing_account_id}/billableObjectBindings" };
};
// Binds billable object to the specified billing account.
rpc BindBillableObject(BindBillableObjectRequest) returns (operation.Operation) {
option (google.api.http) = { post: "/billing/v1/billingAccounts/{billing_account_id}/billableObjectBindings" body: "*" };
option (yandex.cloud.api.operation) = {
metadata: "BindBillableObjectMetadata"
response: "BillableObjectBinding"
};
}
// Lists access bindings for the specified billing account.
rpc ListAccessBindings(access.ListAccessBindingsRequest) returns (access.ListAccessBindingsResponse) {
option (google.api.http) = { get: "/billing/v1/billingAccounts/{resource_id}:listAccessBindings" };
};
// Updates access bindings for the specified billing account.
rpc UpdateAccessBindings(access.UpdateAccessBindingsRequest) returns (operation.Operation) {
option (google.api.http) = { patch: "/billing/v1/billingAccounts/{resource_id}:updateAccessBindings" body: "*" };
option (yandex.cloud.api.operation) = {
metadata: "access.UpdateAccessBindingsMetadata"
response: "google.protobuf.Empty"
};
}
}
message GetBillingAccountRequest {
// ID of the billing account to return.
// To get the billing account ID, use [BillingAccountService.List] request.
string id = 1 [(required) = true, (length) = "<=50"];
}
message ListBillingAccountsRequest {
// 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.
int64 page_size = 2 [(value) = "<=1000"];
// Page token. To get the next page of results,
// set [page_token] to the [ListBillingAccountsResponse.next_page_token]
// returned by a previous list request.
string page_token = 3 [(length) = "<=100"];
}
message ListBillingAccountsResponse {
// List of billing accounts.
repeated BillingAccount billing_accounts = 1;
// 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.
string next_page_token = 2;
}
message ListBillableObjectBindingsRequest {
// ID of the billing account to list associated billable object bindings.
// To get the billing account ID, use [BillingAccountService.List] request.
string billing_account_id = 1 [(required) = true, (length) = "<=50"];
// 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.
int64 page_size = 2 [(value) = "<=1000"];
// Page token. To get the next page of results,
// set [page_token] to the [ListBillableObjectBindingsResponse.next_page_token]
// returned by a previous list request.
string page_token = 3 [(length) = "<=100"];
}
message ListBillableObjectBindingsResponse {
// List of billable object bindings.
repeated BillableObjectBinding billable_object_bindings = 1;
// 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.
string next_page_token = 2;
}
message BindBillableObjectRequest {
// ID of the billing account to bind billable object.
// To get the billing account ID, use [BillingAccountService.List] request.
string billing_account_id = 1 [(required) = true, (length) = "<=50"];
// [yandex.cloud.billing.v1.BillableObject] to bind with billing account.
BillableObject billable_object = 2;
}
message BindBillableObjectMetadata {
// ID of the [yandex.cloud.billing.v1.BillableObject] that was bound to billing account.
string billable_object_id = 1;
}
|