Class PagerDutyClient
java.lang.Object
org.graylog.integrations.pagerduty.client.PagerDutyClient
The Pager Duty REST client implementation class compatible with events V2. For more information
about the event structure please see
the api.
This class is heavily based on the work committed by Jochen, James, Dennis, Padma, and Edgar
here.
- Author:
- Jochen Schalanda, James Carr, Dennis Oelkers, Padma Liyanage, Edgar Molina
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
-
Constructor Summary
ConstructorDescriptionPagerDutyClient
(okhttp3.OkHttpClient httpClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
Method Summary
Modifier and TypeMethodDescriptionThis method POSTs a message to PagerDuty's events enqueue API.
-
Constructor Details
-
PagerDutyClient
@Inject public PagerDutyClient(okhttp3.OkHttpClient httpClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
-
Method Details
-
enqueue
public PagerDutyResponse enqueue(String payloadString) throws PagerDutyClient.TemporaryPagerDutyClientException, PagerDutyClient.PermanentPagerDutyClientException This method POSTs a message to PagerDuty's events enqueue API.- Parameters:
payloadString
- JSON representation of a valid PagerDuty change event or alert event- Returns:
- PagerDutyResponse object
- Throws:
PagerDutyClient.TemporaryPagerDutyClientException
- when a retryable error is encounteredPagerDutyClient.PermanentPagerDutyClientException
- when a non-retriable error is encountered
-