From 4b6bb3dede843b93353dbebfee4d2758aeede96f Mon Sep 17 00:00:00 2001 From: Google APIs Date: Thu, 26 Aug 2021 09:33:23 -0700 Subject: [PATCH] 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 --- .../assuredworkloads/v1beta1/BUILD.bazel | 3 ++ .../v1beta1/assuredworkloads_v1beta1.proto | 37 +++++++++++++------ 2 files changed, 29 insertions(+), 11 deletions(-) diff --git a/google/cloud/assuredworkloads/v1beta1/BUILD.bazel b/google/cloud/assuredworkloads/v1beta1/BUILD.bazel index 5911e30ab..c6af88484 100644 --- a/google/cloud/assuredworkloads/v1beta1/BUILD.bazel +++ b/google/cloud/assuredworkloads/v1beta1/BUILD.bazel @@ -70,12 +70,15 @@ java_grpc_library( java_gapic_library( name = "assuredworkloads_java_gapic", srcs = [":assuredworkloads_proto_with_info"], + gapic_yaml = None, grpc_service_config = "assuredworkloads_grpc_service_config.json", + service_yaml = "assuredworkloads_v1beta1.yaml", test_deps = [ ":assuredworkloads_java_grpc", ], deps = [ ":assuredworkloads_java_proto", + "//google/api:api_java_proto", ], ) diff --git a/google/cloud/assuredworkloads/v1beta1/assuredworkloads_v1beta1.proto b/google/cloud/assuredworkloads/v1beta1/assuredworkloads_v1beta1.proto index d12149b15..d97441d63 100644 --- a/google/cloud/assuredworkloads/v1beta1/assuredworkloads_v1beta1.proto +++ b/google/cloud/assuredworkloads/v1beta1/assuredworkloads_v1beta1.proto @@ -208,11 +208,18 @@ message Workload { // Unknown resource type. RESOURCE_TYPE_UNSPECIFIED = 0; - // Consumer project. - CONSUMER_PROJECT = 1; + // Deprecated. Existing workloads will continue to support this, but new + // CreateWorkloadRequests should not specify this as an input value. + CONSUMER_PROJECT = 1 [deprecated = true]; + + // Consumer Folder. + CONSUMER_FOLDER = 4; // Consumer project containing encryption keys. ENCRYPTION_KEYS_PROJECT = 2; + + // Keyring resource that hosts encryption keys. + KEYRING = 3; } // Resource identifier. @@ -302,6 +309,11 @@ message Workload { // correspond the id to the right project type (CONSUMER_PROJECT or // ENCRYPTION_KEYS_PROJECT) ResourceInfo.ResourceType resource_type = 2; + + // User-assigned resource display name. + // If not empty it will be used to create a resource with the specified + // name. + string display_name = 3; } // Supported Compliance Regimes. @@ -332,6 +344,9 @@ message Workload { // Assured Workloads For EU Regions and Support controls EU_REGIONS_AND_SUPPORT = 8; + + // Assured Workloads For Canada Regions and Support controls + CA_REGIONS_AND_SUPPORT = 9; } // Optional. The resource name of the workload. @@ -367,7 +382,7 @@ message Workload { (google.api.field_behavior) = IMMUTABLE ]; - // Required. Input only. The billing account used for the resources which are + // Input only. The billing account used for the resources which are // direct children of workload. This billing account is initially associated // with the resources created as part of Workload creation. // After the initial creation of these resources, the customer can change @@ -375,10 +390,7 @@ message Workload { // The resource name has the form // `billingAccounts/{billing_account_id}`. For example, // `billingAccounts/012345-567890-ABCDEF`. - string billing_account = 6 [ - (google.api.field_behavior) = REQUIRED, - (google.api.field_behavior) = INPUT_ONLY - ]; + string billing_account = 6 [(google.api.field_behavior) = INPUT_ONLY]; // Settings specific to the selected [compliance_regime] oneof compliance_regime_settings { @@ -423,12 +435,11 @@ message Workload { map labels = 10 [(google.api.field_behavior) = OPTIONAL]; // Input only. The parent resource for the resources managed by this Assured Workload. May - // be either an organization or a folder. Must be the same or a child of the + // be either empty or a folder resource which is a child of the // Workload parent. If not specified all resources are created under the - // Workload parent. - // Formats: + // parent organization. + // Format: // folders/{folder_id} - // organizations/{organization_id} string provisioned_resources_parent = 13 [(google.api.field_behavior) = INPUT_ONLY]; // Input only. Settings used to create a CMEK crypto key. When set a project with a KMS @@ -456,4 +467,8 @@ message CreateWorkloadOperationMetadata { // Optional. Compliance controls that should be applied to the resources managed by // the workload. Workload.ComplianceRegime compliance_regime = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Resource properties in the input that are used for creating/customizing + // workload resources. + repeated Workload.ResourceSettings resource_settings = 5 [(google.api.field_behavior) = OPTIONAL]; }