1// Copyright 2023 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.cloud.cloudcontrolspartner.v1; 18 19import "google/api/annotations.proto"; 20import "google/api/client.proto"; 21import "google/cloud/cloudcontrolspartner/v1/violations.proto"; 22 23option csharp_namespace = "Google.Cloud.CloudControlsPartner.V1"; 24option go_package = "cloud.google.com/go/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb;cloudcontrolspartnerpb"; 25option java_multiple_files = true; 26option java_outer_classname = "MonitoringProto"; 27option java_package = "com.google.cloud.cloudcontrolspartner.v1"; 28option php_namespace = "Google\\Cloud\\CloudControlsPartner\\V1"; 29option ruby_package = "Google::Cloud::CloudControlsPartner::V1"; 30 31// Service describing handlers for resources 32service CloudControlsPartnerMonitoring { 33 option (google.api.default_host) = "cloudcontrolspartner.googleapis.com"; 34 option (google.api.oauth_scopes) = 35 "https://www.googleapis.com/auth/cloud-platform"; 36 37 // Lists Violations for a workload 38 // Callers may also choose to read across multiple Customers or for a single 39 // customer as per 40 // [AIP-159](https://google.aip.dev/159) by using '-' (the hyphen or dash 41 // character) as a wildcard character instead of {customer} & {workload}. 42 // Format: 43 // `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` 44 rpc ListViolations(ListViolationsRequest) returns (ListViolationsResponse) { 45 option (google.api.http) = { 46 get: "/v1/{parent=organizations/*/locations/*/customers/*/workloads/*}/violations" 47 }; 48 option (google.api.method_signature) = "parent"; 49 } 50 51 // Gets details of a single Violation. 52 rpc GetViolation(GetViolationRequest) returns (Violation) { 53 option (google.api.http) = { 54 get: "/v1/{name=organizations/*/locations/*/customers/*/workloads/*/violations/*}" 55 }; 56 option (google.api.method_signature) = "name"; 57 } 58} 59