public class Monitoring.Projects.AlertPolicies extends Object
| Modifier and Type | Class and Description |
|---|---|
class |
Monitoring.Projects.AlertPolicies.Create |
class |
Monitoring.Projects.AlertPolicies.Delete |
class |
Monitoring.Projects.AlertPolicies.Get |
class |
Monitoring.Projects.AlertPolicies.List |
class |
Monitoring.Projects.AlertPolicies.Patch |
| Constructor and Description |
|---|
AlertPolicies() |
| Modifier and Type | Method and Description |
|---|---|
Monitoring.Projects.AlertPolicies.Create |
create(String name,
AlertPolicy content)
Creates a new alerting policy.Design your application to single-thread API calls that modify the
state of alerting policies in a single project.
|
Monitoring.Projects.AlertPolicies.Delete |
delete(String name)
Deletes an alerting policy.Design your application to single-thread API calls that modify the
state of alerting policies in a single project.
|
Monitoring.Projects.AlertPolicies.Get |
get(String name)
Gets a single alerting policy.
|
Monitoring.Projects.AlertPolicies.List |
list(String name)
Lists the existing alerting policies for the workspace.
|
Monitoring.Projects.AlertPolicies.Patch |
patch(String name,
AlertPolicy content)
Updates an alerting policy.
|
public Monitoring.Projects.AlertPolicies.Create create(String name, AlertPolicy content) throws IOException
AbstractGoogleClientRequest.execute() method to invoke the remote operation.name - Required. The project (https://cloud.google.com/monitoring/api/v3#project_name) in which to create
the alerting policy. The format is: projects/[PROJECT_ID_OR_NUMBER] 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 /alertPolicies/[ALERT_POLICY_ID], identifying the policy in the container.content - the AlertPolicyIOExceptionpublic Monitoring.Projects.AlertPolicies.Delete delete(String name) throws IOException
AbstractGoogleClientRequest.execute() method to invoke the remote operation.name - Required. The alerting policy to delete. The format is:
projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] For more information, see
AlertPolicy.IOExceptionpublic Monitoring.Projects.AlertPolicies.Get get(String name) throws IOException
AbstractGoogleClientRequest.execute() method to invoke the remote operation.name - Required. The alerting policy to retrieve. The format is:
projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID]IOExceptionpublic Monitoring.Projects.AlertPolicies.List list(String name) throws IOException
AbstractGoogleClientRequest.execute() method to invoke the remote operation.name - Required. The project (https://cloud.google.com/monitoring/api/v3#project_name) 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 GetAlertPolicy operation, instead.IOExceptionpublic Monitoring.Projects.AlertPolicies.Patch patch(String name, AlertPolicy content) throws IOException
AbstractGoogleClientRequest.execute() method to invoke the remote operation.name - Identifier. Required if the policy exists. The resource name for this policy. The format is:
projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] [ALERT_POLICY_ID] is
assigned by Cloud Monitoring when the policy is created. When calling the
alertPolicies.create method, do not include the name field in the alerting policy passed
as part of the request.content - the AlertPolicyIOExceptionCopyright © 2011–2025 Google. All rights reserved.