Add Service Monitoring (Service and ServiceLevelObjective) protocol buffers to Google Cloud Monitoring API.

PiperOrigin-RevId: 279649144
This commit is contained in:
Google APIs 2019-11-10 17:56:56 -08:00 committed by Copybara-Service
parent 1ef3bed959
commit 989b304c8a
4 changed files with 957 additions and 0 deletions

View File

@ -8,6 +8,7 @@ apis:
- name: google.monitoring.v3.GroupService
- name: google.monitoring.v3.MetricService
- name: google.monitoring.v3.NotificationChannelService
- name: google.monitoring.v3.ServiceMonitoringService
- name: google.monitoring.v3.UptimeCheckService
types:
@ -135,6 +136,35 @@ authentication:
https://www.googleapis.com/auth/cloud-platform,
https://www.googleapis.com/auth/monitoring,
https://www.googleapis.com/auth/monitoring.read
- selector: 'google.monitoring.v3.ServiceMonitoringService.*'
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform,
https://www.googleapis.com/auth/monitoring
- selector: google.monitoring.v3.ServiceMonitoringService.GetService
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform,
https://www.googleapis.com/auth/monitoring,
https://www.googleapis.com/auth/monitoring.read
- selector: google.monitoring.v3.ServiceMonitoringService.GetServiceLevelObjective
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform,
https://www.googleapis.com/auth/monitoring,
https://www.googleapis.com/auth/monitoring.read
- selector: google.monitoring.v3.ServiceMonitoringService.ListServiceLevelObjectives
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform,
https://www.googleapis.com/auth/monitoring,
https://www.googleapis.com/auth/monitoring.read
- selector: google.monitoring.v3.ServiceMonitoringService.ListServices
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform,
https://www.googleapis.com/auth/monitoring,
https://www.googleapis.com/auth/monitoring.read
- selector: 'google.monitoring.v3.UptimeCheckService.*'
oauth:
canonical_scopes: |-

View File

@ -811,6 +811,237 @@ interfaces:
name: notification_channel
timeout_millis: 60000
# The fully qualified name of the API interface.
- name: google.monitoring.v3.ServiceMonitoringService
# A list of resource collection configurations.
# Consists of a name_pattern and an entity_name.
# The name_pattern is a pattern to describe the names of the resources of this
# collection, using the platform's conventions for URI patterns. A generator
# may use this to generate methods to compose and decompose such names. The
# pattern should use named placeholders as in `shelves/{shelf}/books/{book}`;
# those will be taken as hints for the parameter names of the generated
# methods. If empty, no name methods are generated.
# The entity_name is the name to be used as a basis for generated methods and
# classes.
collections:
- name_pattern: projects/{project}
entity_name: project
- name_pattern: projects/{project}/services/{service}
entity_name: service
- name_pattern: projects/{project}/services/{service}/serviceLevelObjectives/{service_level_objective}
entity_name: service_level_objective
# Definition for retryable codes.
retry_codes_def:
- name: idempotent
retry_codes:
- DEADLINE_EXCEEDED
- UNAVAILABLE
- name: non_idempotent
retry_codes: []
# Definition for retry/backoff parameters.
retry_params_def:
- name: default
initial_retry_delay_millis: 100
retry_delay_multiplier: 1.3
max_retry_delay_millis: 60000
initial_rpc_timeout_millis: 20000
rpc_timeout_multiplier: 1
max_rpc_timeout_millis: 20000
total_timeout_millis: 600000
# A list of method configurations.
# Common properties:
#
# name - The simple name of the method.
#
# flattening - Specifies the configuration for parameter flattening.
# Describes the parameter groups for which a generator should produce method
# overloads which allow a client to directly pass request message fields as
# method parameters. This information may or may not be used, depending on
# the target language.
# Consists of groups, which each represent a list of parameters to be
# flattened. Each parameter listed must be a field of the request message.
#
# required_fields - Fields that are always required for a request to be
# valid.
#
# page_streaming - Specifies the configuration for paging.
# Describes information for generating a method which transforms a paging
# list RPC into a stream of resources.
# Consists of a request and a response.
# The request specifies request information of the list method. It defines
# which fields match the paging pattern in the request. The request consists
# of a page_size_field and a token_field. The page_size_field is the name of
# the optional field specifying the maximum number of elements to be
# returned in the response. The token_field is the name of the field in the
# request containing the page token.
# The response specifies response information of the list method. It defines
# which fields match the paging pattern in the response. The response
# consists of a token_field and a resources_field. The token_field is the
# name of the field in the response containing the next page token. The
# resources_field is the name of the field in the response containing the
# list of resources belonging to the page.
#
# retry_codes_name - Specifies the configuration for retryable codes. The
# name must be defined in interfaces.retry_codes_def.
#
# retry_params_name - Specifies the configuration for retry/backoff
# parameters. The name must be defined in interfaces.retry_params_def.
#
# field_name_patterns - Maps the field name of the request type to
# entity_name of interfaces.collections.
# Specifies the string pattern that the field must follow.
#
# timeout_millis - Specifies the default timeout for a non-retrying call. If
# the call is retrying, refer to retry_params_name instead.
methods:
- name: CreateService
flattening:
groups:
- parameters:
- parent
- service
required_fields:
- parent
- service
retry_codes_name: non_idempotent
retry_params_name: default
field_name_patterns:
parent: project
resource_name_treatment: STATIC_TYPES
timeout_millis: 60000
- name: GetService
flattening:
groups:
- parameters:
- name
required_fields:
- name
retry_codes_name: idempotent
retry_params_name: default
field_name_patterns:
name: service
resource_name_treatment: STATIC_TYPES
timeout_millis: 60000
- name: ListServices
flattening:
groups:
- parameters:
- parent
required_fields:
- parent
page_streaming:
request:
page_size_field: page_size
token_field: page_token
response:
token_field: next_page_token
resources_field: services
retry_codes_name: idempotent
retry_params_name: default
field_name_patterns:
parent: project
resource_name_treatment: STATIC_TYPES
timeout_millis: 60000
- name: UpdateService
flattening:
groups:
- parameters:
- service
required_fields:
- service
retry_codes_name: non_idempotent
retry_params_name: default
field_name_patterns:
service.name: service
resource_name_treatment: STATIC_TYPES
timeout_millis: 60000
- name: DeleteService
flattening:
groups:
- parameters:
- name
required_fields:
- name
retry_codes_name: idempotent
retry_params_name: default
field_name_patterns:
name: service
resource_name_treatment: STATIC_TYPES
timeout_millis: 60000
- name: CreateServiceLevelObjective
flattening:
groups:
- parameters:
- parent
- service_level_objective
required_fields:
- parent
- service_level_objective
retry_codes_name: non_idempotent
retry_params_name: default
field_name_patterns:
parent: service
resource_name_treatment: STATIC_TYPES
timeout_millis: 60000
- name: GetServiceLevelObjective
flattening:
groups:
- parameters:
- name
required_fields:
- name
retry_codes_name: idempotent
retry_params_name: default
field_name_patterns:
name: service_level_objective
resource_name_treatment: STATIC_TYPES
timeout_millis: 60000
- name: ListServiceLevelObjectives
flattening:
groups:
- parameters:
- parent
required_fields:
- parent
page_streaming:
request:
page_size_field: page_size
token_field: page_token
response:
token_field: next_page_token
resources_field: service_level_objectives
retry_codes_name: idempotent
retry_params_name: default
field_name_patterns:
parent: service
resource_name_treatment: STATIC_TYPES
timeout_millis: 60000
- name: UpdateServiceLevelObjective
flattening:
groups:
- parameters:
- service_level_objective
required_fields:
- service_level_objective
retry_codes_name: non_idempotent
retry_params_name: default
field_name_patterns:
service_level_objective.name: service_level_objective
resource_name_treatment: STATIC_TYPES
timeout_millis: 60000
- name: DeleteServiceLevelObjective
flattening:
groups:
- parameters:
- name
required_fields:
- name
retry_codes_name: idempotent
retry_params_name: default
field_name_patterns:
name: service_level_objective
resource_name_treatment: STATIC_TYPES
timeout_millis: 60000
# The fully qualified name of the API interface.
- name: google.monitoring.v3.UptimeCheckService
# A list of resource collection configurations.
# Consists of a name_pattern and an entity_name.
@ -1067,3 +1298,39 @@ resource_name_generation:
- message_name: DeleteUptimeCheckConfigRequest
field_entity_map:
name: uptime_check_config
- message_name: Service
field_entity_map:
name: service
- message_name: ServiceLevelObjective
field_entity_map:
name: service_level_objective
- message_name: CreateServiceRequest
field_entity_map:
parent: project
- message_name: GetServiceRequest
field_entity_map:
name: service
- message_name: ListServicesRequest
field_entity_map:
parent: project
- message_name: UpdateServiceRequest
field_entity_map:
name: service
- message_name: DeleteServiceRequest
field_entity_map:
name: service
- message_name: CreateServiceLevelObjectiveRequest
field_entity_map:
parent: service
- message_name: GetServiceLevelObjectiveRequest
field_entity_map:
name: service_level_objective
- message_name: ListServiceLevelObjectivesRequest
field_entity_map:
parent: service
- message_name: UpdateServiceLevelObjectiveRequest
field_entity_map:
name: service_level_objective
- message_name: DeleteServiceLevelObjectiveRequest
field_entity_map:
name: service_level_objective

View File

@ -0,0 +1,377 @@
// Copyright 2019 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
syntax = "proto3";
package google.monitoring.v3;
import "google/api/monitored_resource.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";
import "google/type/calendar_period.proto";
option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring";
option java_multiple_files = true;
option java_outer_classname = "ServiceMonitoringProto";
option java_package = "com.google.monitoring.v3";
// A `Service` is a discrete, autonomous, and network-accessible unit, designed
// to solve an individual concern
// ([Wikipedia](https://en.wikipedia.org/wiki/Service-orientation)). In
// Stackdriver Monitoring, a `Service` acts as the root resource under which
// operational aspects of the service are accessible.
message Service {
// Custom view of service telemetry. Currently a place-holder pending final
// design.
message Custom {
}
// App Engine service. Learn more at https://cloud.google.com/appengine.
message AppEngine {
// The ID of the App Engine module underlying this service. Corresponds to
// the `module_id` resource label in the `gae_app` monitored resource:
// https://cloud.google.com/monitoring/api/resources#tag_gae_app
string module_id = 1;
}
// Cloud Endpoints service. Learn more at https://cloud.google.com/endpoints.
message CloudEndpoints {
// The name of the Cloud Endpoints service underlying this service.
// Corresponds to the `service` resource label in the `api` monitored
// resource: https://cloud.google.com/monitoring/api/resources#tag_api
string service = 1;
}
// Istio service. Learn more at http://istio.io.
message ClusterIstio {
// The location of the Kubernetes cluster in which this Istio service is
// defined. Corresponds to the `location` resource label in `k8s_cluster`
// resources.
string location = 1;
// The name of the Kubernetes cluster in which this Istio service is
// defined. Corresponds to the `cluster_name` resource label in
// `k8s_cluster` resources.
string cluster_name = 2;
// The namespace of the Istio service underlying this service. Corresponds
// to the `destination_service_namespace` metric label in Istio metrics.
string service_namespace = 3;
// The name of the Istio service underlying this service. Corresponds to the
// `destination_service_name` metric label in Istio metrics.
string service_name = 4;
}
// Configuration for how to query telemetry on a Service.
message Telemetry {
// The full name of the resource that defines this service. Formatted as
// described in https://cloud.google.com/apis/design/resource_names.
string resource_name = 1;
}
// Resource name for this Service. Of the form
// `projects/{project_id}/services/{service_id}`.
string name = 1;
// Name used for UI elements listing this Service.
string display_name = 2;
// REQUIRED. Service-identifying atoms specifying the underlying service.
oneof identifier {
// Custom service type.
Custom custom = 6;
// Type used for App Engine services.
AppEngine app_engine = 7;
// Type used for Cloud Endpoints services.
CloudEndpoints cloud_endpoints = 8;
// Type used for Istio services that live in a Kubernetes cluster.
ClusterIstio cluster_istio = 9;
}
// Configuration for how to query telemetry on a Service.
Telemetry telemetry = 13;
}
// A Service-Level Objective (SLO) describes a level of desired good service. It
// consists of a service-level indicator (SLI), a performance goal, and a period
// over which the objective is to be evaluated against that goal. The SLO can
// use SLIs defined in a number of different manners. Typical SLOs might include
// "99% of requests in each rolling week have latency below 200 milliseconds" or
// "99.5% of requests in each calendar month return successfully."
message ServiceLevelObjective {
// `ServiceLevelObjective.View` determines what form of
// `ServiceLevelObjective` is returned from `GetServiceLevelObjective`,
// `ListServiceLevelObjectives`, and `ListServiceLevelObjectiveVersions` RPCs.
enum View {
// Same as FULL.
VIEW_UNSPECIFIED = 0;
// Return the embedded `ServiceLevelIndicator` in the form in which it was
// defined. If it was defined using a `BasicSli`, return that `BasicSli`.
FULL = 2;
// For `ServiceLevelIndicator`s using `BasicSli` articulation, instead
// return the `ServiceLevelIndicator` with its mode of computation fully
// spelled out as a `RequestBasedSli`. For `ServiceLevelIndicator`s using
// `RequestBasedSli` or `WindowsBasedSli`, return the
// `ServiceLevelIndicator` as it was provided.
EXPLICIT = 1;
}
// Resource name for this `ServiceLevelObjective`.
// Of the form
// `projects/{project_id}/services/{service_id}/serviceLevelObjectives/{slo_name}`.
string name = 1;
// Name used for UI elements listing this SLO.
string display_name = 11;
// The definition of good service, used to measure and calculate the quality
// of the `Service`'s performance with respect to a single aspect of service
// quality.
ServiceLevelIndicator service_level_indicator = 3;
// The fraction of service that must be good in order for this objective to be
// met. `0 < goal <= 1`.
double goal = 4;
// The time period over which the objective will be evaluated.
oneof period {
// A rolling time period, semantically "in the past `<rolling_period>`".
// Must be an integer multiple of 1 day no larger than 30 days.
google.protobuf.Duration rolling_period = 5;
// A calendar period, semantically "since the start of the current
// `<calendar_period>`". At this time, only `DAY`, `WEEK`, `FORTNIGHT`, and
// `MONTH` are supported.
google.type.CalendarPeriod calendar_period = 6;
}
}
// A Service-Level Indicator (SLI) describes the "performance" of a service. For
// some services, the SLI is well-defined. In such cases, the SLI can be
// described easily by referencing the well-known SLI and providing the needed
// parameters. Alternatively, a "custom" SLI can be defined with a query to the
// underlying metric store. An SLI is defined to be `good_service /
// total_service` over any queried time interval. The value of performance
// always falls into the range `0 <= performance <= 1`. A custom SLI describes
// how to compute this ratio, whether this is by dividing values from a pair of
// time series, cutting a `Distribution` into good and bad counts, or counting
// time windows in which the service complies with a criterion. For separation
// of concerns, a single Service-Level Indicator measures performance for only
// one aspect of service quality, such as fraction of successful queries or
// fast-enough queries.
message ServiceLevelIndicator {
// Service level indicators can be grouped by whether the "unit" of service
// being measured is based on counts of good requests or on counts of good
// time windows
oneof type {
// Basic SLI on a well-known service type.
BasicSli basic_sli = 4;
// Request-based SLIs
RequestBasedSli request_based = 1;
// Windows-based SLIs
WindowsBasedSli windows_based = 2;
}
}
// An SLI measuring performance on a well-known service type. Performance will
// be computed on the basis of pre-defined metrics. The type of the
// `service_resource` determines the metrics to use and the
// `service_resource.labels` and `metric_labels` are used to construct a
// monitoring filter to filter that metric down to just the data relevant to
// this service.
message BasicSli {
// Future parameters for the availability SLI.
message AvailabilityCriteria {
}
// Parameters for a latency threshold SLI.
message LatencyCriteria {
// Good service is defined to be the count of requests made to this service
// that return in no more than `threshold`.
google.protobuf.Duration threshold = 3;
}
// OPTIONAL: The set of RPCs to which this SLI is relevant. Telemetry from
// other methods will not be used to calculate performance for this SLI. If
// omitted, this SLI applies to all the Service's methods. For service types
// that don't support breaking down by method, setting this field will result
// in an error.
repeated string method = 7;
// OPTIONAL: The set of locations to which this SLI is relevant. Telemetry
// from other locations will not be used to calculate performance for this
// SLI. If omitted, this SLI applies to all locations in which the Service has
// activity. For service types that don't support breaking down by location,
// setting this field will result in an error.
repeated string location = 8;
// OPTIONAL: The set of API versions to which this SLI is relevant. Telemetry
// from other API versions will not be used to calculate performance for this
// SLI. If omitted, this SLI applies to all API versions. For service types
// that don't support breaking down by version, setting this field will result
// in an error.
repeated string version = 9;
// This SLI can be evaluated on the basis of availability or latency.
oneof sli_criteria {
// Good service is defined to be the count of requests made to this service
// that return successfully.
AvailabilityCriteria availability = 2;
// Good service is defined to be the count of requests made to this service
// that are fast enough with respect to `latency.threshold`.
LatencyCriteria latency = 3;
}
}
// Range of numerical values, inclusive of `min` and exclusive of `max`. If the
// open range "< range.max" is desired, set `range.min = -infinity`. If the open
// range ">= range.min" is desired, set `range.max = infinity`.
message Range {
// Range minimum.
double min = 1;
// Range maximum.
double max = 2;
}
// Service Level Indicators for which atomic units of service are counted
// directly.
message RequestBasedSli {
// The means to compute a ratio of `good_service` to `total_service`.
oneof method {
// `good_total_ratio` is used when the ratio of `good_service` to
// `total_service` is computed from two `TimeSeries`.
TimeSeriesRatio good_total_ratio = 1;
// `distribution_cut` is used when `good_service` is a count of values
// aggregated in a `Distribution` that fall into a good range. The
// `total_service` is the total count of all values aggregated in the
// `Distribution`.
DistributionCut distribution_cut = 3;
}
}
// A `TimeSeriesRatio` specifies two `TimeSeries` to use for computing the
// `good_service / total_service` ratio. The specified `TimeSeries` must have
// `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind =
// DELTA` or `MetricKind = CUMULATIVE`. The `TimeSeriesRatio` must specify
// exactly two of good, bad, and total, and the relationship `good_service +
// bad_service = total_service` will be assumed.
message TimeSeriesRatio {
// A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters)
// specifying a `TimeSeries` quantifying good service provided. Must have
// `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind =
// DELTA` or `MetricKind = CUMULATIVE`.
string good_service_filter = 4;
// A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters)
// specifying a `TimeSeries` quantifying bad service, either demanded service
// that was not provided or demanded service that was of inadequate quality.
// Must have `ValueType = DOUBLE` or `ValueType = INT64` and must have
// `MetricKind = DELTA` or `MetricKind = CUMULATIVE`.
string bad_service_filter = 5;
// A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters)
// specifying a `TimeSeries` quantifying total demanded service. Must have
// `ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind =
// DELTA` or `MetricKind = CUMULATIVE`.
string total_service_filter = 6;
}
// A `DistributionCut` defines a `TimeSeries` and thresholds used for measuring
// good service and total service. The `TimeSeries` must have `ValueType =
// DISTRIBUTION` and `MetricKind = DELTA` or `MetricKind = CUMULATIVE`. The
// computed `good_service` will be the count of values x in the `Distribution`
// such that `range.min <= x < range.max`.
message DistributionCut {
// A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters)
// specifying a `TimeSeries` aggregating values. Must have `ValueType =
// DISTRIBUTION` and `MetricKind = DELTA` or `MetricKind = CUMULATIVE`.
string distribution_filter = 4;
// Range of values considered "good." For a one-sided range, set one bound to
// an infinite value.
Range range = 5;
}
// A `WindowsBasedSli` defines `good_service` as the count of time windows for
// which the provided service was of good quality. Criteria for determining
// if service was good are embedded in the `window_criterion`.
message WindowsBasedSli {
// A `PerformanceThreshold` is used when each window is good when that window
// has a sufficiently high `performance`.
message PerformanceThreshold {
// The means, either a request-based SLI or a basic SLI, by which to compute
// performance over a window.
oneof type {
// `RequestBasedSli` to evaluate to judge window quality.
RequestBasedSli performance = 1;
// `BasicSli` to evaluate to judge window quality.
BasicSli basic_sli_performance = 3;
}
// If window `performance >= threshold`, the window is counted as good.
double threshold = 2;
}
// A `MetricRange` is used when each window is good when the value x of a
// single `TimeSeries` satisfies `range.min <= x < range.max`. The provided
// `TimeSeries` must have `ValueType = INT64` or `ValueType = DOUBLE` and
// `MetricKind = GAUGE`.
message MetricRange {
// A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters)
// specifying the `TimeSeries` to use for evaluating window quality.
string time_series = 1;
// Range of values considered "good." For a one-sided range, set one bound
// to an infinite value.
Range range = 4;
}
// The criterion to use for evaluating window goodness.
oneof window_criterion {
// A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters)
// specifying a `TimeSeries` with `ValueType = BOOL`. The window is good if
// any `true` values appear in the window.
string good_bad_metric_filter = 5;
// A window is good if its `performance` is high enough.
PerformanceThreshold good_total_ratio_threshold = 2;
// A window is good if the metric's value is in a good range, averaged
// across returned streams.
MetricRange metric_mean_in_range = 6;
// A window is good if the metric's value is in a good range, summed across
// returned streams.
MetricRange metric_sum_in_range = 7;
}
// Duration over which window quality is evaluated. Must be an integer
// fraction of a day and at least `60s`.
google.protobuf.Duration window_period = 4;
}

View File

@ -0,0 +1,283 @@
// Copyright 2019 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
syntax = "proto3";
package google.monitoring.v3;
import "google/api/annotations.proto";
import "google/api/monitored_resource.proto";
import "google/monitoring/v3/service.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
import "google/api/client.proto";
option go_package = "google.golang.org/genproto/googleapis/monitoring/v3;monitoring";
option java_multiple_files = true;
option java_outer_classname = "ServiceMonitoringServiceProto";
option java_package = "com.google.monitoring.v3";
// The Stackdriver Monitoring Service-Oriented Monitoring API has endpoints for
// managing and querying aspects of a workspace's services. These include the
// `Service`'s monitored resources, its Service-Level Objectives, and a taxonomy
// of categorized Health Metrics.
service ServiceMonitoringService {
option (google.api.default_host) = "monitoring.googleapis.com";
option (google.api.oauth_scopes) =
"https://www.googleapis.com/auth/cloud-platform,"
"https://www.googleapis.com/auth/monitoring,"
"https://www.googleapis.com/auth/monitoring.read";
// Create a `Service`.
rpc CreateService(CreateServiceRequest) returns (Service) {
option (google.api.http) = {
post: "/v3/{parent=*/*}/services"
body: "service"
};
}
// Get the named `Service`.
rpc GetService(GetServiceRequest) returns (Service) {
option (google.api.http) = {
get: "/v3/{name=*/*/services/*}"
};
}
// List `Service`s for this workspace.
rpc ListServices(ListServicesRequest) returns (ListServicesResponse) {
option (google.api.http) = {
get: "/v3/{parent=*/*}/services"
};
}
// Update this `Service`.
rpc UpdateService(UpdateServiceRequest) returns (Service) {
option (google.api.http) = {
patch: "/v3/{service.name=*/*/services/*}"
body: "service"
};
}
// Soft delete this `Service`.
rpc DeleteService(DeleteServiceRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v3/{name=*/*/services/*}"
};
}
// Create a `ServiceLevelObjective` for the given `Service`.
rpc CreateServiceLevelObjective(CreateServiceLevelObjectiveRequest) returns (ServiceLevelObjective) {
option (google.api.http) = {
post: "/v3/{parent=*/*/services/*}/serviceLevelObjectives"
body: "service_level_objective"
};
}
// Get a `ServiceLevelObjective` by name.
rpc GetServiceLevelObjective(GetServiceLevelObjectiveRequest) returns (ServiceLevelObjective) {
option (google.api.http) = {
get: "/v3/{name=*/*/services/*/serviceLevelObjectives/*}"
};
}
// List the `ServiceLevelObjective`s for the given `Service`.
rpc ListServiceLevelObjectives(ListServiceLevelObjectivesRequest) returns (ListServiceLevelObjectivesResponse) {
option (google.api.http) = {
get: "/v3/{parent=*/*/services/*}/serviceLevelObjectives"
};
}
// Update the given `ServiceLevelObjective`.
rpc UpdateServiceLevelObjective(UpdateServiceLevelObjectiveRequest) returns (ServiceLevelObjective) {
option (google.api.http) = {
patch: "/v3/{service_level_objective.name=*/*/services/*/serviceLevelObjectives/*}"
body: "service_level_objective"
};
}
// Delete the given `ServiceLevelObjective`.
rpc DeleteServiceLevelObjective(DeleteServiceLevelObjectiveRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v3/{name=*/*/services/*/serviceLevelObjectives/*}"
};
}
}
// The `CreateService` request.
message CreateServiceRequest {
// Resource name of the parent workspace.
// Of the form `projects/{project_id}`.
string parent = 1;
// Optional. The Service id to use for this Service. If omitted, an id will be
// generated instead. Must match the pattern [a-z0-9\-]+
string service_id = 3;
// The `Service` to create.
Service service = 2;
}
// The `GetService` request.
message GetServiceRequest {
// Resource name of the `Service`.
// Of the form `projects/{project_id}/services/{service_id}`.
string name = 1;
}
// The `ListServices` request.
message ListServicesRequest {
// Resource name of the parent `Workspace`.
// Of the form `projects/{project_id}`.
string parent = 1;
// A filter specifying what `Service`s to return. The filter currently
// supports the following fields:
//
// - `identifier_case`
// - `app_engine.module_id`
// - `cloud_endpoints.service`
// - `cluster_istio.location`
// - `cluster_istio.cluster_name`
// - `cluster_istio.service_namespace`
// - `cluster_istio.service_name`
//
// `identifier_case` refers to which option in the identifier oneof is
// populated. For example, the filter `identifier_case = "CUSTOM"` would match
// all services with a value for the `custom` field. Valid options are
// "CUSTOM", "APP_ENGINE", "CLOUD_ENDPOINTS", and "CLUSTER_ISTIO".
string filter = 2;
// A non-negative number that is the maximum number of results to return.
// When 0, use default page size.
int32 page_size = 3;
// If this field is not empty then it must contain the `nextPageToken` value
// returned by a previous call to this method. Using this field causes the
// method to return additional results from the previous method call.
string page_token = 4;
}
// The `ListServices` response.
message ListServicesResponse {
// The `Service`s matching the specified filter.
repeated Service services = 1;
// If there are more results than have been returned, then this field is set
// to a non-empty value. To see the additional results,
// use that value as `pageToken` in the next call to this method.
string next_page_token = 2;
}
// The `UpdateService` request.
message UpdateServiceRequest {
// The `Service` to draw updates from.
// The given `name` specifies the resource to update.
Service service = 1;
// A set of field paths defining which fields to use for the update.
google.protobuf.FieldMask update_mask = 2;
}
// The `DeleteService` request.
message DeleteServiceRequest {
// Resource name of the `Service` to delete.
// Of the form `projects/{project_id}/service/{service_id}`.
string name = 1;
}
// The `CreateServiceLevelObjective` request.
message CreateServiceLevelObjectiveRequest {
// Resource name of the parent `Service`.
// Of the form `projects/{project_id}/services/{service_id}`.
string parent = 1;
// Optional. The ServiceLevelObjective id to use for this
// ServiceLevelObjective. If omitted, an id will be generated instead. Must
// match the pattern [a-z0-9\-]+
string service_level_objective_id = 3;
// The `ServiceLevelObjective` to create.
// The provided `name` will be respected if no `ServiceLevelObjective` exists
// with this name.
ServiceLevelObjective service_level_objective = 2;
}
// The `GetServiceLevelObjective` request.
message GetServiceLevelObjectiveRequest {
// Resource name of the `ServiceLevelObjective` to get.
// Of the form
// `projects/{project_id}/services/{service_id}/serviceLevelObjectives/{slo_name}`.
string name = 1;
// View of the `ServiceLevelObjective` to return. If `DEFAULT`, return the
// `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the
// `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the
// `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed.
ServiceLevelObjective.View view = 2;
}
// The `ListServiceLevelObjectives` request.
message ListServiceLevelObjectivesRequest {
// Resource name of the parent `Service`.
// Of the form `projects/{project_id}/services/{service_id}`.
string parent = 1;
// A filter specifying what `ServiceLevelObjective`s to return.
string filter = 2;
// A non-negative number that is the maximum number of results to return.
// When 0, use default page size.
int32 page_size = 3;
// If this field is not empty then it must contain the `nextPageToken` value
// returned by a previous call to this method. Using this field causes the
// method to return additional results from the previous method call.
string page_token = 4;
// View of the `ServiceLevelObjective`s to return. If `DEFAULT`, return each
// `ServiceLevelObjective` as originally defined. If `EXPLICIT` and the
// `ServiceLevelObjective` is defined in terms of a `BasicSli`, replace the
// `BasicSli` with a `RequestBasedSli` spelling out how the SLI is computed.
ServiceLevelObjective.View view = 5;
}
// The `ListServiceLevelObjectives` response.
message ListServiceLevelObjectivesResponse {
// The `ServiceLevelObjective`s matching the specified filter.
repeated ServiceLevelObjective service_level_objectives = 1;
// If there are more results than have been returned, then this field is set
// to a non-empty value. To see the additional results,
// use that value as `pageToken` in the next call to this method.
string next_page_token = 2;
}
// The `UpdateServiceLevelObjective` request.
message UpdateServiceLevelObjectiveRequest {
// The `ServiceLevelObjective` to draw updates from.
// The given `name` specifies the resource to update.
ServiceLevelObjective service_level_objective = 1;
// A set of field paths defining which fields to use for the update.
google.protobuf.FieldMask update_mask = 2;
}
// The `DeleteServiceLevelObjective` request.
message DeleteServiceLevelObjectiveRequest {
// Resource name of the `ServiceLevelObjective` to delete.
// Of the form
// `projects/{project_id}/services/{service_id}/serviceLevelObjectives/{slo_name}`.
string name = 1;
}