public class AlertEntityConditionService extends BaseFluent
ALERT_CHANNEL, ALERT_CHANNELS, ALERT_CONDITION, ALERT_CONDITIONS, ALERT_EVENT, ALERT_EVENTS, ALERT_INCIDENT, ALERT_INCIDENTS, ALERT_POLICIES, ALERT_POLICY, ALERT_POLICY_CHANNEL, ALERT_VIOLATION, ALERT_VIOLATIONS, APPLICATION, APPLICATION_HOST, APPLICATION_HOSTS, APPLICATION_INSTANCE, APPLICATION_INSTANCES, APPLICATIONS, BROWSER_APPLICATION, BROWSER_APPLICATIONS, DASHBOARD, DASHBOARDS, DEPLOYMENT, DEPLOYMENTS, EXTERNAL_SERVICE_ALERT_CONDITION, EXTERNAL_SERVICE_ALERT_CONDITIONS, HTTP, INFRA_ALERT_CONDITION, INFRA_ALERT_CONDITIONS, KEY_TRANSACTION, KEY_TRANSACTIONS, LABEL, LABELS, LOCATIONS, METRIC_DATA, METRICS, MOBILE_APPLICATION, MOBILE_APPLICATIONS, MONITOR, MONITORS, NRQL_ALERT_CONDITION, NRQL_ALERT_CONDITIONS, PARTNER_ACCOUNT, PARTNER_ACCOUNTS, PARTNER_SUBSCRIPTION, PARTNER_SUBSCRIPTIONS, PARTNER_USERS, PLUGIN, PLUGIN_COMPONENT, PLUGIN_COMPONENTS, PLUGINS, PLUGINS_ALERT_CONDITION, PLUGINS_ALERT_CONDITIONS, QUERY_DATA, SCRIPT, SERVER, SERVERS, STATUS, SYNTHETICS_ALERT_CONDITION, SYNTHETICS_ALERT_CONDITIONS, USAGE_DATA, USER, USERS
Constructor and Description |
---|
AlertEntityConditionService(HttpContext httpContext,
NewRelicClient client)
Constructor that takes a http context and API client.
|
Modifier and Type | Method and Description |
---|---|
com.google.common.base.Optional<AlertCondition> |
add(Entity entity,
long conditionId)
Adds the given entity to the alert condition with the given id.
|
com.google.common.base.Optional<AlertCondition> |
add(long entityId,
String entityType,
long conditionId)
Adds the given entity to the alert condition with the given id.
|
Collection<AlertCondition> |
list(Entity entity)
Returns the alert conditions for the given entity.
|
Collection<AlertCondition> |
list(long entityId,
String entityType)
Returns the alert conditions for the given entity id.
|
AlertEntityConditionService |
remove(Entity entity,
long conditionId)
Removes the given entity from the alert condition with the given id.
|
AlertEntityConditionService |
remove(long entityId,
String entityType,
long conditionId)
Removes the given entity from the alert condition with the given id.
|
encode, getClient
public AlertEntityConditionService(HttpContext httpContext, NewRelicClient client)
httpContext
- The set of HTTP operationsclient
- The client used to invoke the New Relic operationspublic Collection<AlertCondition> list(long entityId, String entityType)
entityId
- The id of the entityentityType
- The type of the entitypublic Collection<AlertCondition> list(Entity entity)
entity
- The entity to look uppublic com.google.common.base.Optional<AlertCondition> add(long entityId, String entityType, long conditionId)
entityId
- The id of the entity to addentityType
- The type of the entity to addconditionId
- The id of the alert condition to add the entity topublic com.google.common.base.Optional<AlertCondition> add(Entity entity, long conditionId)
entity
- The entity to addconditionId
- The id of the alert condition to add the entity topublic AlertEntityConditionService remove(long entityId, String entityType, long conditionId)
entityId
- The id of the entity to removeentityType
- The type of the entity to removeconditionId
- The id of the alert condition from which to delete the entitypublic AlertEntityConditionService remove(Entity entity, long conditionId)
entity
- The entity to removeconditionId
- The id of the alert condition from which to delete the entityCopyright © 2018. All rights reserved.