Skip to content

Commit

Permalink
feat: Add 'resource_settings' field to provide custom properties (ids…
Browse files Browse the repository at this point in the history
…) for the provisioned projects.

PiperOrigin-RevId: 363600693
  • Loading branch information
Google APIs authored and Copybara-Service committed Mar 18, 2021
1 parent d7e9274 commit dd7c51a
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 6 deletions.
12 changes: 7 additions & 5 deletions google/cloud/assuredworkloads/v1beta1/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file was automatically generated by BuildFileGenerator
# https://github.com/googleapis/gapic-generator/tree/master/rules_gapic/bazel
# https://github.com/googleapis/rules_gapic/tree/master/bazel

# Most of the manual changes to this file will be overwritten.
# It's **only** allowed to change the following rule attribute values:
Expand Down Expand Up @@ -125,6 +125,7 @@ go_gapic_library(
srcs = [":assuredworkloads_proto_with_info"],
grpc_service_config = "assuredworkloads_grpc_service_config.json",
importpath = "cloud.google.com/go/assuredworkloads/apiv1beta1;assuredworkloads",
metadata = True,
service_yaml = "assuredworkloads_v1beta1.yaml",
deps = [
":assuredworkloads_go_proto",
Expand All @@ -147,6 +148,7 @@ go_gapic_assembly_pkg(
name = "gapi-cloud-assuredworkloads-v1beta1-go",
deps = [
":assuredworkloads_go_gapic",
":assuredworkloads_go_gapic_srcjar-metadata.srcjar",
":assuredworkloads_go_gapic_srcjar-test.srcjar",
":assuredworkloads_go_proto",
],
Expand Down Expand Up @@ -253,8 +255,8 @@ nodejs_gapic_assembly_pkg(
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"ruby_gapic_assembly_pkg",
"ruby_cloud_gapic_library",
"ruby_gapic_assembly_pkg",
"ruby_grpc_library",
"ruby_proto_library",
)
Expand All @@ -274,11 +276,11 @@ ruby_cloud_gapic_library(
name = "assuredworkloads_ruby_gapic",
srcs = [":assuredworkloads_proto_with_info"],
extra_protoc_parameters = [
"ruby-cloud-gem-name=google-cloud-assured_workloads-v1beta1",
"ruby-cloud-env-prefix=ASSURED_WORKLOADS",
"ruby-cloud-product-url=https://cloud.google.com/assured-workloads/",
"ruby-cloud-api-id=assuredworkloads.googleapis.com",
"ruby-cloud-api-shortname=assuredworkloads",
"ruby-cloud-env-prefix=ASSURED_WORKLOADS",
"ruby-cloud-gem-name=google-cloud-assured_workloads-v1beta1",
"ruby-cloud-product-url=https://cloud.google.com/assured-workloads/",
],
grpc_service_config = "assuredworkloads_grpc_service_config.json",
ruby_cloud_description = "Assured Workloads for Government secures government workloads and accelerates the path to running compliant workloads on Google Cloud.",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2020 Google LLC
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -291,6 +291,19 @@ message Workload {
];
}

// Represent the custom settings for the resources to be created.
message ResourceSettings {
// Resource identifier.
// For a project this represents project_id. If the project is already
// taken, the workload creation will fail.
string resource_id = 1;

// Indicates the type of resource. This field should be specified to
// correspond the id to the right project type (CONSUMER_PROJECT or
// ENCRYPTION_KEYS_PROJECT)
ResourceInfo.ResourceType resource_type = 2;
}

// Supported Compliance Regimes.
enum ComplianceRegime {
// Unknown compliance regime.
Expand Down Expand Up @@ -413,6 +426,11 @@ message Workload {
// CMEK key is provisioned. This field is mandatory for a subset of Compliance
// Regimes.
KMSSettings kms_settings = 14 [(google.api.field_behavior) = INPUT_ONLY];

// Input only. Resource properties that are used to customize workload resources.
// These properties (such as custom project id) will be used to create
// workload resources if possible. This field is optional.
repeated ResourceSettings resource_settings = 15 [(google.api.field_behavior) = INPUT_ONLY];
}

// Operation metadata to give request details of CreateWorkload.
Expand Down

0 comments on commit dd7c51a

Please sign in to comment.