public class ExternalServiceAlertConditionService 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 |
---|
ExternalServiceAlertConditionService(HttpContext httpContext,
NewRelicClient client)
Constructor that takes a http context and API client.
|
Modifier and Type | Method and Description |
---|---|
com.google.common.base.Optional<ExternalServiceAlertCondition> |
create(long policyId,
ExternalServiceAlertCondition condition)
Creates the given external service alert condition.
|
ExternalServiceAlertConditionService |
delete(long conditionId)
Deletes the external service alert condition with the given id.
|
Collection<ExternalServiceAlertCondition> |
list(long policyId)
Returns the set of alert conditions for the given policy id.
|
com.google.common.base.Optional<ExternalServiceAlertCondition> |
show(long policyId,
long conditionId)
Returns the external service alert condition with the given id.
|
com.google.common.base.Optional<ExternalServiceAlertCondition> |
update(ExternalServiceAlertCondition condition)
Updates the given external service alert condition.
|
encode, getClient
public ExternalServiceAlertConditionService(HttpContext httpContext, NewRelicClient client)
httpContext
- The set of HTTP operationsclient
- The client used to invoke the New Relic operationspublic Collection<ExternalServiceAlertCondition> list(long policyId)
policyId
- The id of the alert policy to return the conditions forpublic com.google.common.base.Optional<ExternalServiceAlertCondition> show(long policyId, long conditionId)
This is needed because the API does not contain an operation to get a condition using the id directly.
policyId
- The id of the policy the condition belongs toconditionId
- The id of the external service alert condition to returnpublic com.google.common.base.Optional<ExternalServiceAlertCondition> create(long policyId, ExternalServiceAlertCondition condition)
policyId
- The id of the policy to add the alert condition tocondition
- The alert condition to createpublic com.google.common.base.Optional<ExternalServiceAlertCondition> update(ExternalServiceAlertCondition condition)
condition
- The alert condition to updatepublic ExternalServiceAlertConditionService delete(long conditionId)
conditionId
- The id of the alert condition to deleteCopyright © 2018. All rights reserved.