Method: organizations.locations.workloads.analyzeWorkloadMove

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.

The URLs use gRPC Transcoding syntax.

Path parameters

Parameters
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'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.

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.

Union parameter sourceResource. The resource type to be moved to the destination workload. sourceResource can be only one of the following:
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.

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 the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the target resource:

  • assuredworkloads.workload.get

For more information, see the IAM documentation.

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.

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,

  // Union field result can be only one of the following:
  "analysisResult": {
    object (MoveAnalysisResult)
  },
  "error": {
    object (Status)
  }
  // End of list of possible types for union field result.
}
Fields
displayName

string

Name of the analysis group.

Union field result.

result can be only one of the following:

analysisResult

object (MoveAnalysisResult)

Result of a successful analysis.

error

object (Status)

Error details for a failed analysis.

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.