Skip to content

Commit 4b6bb3d

Browse files
Google APIscopybara-github
authored andcommitted
feat: Add Canada Regions And Support compliance regime
fix: ResourceType CONSUMER_PROJECT is deprecated feat: ResourceType CONSUMER_FOLDER and KEYRING are added feat: display_name is added to ResourceSettings fix: billing_account is now optional in Workload feat: resource_settings is added to CreateWorkloadOperationMetadata Committer: @ketanbshah PiperOrigin-RevId: 393142547
1 parent 4006aa5 commit 4b6bb3d

2 files changed

Lines changed: 29 additions & 11 deletions

File tree

google/cloud/assuredworkloads/v1beta1/BUILD.bazel

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,15 @@ java_grpc_library(
7070
java_gapic_library(
7171
name = "assuredworkloads_java_gapic",
7272
srcs = [":assuredworkloads_proto_with_info"],
73+
gapic_yaml = None,
7374
grpc_service_config = "assuredworkloads_grpc_service_config.json",
75+
service_yaml = "assuredworkloads_v1beta1.yaml",
7476
test_deps = [
7577
":assuredworkloads_java_grpc",
7678
],
7779
deps = [
7880
":assuredworkloads_java_proto",
81+
"//google/api:api_java_proto",
7982
],
8083
)
8184

google/cloud/assuredworkloads/v1beta1/assuredworkloads_v1beta1.proto

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -208,11 +208,18 @@ message Workload {
208208
// Unknown resource type.
209209
RESOURCE_TYPE_UNSPECIFIED = 0;
210210

211-
// Consumer project.
212-
CONSUMER_PROJECT = 1;
211+
// Deprecated. Existing workloads will continue to support this, but new
212+
// CreateWorkloadRequests should not specify this as an input value.
213+
CONSUMER_PROJECT = 1 [deprecated = true];
214+
215+
// Consumer Folder.
216+
CONSUMER_FOLDER = 4;
213217

214218
// Consumer project containing encryption keys.
215219
ENCRYPTION_KEYS_PROJECT = 2;
220+
221+
// Keyring resource that hosts encryption keys.
222+
KEYRING = 3;
216223
}
217224

218225
// Resource identifier.
@@ -302,6 +309,11 @@ message Workload {
302309
// correspond the id to the right project type (CONSUMER_PROJECT or
303310
// ENCRYPTION_KEYS_PROJECT)
304311
ResourceInfo.ResourceType resource_type = 2;
312+
313+
// User-assigned resource display name.
314+
// If not empty it will be used to create a resource with the specified
315+
// name.
316+
string display_name = 3;
305317
}
306318

307319
// Supported Compliance Regimes.
@@ -332,6 +344,9 @@ message Workload {
332344

333345
// Assured Workloads For EU Regions and Support controls
334346
EU_REGIONS_AND_SUPPORT = 8;
347+
348+
// Assured Workloads For Canada Regions and Support controls
349+
CA_REGIONS_AND_SUPPORT = 9;
335350
}
336351

337352
// Optional. The resource name of the workload.
@@ -367,18 +382,15 @@ message Workload {
367382
(google.api.field_behavior) = IMMUTABLE
368383
];
369384

370-
// Required. Input only. The billing account used for the resources which are
385+
// Input only. The billing account used for the resources which are
371386
// direct children of workload. This billing account is initially associated
372387
// with the resources created as part of Workload creation.
373388
// After the initial creation of these resources, the customer can change
374389
// the assigned billing account.
375390
// The resource name has the form
376391
// `billingAccounts/{billing_account_id}`. For example,
377392
// `billingAccounts/012345-567890-ABCDEF`.
378-
string billing_account = 6 [
379-
(google.api.field_behavior) = REQUIRED,
380-
(google.api.field_behavior) = INPUT_ONLY
381-
];
393+
string billing_account = 6 [(google.api.field_behavior) = INPUT_ONLY];
382394

383395
// Settings specific to the selected [compliance_regime]
384396
oneof compliance_regime_settings {
@@ -423,12 +435,11 @@ message Workload {
423435
map<string, string> labels = 10 [(google.api.field_behavior) = OPTIONAL];
424436

425437
// Input only. The parent resource for the resources managed by this Assured Workload. May
426-
// be either an organization or a folder. Must be the same or a child of the
438+
// be either empty or a folder resource which is a child of the
427439
// Workload parent. If not specified all resources are created under the
428-
// Workload parent.
429-
// Formats:
440+
// parent organization.
441+
// Format:
430442
// folders/{folder_id}
431-
// organizations/{organization_id}
432443
string provisioned_resources_parent = 13 [(google.api.field_behavior) = INPUT_ONLY];
433444

434445
// Input only. Settings used to create a CMEK crypto key. When set a project with a KMS
@@ -456,4 +467,8 @@ message CreateWorkloadOperationMetadata {
456467
// Optional. Compliance controls that should be applied to the resources managed by
457468
// the workload.
458469
Workload.ComplianceRegime compliance_regime = 4 [(google.api.field_behavior) = OPTIONAL];
470+
471+
// Optional. Resource properties in the input that are used for creating/customizing
472+
// workload resources.
473+
repeated Workload.ResourceSettings resource_settings = 5 [(google.api.field_behavior) = OPTIONAL];
459474
}

0 commit comments

Comments
 (0)