public class Monitoring.Projects.AlertPolicies
extends java.lang.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(java.lang.String name,
AlertPolicy content)
Creates a new alerting policy.
|
Monitoring.Projects.AlertPolicies.Delete |
delete(java.lang.String name)
Deletes an alerting policy.
|
Monitoring.Projects.AlertPolicies.Get |
get(java.lang.String name)
Gets a single alerting policy.
|
Monitoring.Projects.AlertPolicies.List |
list(java.lang.String name)
Lists the existing alerting policies for the project.
|
Monitoring.Projects.AlertPolicies.Patch |
patch(java.lang.String name,
AlertPolicy content)
Updates an alerting policy.
|
public Monitoring.Projects.AlertPolicies.Create create(java.lang.String name, AlertPolicy content) throws java.io.IOException
AbstractGoogleClientRequest.execute() method to invoke the remote operation.name - 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.content - the AlertPolicyjava.io.IOExceptionpublic Monitoring.Projects.AlertPolicies.Delete delete(java.lang.String name) throws java.io.IOException
AbstractGoogleClientRequest.execute() method to invoke the remote operation.name - The alerting policy to delete. The format is:
projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID]
For more information, see AlertPolicy.java.io.IOExceptionpublic Monitoring.Projects.AlertPolicies.Get get(java.lang.String name) throws java.io.IOException
AbstractGoogleClientRequest.execute() method to invoke the remote operation.name - The alerting policy to retrieve. The format is
projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID]java.io.IOExceptionpublic Monitoring.Projects.AlertPolicies.List list(java.lang.String name) throws java.io.IOException
AbstractGoogleClientRequest.execute() method to invoke the remote operation.name - The project whose alert policies are to be listed. The format is
projects/[PROJECT_ID]
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.java.io.IOExceptionpublic Monitoring.Projects.AlertPolicies.Patch patch(java.lang.String name, AlertPolicy content) throws java.io.IOException
AbstractGoogleClientRequest.execute() method to invoke the remote operation.name - Required if the policy exists. The resource name for this policy. The syntax is:
projects/[PROJECT_ID]/alertPolicies/[ALERT_POLICY_ID]
[ALERT_POLICY_ID] is assigned by
Stackdriver 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 AlertPolicyjava.io.IOException