Skip to content

Commit 86eaf3f

Browse files
feat(assuredworkloads): update the api
#### assuredworkloads:v1 The following keys were added: - resources.organizations.resources.locations.resources.workloads.methods.analyzeWorkloadMove (Total Keys: 21) - schemas.GoogleCloudAssuredworkloadsV1AnalyzeWorkloadMoveResponse (Total Keys: 5) - schemas.GoogleCloudAssuredworkloadsV1AssetMoveAnalysis (Total Keys: 6) - schemas.GoogleCloudAssuredworkloadsV1MoveAnalysisGroup (Total Keys: 5) - schemas.GoogleCloudAssuredworkloadsV1MoveAnalysisResult (Total Keys: 6) - schemas.GoogleCloudAssuredworkloadsV1MoveImpact (Total Keys: 3)
1 parent fe34c22 commit 86eaf3f

File tree

2 files changed

+214
-1
lines changed

2 files changed

+214
-1
lines changed

docs/dyn/assuredworkloads_v1.organizations.locations.workloads.html

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@ <h2>Instance Methods</h2>
7979
</p>
8080
<p class="firstline">Returns the violations Resource.</p>
8181

82+
<p class="toc_element">
83+
<code><a href="#analyzeWorkloadMove">analyzeWorkloadMove(target, assetTypes=None, pageSize=None, pageToken=None, project=None, x__xgafv=None)</a></code></p>
84+
<p class="firstline">Analyzes a hypothetical move of a source resource to a target workload to surface compliance risks. The analysis is best effort and is not guaranteed to be exhaustive.</p>
85+
<p class="toc_element">
86+
<code><a href="#analyzeWorkloadMove_next">analyzeWorkloadMove_next()</a></code></p>
87+
<p class="firstline">Retrieves the next page of results.</p>
8288
<p class="toc_element">
8389
<code><a href="#close">close()</a></code></p>
8490
<p class="firstline">Close httplib2 connections.</p>
@@ -107,6 +113,75 @@ <h2>Instance Methods</h2>
107113
<code><a href="#restrictAllowedResources">restrictAllowedResources(name, body=None, x__xgafv=None)</a></code></p>
108114
<p class="firstline">Restrict the list of resources allowed in the Workload environment. The current list of allowed products can be found at https://cloud.google.com/assured-workloads/docs/supported-products In addition to assuredworkloads.workload.update permission, the user should also have orgpolicy.policy.set permission on the folder resource to use this functionality.</p>
109115
<h3>Method Details</h3>
116+
<div class="method">
117+
<code class="details" id="analyzeWorkloadMove">analyzeWorkloadMove(target, assetTypes=None, pageSize=None, pageToken=None, project=None, x__xgafv=None)</code>
118+
<pre>Analyzes a hypothetical move of a source resource to a target workload to surface compliance risks. The analysis is best effort and is not guaranteed to be exhaustive.
119+
120+
Args:
121+
target: string, Required. The resource ID of the folder-based destination workload. This workload is where the source resource will hypothetically be moved to. Specify the workload&#x27;s relative resource name, formatted as: &quot;organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}&quot; For example: &quot;organizations/123/locations/us-east1/workloads/assured-workload-2&quot; (required)
122+
assetTypes: string, Optional. List of asset types to be analyzed, including and under the source resource. If empty, all assets are analyzed. The complete list of asset types is available [here](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types). (repeated)
123+
pageSize: integer, Optional. Page size. If a value is not specified, the default value of 10 is used.
124+
pageToken: string, Optional. The page token from the previous response. It needs to be passed in the second and following requests.
125+
project: string, The source type is a project. Specify the project&#x27;s relative resource name, formatted as either a project number or a project ID: &quot;projects/{PROJECT_NUMBER}&quot; or &quot;projects/{PROJECT_ID}&quot; For example: &quot;projects/951040570662&quot; when specifying a project number, or &quot;projects/my-project-123&quot; when specifying a project ID.
126+
x__xgafv: string, V1 error format.
127+
Allowed values
128+
1 - v1 error format
129+
2 - v2 error format
130+
131+
Returns:
132+
An object of the form:
133+
134+
{ # Response containing the analysis results for the hypothetical resource move.
135+
&quot;assetMoveAnalyses&quot;: [ # List of analysis results for each asset in scope.
136+
{ # Represents move analysis results for an asset.
137+
&quot;analysisGroups&quot;: [ # List of eligible analyses performed for the asset.
138+
{ # Represents a logical group of checks performed for an asset. If successful, the group contains the analysis result, otherwise it contains an error with the failure reason.
139+
&quot;analysisResult&quot;: { # Represents the successful move analysis results for a group. # Result of a successful analysis.
140+
&quot;blockers&quot;: [ # List of blockers. If not resolved, these will result in compliance violations in the target.
141+
{ # Represents the impact of moving the asset to the target.
142+
&quot;detail&quot;: &quot;A String&quot;, # Explanation of the impact.
143+
},
144+
],
145+
&quot;warnings&quot;: [ # List of warnings. These are risks that may or may not result in compliance violations.
146+
{ # Represents the impact of moving the asset to the target.
147+
&quot;detail&quot;: &quot;A String&quot;, # Explanation of the impact.
148+
},
149+
],
150+
},
151+
&quot;displayName&quot;: &quot;A String&quot;, # Name of the analysis group.
152+
&quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Error details for a failed analysis.
153+
&quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
154+
&quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
155+
{
156+
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
157+
},
158+
],
159+
&quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
160+
},
161+
},
162+
],
163+
&quot;asset&quot;: &quot;A String&quot;, # The full resource name of the asset being analyzed. Example: //compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1
164+
&quot;assetType&quot;: &quot;A String&quot;, # Type of the asset being analyzed. Possible values will be among the ones listed [here](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
165+
},
166+
],
167+
&quot;nextPageToken&quot;: &quot;A String&quot;, # The next page token. Is empty if the last page is reached.
168+
}</pre>
169+
</div>
170+
171+
<div class="method">
172+
<code class="details" id="analyzeWorkloadMove_next">analyzeWorkloadMove_next()</code>
173+
<pre>Retrieves the next page of results.
174+
175+
Args:
176+
previous_request: The request for the previous page. (required)
177+
previous_response: The response from the request for the previous page. (required)
178+
179+
Returns:
180+
A request object that you can call &#x27;execute()&#x27; on to request the next
181+
page. Returns None if there are no more items in the collection.
182+
</pre>
183+
</div>
184+
110185
<div class="method">
111186
<code class="details" id="close">close()</code>
112187
<pre>Close httplib2 connections.</pre>

googleapiclient/discovery_cache/documents/assuredworkloads.v1.json

Lines changed: 139 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,53 @@
181181
},
182182
"workloads": {
183183
"methods": {
184+
"analyzeWorkloadMove": {
185+
"description": "Analyzes a hypothetical move of a source resource to a target workload to surface compliance risks. The analysis is best effort and is not guaranteed to be exhaustive.",
186+
"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}:analyzeWorkloadMove",
187+
"httpMethod": "GET",
188+
"id": "assuredworkloads.organizations.locations.workloads.analyzeWorkloadMove",
189+
"parameterOrder": [
190+
"target"
191+
],
192+
"parameters": {
193+
"assetTypes": {
194+
"description": "Optional. List of asset types to be analyzed, including and under the source resource. If empty, all assets are analyzed. The complete list of asset types is available [here](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).",
195+
"location": "query",
196+
"repeated": true,
197+
"type": "string"
198+
},
199+
"pageSize": {
200+
"description": "Optional. Page size. If a value is not specified, the default value of 10 is used.",
201+
"format": "int32",
202+
"location": "query",
203+
"type": "integer"
204+
},
205+
"pageToken": {
206+
"description": "Optional. The page token from the previous response. It needs to be passed in the second and following requests.",
207+
"location": "query",
208+
"type": "string"
209+
},
210+
"project": {
211+
"description": "The source type is a project. Specify the project's relative resource name, formatted as either a project number or a project ID: \"projects/{PROJECT_NUMBER}\" or \"projects/{PROJECT_ID}\" For example: \"projects/951040570662\" when specifying a project number, or \"projects/my-project-123\" when specifying a project ID.",
212+
"location": "query",
213+
"type": "string"
214+
},
215+
"target": {
216+
"description": "Required. The resource ID of the folder-based destination workload. This workload is where the source resource will hypothetically be moved to. Specify the workload's relative resource name, formatted as: \"organizations/{ORGANIZATION_ID}/locations/{LOCATION_ID}/workloads/{WORKLOAD_ID}\" For example: \"organizations/123/locations/us-east1/workloads/assured-workload-2\"",
217+
"location": "path",
218+
"pattern": "^organizations/[^/]+/locations/[^/]+/workloads/[^/]+$",
219+
"required": true,
220+
"type": "string"
221+
}
222+
},
223+
"path": "v1/{+target}:analyzeWorkloadMove",
224+
"response": {
225+
"$ref": "GoogleCloudAssuredworkloadsV1AnalyzeWorkloadMoveResponse"
226+
},
227+
"scopes": [
228+
"https://www.googleapis.com/auth/cloud-platform"
229+
]
230+
},
184231
"create": {
185232
"description": "Creates Assured Workload.",
186233
"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/workloads",
@@ -519,7 +566,7 @@
519566
}
520567
}
521568
},
522-
"revision": "20230831",
569+
"revision": "20230907",
523570
"rootUrl": "https://assuredworkloads.googleapis.com/",
524571
"schemas": {
525572
"GoogleCloudAssuredworkloadsV1AcknowledgeViolationRequest": {
@@ -544,6 +591,46 @@
544591
"properties": {},
545592
"type": "object"
546593
},
594+
"GoogleCloudAssuredworkloadsV1AnalyzeWorkloadMoveResponse": {
595+
"description": "Response containing the analysis results for the hypothetical resource move.",
596+
"id": "GoogleCloudAssuredworkloadsV1AnalyzeWorkloadMoveResponse",
597+
"properties": {
598+
"assetMoveAnalyses": {
599+
"description": "List of analysis results for each asset in scope.",
600+
"items": {
601+
"$ref": "GoogleCloudAssuredworkloadsV1AssetMoveAnalysis"
602+
},
603+
"type": "array"
604+
},
605+
"nextPageToken": {
606+
"description": "The next page token. Is empty if the last page is reached.",
607+
"type": "string"
608+
}
609+
},
610+
"type": "object"
611+
},
612+
"GoogleCloudAssuredworkloadsV1AssetMoveAnalysis": {
613+
"description": "Represents move analysis results for an asset.",
614+
"id": "GoogleCloudAssuredworkloadsV1AssetMoveAnalysis",
615+
"properties": {
616+
"analysisGroups": {
617+
"description": "List of eligible analyses performed for the asset.",
618+
"items": {
619+
"$ref": "GoogleCloudAssuredworkloadsV1MoveAnalysisGroup"
620+
},
621+
"type": "array"
622+
},
623+
"asset": {
624+
"description": "The full resource name of the asset being analyzed. Example: //compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1",
625+
"type": "string"
626+
},
627+
"assetType": {
628+
"description": "Type of the asset being analyzed. Possible values will be among the ones listed [here](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).",
629+
"type": "string"
630+
}
631+
},
632+
"type": "object"
633+
},
547634
"GoogleCloudAssuredworkloadsV1CreateWorkloadOperationMetadata": {
548635
"description": "Operation metadata to give request details of CreateWorkload.",
549636
"id": "GoogleCloudAssuredworkloadsV1CreateWorkloadOperationMetadata",
@@ -644,6 +731,57 @@
644731
},
645732
"type": "object"
646733
},
734+
"GoogleCloudAssuredworkloadsV1MoveAnalysisGroup": {
735+
"description": "Represents a logical group of checks performed for an asset. If successful, the group contains the analysis result, otherwise it contains an error with the failure reason.",
736+
"id": "GoogleCloudAssuredworkloadsV1MoveAnalysisGroup",
737+
"properties": {
738+
"analysisResult": {
739+
"$ref": "GoogleCloudAssuredworkloadsV1MoveAnalysisResult",
740+
"description": "Result of a successful analysis."
741+
},
742+
"displayName": {
743+
"description": "Name of the analysis group.",
744+
"type": "string"
745+
},
746+
"error": {
747+
"$ref": "GoogleRpcStatus",
748+
"description": "Error details for a failed analysis."
749+
}
750+
},
751+
"type": "object"
752+
},
753+
"GoogleCloudAssuredworkloadsV1MoveAnalysisResult": {
754+
"description": "Represents the successful move analysis results for a group.",
755+
"id": "GoogleCloudAssuredworkloadsV1MoveAnalysisResult",
756+
"properties": {
757+
"blockers": {
758+
"description": "List of blockers. If not resolved, these will result in compliance violations in the target.",
759+
"items": {
760+
"$ref": "GoogleCloudAssuredworkloadsV1MoveImpact"
761+
},
762+
"type": "array"
763+
},
764+
"warnings": {
765+
"description": "List of warnings. These are risks that may or may not result in compliance violations.",
766+
"items": {
767+
"$ref": "GoogleCloudAssuredworkloadsV1MoveImpact"
768+
},
769+
"type": "array"
770+
}
771+
},
772+
"type": "object"
773+
},
774+
"GoogleCloudAssuredworkloadsV1MoveImpact": {
775+
"description": "Represents the impact of moving the asset to the target.",
776+
"id": "GoogleCloudAssuredworkloadsV1MoveImpact",
777+
"properties": {
778+
"detail": {
779+
"description": "Explanation of the impact.",
780+
"type": "string"
781+
}
782+
},
783+
"type": "object"
784+
},
647785
"GoogleCloudAssuredworkloadsV1MutatePartnerPermissionsRequest": {
648786
"description": "Request for updating permission settings for a partner workload.",
649787
"id": "GoogleCloudAssuredworkloadsV1MutatePartnerPermissionsRequest",

0 commit comments

Comments
 (0)