aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/yandex-cloud-api-protos/yandex/cloud/billing/v1/sku_service.proto
blob: 176a1922bd2249185e1139e64b9daf0fab6bb839 (plain) (blame)
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
syntax = "proto3";

package yandex.cloud.billing.v1;

import "google/api/annotations.proto";

import "yandex/cloud/billing/v1/sku.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 Sku resources.
service SkuService {

    // Returns the specified SKU.
    rpc Get(GetSkuRequest) returns (Sku) {
        option (google.api.http) = { get: "/billing/v1/skus/{id}" };
    };

    // Retrieves the list of SKUs.
    rpc List(ListSkusRequest) returns (ListSkusResponse) {
        option (google.api.http) = { get: "/billing/v1/skus" };
    };
}

message GetSkuRequest {

    // ID of the SKU to return.
    // To get the SKU ID, use [SkuService.List] request.
    string id = 1 [(required) = true, (length) = "<=50"];

    // Currency of the SKU.
    // Can be one of the following:
    // * `RUB`
    // * `USD`
    // * `KZT`
    string currency = 2 [(required) = true];

    // Optional ID of the billing account.
    // If specified, contract prices for a particular billing account are included in the response.
    // To get the billing account ID, use [BillingAccountService.List] request.
    string billing_account_id = 3;
}

message ListSkusRequest {

    // Currency of the prices.
    // Can be one of the following:
    // * `RUB`
    // * `USD`
    // * `KZT`
    string currency = 1 [(required) = true];

    // Optional ID of the billing account.
    // If specified, contract prices for a particular billing account are included in the response.
    // To get the billing account ID, use [BillingAccountService.List] request.
    string billing_account_id = 2;

    // A filter expression that filters resources listed in the response.
    // The expression must specify:
    // 1. The field name. Currently you can use filtering only on the [yandex.cloud.billing.v1.Sku.id] and [yandex.cloud.billing.v1.Sku.service_id] field.
    // 2. An `=` operator.
    // 3. The value in double quotes (`"`). Must be 3-63 characters long and match the regular expression `[a-z][-a-z0-9]{1,61}[a-z0-9]`.
    string filter = 3 [(length) = "<=1000"];


    // The maximum number of results per page to return. If the number of available
    // results is larger than [page_size],
    // the service returns a [ListSkusResponse.next_page_token]
    // that can be used to get the next page of results in subsequent list requests.
    int64 page_size = 4 [(value) = "<=1000"];

    // Page token. To get the next page of results,
    // set [page_token] to the [ListSkusResponse.next_page_token]
    // returned by a previous list request.
    string page_token = 5 [(length) = "<=100"];
}

message ListSkusResponse {

    // List of skus.
    repeated Sku skus = 1;

    // This token allows you to get the next page of results for list requests. If the number of results
    // is larger than [ListSkusRequest.page_size], use
    // [next_page_token] as the value
    // for the [ListSkusRequest.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;
}