- [HTTP request](https://docs.cloud.google.com/assured-workloads/docs/reference/rest/v1beta1/organizations.locations.workloads/analyzeWorkloadMove.md.txt#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/assured-workloads/docs/reference/rest/v1beta1/organizations.locations.workloads/analyzeWorkloadMove.md.txt#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/assured-workloads/docs/reference/rest/v1beta1/organizations.locations.workloads/analyzeWorkloadMove.md.txt#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/assured-workloads/docs/reference/rest/v1beta1/organizations.locations.workloads/analyzeWorkloadMove.md.txt#body.request_body)
- [Response body](https://docs.cloud.google.com/assured-workloads/docs/reference/rest/v1beta1/organizations.locations.workloads/analyzeWorkloadMove.md.txt#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/assured-workloads/docs/reference/rest/v1beta1/organizations.locations.workloads/analyzeWorkloadMove.md.txt#body.AnalyzeWorkloadMoveResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/assured-workloads/docs/reference/rest/v1beta1/organizations.locations.workloads/analyzeWorkloadMove.md.txt#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/assured-workloads/docs/reference/rest/v1beta1/organizations.locations.workloads/analyzeWorkloadMove.md.txt#body.aspect_1)
- [AssetMoveAnalysis](https://docs.cloud.google.com/assured-workloads/docs/reference/rest/v1beta1/organizations.locations.workloads/analyzeWorkloadMove.md.txt#AssetMoveAnalysis)
  - [JSON representation](https://docs.cloud.google.com/assured-workloads/docs/reference/rest/v1beta1/organizations.locations.workloads/analyzeWorkloadMove.md.txt#AssetMoveAnalysis.SCHEMA_REPRESENTATION)
- [MoveAnalysisGroup](https://docs.cloud.google.com/assured-workloads/docs/reference/rest/v1beta1/organizations.locations.workloads/analyzeWorkloadMove.md.txt#MoveAnalysisGroup)
  - [JSON representation](https://docs.cloud.google.com/assured-workloads/docs/reference/rest/v1beta1/organizations.locations.workloads/analyzeWorkloadMove.md.txt#MoveAnalysisGroup.SCHEMA_REPRESENTATION)
- [MoveAnalysisResult](https://docs.cloud.google.com/assured-workloads/docs/reference/rest/v1beta1/organizations.locations.workloads/analyzeWorkloadMove.md.txt#MoveAnalysisResult)
  - [JSON representation](https://docs.cloud.google.com/assured-workloads/docs/reference/rest/v1beta1/organizations.locations.workloads/analyzeWorkloadMove.md.txt#MoveAnalysisResult.SCHEMA_REPRESENTATION)
- [MoveImpact](https://docs.cloud.google.com/assured-workloads/docs/reference/rest/v1beta1/organizations.locations.workloads/analyzeWorkloadMove.md.txt#MoveImpact)
  - [JSON representation](https://docs.cloud.google.com/assured-workloads/docs/reference/rest/v1beta1/organizations.locations.workloads/analyzeWorkloadMove.md.txt#MoveImpact.SCHEMA_REPRESENTATION)

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.

### HTTP request

`GET https://{endpoint}/v1beta1/{target=organizations/*/locations/*/workloads/*}:analyzeWorkloadMove`

Where `{endpoint}` is one of the [supported service endpoints](https://docs.cloud.google.com/assured-workloads/docs/reference/rest.md.txt#rest_endpoints).

The URLs use [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `target` | `string` Required. The resource name 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" |

### Query parameters

| Parameters ||
|---|---|
| `pageSize` | `integer` Optional. Page size. If a value is not specified, the default value of 10 is used. The maximum value is 50. |
| `pageToken` | `string` Optional. The page token from the previous response. It needs to be passed in the second and following requests. |
| `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). |
| The resource type to be moved to the destination workload. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `project` | `string` 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. |
| End of mutually exclusive fields. ||

### Request body

The request body must be empty.

### Response body

Response containing the analysis results for the hypothetical resource move.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "assetMoveAnalyses": [ { object (`AssetMoveAnalysis`) } ], "nextPageToken": string } ``` |

| Fields ||
|---|---|
| `assetMoveAnalyses[]` | ``object (`AssetMoveAnalysis`)`` List of analysis results for each asset in scope. |
| `nextPageToken` | `string` The next page token. Is empty if the last page is reached. |

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/assuredworkloads`
- `https://www.googleapis.com/auth/assuredworkloads.readonly`
- `https://www.googleapis.com/auth/cloud-platform`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication.md.txt#authorization-gcp).

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `parent` resource:

- `assuredworkloads.workload.list`

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `target` resource:

- `assuredworkloads.workload.get`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).

## AssetMoveAnalysis

Represents move analysis results for an asset.

| JSON representation |
|---|
| ``` { "asset": string, "assetType": string, "analysisGroups": [ { object (`MoveAnalysisGroup`) } ] } ``` |

| Fields ||
|---|---|
| `asset` | `string` The full resource name of the asset being analyzed. Example: //compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1 |
| `assetType` | `string` 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). |
| `analysisGroups[]` | ``object (`MoveAnalysisGroup`)`` List of eligible analyses performed for the asset. |

## MoveAnalysisGroup

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.

| JSON representation |
|---|
| ``` { "displayName": string, // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "analysisResult": { object (`MoveAnalysisResult`) }, "error": { object (`Status`) } // End of mutually exclusive fields. } ``` |

| Fields ||
|---|---|
| `displayName` | `string` Name of the analysis group. |
| The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: ||
| `analysisResult` | ``object (`MoveAnalysisResult`)`` Result of a successful analysis. |
| `error` | ``object (`Status`)`` Error details for a failed analysis. |
| End of mutually exclusive fields. ||

## MoveAnalysisResult

Represents the successful move analysis results for a group.

| JSON representation |
|---|
| ``` { "warnings": [ { object (`MoveImpact`) } ], "blockers": [ { object (`MoveImpact`) } ] } ``` |

| Fields ||
|---|---|
| `warnings[]` | ``object (`MoveImpact`)`` List of warnings. These are risks that may or may not result in compliance violations. |
| `blockers[]` | ``object (`MoveImpact`)`` List of blockers. If not resolved, these will result in compliance violations in the target. |

## MoveImpact

Represents the impact of moving the asset to the target.

| JSON representation |
|---|
| ``` { "detail": string } ``` |

| Fields ||
|---|---|
| `detail` | `string` Explanation of the impact. |