Codota Logo
DefaultAlertsPoliciesApi
Code IndexAdd Codota to your IDE (free)

How to use
DefaultAlertsPoliciesApi
in
com.ocadotechnology.newrelic.apiclient.internal

Best Java code snippets using com.ocadotechnology.newrelic.apiclient.internal.DefaultAlertsPoliciesApi (Showing top 3 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: ocadotechnology/newrelic-alerts-configurator

@Before
public void setUp() {
  NewRelicClient clientMock = mock(NewRelicClient.class);
  WebTarget webTargetMock = mock(WebTarget.class);
  Invocation.Builder builderMock = mock(Invocation.Builder.class);
  when(clientMock.target("/v2/alerts_policies.json")).thenReturn(webTargetMock);
  when(webTargetMock.queryParam("filter[name]", "policy")).thenReturn(webTargetMock);
  when(webTargetMock.request(APPLICATION_JSON_TYPE)).thenReturn(builderMock);
  when(builderMock.get()).thenReturn(responseMock);
  testee = new DefaultAlertsPoliciesApi(clientMock);
}
origin: ocadotechnology/newrelic-alerts-configurator

@Override
public Optional<AlertsPolicy> getByName(String alertsPolicyName) {
  Invocation.Builder builder = client
      .target(POLICIES_URL)
      .queryParam("filter[name]", alertsPolicyName)
      .request(APPLICATION_JSON_TYPE);
  return getPageable(builder, AlertsPolicyList.class)
      .filter(alertsPolicy -> alertsPolicy.getName().equals(alertsPolicyName))
      .getSingle();
}
origin: ocadotechnology/newrelic-alerts-configurator

  /**
   * NewRelic API constructor.
   *
   * @param restApiUrl NewRelic REST API URL, for example https://api.newrelic.com
   * @param syntheticsApiUrl NewRelic Synthetics API URL
   * @param apiKey  API Key for given NewRelic account
   */
  public NewRelicInternalApi(String restApiUrl, String syntheticsApiUrl, String apiKey) {
    NewRelicClient client = new NewRelicClient(restApiUrl, apiKey);
    applicationsApi = new DefaultApplicationsApi(client);
    alertsChannelsApi = new DefaultAlertsChannelsApi(client);
    alertsPoliciesApi = new DefaultAlertsPoliciesApi(client);
    alertsConditionsApi = new DefaultAlertsConditionsApi(client);
    alertsExternalServiceConditionsApi = new DefaultAlertsExternalServiceConditionsApi(client);
    alertsNrqlConditionsApi = new DefaultAlertsNrqlConditionsApi(client);
    alertsSyntheticsConditionApi = new DefaultAlertsSyntheticsConditionsApi(client);
    keyTransactionsApi = new DefaultKeyTransactionsApi(client);
    deploymentsApi = new DefaultDeploymentsApi(client);
    serversApi = new DefaultServersApi(client);
    usersApi = new DefaultUsersApi(client);

    NewRelicClient syntheticsClient = new NewRelicClient(syntheticsApiUrl, apiKey);
    syntheticsMonitorsApi = new DefaultSyntheticsMonitorsApi(syntheticsClient);
  }
}
com.ocadotechnology.newrelic.apiclient.internalDefaultAlertsPoliciesApi

Most used methods

  • <init>
  • getPageable

Popular in Java

  • Reading from database using SQL prepared statement
  • getResourceAsStream (ClassLoader)
  • requestLocationUpdates (LocationManager)
  • putExtra (Intent)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • BitSet (java.util)
    This class implements a vector of bits that grows as needed. Each component of the bit set has a boo
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now