* internal/gen: better API docs Add various pieces of metadata that can be used by the API docs renderer. Improve the service labels by specifying explicit tags. Specify error responses. Specify version at generation time. * internal/gen: add better errors The default error entry is now used to cover all errors, as adding a new error for every possible status code was a bit much. This also properly includes the real error type now! * Add various pieces of metadata that can be used by the API docs renderer. Improve the service labels by specifying explicit tags. * make auth method API docs * make API docs better * make auth methods API docs nicer * internal/gen: better attribute examples Replace Output Only comments with a field behavior annotation in accounts. Mark some fields as required. Add elaborate description for attributes. * Make API docs better * Make API docs better * Make API docs better * internal/proto: regenerate files * internal/proto: finish off account service * Make API docs better * internal/proto: add better API docs for aliases * Tidy up service descriptions * Added description for Boundary controller API doc * internal/gen: add better API intro Copy parts of the API docs into the description * sdk: add openapi dependency * internal/gen: move global API doc to separate file * internal/gen: remove required annotations Unfortunately, while these help with the creating of resources, they still appear required in contexts where they are not, such as when updating a resource. * Review comments --------- Co-authored-by: jigar-hashicorp <jigar.shah@hashicorp.com> Co-authored-by: Isaac Christian (he/him) <112639904+isaacchristian@users.noreply.github.com>
42 lines
1.8 KiB
Protocol Buffer
42 lines
1.8 KiB
Protocol Buffer
// Copyright (c) HashiCorp, Inc.
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
syntax = "proto3";
|
|
|
|
package controller.api.services.v1;
|
|
|
|
import "controller/api/resources/billing/v1/billing.proto";
|
|
import "google/api/annotations.proto";
|
|
import "protoc-gen-openapiv2/options/annotations.proto";
|
|
|
|
option go_package = "github.com/hashicorp/boundary/internal/gen/controller/api/services;services";
|
|
|
|
service BillingService {
|
|
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_tag) = {
|
|
name: "Billing service"
|
|
description: "The billing service provides the usage data. It includes the active users in a given time period."
|
|
};
|
|
|
|
// MonthlyActiveUsers returns the monthly active users for the given time period.
|
|
// If no time period is provided, the current and previous months are returned.
|
|
// If the provided request contains a start time but no end time, it will return
|
|
// up to the current month. If the provided request contains an end time and no start time,
|
|
// or if the end time is prior to the start time, an error will be returned.
|
|
rpc MonthlyActiveUsers(MonthlyActiveUsersRequest) returns (MonthlyActiveUsersResponse) {
|
|
option (google.api.http) = {get: "/v1/billing:monthly-active-users"};
|
|
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {summary: "Returns monthly active users."};
|
|
}
|
|
}
|
|
|
|
message MonthlyActiveUsersRequest {
|
|
// An optional start time of the billing period to query, in the format of YYYY-MM.
|
|
string start_time = 1 [json_name = "start_time"]; // @gotags: class:"public"
|
|
|
|
// An optional end time of the billing period to query, in the format of YYYY-MM.
|
|
string end_time = 2 [json_name = "end_time"]; // @gotags: class:"public"
|
|
}
|
|
|
|
message MonthlyActiveUsersResponse {
|
|
repeated resources.billing.v1.ActiveUsers items = 1;
|
|
}
|