• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.v1beta;
18
19import "google/api/annotations.proto";
20import "google/api/client.proto";
21import "google/api/field_behavior.proto";
22import "google/api/resource.proto";
23import "google/cloud/cloudcontrolspartner/v1beta/access_approval_requests.proto";
24import "google/cloud/cloudcontrolspartner/v1beta/customer_workloads.proto";
25import "google/cloud/cloudcontrolspartner/v1beta/customers.proto";
26import "google/cloud/cloudcontrolspartner/v1beta/ekm_connections.proto";
27import "google/cloud/cloudcontrolspartner/v1beta/partner_permissions.proto";
28import "google/cloud/cloudcontrolspartner/v1beta/partners.proto";
29import "google/protobuf/timestamp.proto";
30
31option csharp_namespace = "Google.Cloud.CloudControlsPartner.V1Beta";
32option go_package = "cloud.google.com/go/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb;cloudcontrolspartnerpb";
33option java_multiple_files = true;
34option java_outer_classname = "CoreProto";
35option java_package = "com.google.cloud.cloudcontrolspartner.v1beta";
36option php_namespace = "Google\\Cloud\\CloudControlsPartner\\V1beta";
37option ruby_package = "Google::Cloud::CloudControlsPartner::V1beta";
38option (google.api.resource_definition) = {
39  type: "cloudcontrolspartner.googleapis.com/OrganizationLocation"
40  pattern: "organizations/{organization}/locations/{location}"
41};
42
43// Service describing handlers for resources
44service CloudControlsPartnerCore {
45  option (google.api.default_host) = "cloudcontrolspartner.googleapis.com";
46  option (google.api.oauth_scopes) =
47      "https://www.googleapis.com/auth/cloud-platform";
48
49  // Gets details of a single workload
50  rpc GetWorkload(GetWorkloadRequest) returns (Workload) {
51    option (google.api.http) = {
52      get: "/v1beta/{name=organizations/*/locations/*/customers/*/workloads/*}"
53    };
54    option (google.api.method_signature) = "name";
55  }
56
57  // Lists customer workloads for a given customer org id
58  rpc ListWorkloads(ListWorkloadsRequest) returns (ListWorkloadsResponse) {
59    option (google.api.http) = {
60      get: "/v1beta/{parent=organizations/*/locations/*/customers/*}/workloads"
61    };
62    option (google.api.method_signature) = "parent";
63  }
64
65  // Gets details of a single customer
66  rpc GetCustomer(GetCustomerRequest) returns (Customer) {
67    option (google.api.http) = {
68      get: "/v1beta/{name=organizations/*/locations/*/customers/*}"
69    };
70    option (google.api.method_signature) = "name";
71  }
72
73  // Lists customers of a partner identified by its Google Cloud organization ID
74  rpc ListCustomers(ListCustomersRequest) returns (ListCustomersResponse) {
75    option (google.api.http) = {
76      get: "/v1beta/{parent=organizations/*/locations/*}/customers"
77    };
78    option (google.api.method_signature) = "parent";
79  }
80
81  // Gets the EKM connections associated with a workload
82  rpc GetEkmConnections(GetEkmConnectionsRequest) returns (EkmConnections) {
83    option (google.api.http) = {
84      get: "/v1beta/{name=organizations/*/locations/*/customers/*/workloads/*/ekmConnections}"
85    };
86    option (google.api.method_signature) = "name";
87  }
88
89  // Gets the partner permissions granted for a workload
90  rpc GetPartnerPermissions(GetPartnerPermissionsRequest)
91      returns (PartnerPermissions) {
92    option (google.api.http) = {
93      get: "/v1beta/{name=organizations/*/locations/*/customers/*/workloads/*/partnerPermissions}"
94    };
95    option (google.api.method_signature) = "name";
96  }
97
98  // Lists access requests associated with a workload
99  rpc ListAccessApprovalRequests(ListAccessApprovalRequestsRequest)
100      returns (ListAccessApprovalRequestsResponse) {
101    option (google.api.http) = {
102      get: "/v1beta/{parent=organizations/*/locations/*/customers/*/workloads/*}/accessApprovalRequests"
103    };
104    option (google.api.method_signature) = "parent";
105  }
106
107  // Get details of a Partner.
108  rpc GetPartner(GetPartnerRequest) returns (Partner) {
109    option (google.api.http) = {
110      get: "/v1beta/{name=organizations/*/locations/*/partner}"
111    };
112    option (google.api.method_signature) = "name";
113  }
114}
115
116// Represents the metadata of the long-running operation.
117message OperationMetadata {
118  // Output only. The time the operation was created.
119  google.protobuf.Timestamp create_time = 1
120      [(google.api.field_behavior) = OUTPUT_ONLY];
121
122  // Output only. The time the operation finished running.
123  google.protobuf.Timestamp end_time = 2
124      [(google.api.field_behavior) = OUTPUT_ONLY];
125
126  // Output only. Server-defined resource path for the target of the operation.
127  string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
128
129  // Output only. Name of the verb executed by the operation.
130  string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
131
132  // Output only. Human-readable status of the operation, if any.
133  string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
134
135  // Output only. Identifies whether the user has requested cancellation
136  // of the operation. Operations that have been cancelled successfully
137  // have [Operation.error][] value with a
138  // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
139  // `Code.CANCELLED`.
140  bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
141
142  // Output only. API version used to start the operation.
143  string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
144}
145