Method: organizations.locations.workloads.list

Lists Assured Workloads in a given organization and location.

HTTP request

GET https://{endpoint}/v2/{parent=organizations/*/locations/*}/workloads

Where {endpoint} is one of the supported service endpoints.

The URLs use gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. The parent organization and location for which to list workloads. Format: organizations/{organization}/locations/{location}

Query parameters

Parameters
pageSize

integer

Optional. The maximum number of workloads to return. If unspecified, at most 50 workloads will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

pageToken

string

Optional. A page token received from a previous workloads.list call. Provide this to retrieve the subsequent page.

filter

string

Optional. A filter expression that filters the listed workloads, as defined in AIP-160: Filtering.

Supported filter fields:

  • workloadId
  • state (supports =, :, and != operators; for example, state="ACTIVE")
  • computedTargetResource (for example, computedTargetResource="projects/123")
  • targetResourceDisplayName
  • framework.framework
  • createTime
  • updateTime

Request body

The request body must be empty.

Response body

Response message for workloads.list.

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

JSON representation
{
  "workloads": [
    {
      object (Workload)
    }
  ],
  "nextPageToken": string
}
Fields
workloads[]

object (Workload)

The list of workloads in the given organization and location.

nextPageToken

string

A token to retrieve the next page of results. If this field is omitted, there are no subsequent pages.

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.

IAM Permissions

Requires the following IAM permission on the parent resource:

  • assuredworkloads.workload.list

For more information, see the IAM documentation.