Method: projects.alertPolicies.create Stay organized with collections Save and categorize content based on your preferences.
Creates a new alerting policy.
Design your application to single-thread API calls that modify the state of alerting policies in a single project. This includes calls to alertPolicies.create, alertPolicies.delete and alertPolicies.patch.
HTTP request
POST https://monitoring.googleapis.com/v3/{name}/alertPolicies
Path parameters
| Parameters | |
|---|---|
name |
Required. Theproject in which to create the alerting policy. The format is: Note that this field names the parent container in which the alerting policy will be written, not the name of the created policy. |name| must be a host project of a Metrics Scope, otherwise INVALID_ARGUMENT error will return. 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 Authorization requires the followingIAM permission on the specified resource
|
Request body
The request body contains an instance ofAlertPolicy.
Response body
If successful, the response body contains a newly created instance ofAlertPolicy.
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/cloud-platformhttps://www.googleapis.com/auth/monitoring
For more information, see theAuthentication Overview.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-23 UTC.