1// Copyright 2021 Google LLC 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15syntax = "proto3"; 16 17package google.monitoring.metricsscope.v1; 18 19import "google/api/field_behavior.proto"; 20import "google/api/resource.proto"; 21import "google/protobuf/timestamp.proto"; 22 23option go_package = "cloud.google.com/go/monitoring/metricsscope/apiv1/metricsscopepb;metricsscopepb"; 24option java_multiple_files = true; 25option java_outer_classname = "MetricsScopeProto"; 26option java_package = "com.google.monitoring.metricsscope.v1"; 27option csharp_namespace = "Google.Cloud.Monitoring.MetricsScope.V1"; 28option php_namespace = "Google\\Cloud\\Monitoring\\MetricsScope\\V1"; 29option ruby_package = "Google::Cloud::Monitoring::MetricsScope::V1"; 30 31// Represents a [Metrics 32// Scope](https://cloud.google.com/monitoring/settings#concept-scope) in Cloud 33// Monitoring, which specifies one or more Google projects and zero or more AWS 34// accounts to monitor together. 35message MetricsScope { 36 option (google.api.resource) = { 37 type: "monitoring.googleapis.com/MetricsScope" 38 pattern: "locations/global/metricsScope/{metrics_scope}" 39 }; 40 41 // Immutable. The resource name of the Monitoring Metrics Scope. 42 // On input, the resource name can be specified with the 43 // scoping project ID or number. On output, the resource name is 44 // specified with the scoping project number. 45 // Example: 46 // `locations/global/metricsScopes/{SCOPING_PROJECT_ID_OR_NUMBER}` 47 string name = 1 [(google.api.field_behavior) = IMMUTABLE]; 48 49 // Output only. The time when this `Metrics Scope` was created. 50 google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; 51 52 // Output only. The time when this `Metrics Scope` record was last updated. 53 google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; 54 55 // Output only. The list of projects monitored by this `Metrics Scope`. 56 repeated MonitoredProject monitored_projects = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; 57} 58 59// A [project being 60// monitored](https://cloud.google.com/monitoring/settings/multiple-projects#create-multi) 61// by a `Metrics Scope`. 62message MonitoredProject { 63 option (google.api.resource) = { 64 type: "monitoring.googleapis.com/MonitoredProject" 65 pattern: "locations/global/metricsScopes/{metrics_scope}/projects/{project}" 66 }; 67 68 // Immutable. The resource name of the `MonitoredProject`. On input, the resource name 69 // includes the scoping project ID and monitored project ID. On output, it 70 // contains the equivalent project numbers. 71 // Example: 72 // `locations/global/metricsScopes/{SCOPING_PROJECT_ID_OR_NUMBER}/projects/{MONITORED_PROJECT_ID_OR_NUMBER}` 73 string name = 1 [(google.api.field_behavior) = IMMUTABLE]; 74 75 // Output only. The time when this `MonitoredProject` was created. 76 google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; 77} 78