@Generated(value="https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class Monitor extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
JSON_PROPERTY_ASSETS |
static String |
JSON_PROPERTY_CREATED |
static String |
JSON_PROPERTY_CREATOR |
static String |
JSON_PROPERTY_DELETED |
static String |
JSON_PROPERTY_DRAFT_STATUS |
static String |
JSON_PROPERTY_ID |
static String |
JSON_PROPERTY_MATCHING_DOWNTIMES |
static String |
JSON_PROPERTY_MESSAGE |
static String |
JSON_PROPERTY_MODIFIED |
static String |
JSON_PROPERTY_MULTI |
static String |
JSON_PROPERTY_NAME |
static String |
JSON_PROPERTY_OPTIONS |
static String |
JSON_PROPERTY_OVERALL_STATE |
static String |
JSON_PROPERTY_PRIORITY |
static String |
JSON_PROPERTY_QUERY |
static String |
JSON_PROPERTY_RESTRICTED_ROLES |
static String |
JSON_PROPERTY_STATE |
static String |
JSON_PROPERTY_TAGS |
static String |
JSON_PROPERTY_TYPE |
boolean |
unparsed |
| Constructor and Description |
|---|
Monitor() |
Monitor(String query,
MonitorType type) |
| Modifier and Type | Method and Description |
|---|---|
Monitor |
addAssetsItem(MonitorAsset assetsItem) |
Monitor |
addMatchingDowntimesItem(MatchingDowntime matchingDowntimesItem) |
Monitor |
addRestrictedRolesItem(String restrictedRolesItem) |
Monitor |
addTagsItem(String tagsItem) |
Monitor |
assets(List<MonitorAsset> assets) |
Monitor |
draftStatus(MonitorDraftStatus draftStatus) |
boolean |
equals(Object o)
Return true if this Monitor object is equal to o.
|
Map<String,Object> |
getAdditionalProperties()
Return the additional (undeclared) property.
|
Object |
getAdditionalProperty(String key)
Return the additional (undeclared) property with the specified name.
|
List<MonitorAsset> |
getAssets()
The list of monitor assets tied to a monitor, which represents key links for users to take
action on monitor alerts (for example, runbooks).
|
OffsetDateTime |
getCreated()
Timestamp of the monitor creation.
|
Creator |
getCreator()
Object describing the creator of the shared element.
|
org.openapitools.jackson.nullable.JsonNullable<OffsetDateTime> |
getDeleted_JsonNullable() |
OffsetDateTime |
getDeleted()
Whether or not the monitor is deleted.
|
MonitorDraftStatus |
getDraftStatus()
Indicates whether the monitor is in a draft or published state.
|
Long |
getId()
ID of this monitor.
|
List<MatchingDowntime> |
getMatchingDowntimes()
A list of active v1 downtimes that match this monitor.
|
String |
getMessage()
A message to include with notifications for this monitor.
|
OffsetDateTime |
getModified()
Last timestamp when the monitor was edited.
|
Boolean |
getMulti()
Whether or not the monitor is broken down on different groups.
|
String |
getName()
The monitor name.
|
MonitorOptions |
getOptions()
List of options associated with your monitor.
|
MonitorOverallStates |
getOverallState()
The different states your monitor can be in.
|
org.openapitools.jackson.nullable.JsonNullable<Long> |
getPriority_JsonNullable() |
Long |
getPriority()
Integer from 1 (high) to 5 (low) indicating alert severity.
|
String |
getQuery()
The monitor query.
|
org.openapitools.jackson.nullable.JsonNullable<List<String>> |
getRestrictedRoles_JsonNullable() |
List<String> |
getRestrictedRoles()
A list of unique role identifiers to define which roles are allowed to edit the monitor.
|
MonitorState |
getState()
Wrapper object with the different monitor states.
|
List<String> |
getTags()
Tags associated to your monitor.
|
MonitorType |
getType()
The type of the monitor.
|
int |
hashCode() |
Monitor |
matchingDowntimes(List<MatchingDowntime> matchingDowntimes) |
Monitor |
message(String message) |
Monitor |
name(String name) |
Monitor |
options(MonitorOptions options) |
Monitor |
priority(Long priority) |
Monitor |
putAdditionalProperty(String key,
Object value)
Set the additional (undeclared) property with the specified name and value.
|
Monitor |
query(String query) |
Monitor |
restrictedRoles(List<String> restrictedRoles) |
void |
setAssets(List<MonitorAsset> assets) |
void |
setDraftStatus(MonitorDraftStatus draftStatus) |
void |
setMatchingDowntimes(List<MatchingDowntime> matchingDowntimes) |
void |
setMessage(String message) |
void |
setName(String name) |
void |
setOptions(MonitorOptions options) |
void |
setPriority_JsonNullable(org.openapitools.jackson.nullable.JsonNullable<Long> priority) |
void |
setPriority(Long priority) |
void |
setQuery(String query) |
void |
setRestrictedRoles_JsonNullable(org.openapitools.jackson.nullable.JsonNullable<List<String>> restrictedRoles) |
void |
setRestrictedRoles(List<String> restrictedRoles) |
void |
setTags(List<String> tags) |
void |
setType(MonitorType type) |
Monitor |
tags(List<String> tags) |
String |
toString() |
Monitor |
type(MonitorType type) |
public boolean unparsed
public static final String JSON_PROPERTY_ASSETS
public static final String JSON_PROPERTY_CREATED
public static final String JSON_PROPERTY_CREATOR
public static final String JSON_PROPERTY_DELETED
public static final String JSON_PROPERTY_DRAFT_STATUS
public static final String JSON_PROPERTY_ID
public static final String JSON_PROPERTY_MATCHING_DOWNTIMES
public static final String JSON_PROPERTY_MESSAGE
public static final String JSON_PROPERTY_MODIFIED
public static final String JSON_PROPERTY_MULTI
public static final String JSON_PROPERTY_NAME
public static final String JSON_PROPERTY_OPTIONS
public static final String JSON_PROPERTY_OVERALL_STATE
public static final String JSON_PROPERTY_PRIORITY
public static final String JSON_PROPERTY_QUERY
public static final String JSON_PROPERTY_RESTRICTED_ROLES
public static final String JSON_PROPERTY_STATE
public static final String JSON_PROPERTY_TAGS
public static final String JSON_PROPERTY_TYPE
public Monitor()
public Monitor(String query, MonitorType type)
public Monitor assets(List<MonitorAsset> assets)
public Monitor addAssetsItem(MonitorAsset assetsItem)
@Nullable public List<MonitorAsset> getAssets()
public void setAssets(List<MonitorAsset> assets)
@Nullable public OffsetDateTime getCreated()
@Nullable public Creator getCreator()
@Nullable public OffsetDateTime getDeleted()
null)public org.openapitools.jackson.nullable.JsonNullable<OffsetDateTime> getDeleted_JsonNullable()
public Monitor draftStatus(MonitorDraftStatus draftStatus)
@Nullable public MonitorDraftStatus getDraftStatus()
draft: The monitor appears as Draft and does not send notifications.
published: The monitor is active and evaluates conditions and notify as configured.
This field is in preview. The draft value is only available to customers with the feature enabled.
public void setDraftStatus(MonitorDraftStatus draftStatus)
@Nullable public Long getId()
public Monitor matchingDowntimes(List<MatchingDowntime> matchingDowntimes)
public Monitor addMatchingDowntimesItem(MatchingDowntime matchingDowntimesItem)
@Nullable public List<MatchingDowntime> getMatchingDowntimes()
public void setMatchingDowntimes(List<MatchingDowntime> matchingDowntimes)
@Nullable public String getMessage()
public void setMessage(String message)
@Nullable public OffsetDateTime getModified()
@Nullable public Boolean getMulti()
@Nullable public String getName()
public void setName(String name)
public Monitor options(MonitorOptions options)
@Nullable public MonitorOptions getOptions()
public void setOptions(MonitorOptions options)
@Nullable public MonitorOverallStates getOverallState()
@Nullable public Long getPriority()
public org.openapitools.jackson.nullable.JsonNullable<Long> getPriority_JsonNullable()
public void setPriority_JsonNullable(org.openapitools.jackson.nullable.JsonNullable<Long> priority)
public void setPriority(Long priority)
public String getQuery()
public void setQuery(String query)
@Nullable public List<String> getRestrictedRoles()
data.id field. Editing a monitor includes any updates to the monitor
configuration, monitor deletion, and muting of the monitor for any amount of time. You can use
the Restriction Policies
API to manage write authorization for individual monitors by teams and users, in addition
to roles.public org.openapitools.jackson.nullable.JsonNullable<List<String>> getRestrictedRoles_JsonNullable()
public void setRestrictedRoles_JsonNullable(org.openapitools.jackson.nullable.JsonNullable<List<String>> restrictedRoles)
@Nullable public MonitorState getState()
public Monitor type(MonitorType type)
public MonitorType getType()
type, see the monitor options docs.public void setType(MonitorType type)
public Monitor putAdditionalProperty(String key, Object value)
key - The arbitrary key to setvalue - The associated valuepublic Map<String,Object> getAdditionalProperties()
public Object getAdditionalProperty(String key)
key - The arbitrary key to getpublic boolean equals(Object o)
Copyright © 2026. All rights reserved.