Skip to content

Commit 32d2f9b

Browse files
Google APIscopybara-github
authored andcommitted
feat: Updated v1beta1 analyzeWorkloadMove documentation
Committer: @ketanbshah PiperOrigin-RevId: 469606602
1 parent 7c3a38d commit 32d2f9b

3 files changed

Lines changed: 35 additions & 86 deletions

File tree

google/cloud/assuredworkloads/v1beta1/assuredworkloads.proto

Lines changed: 29 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -67,39 +67,6 @@ message UpdateWorkloadRequest {
6767
google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
6868
}
6969

70-
// Request for restricting list of available services in Workload environment.
71-
message RestrictAllowedServicesRequest {
72-
// The type of restriction.
73-
enum RestrictionType {
74-
// Unknown restriction type.
75-
RESTRICTION_TYPE_UNSPECIFIED = 0;
76-
77-
// Allow the use all services. This effectively remove all restrictions
78-
// placed on the Folder.
79-
ALLOW_ALL_GCP_SERVICES = 1;
80-
81-
// Based on Workload's compliance regime, allowed list changes.
82-
// See - https://cloud.google.com/assured-workloads/docs/supported-products
83-
// for the list of allowed services.
84-
ALLOW_COMPLIANT_SERVICES = 2;
85-
}
86-
87-
// Required. The resource name of the Workload. This is the workloads's
88-
// relative path in the API, formatted as
89-
// "organizations/{organization_id}/locations/{location_id}/workloads/{workload_id}".
90-
// For example,
91-
// "organizations/123/locations/us-east1/workloads/assured-workload-1".
92-
string name = 1 [(google.api.field_behavior) = REQUIRED];
93-
94-
// Required. The type of restriction for using gcp services in the Workload environment.
95-
RestrictionType restriction_type = 2 [(google.api.field_behavior) = REQUIRED];
96-
}
97-
98-
// Response for restricting the list of allowed services.
99-
message RestrictAllowedServicesResponse {
100-
101-
}
102-
10370
// Request for restricting list of available resources in Workload environment.
10471
message RestrictAllowedResourcesRequest {
10572
// The type of restriction.
@@ -166,41 +133,41 @@ message GetWorkloadRequest {
166133
];
167134
}
168135

169-
// Request to check if source workload can be moved to target workload.
136+
// A request to analyze a hypothetical move of a source project or project-based
137+
// workload to a target (destination) folder-based workload.
170138
message AnalyzeWorkloadMoveRequest {
171-
// Kind of resource to be moved to the destination workload
139+
// The resource type to be moved to the destination workload. It can be either
140+
// an existing project or a project-based workload.
172141
oneof projectOrWorkloadResource {
173-
// The Source is project based Workload to be moved. This is the workloads's
174-
// relative path in the API, formatted as
175-
// "organizations/{organization_id}/locations/{location_id}/workloads/{workload_id}".
176-
// For example,
177-
// "organizations/123/locations/us-east1/workloads/assured-workload-1".
142+
// The source type is a project-based workload. Specify the workloads's
143+
// relative resource name, formatted as:
144+
// "organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}"
145+
// For example:
146+
// "organizations/123/locations/us-east1/workloads/assured-workload-1"
178147
string source = 1;
179148

180-
// The Source is a project based to be moved.
181-
// This is the project's relative path in the API, formatted as
182-
// "cloudresourcemanager.googleapis.com/projects/{project_number}"
183-
// "projects/{project_number}"
184-
// "cloudresourcemanager.googleapis.com/projects/{project_id}"
185-
// "projects/{project_id}"
186-
// For example,
187-
// "organizations/123/locations/us-east1/workloads/assured-workload-1".
149+
// The source type is a project. Specify the project's relative resource
150+
// name, formatted as either a project number or a project ID:
151+
// "projects/{PROJECT_NUMBER}" or "projects/{PROJECT_ID}"
152+
// For example:
153+
// "projects/951040570662" when specifying a project number, or
154+
// "projects/my-project-123" when specifying a project ID.
188155
string project = 3;
189156
}
190157

191-
// Required. The resource name of the Workload to fetch. This is the workloads's
192-
// relative path in the API, formatted as
193-
// "organizations/{organization_id}/locations/{location_id}/workloads/{workload_id}".
194-
// For example,
195-
// "organizations/123/locations/us-east1/workloads/assured-workload-2".
158+
// Required. The resource ID of the folder-based destination workload. This workload is
159+
// where the source project will hypothetically be moved to. Specify the
160+
// workload's relative resource name, formatted as:
161+
// "organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}"
162+
// For example:
163+
// "organizations/123/locations/us-east1/workloads/assured-workload-2"
196164
string target = 2 [(google.api.field_behavior) = REQUIRED];
197165
}
198166

199-
// Response with the analysis if the source workload can be moved to the target
200-
// workload
167+
// A response that includes the analysis of the hypothetical resource move.
201168
message AnalyzeWorkloadMoveResponse {
202-
// List of blockers that prevent moving the source workload to the target
203-
// workload
169+
// A list of blockers that should be addressed before moving the source
170+
// project or project-based workload to the destination folder-based workload.
204171
repeated string blockers = 1;
205172
}
206173

@@ -308,6 +275,9 @@ message Workload {
308275

309276
// International Traffic in Arms Regulations
310277
ITAR = 10;
278+
279+
// Assured Workloads for Australia Regions and Support controls
280+
AU_REGIONS_AND_US_SUPPORT = 11;
311281
}
312282

313283
// Settings specific to the Key Management Service.
@@ -483,15 +453,15 @@ message Workload {
483453
(google.api.field_behavior) = IMMUTABLE
484454
];
485455

486-
// Input only. The billing account used for the resources which are
456+
// Output only. The billing account used for the resources which are
487457
// direct children of workload. This billing account is initially associated
488458
// with the resources created as part of Workload creation.
489459
// After the initial creation of these resources, the customer can change
490460
// the assigned billing account.
491461
// The resource name has the form
492462
// `billingAccounts/{billing_account_id}`. For example,
493463
// `billingAccounts/012345-567890-ABCDEF`.
494-
string billing_account = 6 [(google.api.field_behavior) = INPUT_ONLY];
464+
string billing_account = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
495465

496466
// Settings specific to the selected [compliance_regime]
497467
oneof compliance_regime_settings {

google/cloud/assuredworkloads/v1beta1/assuredworkloads_grpc_service_config.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@
3131
"service": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService",
3232
"method": "AnalyzeWorkloadMove"
3333
},
34-
{
35-
"service": "google.cloud.assuredworkloads.v1beta1.AssuredWorkloadsService",
36-
"method": "AnalyzeWorkloadMove"
37-
},
3834
{
3935
"service": "google.longrunning.Operations",
4036
"method": "GetOperation"

google/cloud/assuredworkloads/v1beta1/assuredworkloads_service.proto

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,10 @@ option ruby_package = "Google::Cloud::AssuredWorkloads::V1beta1";
3333
// Service to manage AssuredWorkloads.
3434
service AssuredWorkloadsService {
3535
option (google.api.default_host) = "assuredworkloads.googleapis.com";
36-
option (google.api.oauth_scopes) =
37-
"https://www.googleapis.com/auth/cloud-platform";
36+
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
3837

3938
// Creates Assured Workload.
40-
rpc CreateWorkload(CreateWorkloadRequest)
41-
returns (google.longrunning.Operation) {
39+
rpc CreateWorkload(CreateWorkloadRequest) returns (google.longrunning.Operation) {
4240
option (google.api.http) = {
4341
post: "/v1beta1/{parent=organizations/*/locations/*}/workloads"
4442
body: "workload"
@@ -55,30 +53,16 @@ service AssuredWorkloadsService {
5553
// For force updates don't set etag field in the Workload.
5654
// Only one update operation per workload can be in progress.
5755
rpc UpdateWorkload(UpdateWorkloadRequest) returns (Workload) {
58-
option (google.api.http) = {
59-
patch: "/v1beta1/{workload.name=organizations/*/locations/*/workloads/*}"
60-
body: "workload"
61-
};
6256
option (google.api.method_signature) = "workload,update_mask";
6357
}
6458

65-
// Restrict the list of services allowed in the Workload environment.
66-
// The current list of allowed services can be found at
67-
// https://cloud.google.com/assured-workloads/docs/supported-products
68-
// In addition to assuredworkloads.workload.update permission, the user should
69-
// also have orgpolicy.policy.set permission on the folder resource
70-
// to use this functionality.
71-
rpc RestrictAllowedServices(RestrictAllowedServicesRequest)
72-
returns (RestrictAllowedServicesResponse) {}
73-
7459
// Restrict the list of resources allowed in the Workload environment.
7560
// The current list of allowed products can be found at
7661
// https://cloud.google.com/assured-workloads/docs/supported-products
7762
// In addition to assuredworkloads.workload.update permission, the user should
7863
// also have orgpolicy.policy.set permission on the folder resource
7964
// to use this functionality.
80-
rpc RestrictAllowedResources(RestrictAllowedResourcesRequest)
81-
returns (RestrictAllowedResourcesResponse) {
65+
rpc RestrictAllowedResources(RestrictAllowedResourcesRequest) returns (RestrictAllowedResourcesResponse) {
8266
option (google.api.http) = {
8367
post: "/v1beta1/{name=organizations/*/locations/*/workloads/*}:restrictAllowedResources"
8468
body: "*"
@@ -103,10 +87,9 @@ service AssuredWorkloadsService {
10387
option (google.api.method_signature) = "name";
10488
}
10589

106-
// Analyze if the source Assured Workloads can be moved to the target Assured
107-
// Workload
108-
rpc AnalyzeWorkloadMove(AnalyzeWorkloadMoveRequest)
109-
returns (AnalyzeWorkloadMoveResponse) {
90+
// A request to analyze a hypothetical move of a source project or
91+
// project-based workload to a target (destination) folder-based workload.
92+
rpc AnalyzeWorkloadMove(AnalyzeWorkloadMoveRequest) returns (AnalyzeWorkloadMoveResponse) {
11093
option (google.api.method_signature) = "project,target";
11194
}
11295

0 commit comments

Comments
 (0)