public final class AlertPolicy
extends com.google.api.client.json.GenericJson
This is the Java data model class that specifies how to parse/serialize into the JSON that is transmitted over HTTP when working with the Cloud Monitoring API. For a detailed explanation see: https://developers.google.com/api-client-library/java/google-http-java-client/json
com.google.api.client.util.GenericData.FlagsAbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
AlertPolicy() |
| Modifier and Type | Method and Description |
|---|---|
AlertPolicy |
clone() |
AlertStrategy |
getAlertStrategy()
Control over how this alerting policy's notification channels are notified.
|
String |
getCombiner()
How to combine the results of multiple conditions to determine if an incident should be opened.
|
List<Condition> |
getConditions()
A list of conditions for the policy.
|
MutationRecord |
getCreationRecord()
A read-only record of the creation of the alerting policy.
|
String |
getDisplayName()
A short name or phrase used to identify the policy in dashboards, notifications, and incidents.
|
Documentation |
getDocumentation()
Documentation that is included with notifications and incidents related to this policy.
|
Boolean |
getEnabled()
Whether or not the policy is enabled.
|
MutationRecord |
getMutationRecord()
A read-only record of the most recent change to the alerting policy.
|
String |
getName()
Identifier.
|
List<String> |
getNotificationChannels()
Identifies the notification channels to which notifications should be sent when incidents are
opened or closed or when new violations occur on an already opened incident.
|
String |
getSeverity()
Optional.
|
Map<String,String> |
getUserLabels()
User-supplied key/value data to be used for organizing and identifying the AlertPolicy
objects.The field can contain up to 64 entries.
|
Status |
getValidity()
Read-only description of how the alerting policy is invalid.
|
AlertPolicy |
set(String fieldName,
Object value) |
AlertPolicy |
setAlertStrategy(AlertStrategy alertStrategy)
Control over how this alerting policy's notification channels are notified.
|
AlertPolicy |
setCombiner(String combiner)
How to combine the results of multiple conditions to determine if an incident should be opened.
|
AlertPolicy |
setConditions(List<Condition> conditions)
A list of conditions for the policy.
|
AlertPolicy |
setCreationRecord(MutationRecord creationRecord)
A read-only record of the creation of the alerting policy.
|
AlertPolicy |
setDisplayName(String displayName)
A short name or phrase used to identify the policy in dashboards, notifications, and incidents.
|
AlertPolicy |
setDocumentation(Documentation documentation)
Documentation that is included with notifications and incidents related to this policy.
|
AlertPolicy |
setEnabled(Boolean enabled)
Whether or not the policy is enabled.
|
AlertPolicy |
setMutationRecord(MutationRecord mutationRecord)
A read-only record of the most recent change to the alerting policy.
|
AlertPolicy |
setName(String name)
Identifier.
|
AlertPolicy |
setNotificationChannels(List<String> notificationChannels)
Identifies the notification channels to which notifications should be sent when incidents are
opened or closed or when new violations occur on an already opened incident.
|
AlertPolicy |
setSeverity(String severity)
Optional.
|
AlertPolicy |
setUserLabels(Map<String,String> userLabels)
User-supplied key/value data to be used for organizing and identifying the AlertPolicy
objects.The field can contain up to 64 entries.
|
AlertPolicy |
setValidity(Status validity)
Read-only description of how the alerting policy is invalid.
|
getFactory, setFactory, toPrettyString, toStringentrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeysclear, containsKey, containsValue, isEmpty, keySet, size, valuesfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic AlertStrategy getAlertStrategy()
null for nonepublic AlertPolicy setAlertStrategy(AlertStrategy alertStrategy)
alertStrategy - alertStrategy or null for nonepublic String getCombiner()
null for nonepublic AlertPolicy setCombiner(String combiner)
combiner - combiner or null for nonepublic List<Condition> getConditions()
null for nonepublic AlertPolicy setConditions(List<Condition> conditions)
conditions - conditions or null for nonepublic MutationRecord getCreationRecord()
null for nonepublic AlertPolicy setCreationRecord(MutationRecord creationRecord)
creationRecord - creationRecord or null for nonepublic String getDisplayName()
null for nonepublic AlertPolicy setDisplayName(String displayName)
displayName - displayName or null for nonepublic Documentation getDocumentation()
null for nonepublic AlertPolicy setDocumentation(Documentation documentation)
documentation - documentation or null for nonepublic Boolean getEnabled()
null for nonepublic AlertPolicy setEnabled(Boolean enabled)
enabled - enabled or null for nonepublic MutationRecord getMutationRecord()
null for nonepublic AlertPolicy setMutationRecord(MutationRecord mutationRecord)
mutationRecord - mutationRecord or null for nonepublic String getName()
null for nonepublic AlertPolicy setName(String name)
name - name or null for nonepublic List<String> getNotificationChannels()
null for nonepublic AlertPolicy setNotificationChannels(List<String> notificationChannels)
notificationChannels - notificationChannels or null for nonepublic String getSeverity()
null for nonepublic AlertPolicy setSeverity(String severity)
severity - severity or null for nonepublic Map<String,String> getUserLabels()
null for nonepublic AlertPolicy setUserLabels(Map<String,String> userLabels)
userLabels - userLabels or null for nonepublic Status getValidity()
null for nonepublic AlertPolicy setValidity(Status validity)
validity - validity or null for nonepublic AlertPolicy set(String fieldName, Object value)
set in class com.google.api.client.json.GenericJsonpublic AlertPolicy clone()
clone in class com.google.api.client.json.GenericJsonCopyright © 2011–2025 Google. All rights reserved.