Skip to content

Commit

Permalink
feat(assuredworkloads): update the api
Browse files Browse the repository at this point in the history
#### 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)
  • Loading branch information
yoshi-automation committed Sep 18, 2023
1 parent fe34c22 commit 86eaf3f
Show file tree
Hide file tree
Showing 2 changed files with 214 additions and 1 deletion.
Expand Up @@ -79,6 +79,12 @@ <h2>Instance Methods</h2>
</p>
<p class="firstline">Returns the violations Resource.</p>

<p class="toc_element">
<code><a href="#analyzeWorkloadMove">analyzeWorkloadMove(target, assetTypes=None, pageSize=None, pageToken=None, project=None, x__xgafv=None)</a></code></p>
<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>
<p class="toc_element">
<code><a href="#analyzeWorkloadMove_next">analyzeWorkloadMove_next()</a></code></p>
<p class="firstline">Retrieves the next page of results.</p>
<p class="toc_element">
<code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
Expand Down Expand Up @@ -107,6 +113,75 @@ <h2>Instance Methods</h2>
<code><a href="#restrictAllowedResources">restrictAllowedResources(name, body=None, x__xgafv=None)</a></code></p>
<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>
<h3>Method Details</h3>
<div class="method">
<code class="details" id="analyzeWorkloadMove">analyzeWorkloadMove(target, assetTypes=None, pageSize=None, pageToken=None, project=None, x__xgafv=None)</code>
<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.

Args:
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)
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)
pageSize: integer, Optional. Page size. If a value is not specified, the default value of 10 is used.
pageToken: string, Optional. The page token from the previous response. It needs to be passed in the second and following requests.
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.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format

Returns:
An object of the form:

{ # Response containing the analysis results for the hypothetical resource move.
&quot;assetMoveAnalyses&quot;: [ # List of analysis results for each asset in scope.
{ # Represents move analysis results for an asset.
&quot;analysisGroups&quot;: [ # List of eligible analyses performed for the asset.
{ # 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.
&quot;analysisResult&quot;: { # Represents the successful move analysis results for a group. # Result of a successful analysis.
&quot;blockers&quot;: [ # List of blockers. If not resolved, these will result in compliance violations in the target.
{ # Represents the impact of moving the asset to the target.
&quot;detail&quot;: &quot;A String&quot;, # Explanation of the impact.
},
],
&quot;warnings&quot;: [ # List of warnings. These are risks that may or may not result in compliance violations.
{ # Represents the impact of moving the asset to the target.
&quot;detail&quot;: &quot;A String&quot;, # Explanation of the impact.
},
],
},
&quot;displayName&quot;: &quot;A String&quot;, # Name of the analysis group.
&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.
&quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
&quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
{
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
},
],
&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.
},
},
],
&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
&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).
},
],
&quot;nextPageToken&quot;: &quot;A String&quot;, # The next page token. Is empty if the last page is reached.
}</pre>
</div>

<div class="method">
<code class="details" id="analyzeWorkloadMove_next">analyzeWorkloadMove_next()</code>
<pre>Retrieves the next page of results.

Args:
previous_request: The request for the previous page. (required)
previous_response: The response from the request for the previous page. (required)

Returns:
A request object that you can call &#x27;execute()&#x27; on to request the next
page. Returns None if there are no more items in the collection.
</pre>
</div>

<div class="method">
<code class="details" id="close">close()</code>
<pre>Close httplib2 connections.</pre>
Expand Down
140 changes: 139 additions & 1 deletion googleapiclient/discovery_cache/documents/assuredworkloads.v1.json
Expand Up @@ -181,6 +181,53 @@
},
"workloads": {
"methods": {
"analyzeWorkloadMove": {
"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.",
"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/workloads/{workloadsId}:analyzeWorkloadMove",
"httpMethod": "GET",
"id": "assuredworkloads.organizations.locations.workloads.analyzeWorkloadMove",
"parameterOrder": [
"target"
],
"parameters": {
"assetTypes": {
"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).",
"location": "query",
"repeated": true,
"type": "string"
},
"pageSize": {
"description": "Optional. Page size. If a value is not specified, the default value of 10 is used.",
"format": "int32",
"location": "query",
"type": "integer"
},
"pageToken": {
"description": "Optional. The page token from the previous response. It needs to be passed in the second and following requests.",
"location": "query",
"type": "string"
},
"project": {
"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.",
"location": "query",
"type": "string"
},
"target": {
"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\"",
"location": "path",
"pattern": "^organizations/[^/]+/locations/[^/]+/workloads/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+target}:analyzeWorkloadMove",
"response": {
"$ref": "GoogleCloudAssuredworkloadsV1AnalyzeWorkloadMoveResponse"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
},
"create": {
"description": "Creates Assured Workload.",
"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/workloads",
Expand Down Expand Up @@ -519,7 +566,7 @@
}
}
},
"revision": "20230831",
"revision": "20230907",
"rootUrl": "https://assuredworkloads.googleapis.com/",
"schemas": {
"GoogleCloudAssuredworkloadsV1AcknowledgeViolationRequest": {
Expand All @@ -544,6 +591,46 @@
"properties": {},
"type": "object"
},
"GoogleCloudAssuredworkloadsV1AnalyzeWorkloadMoveResponse": {
"description": "Response containing the analysis results for the hypothetical resource move.",
"id": "GoogleCloudAssuredworkloadsV1AnalyzeWorkloadMoveResponse",
"properties": {
"assetMoveAnalyses": {
"description": "List of analysis results for each asset in scope.",
"items": {
"$ref": "GoogleCloudAssuredworkloadsV1AssetMoveAnalysis"
},
"type": "array"
},
"nextPageToken": {
"description": "The next page token. Is empty if the last page is reached.",
"type": "string"
}
},
"type": "object"
},
"GoogleCloudAssuredworkloadsV1AssetMoveAnalysis": {
"description": "Represents move analysis results for an asset.",
"id": "GoogleCloudAssuredworkloadsV1AssetMoveAnalysis",
"properties": {
"analysisGroups": {
"description": "List of eligible analyses performed for the asset.",
"items": {
"$ref": "GoogleCloudAssuredworkloadsV1MoveAnalysisGroup"
},
"type": "array"
},
"asset": {
"description": "The full resource name of the asset being analyzed. Example: //compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1",
"type": "string"
},
"assetType": {
"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).",
"type": "string"
}
},
"type": "object"
},
"GoogleCloudAssuredworkloadsV1CreateWorkloadOperationMetadata": {
"description": "Operation metadata to give request details of CreateWorkload.",
"id": "GoogleCloudAssuredworkloadsV1CreateWorkloadOperationMetadata",
Expand Down Expand Up @@ -644,6 +731,57 @@
},
"type": "object"
},
"GoogleCloudAssuredworkloadsV1MoveAnalysisGroup": {
"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.",
"id": "GoogleCloudAssuredworkloadsV1MoveAnalysisGroup",
"properties": {
"analysisResult": {
"$ref": "GoogleCloudAssuredworkloadsV1MoveAnalysisResult",
"description": "Result of a successful analysis."
},
"displayName": {
"description": "Name of the analysis group.",
"type": "string"
},
"error": {
"$ref": "GoogleRpcStatus",
"description": "Error details for a failed analysis."
}
},
"type": "object"
},
"GoogleCloudAssuredworkloadsV1MoveAnalysisResult": {
"description": "Represents the successful move analysis results for a group.",
"id": "GoogleCloudAssuredworkloadsV1MoveAnalysisResult",
"properties": {
"blockers": {
"description": "List of blockers. If not resolved, these will result in compliance violations in the target.",
"items": {
"$ref": "GoogleCloudAssuredworkloadsV1MoveImpact"
},
"type": "array"
},
"warnings": {
"description": "List of warnings. These are risks that may or may not result in compliance violations.",
"items": {
"$ref": "GoogleCloudAssuredworkloadsV1MoveImpact"
},
"type": "array"
}
},
"type": "object"
},
"GoogleCloudAssuredworkloadsV1MoveImpact": {
"description": "Represents the impact of moving the asset to the target.",
"id": "GoogleCloudAssuredworkloadsV1MoveImpact",
"properties": {
"detail": {
"description": "Explanation of the impact.",
"type": "string"
}
},
"type": "object"
},
"GoogleCloudAssuredworkloadsV1MutatePartnerPermissionsRequest": {
"description": "Request for updating permission settings for a partner workload.",
"id": "GoogleCloudAssuredworkloadsV1MutatePartnerPermissionsRequest",
Expand Down

0 comments on commit 86eaf3f

Please sign in to comment.