xref: /aosp_15_r20/external/googleapis/google/cloud/cloudcontrolspartner/v1beta/customer_workloads.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
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/field_behavior.proto";
20import "google/api/resource.proto";
21import "google/cloud/cloudcontrolspartner/v1beta/completion_state.proto";
22import "google/protobuf/timestamp.proto";
23
24option csharp_namespace = "Google.Cloud.CloudControlsPartner.V1Beta";
25option go_package = "cloud.google.com/go/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb;cloudcontrolspartnerpb";
26option java_multiple_files = true;
27option java_outer_classname = "CustomerWorkloadsProto";
28option java_package = "com.google.cloud.cloudcontrolspartner.v1beta";
29option php_namespace = "Google\\Cloud\\CloudControlsPartner\\V1beta";
30option ruby_package = "Google::Cloud::CloudControlsPartner::V1beta";
31
32// Contains metadata around the [Workload
33// resource](https://cloud.google.com/assured-workloads/docs/reference/rest/Shared.Types/Workload)
34// in the Assured Workloads API.
35message Workload {
36  option (google.api.resource) = {
37    type: "cloudcontrolspartner.googleapis.com/Workload"
38    pattern: "organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}"
39    plural: "workloads"
40    singular: "workload"
41  };
42
43  // Supported Assured Workloads Partners.
44  enum Partner {
45    // Unknown Partner.
46    PARTNER_UNSPECIFIED = 0;
47
48    // Enum representing S3NS (Thales) partner.
49    PARTNER_LOCAL_CONTROLS_BY_S3NS = 1;
50
51    // Enum representing T_SYSTEM (TSI) partner.
52    PARTNER_SOVEREIGN_CONTROLS_BY_T_SYSTEMS = 2;
53
54    // Enum representing SIA_MINSAIT (Indra) partner.
55    PARTNER_SOVEREIGN_CONTROLS_BY_SIA_MINSAIT = 3;
56
57    // Enum representing PSN (TIM) partner.
58    PARTNER_SOVEREIGN_CONTROLS_BY_PSN = 4;
59
60    // Enum representing CNTXT (Kingdom of Saudi Arabia) partner.
61    PARTNER_SOVEREIGN_CONTROLS_BY_CNTXT = 6;
62
63    // Enum representing CNXT (Kingdom of Saudi Arabia) partner offering without
64    // EKM provisioning.
65    PARTNER_SOVEREIGN_CONTROLS_BY_CNTXT_NO_EKM = 7;
66  }
67
68  // Identifier. Format:
69  // organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}
70  string name = 1 [(google.api.field_behavior) = IDENTIFIER];
71
72  // Output only. Folder id this workload is associated with
73  int64 folder_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
74
75  // Output only. Time the resource was created.
76  google.protobuf.Timestamp create_time = 3
77      [(google.api.field_behavior) = OUTPUT_ONLY];
78
79  // Output only. The name of container folder of the assured workload
80  string folder = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
81
82  // Container for workload onboarding steps.
83  WorkloadOnboardingState workload_onboarding_state = 5;
84
85  // Indicates whether a workload is fully onboarded.
86  bool is_onboarded = 6;
87
88  // The project id of the key management project for the workload
89  string key_management_project_id = 7;
90
91  // The Google Cloud location of the workload
92  string location = 8;
93
94  // Partner associated with this workload.
95  Partner partner = 9;
96}
97
98// Request to list customer workloads.
99message ListWorkloadsRequest {
100  // Required. Parent resource
101  // Format:
102  // organizations/{organization}/locations/{location}/customers/{customer}
103  string parent = 1 [
104    (google.api.field_behavior) = REQUIRED,
105    (google.api.resource_reference) = {
106      child_type: "cloudcontrolspartner.googleapis.com/Workload"
107    }
108  ];
109
110  // The maximum number of workloads to return. The service may return fewer
111  // than this value. If unspecified, at most 500 workloads will be returned.
112  int32 page_size = 2;
113
114  // A page token, received from a previous `ListWorkloads` call.
115  // Provide this to retrieve the subsequent page.
116  string page_token = 3;
117
118  // Optional. Filtering results.
119  string filter = 4 [(google.api.field_behavior) = OPTIONAL];
120
121  // Optional. Hint for how to order the results.
122  string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
123}
124
125// Response message for list customer workloads requests.
126message ListWorkloadsResponse {
127  // List of customer workloads
128  repeated Workload workloads = 1;
129
130  // A token that can be sent as `page_token` to retrieve the next page.
131  // If this field is omitted, there are no subsequent pages.
132  string next_page_token = 2;
133
134  // Locations that could not be reached.
135  repeated string unreachable = 3;
136}
137
138// Message for getting a customer workload.
139message GetWorkloadRequest {
140  // Required. Format:
141  // organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}
142  string name = 1 [
143    (google.api.field_behavior) = REQUIRED,
144    (google.api.resource_reference) = {
145      type: "cloudcontrolspartner.googleapis.com/Workload"
146    }
147  ];
148}
149
150// Container for workload onboarding steps.
151message WorkloadOnboardingState {
152  // List of workload onboarding steps.
153  repeated WorkloadOnboardingStep onboarding_steps = 1;
154}
155
156// Container for workload onboarding information.
157message WorkloadOnboardingStep {
158  // Enum for possible onboarding steps.
159  enum Step {
160    // Unspecified step.
161    STEP_UNSPECIFIED = 0;
162
163    // EKM Provisioned step.
164    EKM_PROVISIONED = 1;
165
166    // Signed Access Approval step.
167    SIGNED_ACCESS_APPROVAL_CONFIGURED = 2;
168  }
169
170  // The onboarding step.
171  Step step = 1;
172
173  // The starting time of the onboarding step.
174  google.protobuf.Timestamp start_time = 2;
175
176  // The completion time of the onboarding step.
177  google.protobuf.Timestamp completion_time = 3;
178
179  // Output only. The completion state of the onboarding step.
180  CompletionState completion_state = 4
181      [(google.api.field_behavior) = OUTPUT_ONLY];
182}
183