Method: projects.alertPolicies.create

Creates a new alerting policy.

HTTP request

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

Path parameters

Parameters
name

string

The project in which to create the alerting policy. The format is projects/[PROJECT_ID].

Note that this field names the parent container in which the alerting policy will be written, not the name of the created policy. The alerting policy that is returned will have a name that contains a normalized representation of this name as a prefix but adds a suffix of the form /alertPolicies/[POLICY_ID], identifying the policy in the container.

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

  • monitoring.alertPolicies.create

Request body

The request body contains an instance of AlertPolicy.

Response body

If successful, the response body contains a newly created instance of AlertPolicy.

Authorization Scopes

Requires one of the following OAuth scopes:

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

For more information, see the Authentication Overview.

Try it!

Was this page helpful? Let us know how we did:

Send feedback about...

Stackdriver Monitoring