public class ApplicationService extends BaseFluent
Modifier and Type | Class and Description |
---|---|
static class |
ApplicationService.FilterBuilder
Builder to make filter construction easier.
|
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 |
---|
ApplicationService(HttpContext httpContext,
NewRelicClient client)
Constructor that takes a http context and API client.
|
Modifier and Type | Method and Description |
---|---|
ApplicationService |
delete(long applicationId)
Deletes the given application.
|
static ApplicationService.FilterBuilder |
filters()
Returns a builder for the application filters.
|
Collection<Application> |
list()
Returns the set of applications.
|
Collection<Application> |
list(List<String> queryParams)
Returns the set of applications with the given query parameters.
|
com.google.common.base.Optional<MetricData> |
metricData(long applicationId,
List<String> queryParams)
Returns the set of metric data for the given application.
|
Collection<Metric> |
metricNames(long applicationId)
Returns the set of metrics for the given application.
|
Collection<Metric> |
metricNames(long applicationId,
String name)
Returns the set of metrics for the given application.
|
static MetricParameterBuilder |
metrics()
Returns a builder for the metric data parameters.
|
com.google.common.base.Optional<Application> |
show(long applicationId)
Returns the application for the given application id.
|
com.google.common.base.Optional<Application> |
update(Application application)
Updates the given application.
|
encode, getClient
public ApplicationService(HttpContext httpContext, NewRelicClient client)
httpContext
- The set of HTTP operationsclient
- The client used to invoke the New Relic operationspublic Collection<Application> list(List<String> queryParams)
queryParams
- The query parameterspublic Collection<Application> list()
public com.google.common.base.Optional<Application> show(long applicationId)
applicationId
- The id for the application to returnpublic com.google.common.base.Optional<Application> update(Application application)
application
- The application to updatepublic ApplicationService delete(long applicationId)
applicationId
- The id of the application to deletepublic Collection<Metric> metricNames(long applicationId, String name)
applicationId
- The id of the application to return metrics forname
- Filter metrics by name (or part of name)public Collection<Metric> metricNames(long applicationId)
applicationId
- The id of the application to return metrics forpublic com.google.common.base.Optional<MetricData> metricData(long applicationId, List<String> queryParams)
applicationId
- The id of the application to return metric data forqueryParams
- The query parameterspublic static ApplicationService.FilterBuilder filters()
public static MetricParameterBuilder metrics()
Copyright © 2018. All rights reserved.