@@ -41,10 +41,12 @@ option (google.api.resource_definition) = {
4141// Service to manage AssuredWorkloads.
4242service AssuredWorkloadsService {
4343 option (google.api.default_host ) = "assuredworkloads.googleapis.com" ;
44- option (google.api.oauth_scopes ) = "https://www.googleapis.com/auth/cloud-platform" ;
44+ option (google.api.oauth_scopes ) =
45+ "https://www.googleapis.com/auth/cloud-platform" ;
4546
4647 // Creates Assured Workload.
47- rpc CreateWorkload (CreateWorkloadRequest ) returns (google.longrunning.Operation ) {
48+ rpc CreateWorkload (CreateWorkloadRequest )
49+ returns (google.longrunning.Operation ) {
4850 option (google.api.http ) = {
4951 post : "/v1/{parent=organizations/*/locations/*}/workloads"
5052 body : "workload"
@@ -109,8 +111,8 @@ message CreateWorkloadRequest {
109111 // Required. Assured Workload to create
110112 Workload workload = 2 [(google.api.field_behavior ) = REQUIRED ];
111113
112- // Optional. A identifier associated with the workload and underlying projects which
113- // allows for the break down of billing costs for a workload. The value
114+ // Optional. A identifier associated with the workload and underlying projects
115+ // which allows for the break down of billing costs for a workload. The value
114116 // provided for the identifier will add a label to the workload and contained
115117 // projects with the identifier as the value.
116118 string external_id = 3 [(google.api.field_behavior ) = OPTIONAL ];
@@ -125,7 +127,8 @@ message UpdateWorkloadRequest {
125127 Workload workload = 1 [(google.api.field_behavior ) = REQUIRED ];
126128
127129 // Required. The list of fields to be updated.
128- google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior ) = REQUIRED ];
130+ google.protobuf.FieldMask update_mask = 2
131+ [(google.api.field_behavior ) = REQUIRED ];
129132}
130133
131134// Request for deleting a Workload.
@@ -147,8 +150,8 @@ message DeleteWorkloadRequest {
147150
148151// Request for fetching a workload.
149152message GetWorkloadRequest {
150- // Required. The resource name of the Workload to fetch. This is the workloads's
151- // relative path in the API, formatted as
153+ // Required. The resource name of the Workload to fetch. This is the
154+ // workloads's relative path in the API, formatted as
152155 // "organizations/{organization_id}/locations/{location_id}/workloads/{workload_id}".
153156 // For example,
154157 // "organizations/123/locations/us-east1/workloads/assured-workload-1".
@@ -228,17 +231,18 @@ message Workload {
228231
229232 // Settings specific to the Key Management Service.
230233 message KMSSettings {
231- // Required. Input only. Immutable. The time at which the Key Management Service will automatically create a
232- // new version of the crypto key and mark it as the primary.
234+ // Required. Input only. Immutable. The time at which the Key Management
235+ // Service will automatically create a new version of the crypto key and
236+ // mark it as the primary.
233237 google.protobuf.Timestamp next_rotation_time = 1 [
234238 (google.api.field_behavior ) = REQUIRED ,
235239 (google.api.field_behavior ) = INPUT_ONLY ,
236240 (google.api.field_behavior ) = IMMUTABLE
237241 ];
238242
239- // Required. Input only. Immutable. [next_rotation_time] will be advanced by this period when the Key
240- // Management Service automatically rotates a key. Must be at least 24 hours
241- // and at most 876,000 hours.
243+ // Required. Input only. Immutable. [next_rotation_time] will be advanced by
244+ // this period when the Key Management Service automatically rotates a key.
245+ // Must be at least 24 hours and at most 876,000 hours.
242246 google.protobuf.Duration rotation_period = 2 [
243247 (google.api.field_behavior ) = REQUIRED ,
244248 (google.api.field_behavior ) = INPUT_ONLY ,
@@ -264,6 +268,48 @@ message Workload {
264268 string display_name = 3 ;
265269 }
266270
271+ // Signed Access Approvals (SAA) enrollment response.
272+ message SaaEnrollmentResponse {
273+ // Setup state of SAA enrollment.
274+ enum SetupState {
275+ // Unspecified.
276+ SETUP_STATE_UNSPECIFIED = 0 ;
277+
278+ // SAA enrollment pending.
279+ STATUS_PENDING = 1 ;
280+
281+ // SAA enrollment comopleted.
282+ STATUS_COMPLETE = 2 ;
283+ }
284+
285+ // Setup error of SAA enrollment.
286+ enum SetupError {
287+ // Unspecified.
288+ SETUP_ERROR_UNSPECIFIED = 0 ;
289+
290+ // Invalid states for all customers, to be redirected to AA UI for
291+ // additional details.
292+ ERROR_INVALID_BASE_SETUP = 1 ;
293+
294+ // Returned when there is not an EKM key configured.
295+ ERROR_MISSING_EXTERNAL_SIGNING_KEY = 2 ;
296+
297+ // Returned when there are no enrolled services or the customer is
298+ // enrolled in CAA only for a subset of services.
299+ ERROR_NOT_ALL_SERVICES_ENROLLED = 3 ;
300+
301+ // Returned when exception was encountered during evaluation of other
302+ // criteria.
303+ ERROR_SETUP_CHECK_FAILED = 4 ;
304+ }
305+
306+ // Indicates SAA enrollment status of a given workload.
307+ optional SetupState setup_status = 1 ;
308+
309+ // Indicates SAA enrollment setup error if any.
310+ repeated SetupError setup_errors = 2 ;
311+ }
312+
267313 // Supported Compliance Regimes.
268314 enum ComplianceRegime {
269315 // Unknown compliance regime.
@@ -297,6 +343,18 @@ message Workload {
297343 CA_REGIONS_AND_SUPPORT = 9 ;
298344 }
299345
346+ // Key Access Justifications(KAJ) Enrollment State.
347+ enum KajEnrollmentState {
348+ // Default State for KAJ Enrollment.
349+ KAJ_ENROLLMENT_STATE_UNSPECIFIED = 0 ;
350+
351+ // Pending State for KAJ Enrollment.
352+ KAJ_ENROLLMENT_STATE_PENDING = 1 ;
353+
354+ // Complete State for KAJ Enrollment.
355+ KAJ_ENROLLMENT_STATE_COMPLETE = 2 ;
356+ }
357+
300358 // Optional. The resource name of the workload.
301359 // Format:
302360 // organizations/{organization}/locations/{location}/workloads/{workload}
@@ -316,7 +374,8 @@ message Workload {
316374 // These resources will be created when creating the workload.
317375 // If any of the projects already exist, the workload creation will fail.
318376 // Always read only.
319- repeated ResourceInfo resources = 3 [(google.api.field_behavior ) = OUTPUT_ONLY ];
377+ repeated ResourceInfo resources = 3
378+ [(google.api.field_behavior ) = OUTPUT_ONLY ];
320379
321380 // Required. Immutable. Compliance Regime associated with this workload.
322381 ComplianceRegime compliance_regime = 4 [
@@ -350,37 +409,55 @@ message Workload {
350409 // Optional. Labels applied to the workload.
351410 map <string , string > labels = 10 [(google.api.field_behavior ) = OPTIONAL ];
352411
353- // Input only. The parent resource for the resources managed by this Assured Workload. May
354- // be either empty or a folder resource which is a child of the
412+ // Input only. The parent resource for the resources managed by this Assured
413+ // Workload. May be either empty or a folder resource which is a child of the
355414 // Workload parent. If not specified all resources are created under the
356415 // parent organization.
357416 // Format:
358417 // folders/{folder_id}
359- string provisioned_resources_parent = 13 [(google.api.field_behavior ) = INPUT_ONLY ];
418+ string provisioned_resources_parent = 13
419+ [(google.api.field_behavior ) = INPUT_ONLY ];
360420
361- // Input only. Settings used to create a CMEK crypto key. When set a project with a KMS
362- // CMEK key is provisioned. This field is mandatory for a subset of Compliance
363- // Regimes.
421+ // Input only. Settings used to create a CMEK crypto key. When set a project
422+ // with a KMS CMEK key is provisioned. This field is mandatory for a subset of
423+ // Compliance Regimes.
364424 KMSSettings kms_settings = 14 [(google.api.field_behavior ) = INPUT_ONLY ];
365425
366- // Input only. Resource properties that are used to customize workload resources.
367- // These properties (such as custom project id) will be used to create
368- // workload resources if possible. This field is optional.
369- repeated ResourceSettings resource_settings = 15 [(google.api.field_behavior ) = INPUT_ONLY ];
426+ // Input only. Resource properties that are used to customize workload
427+ // resources. These properties (such as custom project id) will be used to
428+ // create workload resources if possible. This field is optional.
429+ repeated ResourceSettings resource_settings = 15
430+ [(google.api.field_behavior ) = INPUT_ONLY ];
431+
432+ // Output only. Represents the KAJ enrollment state of the given workload.
433+ KajEnrollmentState kaj_enrollment_state = 17
434+ [(google.api.field_behavior ) = OUTPUT_ONLY ];
435+
436+ // Optional. Indicates the sovereignty status of the given workload.
437+ // Currently meant to be used by Europe/Canada customers.
438+ bool enable_sovereign_controls = 18 [(google.api.field_behavior ) = OPTIONAL ];
439+
440+ // Output only. Represents the SAA enrollment response of the given workload.
441+ // SAA enrollment response is queried during GetWorkload call.
442+ // In failure cases, user friendly error message is shown in SAA details page.
443+ SaaEnrollmentResponse saa_enrollment_response = 20
444+ [(google.api.field_behavior ) = OUTPUT_ONLY ];
370445}
371446
372447// Operation metadata to give request details of CreateWorkload.
373448message CreateWorkloadOperationMetadata {
374449 // Optional. Time when the operation was created.
375- google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior ) = OPTIONAL ];
450+ google.protobuf.Timestamp create_time = 1
451+ [(google.api.field_behavior ) = OPTIONAL ];
376452
377453 // Optional. The display name of the workload.
378454 string display_name = 2 [(google.api.field_behavior ) = OPTIONAL ];
379455
380456 // Optional. The parent of the workload.
381457 string parent = 3 [(google.api.field_behavior ) = OPTIONAL ];
382458
383- // Optional. Compliance controls that should be applied to the resources managed by
384- // the workload.
385- Workload.ComplianceRegime compliance_regime = 4 [(google.api.field_behavior ) = OPTIONAL ];
459+ // Optional. Compliance controls that should be applied to the resources
460+ // managed by the workload.
461+ Workload.ComplianceRegime compliance_regime = 4
462+ [(google.api.field_behavior ) = OPTIONAL ];
386463}
0 commit comments