Method: projects.alertPolicies.list

Lists the existing alerting policies for the workspace.

HTTP request

GET https://monitoring.googleapis.com/v3/{name}/alertPolicies

Path parameters

Parameters
name

string

Required. The project whose alert policies are to be listed. The format is:

projects/[PROJECT_ID_OR_NUMBER]

Note that this field names the parent container in which the alerting policies to be listed are stored. To retrieve a single alerting policy by name, use the alertPolicies.get operation, instead.

Authorization requires the following IAM permission on the specified resource name:

  • monitoring.alertPolicies.list

Query parameters

Parameters
filter

string

Optional. If provided, this field specifies the criteria that must be met by alert policies to be included in the response.

For more details, see sorting and filtering.

orderBy

string

Optional. A comma-separated list of fields by which to sort the result. Supports the same set of field references as the filter field. Entries can be prefixed with a minus sign to sort by the field in descending order.

For more details, see sorting and filtering.

pageSize

integer

Optional. The maximum number of results to return in a single response.

pageToken

string

Optional. If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return more results from the previous method call.

Request body

The request body must be empty.

Response body

The protocol for the alertPolicies.list response.

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

JSON representation
{
  "alertPolicies": [
    {
      object (AlertPolicy)
    }
  ],
  "nextPageToken": string,
  "totalSize": integer
}
Fields
alertPolicies[]

object (AlertPolicy)

The returned alert policies.

nextPageToken

string

If there might be more results than were returned, then this field is set to a non-empty value. To see the additional results, use that value as pageToken in the next call to this method.

totalSize

integer

The total number of alert policies in all pages. This number is only an estimate, and may change in subsequent pages. https://aip.dev/158

Authorization scopes

Requires one of the following OAuth scopes:

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

For more information, see the Authentication Overview.