Documentation ¶
Overview ¶
Package pagerduty is a Go API client for both the PagerDuty v2 REST and Events API. Most methods should be implemented, and it's recommended to use the WithContext variant of each method and to specify a context with a timeout.
To debug responses from the API, you can instruct the client to capture the last response from the API. Please see the documentation for the SetDebugFlag() and LastAPIResponse() methods for more details.
Index ¶
- Constants
- type APIDetails
- type APIError
- type APIErrorObject
- type APIListObject
- type APIObject
- type APIReference
- type Acknowledgement
- type ActiveBetween
- type AddIncidentNotificationSubscribersResponse
- type AddUserToTeamOptions
- type Addon
- type Agent
- type AlertCounts
- type AlertGroupParamsConfig
- type AlertGroupingParameters
- type AnalyticsData
- type AnalyticsFilter
- type AnalyticsRequest
- type AnalyticsResponse
- type Assignee
- type Assignment
- type AuditRecord
- type AutoPauseNotificationsParameters
- type AutomationAction
- type BusinessService
- type BusinessServicePayload
- type BusinessServiceTeam
- type ChangeEvent
- type ChangeEventLink
- type ChangeEventPayload
- type ChangeEventResponse
- type Channel
- type Client
- func (c *Client) AddEscalationPolicyToTeam(teamID, epID string) errordeprecated
- func (c *Client) AddEscalationPolicyToTeamWithContext(ctx context.Context, teamID, epID string) error
- func (c *Client) AddIncidentNotificationSubscribersWithContext(ctx context.Context, id string, subscribers []IncidentNotificationSubscriber) (*AddIncidentNotificationSubscribersResponse, error)
- func (c *Client) AddUserToTeam(teamID, userID string) errordeprecated
- func (c *Client) AddUserToTeamWithContext(ctx context.Context, o AddUserToTeamOptions) error
- func (c *Client) AssignTags(e, eid string, a *TagAssignments) errordeprecated
- func (c *Client) AssignTagsWithContext(ctx context.Context, entityType, entityID string, a *TagAssignments) error
- func (c *Client) AssociateServiceDependencies(dependencies *ListServiceDependencies) (*ListServiceDependencies, error)deprecated
- func (c *Client) AssociateServiceDependenciesWithContext(ctx context.Context, dependencies *ListServiceDependencies) (*ListServiceDependencies, error)
- func (c *Client) CreateBusinessService(b *BusinessService) (*BusinessService, error)deprecated
- func (c *Client) CreateBusinessServiceWithContext(ctx context.Context, b *BusinessService) (*BusinessService, error)
- func (c *Client) CreateChangeEvent(e ChangeEvent) (*ChangeEventResponse, error)deprecated
- func (c *Client) CreateChangeEventWithContext(ctx context.Context, e ChangeEvent) (*ChangeEventResponse, error)
- func (c *Client) CreateEscalationPolicy(e EscalationPolicy) (*EscalationPolicy, error)deprecated
- func (c *Client) CreateEscalationPolicyWithContext(ctx context.Context, e EscalationPolicy) (*EscalationPolicy, error)
- func (c *Client) CreateEscalationRule(escID string, e EscalationRule) (*EscalationRule, error)deprecated
- func (c *Client) CreateEscalationRuleWithContext(ctx context.Context, escID string, e EscalationRule) (*EscalationRule, error)
- func (c *Client) CreateExtension(e *Extension) (*Extension, error)deprecated
- func (c *Client) CreateExtensionWithContext(ctx context.Context, e *Extension) (*Extension, error)
- func (c *Client) CreateIncident(from string, o *CreateIncidentOptions) (*Incident, error)deprecated
- func (c *Client) CreateIncidentNote(id string, note IncidentNote) errordeprecated
- func (c *Client) CreateIncidentNoteWithContext(ctx context.Context, id string, note IncidentNote) (*IncidentNote, error)
- func (c *Client) CreateIncidentNoteWithResponse(id string, note IncidentNote) (*IncidentNote, error)deprecated
- func (c *Client) CreateIncidentStatusUpdate(ctx context.Context, id string, from string, message string) (IncidentStatusUpdate, error)
- func (c *Client) CreateIncidentWithContext(ctx context.Context, from string, o *CreateIncidentOptions) (*Incident, error)
- func (c *Client) CreateIntegration(id string, i Integration) (*Integration, error)deprecated
- func (c *Client) CreateIntegrationWithContext(ctx context.Context, id string, i Integration) (*Integration, error)
- func (c *Client) CreateMaintenanceWindow(from string, o MaintenanceWindow) (*MaintenanceWindow, error)deprecated
- func (c *Client) CreateMaintenanceWindowWithContext(ctx context.Context, from string, o MaintenanceWindow) (*MaintenanceWindow, error)
- func (c *Client) CreateMaintenanceWindows(o MaintenanceWindow) (*MaintenanceWindow, error)deprecated
- func (c *Client) CreateOrchestrationWithContext(ctx context.Context, e Orchestration) (*Orchestration, error)
- func (c *Client) CreateOverride(id string, o Override) (*Override, error)deprecated
- func (c *Client) CreateOverrideWithContext(ctx context.Context, id string, o Override) (*Override, error)
- func (c *Client) CreateResponsePlay(ctx context.Context, rp ResponsePlay) (ResponsePlay, error)
- func (c *Client) CreateRuleset(r *Ruleset) (*Ruleset, error)deprecated
- func (c *Client) CreateRulesetRule(rulesetID string, rule *RulesetRule) (*RulesetRule, error)deprecated
- func (c *Client) CreateRulesetRuleWithContext(ctx context.Context, rulesetID string, rule *RulesetRule) (*RulesetRule, error)
- func (c *Client) CreateRulesetWithContext(ctx context.Context, r *Ruleset) (*Ruleset, error)
- func (c *Client) CreateSchedule(s Schedule) (*Schedule, error)deprecated
- func (c *Client) CreateScheduleWithContext(ctx context.Context, s Schedule) (*Schedule, error)
- func (c *Client) CreateService(s Service) (*Service, error)deprecated
- func (c *Client) CreateServiceRule(ctx context.Context, serviceID string, rule ServiceRule) (ServiceRule, error)
- func (c *Client) CreateServiceWithContext(ctx context.Context, s Service) (*Service, error)
- func (c *Client) CreateTag(t *Tag) (*Tag, error)deprecated
- func (c *Client) CreateTagWithContext(ctx context.Context, t *Tag) (*Tag, error)
- func (c *Client) CreateTeam(t *Team) (*Team, error)deprecated
- func (c *Client) CreateTeamWithContext(ctx context.Context, t *Team) (*Team, error)
- func (c *Client) CreateUser(u User) (*User, error)deprecated
- func (c *Client) CreateUserContactMethod(userID string, cm ContactMethod) (*ContactMethod, error)deprecated
- func (c *Client) CreateUserContactMethodWithContext(ctx context.Context, userID string, cm ContactMethod) (*ContactMethod, error)
- func (c *Client) CreateUserNotificationRule(userID string, rule NotificationRule) (*NotificationRule, error)deprecated
- func (c *Client) CreateUserNotificationRuleWithContext(ctx context.Context, userID string, rule NotificationRule) (*NotificationRule, error)
- func (c *Client) CreateUserWithContext(ctx context.Context, u User) (*User, error)
- func (c *Client) DeleteAddon(id string) errordeprecated
- func (c *Client) DeleteAddonWithContext(ctx context.Context, id string) error
- func (c *Client) DeleteBusinessService(id string) errordeprecated
- func (c *Client) DeleteBusinessServiceWithContext(ctx context.Context, id string) error
- func (c *Client) DeleteEscalationPolicy(id string) errordeprecated
- func (c *Client) DeleteEscalationPolicyWithContext(ctx context.Context, id string) error
- func (c *Client) DeleteEscalationRule(escID string, id string) errordeprecated
- func (c *Client) DeleteEscalationRuleWithContext(ctx context.Context, escID string, id string) error
- func (c *Client) DeleteExtension(id string) errordeprecated
- func (c *Client) DeleteExtensionWithContext(ctx context.Context, id string) error
- func (c *Client) DeleteIntegration(serviceID string, integrationID string) errordeprecated
- func (c *Client) DeleteIntegrationWithContext(ctx context.Context, serviceID string, integrationID string) error
- func (c *Client) DeleteMaintenanceWindow(id string) errordeprecated
- func (c *Client) DeleteMaintenanceWindowWithContext(ctx context.Context, id string) error
- func (c *Client) DeleteOrchestrationWithContext(ctx context.Context, id string) error
- func (c *Client) DeleteOverride(scheduleID, overrideID string) errordeprecated
- func (c *Client) DeleteOverrideWithContext(ctx context.Context, scheduleID, overrideID string) error
- func (c *Client) DeleteResponsePlay(ctx context.Context, id string) error
- func (c *Client) DeleteRuleset(id string) errordeprecated
- func (c *Client) DeleteRulesetRule(rulesetID, ruleID string) errordeprecated
- func (c *Client) DeleteRulesetRuleWithContext(ctx context.Context, rulesetID, ruleID string) error
- func (c *Client) DeleteRulesetWithContext(ctx context.Context, id string) error
- func (c *Client) DeleteSchedule(id string) errordeprecated
- func (c *Client) DeleteScheduleWithContext(ctx context.Context, id string) error
- func (c *Client) DeleteService(id string) errordeprecated
- func (c *Client) DeleteServiceRule(ctx context.Context, serviceID, ruleID string) error
- func (c *Client) DeleteServiceWithContext(ctx context.Context, id string) error
- func (c *Client) DeleteTag(id string) errordeprecated
- func (c *Client) DeleteTagWithContext(ctx context.Context, id string) error
- func (c *Client) DeleteTeam(id string) errordeprecated
- func (c *Client) DeleteTeamWithContext(ctx context.Context, id string) error
- func (c *Client) DeleteUser(id string) errordeprecated
- func (c *Client) DeleteUserContactMethod(userID, contactMethodID string) errordeprecated
- func (c *Client) DeleteUserContactMethodWithContext(ctx context.Context, userID, contactMethodID string) error
- func (c *Client) DeleteUserNotificationRule(userID, ruleID string) errordeprecated
- func (c *Client) DeleteUserNotificationRuleWithContext(ctx context.Context, userID, ruleID string) error
- func (c *Client) DeleteUserWithContext(ctx context.Context, id string) error
- func (c *Client) DisassociateServiceDependencies(dependencies *ListServiceDependencies) (*ListServiceDependencies, error)deprecated
- func (c *Client) DisassociateServiceDependenciesWithContext(ctx context.Context, dependencies *ListServiceDependencies) (*ListServiceDependencies, error)
- func (c *Client) Do(r *http.Request, authRequired bool) (*http.Response, error)
- func (c *Client) EnableExtension(ctx context.Context, id string) (*Extension, error)
- func (c *Client) GetAddon(id string) (*Addon, error)deprecated
- func (c *Client) GetAddonWithContext(ctx context.Context, id string) (*Addon, error)
- func (c *Client) GetAggregatedIncidentData(ctx context.Context, analytics AnalyticsRequest) (AnalyticsResponse, error)
- func (c *Client) GetAggregatedServiceData(ctx context.Context, analytics AnalyticsRequest) (AnalyticsResponse, error)
- func (c *Client) GetAggregatedTeamData(ctx context.Context, analytics AnalyticsRequest) (AnalyticsResponse, error)
- func (c *Client) GetBusinessService(id string) (*BusinessService, error)deprecated
- func (c *Client) GetBusinessServiceWithContext(ctx context.Context, id string) (*BusinessService, error)
- func (c *Client) GetCurrentUser(o GetCurrentUserOptions) (*User, error)deprecated
- func (c *Client) GetCurrentUserWithContext(ctx context.Context, o GetCurrentUserOptions) (*User, error)
- func (c *Client) GetEscalationPoliciesByTag(tid string) (*ListEPResponse, error)
- func (c *Client) GetEscalationPoliciesByTagPaginated(ctx context.Context, tagID string) ([]*APIObject, error)
- func (c *Client) GetEscalationPolicy(id string, o *GetEscalationPolicyOptions) (*EscalationPolicy, error)deprecated
- func (c *Client) GetEscalationPolicyWithContext(ctx context.Context, id string, o *GetEscalationPolicyOptions) (*EscalationPolicy, error)
- func (c *Client) GetEscalationRule(escID string, id string, o *GetEscalationRuleOptions) (*EscalationRule, error)deprecated
- func (c *Client) GetEscalationRuleWithContext(ctx context.Context, escID string, id string, o *GetEscalationRuleOptions) (*EscalationRule, error)
- func (c *Client) GetExtension(id string) (*Extension, error)deprecated
- func (c *Client) GetExtensionSchema(id string) (*ExtensionSchema, error)deprecated
- func (c *Client) GetExtensionSchemaWithContext(ctx context.Context, id string) (*ExtensionSchema, error)
- func (c *Client) GetExtensionWithContext(ctx context.Context, id string) (*Extension, error)
- func (c *Client) GetIncident(id string) (*Incident, error)deprecated
- func (c *Client) GetIncidentAlert(incidentID, alertID string) (*IncidentAlertResponse, error)deprecated
- func (c *Client) GetIncidentAlertWithContext(ctx context.Context, incidentID, alertID string) (*IncidentAlertResponse, error)
- func (c *Client) GetIncidentWithContext(ctx context.Context, id string) (*Incident, error)
- func (c *Client) GetIntegration(serviceID, integrationID string, o GetIntegrationOptions) (*Integration, error)deprecated
- func (c *Client) GetIntegrationWithContext(ctx context.Context, serviceID, integrationID string, o GetIntegrationOptions) (*Integration, error)
- func (c *Client) GetLogEntry(id string, o GetLogEntryOptions) (*LogEntry, error)deprecated
- func (c *Client) GetLogEntryWithContext(ctx context.Context, id string, o GetLogEntryOptions) (*LogEntry, error)
- func (c *Client) GetMaintenanceWindow(id string, o GetMaintenanceWindowOptions) (*MaintenanceWindow, error)deprecated
- func (c *Client) GetMaintenanceWindowWithContext(ctx context.Context, id string, o GetMaintenanceWindowOptions) (*MaintenanceWindow, error)
- func (c *Client) GetOrchestrationRouterWithContext(ctx context.Context, id string, o *GetOrchestrationRouterOptions) (*OrchestrationRouter, error)
- func (c *Client) GetOrchestrationUnroutedWithContext(ctx context.Context, id string, o *GetOrchestrationUnroutedOptions) (*OrchestrationUnrouted, error)
- func (c *Client) GetOrchestrationWithContext(ctx context.Context, id string, o *GetOrchestrationOptions) (*Orchestration, error)
- func (c *Client) GetResponsePlay(ctx context.Context, id string) (ResponsePlay, error)
- func (c *Client) GetRuleset(id string) (*Ruleset, error)deprecated
- func (c *Client) GetRulesetRule(rulesetID, ruleID string) (*RulesetRule, error)deprecated
- func (c *Client) GetRulesetRuleWithContext(ctx context.Context, rulesetID, ruleID string) (*RulesetRule, error)
- func (c *Client) GetRulesetWithContext(ctx context.Context, id string) (*Ruleset, error)
- func (c *Client) GetSchedule(id string, o GetScheduleOptions) (*Schedule, error)deprecated
- func (c *Client) GetScheduleWithContext(ctx context.Context, id string, o GetScheduleOptions) (*Schedule, error)
- func (c *Client) GetService(id string, o *GetServiceOptions) (*Service, error)deprecated
- func (c *Client) GetServiceOrchestrationActiveWithContext(ctx context.Context, id string) (*ServiceOrchestrationActive, error)
- func (c *Client) GetServiceOrchestrationWithContext(ctx context.Context, id string, o *GetServiceOrchestrationOptions) (*ServiceOrchestration, error)
- func (c *Client) GetServiceRule(ctx context.Context, serviceID, ruleID string) (ServiceRule, error)
- func (c *Client) GetServiceWithContext(ctx context.Context, id string, o *GetServiceOptions) (*Service, error)
- func (c *Client) GetTag(id string) (*Tag, error)deprecated
- func (c *Client) GetTagWithContext(ctx context.Context, id string) (*Tag, error)
- func (c *Client) GetTagsForEntity(entityType, entityID string, o ListTagOptions) (*ListTagResponse, error)
- func (c *Client) GetTagsForEntityPaginated(ctx context.Context, entityType, entityID string, o ListTagOptions) ([]*Tag, error)
- func (c *Client) GetTeam(id string) (*Team, error)deprecated
- func (c *Client) GetTeamWithContext(ctx context.Context, id string) (*Team, error)
- func (c *Client) GetTeamsByTag(tid string) (*ListTeamsForTagResponse, error)
- func (c *Client) GetTeamsByTagPaginated(ctx context.Context, tagID string) ([]*APIObject, error)
- func (c *Client) GetUser(id string, o GetUserOptions) (*User, error)deprecated
- func (c *Client) GetUserContactMethod(userID, contactMethodID string) (*ContactMethod, error)deprecated
- func (c *Client) GetUserContactMethodWithContext(ctx context.Context, userID, contactMethodID string) (*ContactMethod, error)
- func (c *Client) GetUserNotificationRule(userID, ruleID string) (*NotificationRule, error)deprecated
- func (c *Client) GetUserNotificationRuleWithContext(ctx context.Context, userID, ruleID string) (*NotificationRule, error)
- func (c *Client) GetUserWithContext(ctx context.Context, id string, o GetUserOptions) (*User, error)
- func (c *Client) GetUsersByTag(tid string) (*ListUserResponse, error)
- func (c *Client) GetUsersByTagPaginated(ctx context.Context, tagID string) ([]*APIObject, error)
- func (c *Client) GetVendor(id string) (*Vendor, error)deprecated
- func (c *Client) GetVendorWithContext(ctx context.Context, id string) (*Vendor, error)
- func (c *Client) InstallAddon(a Addon) (*Addon, error)deprecated
- func (c *Client) InstallAddonWithContext(ctx context.Context, a Addon) (*Addon, error)
- func (c *Client) LastAPIRequest() (*http.Request, bool)
- func (c *Client) LastAPIResponse() (*http.Response, bool)
- func (c *Client) ListAbilities() (*ListAbilityResponse, error)deprecated
- func (c *Client) ListAbilitiesWithContext(ctx context.Context) (*ListAbilityResponse, error)
- func (c *Client) ListAddons(o ListAddonOptions) (*ListAddonResponse, error)deprecated
- func (c *Client) ListAddonsWithContext(ctx context.Context, o ListAddonOptions) (*ListAddonResponse, error)
- func (c *Client) ListAllMembers(teamID string) ([]Member, error)deprecated
- func (c *Client) ListAuditRecords(ctx context.Context, o ListAuditRecordsOptions) (ListAuditRecordsResponse, error)
- func (c *Client) ListAuditRecordsPaginated(ctx context.Context, o ListAuditRecordsOptions, include func(AuditRecord) bool) ([]AuditRecord, error)
- func (c *Client) ListBusinessServiceDependencies(businessServiceID string) (*ListServiceDependencies, error)deprecated
- func (c *Client) ListBusinessServiceDependenciesWithContext(ctx context.Context, businessServiceID string) (*ListServiceDependencies, error)
- func (c *Client) ListBusinessServices(o ListBusinessServiceOptions) (*ListBusinessServicesResponse, error)
- func (c *Client) ListBusinessServicesPaginated(ctx context.Context, o ListBusinessServiceOptions) ([]*BusinessService, error)
- func (c *Client) ListEscalationPolicies(o ListEscalationPoliciesOptions) (*ListEscalationPoliciesResponse, error)deprecated
- func (c *Client) ListEscalationPoliciesWithContext(ctx context.Context, o ListEscalationPoliciesOptions) (*ListEscalationPoliciesResponse, error)
- func (c *Client) ListEscalationRules(escID string) (*ListEscalationRulesResponse, error)deprecated
- func (c *Client) ListEscalationRulesWithContext(ctx context.Context, escID string) (*ListEscalationRulesResponse, error)
- func (c *Client) ListExtensionSchemas(o ListExtensionSchemaOptions) (*ListExtensionSchemaResponse, error)deprecated
- func (c *Client) ListExtensionSchemasWithContext(ctx context.Context, o ListExtensionSchemaOptions) (*ListExtensionSchemaResponse, error)
- func (c *Client) ListExtensions(o ListExtensionOptions) (*ListExtensionResponse, error)deprecated
- func (c *Client) ListExtensionsWithContext(ctx context.Context, o ListExtensionOptions) (*ListExtensionResponse, error)
- func (c *Client) ListIncidentAlerts(id string) (*ListAlertsResponse, error)
- func (c *Client) ListIncidentAlertsWithContext(ctx context.Context, id string, o ListIncidentAlertsOptions) (*ListAlertsResponse, error)
- func (c *Client) ListIncidentAlertsWithOpts(id string, o ListIncidentAlertsOptions) (*ListAlertsResponse, error)deprecated
- func (c *Client) ListIncidentLogEntries(id string, o ListIncidentLogEntriesOptions) (*ListIncidentLogEntriesResponse, error)deprecated
- func (c *Client) ListIncidentLogEntriesWithContext(ctx context.Context, id string, o ListIncidentLogEntriesOptions) (*ListIncidentLogEntriesResponse, error)
- func (c *Client) ListIncidentNotes(id string) ([]IncidentNote, error)deprecated
- func (c *Client) ListIncidentNotesWithContext(ctx context.Context, id string) ([]IncidentNote, error)
- func (c *Client) ListIncidentNotificationSubscribersWithContext(ctx context.Context, id string) (*ListIncidentNotificationSubscribersResponse, error)
- func (c *Client) ListIncidents(o ListIncidentsOptions) (*ListIncidentsResponse, error)deprecated
- func (c *Client) ListIncidentsWithContext(ctx context.Context, o ListIncidentsOptions) (*ListIncidentsResponse, error)
- func (c *Client) ListLicenseAllocationsWithContext(ctx context.Context, o ListLicenseAllocationsOptions) (*ListLicenseAllocationsResponse, error)
- func (c *Client) ListLicensesWithContext(ctx context.Context) (*ListLicensesResponse, error)
- func (c *Client) ListLogEntries(o ListLogEntriesOptions) (*ListLogEntryResponse, error)deprecated
- func (c *Client) ListLogEntriesWithContext(ctx context.Context, o ListLogEntriesOptions) (*ListLogEntryResponse, error)
- func (c *Client) ListMaintenanceWindows(o ListMaintenanceWindowsOptions) (*ListMaintenanceWindowsResponse, error)deprecated
- func (c *Client) ListMaintenanceWindowsWithContext(ctx context.Context, o ListMaintenanceWindowsOptions) (*ListMaintenanceWindowsResponse, error)
- func (c *Client) ListMembers(teamID string, o ListTeamMembersOptions) (*ListTeamMembersResponse, error)deprecated
- func (c *Client) ListMembersPaginated(ctx context.Context, teamID string) ([]Member, error)deprecated
- func (c *Client) ListMembersWithContext(ctx context.Context, teamID string, o ListTeamMembersOptions) (*ListTeamMembersResponse, error)deprecated
- func (c *Client) ListMultiResourcesStandardScores(ctx context.Context, rt string, o ListMultiResourcesStandardScoresOptions) (*ListMultiResourcesStandardScoresResponse, error)
- func (c *Client) ListNotifications(o ListNotificationOptions) (*ListNotificationsResponse, error)deprecated
- func (c *Client) ListNotificationsWithContext(ctx context.Context, o ListNotificationOptions) (*ListNotificationsResponse, error)
- func (c *Client) ListOnCallUsers(id string, o ListOnCallUsersOptions) ([]User, error)deprecated
- func (c *Client) ListOnCallUsersWithContext(ctx context.Context, id string, o ListOnCallUsersOptions) ([]User, error)
- func (c *Client) ListOnCalls(o ListOnCallOptions) (*ListOnCallsResponse, error)deprecated
- func (c *Client) ListOnCallsWithContext(ctx context.Context, o ListOnCallOptions) (*ListOnCallsResponse, error)
- func (c *Client) ListOrchestrationsWithContext(ctx context.Context, o ListOrchestrationsOptions) (*ListOrchestrationsResponse, error)
- func (c *Client) ListOverrides(id string, o ListOverridesOptions) (*ListOverridesResponse, error)deprecated
- func (c *Client) ListOverridesWithContext(ctx context.Context, id string, o ListOverridesOptions) (*ListOverridesResponse, error)
- func (c *Client) ListPriorities() (*ListPrioritiesResponse, error)deprecated
- func (c *Client) ListPrioritiesWithContext(ctx context.Context, o ListPrioritiesOptions) (*ListPrioritiesResponse, error)
- func (c *Client) ListResourceStandardScores(ctx context.Context, id string, rt string) (*ResourceStandardScore, error)
- func (c *Client) ListResponsePlays(ctx context.Context, o ListResponsePlaysOptions) ([]ResponsePlay, error)
- func (c *Client) ListRulesetRules(rulesetID string) (*ListRulesetRulesResponse, error)
- func (c *Client) ListRulesetRulesPaginated(ctx context.Context, rulesetID string) ([]*RulesetRule, error)
- func (c *Client) ListRulesets() (*ListRulesetsResponse, error)
- func (c *Client) ListRulesetsPaginated(ctx context.Context) ([]*Ruleset, error)
- func (c *Client) ListSchedules(o ListSchedulesOptions) (*ListSchedulesResponse, error)deprecated
- func (c *Client) ListSchedulesWithContext(ctx context.Context, o ListSchedulesOptions) (*ListSchedulesResponse, error)
- func (c *Client) ListServiceRulesPaginated(ctx context.Context, serviceID string) ([]ServiceRule, error)
- func (c *Client) ListServices(o ListServiceOptions) (*ListServiceResponse, error)deprecated
- func (c *Client) ListServicesPaginated(ctx context.Context, o ListServiceOptions) ([]Service, error)
- func (c *Client) ListServicesWithContext(ctx context.Context, o ListServiceOptions) (*ListServiceResponse, error)
- func (c *Client) ListStandards(ctx context.Context, o ListStandardsOptions) (*ListStandardsResponse, error)
- func (c *Client) ListTags(o ListTagOptions) (*ListTagResponse, error)
- func (c *Client) ListTagsPaginated(ctx context.Context, o ListTagOptions) ([]*Tag, error)
- func (c *Client) ListTeamMembers(ctx context.Context, teamID string, o ListTeamMembersOptions) (*ListTeamMembersResponse, error)
- func (c *Client) ListTeamMembersPaginated(ctx context.Context, teamID string) ([]Member, error)
- func (c *Client) ListTeams(o ListTeamOptions) (*ListTeamResponse, error)deprecated
- func (c *Client) ListTeamsWithContext(ctx context.Context, o ListTeamOptions) (*ListTeamResponse, error)
- func (c *Client) ListTechnicalServiceDependencies(serviceID string) (*ListServiceDependencies, error)deprecated
- func (c *Client) ListTechnicalServiceDependenciesWithContext(ctx context.Context, serviceID string) (*ListServiceDependencies, error)
- func (c *Client) ListUserContactMethods(userID string) (*ListContactMethodsResponse, error)deprecated
- func (c *Client) ListUserContactMethodsWithContext(ctx context.Context, userID string) (*ListContactMethodsResponse, error)
- func (c *Client) ListUserNotificationRules(userID string) (*ListUserNotificationRulesResponse, error)deprecated
- func (c *Client) ListUserNotificationRulesWithContext(ctx context.Context, userID string) (*ListUserNotificationRulesResponse, error)
- func (c *Client) ListUsers(o ListUsersOptions) (*ListUsersResponse, error)deprecated
- func (c *Client) ListUsersWithContext(ctx context.Context, o ListUsersOptions) (*ListUsersResponse, error)
- func (c *Client) ListVendors(o ListVendorOptions) (*ListVendorResponse, error)deprecated
- func (c *Client) ListVendorsWithContext(ctx context.Context, o ListVendorOptions) (*ListVendorResponse, error)
- func (c *Client) ManageEvent(e *V2Event) (*V2EventResponse, error)deprecated
- func (c *Client) ManageEventWithContext(ctx context.Context, e *V2Event) (*V2EventResponse, error)
- func (c *Client) ManageIncidentAlerts(ctx context.Context, incidentID, from string, alerts *IncidentAlertList) (*ListAlertsResponse, error)
- func (c *Client) ManageIncidents(from string, incidents []ManageIncidentsOptions) (*ListIncidentsResponse, error)deprecated
- func (c *Client) ManageIncidentsWithContext(ctx context.Context, from string, incidents []ManageIncidentsOptions) (*ListIncidentsResponse, error)
- func (c *Client) MergeIncidents(from string, id string, sourceIncidents []MergeIncidentsOptions) (*Incident, error)deprecated
- func (c *Client) MergeIncidentsWithContext(ctx context.Context, from, id string, sourceIncidents []MergeIncidentsOptions) (*Incident, error)
- func (c *Client) PreviewSchedule(s Schedule, o PreviewScheduleOptions) errordeprecated
- func (c *Client) PreviewScheduleWithContext(ctx context.Context, s Schedule, o PreviewScheduleOptions) error
- func (c *Client) RemoveEscalationPolicyFromTeam(teamID, epID string) errordeprecated
- func (c *Client) RemoveEscalationPolicyFromTeamWithContext(ctx context.Context, teamID, epID string) error
- func (c *Client) RemoveIncidentNotificationSubscribersWithContext(ctx context.Context, id string, subscribers []IncidentNotificationSubscriber) (*RemoveIncidentNotificationSubscribersResponse, error)
- func (c *Client) RemoveUserFromTeam(teamID, userID string) errordeprecated
- func (c *Client) RemoveUserFromTeamWithContext(ctx context.Context, teamID, userID string) error
- func (c *Client) ResponderRequest(id string, o ResponderRequestOptions) (*ResponderRequestResponse, error)deprecated
- func (c *Client) ResponderRequestWithContext(ctx context.Context, id string, o ResponderRequestOptions) (*ResponderRequestResponse, error)
- func (c *Client) RunResponsePlay(ctx context.Context, from string, responsePlayID string, incidentID string) error
- func (c *Client) SetDebugFlag(flag DebugFlag)
- func (c *Client) SnoozeIncident(id string, duration uint) errordeprecated
- func (c *Client) SnoozeIncidentWithContext(ctx context.Context, id string, duration uint) (*Incident, error)
- func (c *Client) SnoozeIncidentWithResponse(id string, duration uint) (*Incident, error)deprecated
- func (c *Client) TestAbility(ability string) errordeprecated
- func (c *Client) TestAbilityWithContext(ctx context.Context, ability string) error
- func (c *Client) UpdateAddon(id string, a Addon) (*Addon, error)deprecated
- func (c *Client) UpdateAddonWithContext(ctx context.Context, id string, a Addon) (*Addon, error)
- func (c *Client) UpdateBusinessService(b *BusinessService) (*BusinessService, error)deprecated
- func (c *Client) UpdateBusinessServiceWithContext(ctx context.Context, b *BusinessService) (*BusinessService, error)
- func (c *Client) UpdateEscalationPolicy(id string, e *EscalationPolicy) (*EscalationPolicy, error)deprecated
- func (c *Client) UpdateEscalationPolicyWithContext(ctx context.Context, id string, e EscalationPolicy) (*EscalationPolicy, error)
- func (c *Client) UpdateEscalationRule(escID string, id string, e *EscalationRule) (*EscalationRule, error)deprecated
- func (c *Client) UpdateEscalationRuleWithContext(ctx context.Context, escID string, id string, e EscalationRule) (*EscalationRule, error)
- func (c *Client) UpdateExtension(id string, e *Extension) (*Extension, error)deprecated
- func (c *Client) UpdateExtensionWithContext(ctx context.Context, id string, e *Extension) (*Extension, error)
- func (c *Client) UpdateIntegration(serviceID string, i Integration) (*Integration, error)deprecated
- func (c *Client) UpdateIntegrationWithContext(ctx context.Context, serviceID string, i Integration) (*Integration, error)
- func (c *Client) UpdateMaintenanceWindow(m MaintenanceWindow) (*MaintenanceWindow, error)deprecated
- func (c *Client) UpdateMaintenanceWindowWithContext(ctx context.Context, m MaintenanceWindow) (*MaintenanceWindow, error)
- func (c *Client) UpdateOrchestrationRouterWithContext(ctx context.Context, id string, e OrchestrationRouter) (*OrchestrationRouter, error)
- func (c *Client) UpdateOrchestrationUnroutedWithContext(ctx context.Context, id string, e OrchestrationUnrouted) (*OrchestrationUnrouted, error)
- func (c *Client) UpdateOrchestrationWithContext(ctx context.Context, id string, e Orchestration) (*Orchestration, error)
- func (c *Client) UpdateResponsePlay(ctx context.Context, rp ResponsePlay) (ResponsePlay, error)
- func (c *Client) UpdateRuleset(r *Ruleset) (*Ruleset, error)deprecated
- func (c *Client) UpdateRulesetRule(rulesetID, ruleID string, r *RulesetRule) (*RulesetRule, error)deprecated
- func (c *Client) UpdateRulesetRuleWithContext(ctx context.Context, rulesetID, ruleID string, r *RulesetRule) (*RulesetRule, error)
- func (c *Client) UpdateRulesetWithContext(ctx context.Context, r *Ruleset) (*Ruleset, error)
- func (c *Client) UpdateSchedule(id string, s Schedule) (*Schedule, error)deprecated
- func (c *Client) UpdateScheduleWithContext(ctx context.Context, id string, s Schedule) (*Schedule, error)
- func (c *Client) UpdateService(s Service) (*Service, error)deprecated
- func (c *Client) UpdateServiceOrchestrationActiveWithContext(ctx context.Context, id string, e ServiceOrchestrationActive) (*ServiceOrchestrationActive, error)
- func (c *Client) UpdateServiceOrchestrationWithContext(ctx context.Context, id string, e ServiceOrchestration) (*ServiceOrchestration, error)
- func (c *Client) UpdateServiceRule(ctx context.Context, serviceID, ruleID string, rule ServiceRule) (ServiceRule, error)
- func (c *Client) UpdateServiceWithContext(ctx context.Context, s Service) (*Service, error)
- func (c *Client) UpdateStandard(ctx context.Context, id string, s Standard) (*Standard, error)
- func (c *Client) UpdateTeam(id string, t *Team) (*Team, error)deprecated
- func (c *Client) UpdateTeamWithContext(ctx context.Context, id string, t *Team) (*Team, error)
- func (c *Client) UpdateUser(u User) (*User, error)deprecated
- func (c *Client) UpdateUserContactMethod(userID string, cm ContactMethod) (*ContactMethod, error)
- func (c *Client) UpdateUserContactMethodWthContext(ctx context.Context, userID string, cm ContactMethod) (*ContactMethod, error)
- func (c *Client) UpdateUserNotificationRule(userID string, rule NotificationRule) (*NotificationRule, error)deprecated
- func (c *Client) UpdateUserNotificationRuleWithContext(ctx context.Context, userID string, rule NotificationRule) (*NotificationRule, error)
- func (c *Client) UpdateUserWithContext(ctx context.Context, u User) (*User, error)
- type ClientOptions
- type CommonLogEntryField
- type ConditionParameter
- type ConferenceBridge
- type ContactMethod
- type Context
- type CreateIncidentNoteResponse
- type CreateIncidentOptions
- type DebugFlag
- type Details
- type EscalationPolicy
- type EscalationRule
- type Event
- type EventResponse
- type EventsAPIV2Error
- type EventsAPIV2ErrorObject
- type ExecutionContext
- type Extension
- type ExtensionSchema
- type Field
- type FirstTriggerLogEntry
- type GetCurrentUserOptions
- type GetEscalationPolicyOptions
- type GetEscalationRuleOptions
- type GetIntegrationOptions
- type GetLogEntryOptions
- type GetMaintenanceWindowOptions
- type GetOrchestrationOptions
- type GetOrchestrationRouterOptions
- type GetOrchestrationUnroutedOptions
- type GetScheduleOptions
- type GetServiceOptions
- type GetServiceOrchestrationOptions
- type GetUserOptions
- type HTTPClient
- type Incident
- type IncidentAlert
- type IncidentAlertList
- type IncidentAlertResponse
- type IncidentBody
- type IncidentDetails
- type IncidentNote
- type IncidentNotificationSubscriber
- type IncidentNotificationSubscriberVia
- type IncidentNotificationSubscriptionWithContext
- type IncidentResponders
- type IncidentStatusUpdate
- type IncidentUrgencyRule
- type IncidentUrgencyType
- type InlineModel
- type Integration
- type IntegrationEmailFilterMode
- type IntegrationEmailFilterRule
- type IntegrationEmailFilterRuleMode
- type License
- type LicenseAllocated
- type LicenseAllocation
- type ListAbilityResponse
- type ListAddonOptions
- type ListAddonResponse
- type ListAlertsResponse
- type ListAuditRecordsOptions
- type ListAuditRecordsResponse
- type ListBusinessServiceOptions
- type ListBusinessServicesResponse
- type ListContactMethodsResponse
- type ListEPResponse
- type ListEscalationPoliciesOptions
- type ListEscalationPoliciesResponse
- type ListEscalationRulesResponse
- type ListExtensionOptions
- type ListExtensionResponse
- type ListExtensionSchemaOptions
- type ListExtensionSchemaResponse
- type ListIncidentAlertsOptions
- type ListIncidentLogEntriesOptions
- type ListIncidentLogEntriesResponse
- type ListIncidentNotificationSubscribersResponse
- type ListIncidentsOptions
- type ListIncidentsResponse
- type ListLicenseAllocationsOptions
- type ListLicenseAllocationsResponse
- type ListLicensesResponse
- type ListLogEntriesOptions
- type ListLogEntryResponse
- type ListMaintenanceWindowsOptions
- type ListMaintenanceWindowsResponse
- type ListMembersOptionsdeprecated
- type ListMembersResponsedeprecated
- type ListMultiResourcesStandardScoresOptions
- type ListMultiResourcesStandardScoresResponse
- type ListNotificationOptions
- type ListNotificationsResponse
- type ListOnCallOptions
- type ListOnCallUsersOptions
- type ListOnCallsResponse
- type ListOrchestrationsOptions
- type ListOrchestrationsResponse
- type ListOverridesOptions
- type ListOverridesResponse
- type ListPrioritiesOptions
- type ListPrioritiesResponse
- type ListResponsePlaysOptions
- type ListResponsePlaysResponse
- type ListRulesetRulesResponse
- type ListRulesetsResponse
- type ListSchedulesOptions
- type ListSchedulesResponse
- type ListServiceDependencies
- type ListServiceOptions
- type ListServiceResponse
- type ListServiceRulesResponse
- type ListStandardsOptions
- type ListStandardsResponse
- type ListTagOptions
- type ListTagResponse
- type ListTeamMembersOptions
- type ListTeamMembersResponse
- type ListTeamOptions
- type ListTeamResponse
- type ListTeamsForTagResponse
- type ListUserNotificationRulesResponse
- type ListUserResponse
- type ListUsersOptions
- type ListUsersResponse
- type ListVendorOptions
- type ListVendorResponse
- type LogEntry
- type MaintenanceWindow
- type ManageIncidentsOptions
- type Member
- type MergeIncidentsOptions
- type Method
- type Notification
- type NotificationRule
- type NullAPIErrorObject
- type NullEventsAPIV2ErrorObject
- type Occurrence
- type OnCall
- type Orchestration
- type OrchestrationExtraction
- type OrchestrationHeader
- type OrchestrationIntegration
- type OrchestrationIntegrationParameters
- type OrchestrationParameter
- type OrchestrationRouter
- type OrchestrationRouterActions
- type OrchestrationRouterCatchAllRule
- type OrchestrationRouterRule
- type OrchestrationRouterRuleCondition
- type OrchestrationRouterRuleSet
- type OrchestrationUnrouted
- type OrchestrationUnroutedCatchAllRule
- type OrchestrationUnroutedRule
- type OrchestrationUnroutedRuleActions
- type OrchestrationUnroutedRuleCondition
- type OrchestrationUnroutedRuleSet
- type OrchestrationVariable
- type Override
- type PagerDutyAutomationAction
- type PendingAction
- type PreviewScheduleOptions
- type Prioritiesdeprecated
- type Priority
- type PriorityPropertydeprecated
- type Reference
- type RemoveIncidentNotificationSubscribersResponse
- type RenderedScheduleEntry
- type ResolveReason
- type ResourceScore
- type ResourceStandard
- type ResourceStandardScore
- type ResponderRequest
- type ResponderRequestOptions
- type ResponderRequestResponse
- type ResponderRequestTarget
- type ResponderRequestTargetWrapper
- type ResponseMetadata
- type ResponsePlay
- type Restriction
- type RuleActionExtraction
- type RuleActionParameter
- type RuleActionSuppress
- type RuleActionSuspend
- type RuleActions
- type RuleConditions
- type RuleSubcondition
- type RuleTimeFrame
- type Ruleset
- type RulesetObject
- type RulesetPayload
- type RulesetRule
- type RulesetRulePayload
- type Schedule
- type ScheduleLayer
- type ScheduledAction
- type ScheduledWeekly
- type Service
- type ServiceDependency
- type ServiceObj
- type ServiceOrchestration
- type ServiceOrchestrationActive
- type ServiceOrchestrationCatchAllRule
- type ServiceOrchestrationRule
- type ServiceOrchestrationRuleActions
- type ServiceOrchestrationRuleCondition
- type ServiceOrchestrationRuleSet
- type ServiceRule
- type ServiceRuleActions
- type Standard
- type StandardInclusionExclusion
- type SupportHours
- type Tag
- type TagAssignment
- type TagAssignments
- type Team
- type TeamUserRole
- type UpdateScheduleOptions
- type User
- type UserReference
- type V2Event
- type V2EventResponse
- type V2Payload
- type Vendor
- type WebhookPayload
- type WebhookPayloadMessages
Constants ¶
const Version = "1.8.0"
Version is current version of this client.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIDetails ¶
type APIDetails struct { Type string `json:"type,omitempty"` Details string `json:"details,omitempty"` }
APIDetails are the fields required to represent a details non-hydrated object.
type APIError ¶ added in v1.4.0
type APIError struct { // StatusCode is the HTTP response status code StatusCode int `json:"-"` // APIError represents the object returned by the API when an error occurs, // which includes messages that should hopefully provide useful context // to the end user. // // If the API response did not contain an error object, the .Valid field of // APIError will be false. If .Valid is true, the .ErrorObject field is // valid and should be consulted. APIError NullAPIErrorObject `json:"error"` // contains filtered or unexported fields }
APIError represents the error response received when an API call fails. The HTTP response code is set inside of the StatusCode field, with the APIError field being the structured JSON error object returned from the API.
This type also provides some helper methods like .RateLimited(), .NotFound(), and .Temporary() to help callers reason about how to handle the error.
You can read more about the HTTP status codes and API error codes returned from the API here: https://developer.pagerduty.com/docs/rest-api-v2/errors/
func (APIError) Error ¶ added in v1.4.0
Error satisfies the error interface, and should contain the StatusCode, APIErrorObject.Message, and APIErrorObject.Code.
func (APIError) NotFound ¶ added in v1.4.0
NotFound returns whether this was an error where it seems like the resource was not found.
func (APIError) RateLimited ¶ added in v1.4.0
RateLimited returns whether the response had a status of 429, and as such the client is rate limited. The PagerDuty rate limits should reset once per minute, and for the REST API they are an account-wide rate limit (not per API key or IP).
type APIErrorObject ¶ added in v1.4.0
type APIErrorObject struct { Code int `json:"code,omitempty"` Message string `json:"message,omitempty"` Errors []string `json:"errors,omitempty"` }
APIErrorObject represents the object returned by the API when an error occurs. This includes messages that should hopefully provide useful context to the end user.
type APIListObject ¶
type APIListObject struct { Limit uint `json:"limit,omitempty"` Offset uint `json:"offset,omitempty"` More bool `json:"more,omitempty"` Total uint `json:"total,omitempty"` }
APIListObject are the fields used to control pagination when listing objects.
type APIObject ¶
type APIObject struct { ID string `json:"id,omitempty"` Type string `json:"type,omitempty"` Summary string `json:"summary,omitempty"` Self string `json:"self,omitempty"` HTMLURL string `json:"html_url,omitempty"` }
APIObject represents generic api json response that is shared by most domain objects (like escalation)
type APIReference ¶
APIReference are the fields required to reference another API object.
type Acknowledgement ¶
type Acknowledgement struct { At string `json:"at,omitempty"` Acknowledger APIObject `json:"acknowledger,omitempty"` }
Acknowledgement is the data structure of an acknowledgement of an incident.
type ActiveBetween ¶ added in v1.2.0
type ActiveBetween struct { // StartTime is in the number of milliseconds into the day at which the // window starts. StartTime int `json:"start_time,omitempty"` // EndTime is the number of milliseconds into the day at which the window // ends. EndTime int `json:"end_time,omitempty"` }
ActiveBetween represents an active_between object for setting a timeline for rules
type AddIncidentNotificationSubscribersResponse ¶ added in v1.7.0
type AddIncidentNotificationSubscribersResponse struct {
Subscriptions []IncidentNotificationSubscriptionWithContext `json:"subscriptions,omitempty"`
}
AddIncidentNotificationSubscribersResponse is the response structure when calling the AddNotificationSubscribers API endpoint.
type AddUserToTeamOptions ¶ added in v1.4.0
type AddUserToTeamOptions struct { TeamID string `json:"-"` UserID string `json:"-"` Role TeamUserRole `json:"role,omitempty"` }
AddUserToTeamOptions is an option struct for the AddUserToTeamWithContext method.
type Addon ¶
type Addon struct { APIObject Name string `json:"name,omitempty"` Src string `json:"src,omitempty"` Services []APIObject `json:"services,omitempty"` }
Addon is a third-party add-on to PagerDuty's UI.
type AlertCounts ¶
type AlertCounts struct { Triggered uint `json:"triggered,omitempty"` Resolved uint `json:"resolved,omitempty"` All uint `json:"all,omitempty"` }
AlertCounts is the data structure holding a summary of the number of alerts by status of an incident.
type AlertGroupParamsConfig ¶ added in v1.4.0
type AlertGroupParamsConfig struct { Timeout *uint `json:"timeout,omitempty"` Aggregate string `json:"aggregate,omitempty"` Fields []string `json:"fields,omitempty"` }
AlertGroupParamsConfig is the config object on alert_grouping_parameters
type AlertGroupingParameters ¶ added in v1.4.0
type AlertGroupingParameters struct { Type string `json:"type,omitempty"` Config *AlertGroupParamsConfig `json:"config,omitempty"` }
AlertGroupingParameters defines how alerts on the service will be automatically grouped into incidents
type AnalyticsData ¶ added in v1.4.0
type AnalyticsData struct { ServiceID string `json:"service_id,omitempty"` ServiceName string `json:"service_name,omitempty"` TeamID string `json:"team_id,omitempty"` TeamName string `json:"team_name,omitempty"` MeanSecondsToResolve int `json:"mean_seconds_to_resolve,omitempty"` MeanSecondsToFirstAck int `json:"mean_seconds_to_first_ack,omitempty"` MeanSecondsToEngage int `json:"mean_seconds_to_engage,omitempty"` MeanSecondsToMobilize int `json:"mean_seconds_to_mobilize,omitempty"` MeanEngagedSeconds int `json:"mean_engaged_seconds,omitempty"` MeanEngagedUserCount int `json:"mean_engaged_user_count,omitempty"` TotalEscalationCount int `json:"total_escalation_count,omitempty"` MeanAssignmentCount int `json:"mean_assignment_count,omitempty"` TotalBusinessHourInterruptions int `json:"total_business_hour_interruptions,omitempty"` TotalSleepHourInterruptions int `json:"total_sleep_hour_interruptions,omitempty"` TotalOffHourInterruptions int `json:"total_off_hour_interruptions,omitempty"` TotalSnoozedSeconds int `json:"total_snoozed_seconds,omitempty"` TotalEngagedSeconds int `json:"total_engaged_seconds,omitempty"` TotalIncidentCount int `json:"total_incident_count,omitempty"` UpTimePct float64 `json:"up_time_pct,omitempty"` UserDefinedEffortSeconds int `json:"user_defined_effort_seconds,omitempty"` RangeStart string `json:"range_start,omitempty"` }
AnalyticsData represents the structure of the analytics we have available.
type AnalyticsFilter ¶ added in v1.4.0
type AnalyticsFilter struct { CreatedAtStart string `json:"created_at_start,omitempty"` CreatedAtEnd string `json:"created_at_end,omitempty"` Urgency string `json:"urgency,omitempty"` Major bool `json:"major,omitempty"` ServiceIDs []string `json:"service_ids,omitempty"` TeamIDs []string `json:"team_ids,omitempty"` PriorityIDs []string `json:"priority_ids,omitempty"` PriorityNames []string `json:"priority_names,omitempty"` }
AnalyticsFilter represents the set of filters as part of the request to PagerDuty when requesting analytics.
type AnalyticsRequest ¶ added in v1.4.0
type AnalyticsRequest struct { Filters *AnalyticsFilter `json:"filters,omitempty"` AggregateUnit string `json:"aggregate_unit,omitempty"` TimeZone string `json:"time_zone,omitempty"` }
AnalyticsRequest represents the request to be sent to PagerDuty when you want aggregated analytics.
type AnalyticsResponse ¶ added in v1.4.0
type AnalyticsResponse struct { Data []AnalyticsData `json:"data,omitempty"` Filters *AnalyticsFilter `json:"filters,omitempty"` AggregateUnit string `json:"aggregate_unit,omitempty"` TimeZone string `json:"time_zone,omitempty"` }
AnalyticsResponse represents the response from the PagerDuty API.
type Assignee ¶
type Assignee struct {
Assignee APIObject `json:"assignee"`
}
Assignee is an individual assigned to an incident.
type Assignment ¶
type Assignment struct { At string `json:"at,omitempty"` Assignee APIObject `json:"assignee,omitempty"` }
Assignment is the data structure for an assignment of an incident
type AuditRecord ¶ added in v1.5.0
type AuditRecord struct { ID string `json:"id,omitempty"` Self string `json:"self,omitempty"` ExecutionTime string `json:"execution_time,omitempty"` ExecutionContext ExecutionContext `json:"execution_context,omitempty"` Actors []APIObject `json:"actors,omitempty"` Method Method `json:"method,omitempty"` RootResource APIObject `json:"root_resource,omitempty"` Action string `json:"action,omitempty"` Details Details `json:"details,omitempty"` }
AuditRecord is a audit trail record that matches the query criteria.
type AutoPauseNotificationsParameters ¶ added in v1.8.0
type AutoPauseNotificationsParameters struct { Enabled bool `json:"enabled"` Timeout uint `json:"timeout,omitempty"` }
AutoPauseNotificationsParameters defines how alerts on the service will be automatically paused
type AutomationAction ¶ added in v1.7.0
type AutomationAction struct { Name string `json:"name,omitempty"` URL string `json:"url,omitempty"` AutoSend bool `json:"auto_send,omitempty"` Headers []*OrchestrationHeader `json:"headers,omitempty"` Parameters []*OrchestrationParameter `json:"parameters,omitempty"` }
type BusinessService ¶ added in v1.3.0
type BusinessService struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Type string `json:"type,omitempty"` Summary string `json:"summary,omitempty"` Self string `json:"self,omitempty"` PointOfContact string `json:"point_of_contact,omitempty"` HTMLUrl string `json:"html_url,omitempty"` Description string `json:"description,omitempty"` Team *BusinessServiceTeam `json:"team,omitempty"` }
BusinessService represents a business service.
type BusinessServicePayload ¶ added in v1.3.0
type BusinessServicePayload struct {
BusinessService *BusinessService `json:"business_service,omitempty"`
}
BusinessServicePayload represents payload with a business service object
type BusinessServiceTeam ¶ added in v1.3.0
type BusinessServiceTeam struct { ID string `json:"id,omitempty"` Type string `json:"type,omitempty"` Self string `json:"self,omitempty"` }
BusinessServiceTeam represents a team object in a business service
type ChangeEvent ¶ added in v1.4.0
type ChangeEvent struct { RoutingKey string `json:"routing_key"` Payload ChangeEventPayload `json:"payload"` Links []ChangeEventLink `json:"links,omitempty"` }
ChangeEvent represents a ChangeEvent's request parameters https://developer.pagerduty.com/docs/events-api-v2/send-change-events/#parameters
type ChangeEventLink ¶ added in v1.4.0
ChangeEventLink represents a single link in a ChangeEvent https://developer.pagerduty.com/docs/events-api-v2/send-change-events/#the-links-property
type ChangeEventPayload ¶ added in v1.4.0
type ChangeEventPayload struct { Summary string `json:"summary"` Source string `json:"source,omitempty"` Timestamp string `json:"timestamp,omitempty"` CustomDetails map[string]interface{} `json:"custom_details,omitempty"` }
ChangeEventPayload ChangeEvent ChangeEventPayload https://developer.pagerduty.com/docs/events-api-v2/send-change-events/#example-request-payload
type ChangeEventResponse ¶ added in v1.4.0
type ChangeEventResponse struct { Status string `json:"status,omitempty"` Message string `json:"message,omitempty"` Errors []string `json:"errors,omitempty"` }
ChangeEventResponse is the json response body for an event
type Channel ¶
Channel is the means by which the action was carried out.
func (*Channel) MarshalJSON ¶ added in v1.4.0
MarshalJSON Expands the LogEntry.Channel object to correctly marshal it back
func (*Channel) UnmarshalJSON ¶ added in v1.2.0
UnmarshalJSON Expands the LogEntry.Channel object to parse out a raw value
type Client ¶
type Client struct { // HTTPClient is the HTTP client used for making requests against the // PagerDuty API. You can use either *http.Client here, or your own // implementation. HTTPClient HTTPClient // contains filtered or unexported fields }
Client wraps http client
func NewClient ¶
func NewClient(authToken string, options ...ClientOptions) *Client
NewClient creates an API client using an account/user API token
func NewOAuthClient ¶ added in v1.2.0
func NewOAuthClient(authToken string, options ...ClientOptions) *Client
NewOAuthClient creates an API client using an OAuth token
func (*Client) AddEscalationPolicyToTeam
deprecated
func (*Client) AddEscalationPolicyToTeamWithContext ¶ added in v1.4.0
func (c *Client) AddEscalationPolicyToTeamWithContext(ctx context.Context, teamID, epID string) error
AddEscalationPolicyToTeamWithContext adds an escalation policy to a team.
func (*Client) AddIncidentNotificationSubscribersWithContext ¶ added in v1.7.0
func (c *Client) AddIncidentNotificationSubscribersWithContext(ctx context.Context, id string, subscribers []IncidentNotificationSubscriber) (*AddIncidentNotificationSubscribersResponse, error)
AddIncidentNotificationSubscribersWithContext adds notification subscribers for the specified incident.
func (*Client) AddUserToTeam
deprecated
func (*Client) AddUserToTeamWithContext ¶ added in v1.4.0
func (c *Client) AddUserToTeamWithContext(ctx context.Context, o AddUserToTeamOptions) error
AddUserToTeamWithContext adds a user to a team.
func (*Client) AssignTags
deprecated
added in
v1.4.0
func (c *Client) AssignTags(e, eid string, a *TagAssignments) error
AssignTags adds and removes tag assignments with entities.
Deprecated: Use AssignTagsWithContext instead.
func (*Client) AssignTagsWithContext ¶ added in v1.4.0
func (c *Client) AssignTagsWithContext(ctx context.Context, entityType, entityID string, a *TagAssignments) error
AssignTagsWithContext adds and removes tag assignments with entities. Permitted entity types are users, teams, and escalation_policies.
func (*Client) AssociateServiceDependencies
deprecated
added in
v1.3.0
func (c *Client) AssociateServiceDependencies(dependencies *ListServiceDependencies) (*ListServiceDependencies, error)
AssociateServiceDependencies Create new dependencies between two services.
Deprecated: Use AssociateServiceDependenciesWithContext instead.
func (*Client) AssociateServiceDependenciesWithContext ¶ added in v1.4.0
func (c *Client) AssociateServiceDependenciesWithContext(ctx context.Context, dependencies *ListServiceDependencies) (*ListServiceDependencies, error)
AssociateServiceDependenciesWithContext Create new dependencies between two services.
func (*Client) CreateBusinessService
deprecated
added in
v1.3.0
func (c *Client) CreateBusinessService(b *BusinessService) (*BusinessService, error)
CreateBusinessService creates a new business service.
Deprecated: Use CreateBusinessServiceWithContext instead
func (*Client) CreateBusinessServiceWithContext ¶ added in v1.4.0
func (c *Client) CreateBusinessServiceWithContext(ctx context.Context, b *BusinessService) (*BusinessService, error)
CreateBusinessServiceWithContext creates a new business service.
func (*Client) CreateChangeEvent
deprecated
added in
v1.4.0
func (c *Client) CreateChangeEvent(e ChangeEvent) (*ChangeEventResponse, error)
CreateChangeEvent Sends PagerDuty a single ChangeEvent to record The v2EventsAPIEndpoint parameter must be set on the client Documentation can be found at https://developer.pagerduty.com/docs/events-api-v2/send-change-events
Deprecated: Use CreateChangeEventWithContext instead.
func (*Client) CreateChangeEventWithContext ¶ added in v1.4.0
func (c *Client) CreateChangeEventWithContext(ctx context.Context, e ChangeEvent) (*ChangeEventResponse, error)
CreateChangeEventWithContext sends PagerDuty a single ChangeEvent to record The v2EventsAPIEndpoint parameter must be set on the client Documentation can be found at https://developer.pagerduty.com/docs/events-api-v2/send-change-events
func (*Client) CreateEscalationPolicy
deprecated
func (c *Client) CreateEscalationPolicy(e EscalationPolicy) (*EscalationPolicy, error)
CreateEscalationPolicy creates a new escalation policy.
Deprecated: Use CreateEscalationPolicyWithContext instead.
func (*Client) CreateEscalationPolicyWithContext ¶ added in v1.4.0
func (c *Client) CreateEscalationPolicyWithContext(ctx context.Context, e EscalationPolicy) (*EscalationPolicy, error)
CreateEscalationPolicyWithContext creates a new escalation policy.
func (*Client) CreateEscalationRule
deprecated
func (c *Client) CreateEscalationRule(escID string, e EscalationRule) (*EscalationRule, error)
CreateEscalationRule creates a new escalation rule for an escalation policy and appends it to the end of the existing escalation rules.
Deprecated: Use CreateEscalationRuleWithContext instead.
func (*Client) CreateEscalationRuleWithContext ¶ added in v1.4.0
func (c *Client) CreateEscalationRuleWithContext(ctx context.Context, escID string, e EscalationRule) (*EscalationRule, error)
CreateEscalationRuleWithContext creates a new escalation rule for an escalation policy and appends it to the end of the existing escalation rules.
func (*Client) CreateExtension
deprecated
func (*Client) CreateExtensionWithContext ¶ added in v1.4.0
CreateExtensionWithContext creates a single extension.
func (*Client) CreateIncident
deprecated
func (c *Client) CreateIncident(from string, o *CreateIncidentOptions) (*Incident, error)
CreateIncident creates an incident synchronously without a corresponding event from a monitoring service.
Deprecated: Use CreateIncidentWithContext instead.
func (*Client) CreateIncidentNote
deprecated
func (c *Client) CreateIncidentNote(id string, note IncidentNote) error
CreateIncidentNote creates a new note for the specified incident.
Deprecated: Use CreateIncidentNoteWithContext instead.
func (*Client) CreateIncidentNoteWithContext ¶ added in v1.4.0
func (c *Client) CreateIncidentNoteWithContext(ctx context.Context, id string, note IncidentNote) (*IncidentNote, error)
CreateIncidentNoteWithContext creates a new note for the specified incident.
func (*Client) CreateIncidentNoteWithResponse
deprecated
func (c *Client) CreateIncidentNoteWithResponse(id string, note IncidentNote) (*IncidentNote, error)
CreateIncidentNoteWithResponse creates a new note for the specified incident.
Deprecated: Use CreateIncidentNoteWithContext instead.
func (*Client) CreateIncidentStatusUpdate ¶ added in v1.5.0
func (c *Client) CreateIncidentStatusUpdate(ctx context.Context, id string, from string, message string) (IncidentStatusUpdate, error)
CreateIncidentStatusUpdate creates a new status update for the specified incident.
func (*Client) CreateIncidentWithContext ¶ added in v1.4.0
func (c *Client) CreateIncidentWithContext(ctx context.Context, from string, o *CreateIncidentOptions) (*Incident, error)
CreateIncidentWithContext creates an incident synchronously without a corresponding event from a monitoring service.
func (*Client) CreateIntegration
deprecated
func (c *Client) CreateIntegration(id string, i Integration) (*Integration, error)
CreateIntegration creates a new integration belonging to a service.
Deprecated: Use CreateIntegrationWithContext instead.
func (*Client) CreateIntegrationWithContext ¶ added in v1.4.0
func (c *Client) CreateIntegrationWithContext(ctx context.Context, id string, i Integration) (*Integration, error)
CreateIntegrationWithContext creates a new integration belonging to a service.
func (*Client) CreateMaintenanceWindow
deprecated
func (c *Client) CreateMaintenanceWindow(from string, o MaintenanceWindow) (*MaintenanceWindow, error)
CreateMaintenanceWindow creates a new maintenance window for the specified services.
Deprecated: Use CreateMaintenanceWindowWithContext instead.
func (*Client) CreateMaintenanceWindowWithContext ¶ added in v1.4.0
func (c *Client) CreateMaintenanceWindowWithContext(ctx context.Context, from string, o MaintenanceWindow) (*MaintenanceWindow, error)
CreateMaintenanceWindowWithContext creates a new maintenance window for the specified services.
func (*Client) CreateMaintenanceWindows
deprecated
func (c *Client) CreateMaintenanceWindows(o MaintenanceWindow) (*MaintenanceWindow, error)
CreateMaintenanceWindows creates a new maintenance window for the specified services.
Deprecated: Use CreateMaintenanceWindowWithContext instead.
func (*Client) CreateOrchestrationWithContext ¶ added in v1.7.0
func (c *Client) CreateOrchestrationWithContext(ctx context.Context, e Orchestration) (*Orchestration, error)
CreateOrchestrationWithContext creates a new event orchestration.
func (*Client) CreateOverrideWithContext ¶ added in v1.4.0
func (c *Client) CreateOverrideWithContext(ctx context.Context, id string, o Override) (*Override, error)
CreateOverrideWithContext creates an override for a specific user covering the specified time range.
func (*Client) CreateResponsePlay ¶ added in v1.5.0
func (c *Client) CreateResponsePlay(ctx context.Context, rp ResponsePlay) (ResponsePlay, error)
CreateResponsePlay creates a new response play.
func (*Client) CreateRuleset
deprecated
added in
v1.2.0
func (*Client) CreateRulesetRule
deprecated
added in
v1.2.0
func (c *Client) CreateRulesetRule(rulesetID string, rule *RulesetRule) (*RulesetRule, error)
CreateRulesetRule creates a new rule for a ruleset.
Deprecated: Use CreateRulesetRuleWithContext instead.
func (*Client) CreateRulesetRuleWithContext ¶ added in v1.4.0
func (c *Client) CreateRulesetRuleWithContext(ctx context.Context, rulesetID string, rule *RulesetRule) (*RulesetRule, error)
CreateRulesetRuleWithContext creates a new rule for a ruleset.
func (*Client) CreateRulesetWithContext ¶ added in v1.4.0
CreateRulesetWithContext creates a new ruleset.
func (*Client) CreateSchedule
deprecated
func (*Client) CreateScheduleWithContext ¶ added in v1.4.0
CreateScheduleWithContext creates a new on-call schedule.
func (*Client) CreateService
deprecated
func (*Client) CreateServiceRule ¶ added in v1.4.0
func (c *Client) CreateServiceRule(ctx context.Context, serviceID string, rule ServiceRule) (ServiceRule, error)
CreateServiceRule creates a service rule.
func (*Client) CreateServiceWithContext ¶ added in v1.4.0
CreateServiceWithContext creates a new service.
func (*Client) CreateTagWithContext ¶ added in v1.4.0
CreateTagWithContext creates a new tag.
func (*Client) CreateTeam
deprecated
func (*Client) CreateTeamWithContext ¶ added in v1.4.0
CreateTeamWithContext creates a new team.
func (*Client) CreateUser
deprecated
func (*Client) CreateUserContactMethod
deprecated
func (c *Client) CreateUserContactMethod(userID string, cm ContactMethod) (*ContactMethod, error)
CreateUserContactMethod creates a new contact method for user.
Deprecated: Use CreateUserContactMethodWithContext instead.
func (*Client) CreateUserContactMethodWithContext ¶ added in v1.4.0
func (c *Client) CreateUserContactMethodWithContext(ctx context.Context, userID string, cm ContactMethod) (*ContactMethod, error)
CreateUserContactMethodWithContext creates a new contact method for user.
func (*Client) CreateUserNotificationRule
deprecated
added in
v1.2.0
func (c *Client) CreateUserNotificationRule(userID string, rule NotificationRule) (*NotificationRule, error)
CreateUserNotificationRule creates a new notification rule for a user.
Deprecated: Use CreateUserNotificationRuleWithContext instead.
func (*Client) CreateUserNotificationRuleWithContext ¶ added in v1.4.0
func (c *Client) CreateUserNotificationRuleWithContext(ctx context.Context, userID string, rule NotificationRule) (*NotificationRule, error)
CreateUserNotificationRuleWithContext creates a new notification rule for a user.
func (*Client) CreateUserWithContext ¶ added in v1.4.0
CreateUserWithContext creates a new user.
func (*Client) DeleteAddon
deprecated
func (*Client) DeleteAddonWithContext ¶ added in v1.4.0
DeleteAddonWithContext deletes an add-on from your account.
func (*Client) DeleteBusinessService
deprecated
added in
v1.3.0
func (*Client) DeleteBusinessServiceWithContext ¶ added in v1.4.0
DeleteBusinessServiceWithContext deletes a business_service.
func (*Client) DeleteEscalationPolicy
deprecated
func (*Client) DeleteEscalationPolicyWithContext ¶ added in v1.4.0
DeleteEscalationPolicyWithContext deletes an existing escalation policy and rules.
func (*Client) DeleteEscalationRule
deprecated
func (*Client) DeleteEscalationRuleWithContext ¶ added in v1.4.0
func (c *Client) DeleteEscalationRuleWithContext(ctx context.Context, escID string, id string) error
DeleteEscalationRuleWithContext deletes an existing escalation rule.
func (*Client) DeleteExtension
deprecated
func (*Client) DeleteExtensionWithContext ¶ added in v1.4.0
DeleteExtensionWithContext deletes an extension by its ID.
func (*Client) DeleteIntegration
deprecated
func (*Client) DeleteIntegrationWithContext ¶ added in v1.4.0
func (c *Client) DeleteIntegrationWithContext(ctx context.Context, serviceID string, integrationID string) error
DeleteIntegrationWithContext deletes an existing integration.
func (*Client) DeleteMaintenanceWindow
deprecated
func (*Client) DeleteMaintenanceWindowWithContext ¶ added in v1.4.0
DeleteMaintenanceWindowWithContext deletes an existing maintenance window if it's in the future, or ends it if it's currently on-going.
func (*Client) DeleteOrchestrationWithContext ¶ added in v1.7.0
DeleteOrchestrationWithContext deletes an existing event orchestration.
func (*Client) DeleteOverride
deprecated
func (*Client) DeleteOverrideWithContext ¶ added in v1.4.0
func (c *Client) DeleteOverrideWithContext(ctx context.Context, scheduleID, overrideID string) error
DeleteOverrideWithContext removes an override.
func (*Client) DeleteResponsePlay ¶ added in v1.5.0
DeleteResponsePlay deletes an existing response play.
func (*Client) DeleteRuleset
deprecated
added in
v1.2.0
func (*Client) DeleteRulesetRule
deprecated
added in
v1.2.0
func (*Client) DeleteRulesetRuleWithContext ¶ added in v1.4.0
DeleteRulesetRuleWithContext deletes a rule.
func (*Client) DeleteRulesetWithContext ¶ added in v1.4.0
DeleteRulesetWithContext deletes a ruleset.
func (*Client) DeleteSchedule
deprecated
func (*Client) DeleteScheduleWithContext ¶ added in v1.4.0
DeleteScheduleWithContext deletes an on-call schedule.
func (*Client) DeleteService
deprecated
func (*Client) DeleteServiceRule ¶ added in v1.4.0
DeleteServiceRule deletes a service rule.
func (*Client) DeleteServiceWithContext ¶ added in v1.4.0
DeleteServiceWithContext deletes an existing service.
func (*Client) DeleteTagWithContext ¶ added in v1.4.0
DeleteTagWithContext removes an existing tag.
func (*Client) DeleteTeam
deprecated
func (*Client) DeleteTeamWithContext ¶ added in v1.4.0
DeleteTeamWithContext removes an existing team.
func (*Client) DeleteUser
deprecated
func (*Client) DeleteUserContactMethod
deprecated
func (*Client) DeleteUserContactMethodWithContext ¶ added in v1.4.0
func (c *Client) DeleteUserContactMethodWithContext(ctx context.Context, userID, contactMethodID string) error
DeleteUserContactMethodWithContext deletes a user.
func (*Client) DeleteUserNotificationRule
deprecated
added in
v1.2.0
func (*Client) DeleteUserNotificationRuleWithContext ¶ added in v1.4.0
func (c *Client) DeleteUserNotificationRuleWithContext(ctx context.Context, userID, ruleID string) error
DeleteUserNotificationRuleWithContext deletes a notification rule for a user.
func (*Client) DeleteUserWithContext ¶ added in v1.4.0
DeleteUserWithContext deletes a user.
func (*Client) DisassociateServiceDependencies
deprecated
added in
v1.3.0
func (c *Client) DisassociateServiceDependencies(dependencies *ListServiceDependencies) (*ListServiceDependencies, error)
DisassociateServiceDependencies Disassociate dependencies between two services.
Deprecated: Use DisassociateServiceDependenciesWithContext instead.
func (*Client) DisassociateServiceDependenciesWithContext ¶ added in v1.4.0
func (c *Client) DisassociateServiceDependenciesWithContext(ctx context.Context, dependencies *ListServiceDependencies) (*ListServiceDependencies, error)
DisassociateServiceDependenciesWithContext Disassociate dependencies between two services.
func (*Client) Do ¶ added in v1.5.0
Do sets some headers on the request, before actioning it using the internal HTTPClient. If the PagerDuty API you're communicating with requires authentication, such as the REST API, set authRequired to true and the client will set the proper authentication headers onto the request. This also assumes any request body is in JSON format and sets the Content-Type to application/json.
func (*Client) EnableExtension ¶ added in v1.5.0
EnableExtension enables a temporarily disabled extension by its ID.
func (*Client) GetAddonWithContext ¶ added in v1.4.0
GetAddonWithContext gets details about an existing add-on.
func (*Client) GetAggregatedIncidentData ¶ added in v1.4.0
func (c *Client) GetAggregatedIncidentData(ctx context.Context, analytics AnalyticsRequest) (AnalyticsResponse, error)
GetAggregatedIncidentData gets the aggregated incident analytics for the requested data.
func (*Client) GetAggregatedServiceData ¶ added in v1.4.0
func (c *Client) GetAggregatedServiceData(ctx context.Context, analytics AnalyticsRequest) (AnalyticsResponse, error)
GetAggregatedServiceData gets the aggregated service analytics for the requested data.
func (*Client) GetAggregatedTeamData ¶ added in v1.4.0
func (c *Client) GetAggregatedTeamData(ctx context.Context, analytics AnalyticsRequest) (AnalyticsResponse, error)
GetAggregatedTeamData gets the aggregated team analytics for the requested data.
func (*Client) GetBusinessService
deprecated
added in
v1.3.0
func (c *Client) GetBusinessService(id string) (*BusinessService, error)
GetBusinessService gets details about a business service.
Deprecated: Use GetBusinessServiceWithContext instead.
func (*Client) GetBusinessServiceWithContext ¶ added in v1.4.0
func (c *Client) GetBusinessServiceWithContext(ctx context.Context, id string) (*BusinessService, error)
GetBusinessServiceWithContext gets details about a business service.
func (*Client) GetCurrentUser
deprecated
func (c *Client) GetCurrentUser(o GetCurrentUserOptions) (*User, error)
GetCurrentUser gets details about the authenticated user when using a user-level API key or OAuth token.
Deprecated: Use GetCurrentUserWithContext instead.
func (*Client) GetCurrentUserWithContext ¶ added in v1.4.0
func (c *Client) GetCurrentUserWithContext(ctx context.Context, o GetCurrentUserOptions) (*User, error)
GetCurrentUserWithContext gets details about the authenticated user when using a user-level API key or OAuth token.
func (*Client) GetEscalationPoliciesByTag ¶ added in v1.4.0
func (c *Client) GetEscalationPoliciesByTag(tid string) (*ListEPResponse, error)
GetEscalationPoliciesByTag gets related escalation policies based on the tag. This method currently handles pagination of the response, so all escalation policy references with the tag should be present.
Please note that the automatic pagination will be removed in v2 of this package, so it's recommended to use GetEscalationPoliciesByTagPaginated() instead.
func (*Client) GetEscalationPoliciesByTagPaginated ¶ added in v1.4.0
func (c *Client) GetEscalationPoliciesByTagPaginated(ctx context.Context, tagID string) ([]*APIObject, error)
GetEscalationPoliciesByTagPaginated gets related escalation policies based on the tag. To get the full info of the EP, you will need to iterate over the returend slice and get that policy's details.
func (*Client) GetEscalationPolicy
deprecated
func (c *Client) GetEscalationPolicy(id string, o *GetEscalationPolicyOptions) (*EscalationPolicy, error)
GetEscalationPolicy gets information about an existing escalation policy and its rules.
Deprecated: Use GetEscalationPolicyWithContext instead.
func (*Client) GetEscalationPolicyWithContext ¶ added in v1.4.0
func (c *Client) GetEscalationPolicyWithContext(ctx context.Context, id string, o *GetEscalationPolicyOptions) (*EscalationPolicy, error)
GetEscalationPolicyWithContext gets information about an existing escalation policy and its rules.
func (*Client) GetEscalationRule
deprecated
func (c *Client) GetEscalationRule(escID string, id string, o *GetEscalationRuleOptions) (*EscalationRule, error)
GetEscalationRule gets information about an existing escalation rule.
Deprecated: Use GetEscalationRuleWithContext instead.
func (*Client) GetEscalationRuleWithContext ¶ added in v1.4.0
func (c *Client) GetEscalationRuleWithContext(ctx context.Context, escID string, id string, o *GetEscalationRuleOptions) (*EscalationRule, error)
GetEscalationRuleWithContext gets information about an existing escalation rule.
func (*Client) GetExtension
deprecated
func (*Client) GetExtensionSchema
deprecated
func (c *Client) GetExtensionSchema(id string) (*ExtensionSchema, error)
GetExtensionSchema gets a single extension schema.
Deprecated: Use GetExtensionSchemaWithContext instead.
func (*Client) GetExtensionSchemaWithContext ¶ added in v1.4.0
func (c *Client) GetExtensionSchemaWithContext(ctx context.Context, id string) (*ExtensionSchema, error)
GetExtensionSchemaWithContext gets a single extension schema.
func (*Client) GetExtensionWithContext ¶ added in v1.4.0
GetExtensionWithContext gets an extension by its ID.
func (*Client) GetIncident
deprecated
func (*Client) GetIncidentAlert
deprecated
added in
v1.3.0
func (c *Client) GetIncidentAlert(incidentID, alertID string) (*IncidentAlertResponse, error)
GetIncidentAlert gets the alert that triggered the incident.
Deprecated: Use GetIncidentAlertWithContext instead.
func (*Client) GetIncidentAlertWithContext ¶ added in v1.4.0
func (c *Client) GetIncidentAlertWithContext(ctx context.Context, incidentID, alertID string) (*IncidentAlertResponse, error)
GetIncidentAlertWithContext gets the alert that triggered the incident.
func (*Client) GetIncidentWithContext ¶ added in v1.4.0
GetIncidentWithContext shows detailed information about an incident.
func (*Client) GetIntegration
deprecated
func (c *Client) GetIntegration(serviceID, integrationID string, o GetIntegrationOptions) (*Integration, error)
GetIntegration gets details about an integration belonging to a service.
Deprecated: Use GetIntegrationWithContext instead.
func (*Client) GetIntegrationWithContext ¶ added in v1.4.0
func (c *Client) GetIntegrationWithContext(ctx context.Context, serviceID, integrationID string, o GetIntegrationOptions) (*Integration, error)
GetIntegrationWithContext gets details about an integration belonging to a service.
func (*Client) GetLogEntry
deprecated
func (c *Client) GetLogEntry(id string, o GetLogEntryOptions) (*LogEntry, error)
GetLogEntry list log entries for the specified incident.
Deprecated: Use GetLogEntryWithContext instead.
func (*Client) GetLogEntryWithContext ¶ added in v1.4.0
func (c *Client) GetLogEntryWithContext(ctx context.Context, id string, o GetLogEntryOptions) (*LogEntry, error)
GetLogEntryWithContext list log entries for the specified incident.
func (*Client) GetMaintenanceWindow
deprecated
func (c *Client) GetMaintenanceWindow(id string, o GetMaintenanceWindowOptions) (*MaintenanceWindow, error)
GetMaintenanceWindow gets an existing maintenance window.
Deprecated: Use GetMaintenanceWindowWithContext instead.
func (*Client) GetMaintenanceWindowWithContext ¶ added in v1.4.0
func (c *Client) GetMaintenanceWindowWithContext(ctx context.Context, id string, o GetMaintenanceWindowOptions) (*MaintenanceWindow, error)
GetMaintenanceWindowWithContext gets an existing maintenance window.
func (*Client) GetOrchestrationRouterWithContext ¶ added in v1.7.0
func (c *Client) GetOrchestrationRouterWithContext(ctx context.Context, id string, o *GetOrchestrationRouterOptions) (*OrchestrationRouter, error)
GetOrchestrationRouterWithContext gets information about an event orchestration.
func (*Client) GetOrchestrationUnroutedWithContext ¶ added in v1.7.0
func (c *Client) GetOrchestrationUnroutedWithContext(ctx context.Context, id string, o *GetOrchestrationUnroutedOptions) (*OrchestrationUnrouted, error)
GetOrchestrationUnroutedWithContext gets the routing rules for unrouted events.
func (*Client) GetOrchestrationWithContext ¶ added in v1.7.0
func (c *Client) GetOrchestrationWithContext(ctx context.Context, id string, o *GetOrchestrationOptions) (*Orchestration, error)
GetOrchestrationWithContext gets information about an event orchestration.
func (*Client) GetResponsePlay ¶ added in v1.5.0
GetResponsePlay gets details about an existing response play.
func (*Client) GetRuleset
deprecated
added in
v1.2.0
func (*Client) GetRulesetRule
deprecated
added in
v1.2.0
func (c *Client) GetRulesetRule(rulesetID, ruleID string) (*RulesetRule, error)
GetRulesetRule gets an event rule.
Deprecated: Use GetRulesetRuleWithContext instead.
func (*Client) GetRulesetRuleWithContext ¶ added in v1.4.0
func (c *Client) GetRulesetRuleWithContext(ctx context.Context, rulesetID, ruleID string) (*RulesetRule, error)
GetRulesetRuleWithContext gets an event rule
func (*Client) GetRulesetWithContext ¶ added in v1.4.0
GetRulesetWithContext gets details about a ruleset.
func (*Client) GetSchedule
deprecated
func (c *Client) GetSchedule(id string, o GetScheduleOptions) (*Schedule, error)
GetSchedule shows detailed information about a schedule, including entries for each layer and sub-schedule.
Deprecated: Use GetScheduleWithContext instead.
func (*Client) GetScheduleWithContext ¶ added in v1.4.0
func (c *Client) GetScheduleWithContext(ctx context.Context, id string, o GetScheduleOptions) (*Schedule, error)
GetScheduleWithContext shows detailed information about a schedule, including entries for each layer and sub-schedule.
func (*Client) GetService
deprecated
func (c *Client) GetService(id string, o *GetServiceOptions) (*Service, error)
GetService gets details about an existing service.
Deprecated: Use GetServiceWithContext instead.
func (*Client) GetServiceOrchestrationActiveWithContext ¶ added in v1.7.0
func (c *Client) GetServiceOrchestrationActiveWithContext(ctx context.Context, id string) (*ServiceOrchestrationActive, error)
GetServiceOrchestrationActiveWithContext gets a service orchestration's active status.
func (*Client) GetServiceOrchestrationWithContext ¶ added in v1.7.0
func (c *Client) GetServiceOrchestrationWithContext(ctx context.Context, id string, o *GetServiceOrchestrationOptions) (*ServiceOrchestration, error)
GetServiceOrchestrationWithContext gets information about a service orchestration.
func (*Client) GetServiceRule ¶ added in v1.4.0
GetServiceRule gets a service rule.
func (*Client) GetServiceWithContext ¶ added in v1.4.0
func (c *Client) GetServiceWithContext(ctx context.Context, id string, o *GetServiceOptions) (*Service, error)
GetServiceWithContext gets details about an existing service.
func (*Client) GetTagWithContext ¶ added in v1.4.0
GetTagWithContext gets details about an existing tag.
func (*Client) GetTagsForEntity ¶ added in v1.4.0
func (c *Client) GetTagsForEntity(entityType, entityID string, o ListTagOptions) (*ListTagResponse, error)
GetTagsForEntity get related tags for Users, Teams or Escalation Policies. This method currently handles pagination of the response, so all tags should be present.
Please note that the automatic pagination will be removed in v2 of this package, so it's recommended to use GetTagsForEntityPaginated() instead.
func (*Client) GetTagsForEntityPaginated ¶ added in v1.4.0
func (c *Client) GetTagsForEntityPaginated(ctx context.Context, entityType, entityID string, o ListTagOptions) ([]*Tag, error)
GetTagsForEntityPaginated gets related tags for Users, Teams or Escalation Policies.
func (*Client) GetTeamWithContext ¶ added in v1.4.0
GetTeamWithContext gets details about an existing team.
func (*Client) GetTeamsByTag ¶ added in v1.4.0
func (c *Client) GetTeamsByTag(tid string) (*ListTeamsForTagResponse, error)
GetTeamsByTag gets related teams based on the tag. This method currently handles pagination of the response, so all team references with the tag should be present.
Please note that the automatic pagination will be removed in v2 of this package, so it's recommended to use GetTeamsByTagPaginated() instead.
func (*Client) GetTeamsByTagPaginated ¶ added in v1.4.0
GetTeamsByTagPaginated gets related teams based on the tag. To get the full info of the team, you will need to iterate over the returend slice and get that team's details.
func (*Client) GetUserContactMethod
deprecated
func (c *Client) GetUserContactMethod(userID, contactMethodID string) (*ContactMethod, error)
GetUserContactMethod gets details about a contact method.
Deprecated: Use GetUserContactMethodWithContext instead.
func (*Client) GetUserContactMethodWithContext ¶ added in v1.4.0
func (c *Client) GetUserContactMethodWithContext(ctx context.Context, userID, contactMethodID string) (*ContactMethod, error)
GetUserContactMethodWithContext gets details about a contact method.
func (*Client) GetUserNotificationRule
deprecated
added in
v1.2.0
func (c *Client) GetUserNotificationRule(userID, ruleID string) (*NotificationRule, error)
GetUserNotificationRule gets details about a notification rule.
Deprecated: Use GetUserNotificationRuleWithContext instead.
func (*Client) GetUserNotificationRuleWithContext ¶ added in v1.4.0
func (c *Client) GetUserNotificationRuleWithContext(ctx context.Context, userID, ruleID string) (*NotificationRule, error)
GetUserNotificationRuleWithContext gets details about a notification rule.
func (*Client) GetUserWithContext ¶ added in v1.4.0
func (c *Client) GetUserWithContext(ctx context.Context, id string, o GetUserOptions) (*User, error)
GetUserWithContext gets details about an existing user.
func (*Client) GetUsersByTag ¶ added in v1.4.0
func (c *Client) GetUsersByTag(tid string) (*ListUserResponse, error)
GetUsersByTag gets related user references based on the Tag. This method currently handles pagination of the response, so all user references with the tag should be present.
Please note that the automatic pagination will be removed in v2 of this package, so it's recommended to use GetUsersByTagPaginated() instead.
func (*Client) GetUsersByTagPaginated ¶ added in v1.4.0
GetUsersByTagPaginated gets related user references based on the tag. To get the full info of the user, you will need to iterate over the returned slice and get that user's details.
func (*Client) GetVendorWithContext ¶ added in v1.4.0
GetVendorWithContext gets details about an existing vendor.
func (*Client) InstallAddon
deprecated
func (*Client) InstallAddonWithContext ¶ added in v1.4.0
InstallAddonWithContext installs an add-on for your account.
func (*Client) LastAPIRequest ¶ added in v1.5.0
LastAPIRequest returns the last request sent to the API, if enabled. This can be turned on by using the SetDebugFlag() method while providing the DebugCaptureLastRequest flag.
The bool value returned from this method is false if the request is unset or is nil. If there was an error prepping the request to be sent to the server, there will be no *http.Request to capture so this will return (<nil>, false).
This is meant to help with debugging unexpected API interactions, so most won't need to use it. Also, callers will need to ensure the *Client isn't used concurrently, otherwise they might receive another method's *http.Request and not the one they anticipated.
The *http.Request made within the Do() method is not captured by the client, and thus won't be returned by this method.
func (*Client) LastAPIResponse ¶ added in v1.5.0
LastAPIResponse returns the last response received from the API, if enabled. This can be turned on by using the SetDebugFlag() method while providing the DebugCaptureLastResponse flag.
The bool value returned from this method is false if the response is unset or is nil. If the HTTP exchange failed (e.g., there was a connection error) there will be no *http.Response to capture so this will return (<nil>, false).
This is meant to help with debugging unexpected API interactions, so most won't need to use it. Also, callers will need to ensure the *Client isn't used concurrently, otherwise they might receive another method's *http.Response and not the one they anticipated.
The *http.Response from the Do() method is not captured by the client, and thus won't be returned by this method.
func (*Client) ListAbilities
deprecated
func (c *Client) ListAbilities() (*ListAbilityResponse, error)
ListAbilities lists all abilities on your account.
Deprecated: Use ListAbilitiesWithContext instead.
func (*Client) ListAbilitiesWithContext ¶ added in v1.4.0
func (c *Client) ListAbilitiesWithContext(ctx context.Context) (*ListAbilityResponse, error)
ListAbilitiesWithContext lists all abilities on your account.
func (*Client) ListAddons
deprecated
func (c *Client) ListAddons(o ListAddonOptions) (*ListAddonResponse, error)
ListAddons lists all of the add-ons installed on your account.
Deprecated: Use ListAddonsWithContext instead.
func (*Client) ListAddonsWithContext ¶ added in v1.4.0
func (c *Client) ListAddonsWithContext(ctx context.Context, o ListAddonOptions) (*ListAddonResponse, error)
ListAddonsWithContext lists all of the add-ons installed on your account.
func (*Client) ListAllMembers
deprecated
func (*Client) ListAuditRecords ¶ added in v1.5.0
func (c *Client) ListAuditRecords(ctx context.Context, o ListAuditRecordsOptions) (ListAuditRecordsResponse, error)
ListAuditRecords lists audit trial records matching provided query params or default criteria.
func (*Client) ListAuditRecordsPaginated ¶ added in v1.5.0
func (c *Client) ListAuditRecordsPaginated(ctx context.Context, o ListAuditRecordsOptions, include func(AuditRecord) bool) ([]AuditRecord, error)
ListAuditRecordsPaginated lists audit trial records matching provided query params or default criteria, processing paginated responses. The include function decides whether or not to include a specific AuditRecord in the final result. If the include function is nil, all audit records from the API are included by default.
func (*Client) ListBusinessServiceDependencies
deprecated
added in
v1.3.0
func (c *Client) ListBusinessServiceDependencies(businessServiceID string) (*ListServiceDependencies, error)
ListBusinessServiceDependencies lists dependencies of a business service.
Deprecated: Use ListBusinessServiceDependenciesWithContext instead.
func (*Client) ListBusinessServiceDependenciesWithContext ¶ added in v1.4.0
func (c *Client) ListBusinessServiceDependenciesWithContext(ctx context.Context, businessServiceID string) (*ListServiceDependencies, error)
ListBusinessServiceDependenciesWithContext lists dependencies of a business service.
func (*Client) ListBusinessServices ¶ added in v1.3.0
func (c *Client) ListBusinessServices(o ListBusinessServiceOptions) (*ListBusinessServicesResponse, error)
ListBusinessServices lists existing business services. This method currently handles pagination of the response, so all business services should be present.
Please note that the automatic pagination will be removed in v2 of this package, so it's recommended to use ListBusinessServicesPaginated instead.
func (*Client) ListBusinessServicesPaginated ¶ added in v1.4.0
func (c *Client) ListBusinessServicesPaginated(ctx context.Context, o ListBusinessServiceOptions) ([]*BusinessService, error)
ListBusinessServicesPaginated lists existing business services, automatically handling pagination and returning the full collection.
func (*Client) ListEscalationPolicies
deprecated
func (c *Client) ListEscalationPolicies(o ListEscalationPoliciesOptions) (*ListEscalationPoliciesResponse, error)
ListEscalationPolicies lists all of the existing escalation policies.
Deprecated: Use ListEscalationPoliciesWithContext instead.
func (*Client) ListEscalationPoliciesWithContext ¶ added in v1.4.0
func (c *Client) ListEscalationPoliciesWithContext(ctx context.Context, o ListEscalationPoliciesOptions) (*ListEscalationPoliciesResponse, error)
ListEscalationPoliciesWithContext lists all of the existing escalation policies.
func (*Client) ListEscalationRules
deprecated
func (c *Client) ListEscalationRules(escID string) (*ListEscalationRulesResponse, error)
ListEscalationRules lists all of the escalation rules for an existing escalation policy.
Deprecated: Use ListEscalationRulesWithContext instead.
func (*Client) ListEscalationRulesWithContext ¶ added in v1.4.0
func (c *Client) ListEscalationRulesWithContext(ctx context.Context, escID string) (*ListEscalationRulesResponse, error)
ListEscalationRulesWithContext lists all of the escalation rules for an existing escalation policy.
func (*Client) ListExtensionSchemas
deprecated
func (c *Client) ListExtensionSchemas(o ListExtensionSchemaOptions) (*ListExtensionSchemaResponse, error)
ListExtensionSchemas lists all of the extension schemas. Each schema represents a specific type of outbound extension.
Deprecated: Use ListExtensionSchemasWithContext instead.
func (*Client) ListExtensionSchemasWithContext ¶ added in v1.4.0
func (c *Client) ListExtensionSchemasWithContext(ctx context.Context, o ListExtensionSchemaOptions) (*ListExtensionSchemaResponse, error)
ListExtensionSchemasWithContext lists all of the extension schemas. Each schema represents a specific type of outbound extension.
func (*Client) ListExtensions
deprecated
func (c *Client) ListExtensions(o ListExtensionOptions) (*ListExtensionResponse, error)
ListExtensions lists the extensions from the API.
Deprecated: Use ListExtensionsWithContext instead.
func (*Client) ListExtensionsWithContext ¶ added in v1.4.0
func (c *Client) ListExtensionsWithContext(ctx context.Context, o ListExtensionOptions) (*ListExtensionResponse, error)
ListExtensionsWithContext lists the extensions from the API.
func (*Client) ListIncidentAlerts ¶
func (c *Client) ListIncidentAlerts(id string) (*ListAlertsResponse, error)
ListIncidentAlerts lists existing alerts for the specified incident. It's recommended to use ListIncidentAlertsWithContext instead.
func (*Client) ListIncidentAlertsWithContext ¶ added in v1.4.0
func (c *Client) ListIncidentAlertsWithContext(ctx context.Context, id string, o ListIncidentAlertsOptions) (*ListAlertsResponse, error)
ListIncidentAlertsWithContext lists existing alerts for the specified incident. If you don't want to filter any of the results, pass in an empty ListIncidentAlertOptions.
func (*Client) ListIncidentAlertsWithOpts
deprecated
added in
v1.2.0
func (c *Client) ListIncidentAlertsWithOpts(id string, o ListIncidentAlertsOptions) (*ListAlertsResponse, error)
ListIncidentAlertsWithOpts lists existing alerts for the specified incident.
Deprecated: Use ListIncidentAlertsWithContext instead.
func (*Client) ListIncidentLogEntries
deprecated
func (c *Client) ListIncidentLogEntries(id string, o ListIncidentLogEntriesOptions) (*ListIncidentLogEntriesResponse, error)
ListIncidentLogEntries lists existing log entries for the specified incident.
Deprecated: Use ListIncidentLogEntriesWithContext instead.
func (*Client) ListIncidentLogEntriesWithContext ¶ added in v1.4.0
func (c *Client) ListIncidentLogEntriesWithContext(ctx context.Context, id string, o ListIncidentLogEntriesOptions) (*ListIncidentLogEntriesResponse, error)
ListIncidentLogEntriesWithContext lists existing log entries for the specified incident.
func (*Client) ListIncidentNotes
deprecated
func (c *Client) ListIncidentNotes(id string) ([]IncidentNote, error)
ListIncidentNotes lists existing notes for the specified incident.
Deprecated: Use ListIncidentNotesWithContext instead.
func (*Client) ListIncidentNotesWithContext ¶ added in v1.4.0
func (c *Client) ListIncidentNotesWithContext(ctx context.Context, id string) ([]IncidentNote, error)
ListIncidentNotesWithContext lists existing notes for the specified incident.
func (*Client) ListIncidentNotificationSubscribersWithContext ¶ added in v1.7.0
func (c *Client) ListIncidentNotificationSubscribersWithContext(ctx context.Context, id string) (*ListIncidentNotificationSubscribersResponse, error)
ListIncidentNotificationSubscribersWithContext lists notification subscribers for the specified incident.
func (*Client) ListIncidents
deprecated
func (c *Client) ListIncidents(o ListIncidentsOptions) (*ListIncidentsResponse, error)
ListIncidents lists existing incidents.
Deprecated: Use ListIncidentsWithContext instead.
func (*Client) ListIncidentsWithContext ¶ added in v1.4.0
func (c *Client) ListIncidentsWithContext(ctx context.Context, o ListIncidentsOptions) (*ListIncidentsResponse, error)
ListIncidentsWithContext lists existing incidents.
func (*Client) ListLicenseAllocationsWithContext ¶ added in v1.8.0
func (c *Client) ListLicenseAllocationsWithContext(ctx context.Context, o ListLicenseAllocationsOptions) (*ListLicenseAllocationsResponse, error)
func (*Client) ListLicensesWithContext ¶ added in v1.8.0
func (c *Client) ListLicensesWithContext(ctx context.Context) (*ListLicensesResponse, error)
func (*Client) ListLogEntries
deprecated
func (c *Client) ListLogEntries(o ListLogEntriesOptions) (*ListLogEntryResponse, error)
ListLogEntries lists all of the incident log entries across the entire account.
Deprecated: Use ListLogEntriesWithContext instead.
func (*Client) ListLogEntriesWithContext ¶ added in v1.4.0
func (c *Client) ListLogEntriesWithContext(ctx context.Context, o ListLogEntriesOptions) (*ListLogEntryResponse, error)
ListLogEntriesWithContext lists all of the incident log entries across the entire account.
func (*Client) ListMaintenanceWindows
deprecated
func (c *Client) ListMaintenanceWindows(o ListMaintenanceWindowsOptions) (*ListMaintenanceWindowsResponse, error)
ListMaintenanceWindows lists existing maintenance windows, optionally filtered by service and/or team, or whether they are from the past, present or future.
Deprecated: Use ListMaintenanceWindowsWithContext instead.
func (*Client) ListMaintenanceWindowsWithContext ¶ added in v1.4.0
func (c *Client) ListMaintenanceWindowsWithContext(ctx context.Context, o ListMaintenanceWindowsOptions) (*ListMaintenanceWindowsResponse, error)
ListMaintenanceWindowsWithContext lists existing maintenance windows, optionally filtered by service and/or team, or whether they are from the past, present or future.
func (*Client) ListMembers
deprecated
func (c *Client) ListMembers(teamID string, o ListTeamMembersOptions) (*ListTeamMembersResponse, error)
ListMembers gets a page of users associated with the specified team.
Deprecated: Use ListTeamMembers instead.
func (*Client) ListMembersWithContext
deprecated
added in
v1.4.0
func (c *Client) ListMembersWithContext(ctx context.Context, teamID string, o ListTeamMembersOptions) (*ListTeamMembersResponse, error)
ListMembersWithContext gets a page of users associated with the specified team.
Deprecated: Use ListTeamMembers instead.
func (*Client) ListMultiResourcesStandardScores ¶ added in v1.8.0
func (c *Client) ListMultiResourcesStandardScores(ctx context.Context, rt string, o ListMultiResourcesStandardScoresOptions) (*ListMultiResourcesStandardScoresResponse, error)
ListMultiResourcesStandardScores
rt - Resource type Allowed values: technical_services
func (*Client) ListNotifications
deprecated
func (c *Client) ListNotifications(o ListNotificationOptions) (*ListNotificationsResponse, error)
ListNotifications lists notifications for a given time range, optionally filtered by type (sms_notification, email_notification, phone_notification, or push_notification).
Deprecated: Use ListNotificationsWithContext instead.
func (*Client) ListNotificationsWithContext ¶ added in v1.4.0
func (c *Client) ListNotificationsWithContext(ctx context.Context, o ListNotificationOptions) (*ListNotificationsResponse, error)
ListNotificationsWithContext lists notifications for a given time range, optionally filtered by type (sms_notification, email_notification, phone_notification, or push_notification).
func (*Client) ListOnCallUsers
deprecated
func (c *Client) ListOnCallUsers(id string, o ListOnCallUsersOptions) ([]User, error)
ListOnCallUsers lists all of the users on call in a given schedule for a given time range.
Deprecated: Use ListOnCallUsersWithContext instead.
func (*Client) ListOnCallUsersWithContext ¶ added in v1.4.0
func (c *Client) ListOnCallUsersWithContext(ctx context.Context, id string, o ListOnCallUsersOptions) ([]User, error)
ListOnCallUsersWithContext lists all of the users on call in a given schedule for a given time range.
func (*Client) ListOnCalls
deprecated
func (c *Client) ListOnCalls(o ListOnCallOptions) (*ListOnCallsResponse, error)
ListOnCalls list the on-call entries during a given time range.
Deprecated: Use ListOnCallsWithContext instead.
func (*Client) ListOnCallsWithContext ¶ added in v1.4.0
func (c *Client) ListOnCallsWithContext(ctx context.Context, o ListOnCallOptions) (*ListOnCallsResponse, error)
ListOnCallsWithContext list the on-call entries during a given time range.
func (*Client) ListOrchestrationsWithContext ¶ added in v1.7.0
func (c *Client) ListOrchestrationsWithContext(ctx context.Context, o ListOrchestrationsOptions) (*ListOrchestrationsResponse, error)
ListOrchestrationsWithContext lists all the existing event orchestrations.
func (*Client) ListOverrides
deprecated
func (c *Client) ListOverrides(id string, o ListOverridesOptions) (*ListOverridesResponse, error)
ListOverrides lists overrides for a given time range.
Deprecated: Use ListOverridesWithContext instead.
func (*Client) ListOverridesWithContext ¶ added in v1.4.0
func (c *Client) ListOverridesWithContext(ctx context.Context, id string, o ListOverridesOptions) (*ListOverridesResponse, error)
ListOverridesWithContext lists overrides for a given time range.
func (*Client) ListPriorities
deprecated
func (c *Client) ListPriorities() (*ListPrioritiesResponse, error)
ListPriorities lists existing priorities.
Deprecated: Use ListPrioritiesWithContext instead.
func (*Client) ListPrioritiesWithContext ¶ added in v1.4.0
func (c *Client) ListPrioritiesWithContext(ctx context.Context, o ListPrioritiesOptions) (*ListPrioritiesResponse, error)
ListPrioritiesWithContext lists existing priorities.
func (*Client) ListResourceStandardScores ¶ added in v1.8.0
func (c *Client) ListResourceStandardScores(ctx context.Context, id string, rt string) (*ResourceStandardScore, error)
ListResourceStandardScores
rt - Resource type Allowed values: technical_services
func (*Client) ListResponsePlays ¶ added in v1.5.0
func (c *Client) ListResponsePlays(ctx context.Context, o ListResponsePlaysOptions) ([]ResponsePlay, error)
ListResponsePlays lists existing response plays.
func (*Client) ListRulesetRules ¶ added in v1.2.0
func (c *Client) ListRulesetRules(rulesetID string) (*ListRulesetRulesResponse, error)
ListRulesetRules gets all rules for a ruleset. This method currently handles pagination of the response, so all RuleseRule should be present.
Please note that the automatic pagination will be removed in v2 of this package, so it's recommended to use ListRulesetRulesPaginated instead.
func (*Client) ListRulesetRulesPaginated ¶ added in v1.4.0
func (c *Client) ListRulesetRulesPaginated(ctx context.Context, rulesetID string) ([]*RulesetRule, error)
ListRulesetRulesPaginated gets all rules for a ruleset.
func (*Client) ListRulesets ¶ added in v1.2.0
func (c *Client) ListRulesets() (*ListRulesetsResponse, error)
ListRulesets gets all rulesets. This method currently handles pagination of the response, so all rulesets should be present.
Please note that the automatic pagination will be removed in v2 of this package, so it's recommended to use ListRulesetsPaginated instead.
func (*Client) ListRulesetsPaginated ¶ added in v1.4.0
ListRulesetsPaginated gets all rulesets.
func (*Client) ListSchedules
deprecated
func (c *Client) ListSchedules(o ListSchedulesOptions) (*ListSchedulesResponse, error)
ListSchedules lists the on-call schedules.
Deprecated: Use ListSchedulesWithContext instead.
func (*Client) ListSchedulesWithContext ¶ added in v1.4.0
func (c *Client) ListSchedulesWithContext(ctx context.Context, o ListSchedulesOptions) (*ListSchedulesResponse, error)
ListSchedulesWithContext lists the on-call schedules.
func (*Client) ListServiceRulesPaginated ¶ added in v1.4.0
func (c *Client) ListServiceRulesPaginated(ctx context.Context, serviceID string) ([]ServiceRule, error)
ListServiceRulesPaginated gets all rules for a service.
func (*Client) ListServices
deprecated
func (c *Client) ListServices(o ListServiceOptions) (*ListServiceResponse, error)
ListServices lists existing services.
Deprecated: Use ListServicesWithContext instead.
func (*Client) ListServicesPaginated ¶ added in v1.4.0
func (c *Client) ListServicesPaginated(ctx context.Context, o ListServiceOptions) ([]Service, error)
ListServicesPaginated lists existing services processing paginated responses
func (*Client) ListServicesWithContext ¶ added in v1.4.0
func (c *Client) ListServicesWithContext(ctx context.Context, o ListServiceOptions) (*ListServiceResponse, error)
ListServicesWithContext lists existing services.
func (*Client) ListStandards ¶ added in v1.8.0
func (c *Client) ListStandards(ctx context.Context, o ListStandardsOptions) (*ListStandardsResponse, error)
ListStandards lists all the existing standards.
func (*Client) ListTags ¶ added in v1.4.0
func (c *Client) ListTags(o ListTagOptions) (*ListTagResponse, error)
ListTags lists tags on your PagerDuty account, optionally filtered by a search query. This method currently handles pagination of the response, so all tags matched should be present.
Please note that the automatic pagination will be removed in v2 of this package, so it's recommended to use ListTagsPaginated() instead.
func (*Client) ListTagsPaginated ¶ added in v1.4.0
ListTagsPaginated lists tags on your PagerDuty account, optionally filtered by a search query.
func (*Client) ListTeamMembers ¶ added in v1.5.0
func (c *Client) ListTeamMembers(ctx context.Context, teamID string, o ListTeamMembersOptions) (*ListTeamMembersResponse, error)
ListTeamMembers gets a page of users associated with the specified team.
func (*Client) ListTeamMembersPaginated ¶ added in v1.5.0
ListTeamMembersPaginated gets all members associated with the specified team.
func (*Client) ListTeams
deprecated
func (c *Client) ListTeams(o ListTeamOptions) (*ListTeamResponse, error)
ListTeams lists teams of your PagerDuty account, optionally filtered by a search query.
Deprecated: Use ListTeamsWithContext instead.
func (*Client) ListTeamsWithContext ¶ added in v1.4.0
func (c *Client) ListTeamsWithContext(ctx context.Context, o ListTeamOptions) (*ListTeamResponse, error)
ListTeamsWithContext lists teams of your PagerDuty account, optionally filtered by a search query.
func (*Client) ListTechnicalServiceDependencies
deprecated
added in
v1.3.0
func (c *Client) ListTechnicalServiceDependencies(serviceID string) (*ListServiceDependencies, error)
ListTechnicalServiceDependencies lists dependencies of a technical service.
Deprecated: Use ListTechnicalServiceDependenciesWithContext instead.
func (*Client) ListTechnicalServiceDependenciesWithContext ¶ added in v1.4.0
func (c *Client) ListTechnicalServiceDependenciesWithContext(ctx context.Context, serviceID string) (*ListServiceDependencies, error)
ListTechnicalServiceDependenciesWithContext lists dependencies of a technical service.
func (*Client) ListUserContactMethods
deprecated
func (c *Client) ListUserContactMethods(userID string) (*ListContactMethodsResponse, error)
ListUserContactMethods fetches contact methods of the existing user.
Deprecated: Use ListUserContactMethodsWithContext instead.
func (*Client) ListUserContactMethodsWithContext ¶ added in v1.4.0
func (c *Client) ListUserContactMethodsWithContext(ctx context.Context, userID string) (*ListContactMethodsResponse, error)
ListUserContactMethodsWithContext fetches contact methods of the existing user.
func (*Client) ListUserNotificationRules
deprecated
added in
v1.2.0
func (c *Client) ListUserNotificationRules(userID string) (*ListUserNotificationRulesResponse, error)
ListUserNotificationRules fetches notification rules of the existing user.
Deprecated: Use ListUserNotificationRulesWithContext instead.
func (*Client) ListUserNotificationRulesWithContext ¶ added in v1.4.0
func (c *Client) ListUserNotificationRulesWithContext(ctx context.Context, userID string) (*ListUserNotificationRulesResponse, error)
ListUserNotificationRulesWithContext fetches notification rules of the existing user.
func (*Client) ListUsers
deprecated
func (c *Client) ListUsers(o ListUsersOptions) (*ListUsersResponse, error)
ListUsers lists users of your PagerDuty account, optionally filtered by a search query.
Deprecated: Use ListUsersWithContext instead.
func (*Client) ListUsersWithContext ¶ added in v1.4.0
func (c *Client) ListUsersWithContext(ctx context.Context, o ListUsersOptions) (*ListUsersResponse, error)
ListUsersWithContext lists users of your PagerDuty account, optionally filtered by a search query.
func (*Client) ListVendors
deprecated
func (c *Client) ListVendors(o ListVendorOptions) (*ListVendorResponse, error)
ListVendors lists existing vendors.
Deprecated: Use ListVendorsWithContext instead.
func (*Client) ListVendorsWithContext ¶ added in v1.4.0
func (c *Client) ListVendorsWithContext(ctx context.Context, o ListVendorOptions) (*ListVendorResponse, error)
ListVendorsWithContext lists existing vendors.
func (*Client) ManageEvent
deprecated
added in
v1.4.0
func (c *Client) ManageEvent(e *V2Event) (*V2EventResponse, error)
ManageEvent handles the trigger, acknowledge, and resolve methods for an event.
Deprecated: Use ManageEventWithContext instead.
func (*Client) ManageEventWithContext ¶ added in v1.4.0
ManageEventWithContext handles the trigger, acknowledge, and resolve methods for an event.
func (*Client) ManageIncidentAlerts ¶ added in v1.3.0
func (c *Client) ManageIncidentAlerts(ctx context.Context, incidentID, from string, alerts *IncidentAlertList) (*ListAlertsResponse, error)
ManageIncidentAlerts allows you to manage the alerts of an incident.
func (*Client) ManageIncidents
deprecated
func (c *Client) ManageIncidents(from string, incidents []ManageIncidentsOptions) (*ListIncidentsResponse, error)
ManageIncidents acknowledges, resolves, escalates, or reassigns one or more incidents.
Deprecated: Use ManageIncidentsWithContext instead.
func (*Client) ManageIncidentsWithContext ¶ added in v1.4.0
func (c *Client) ManageIncidentsWithContext(ctx context.Context, from string, incidents []ManageIncidentsOptions) (*ListIncidentsResponse, error)
ManageIncidentsWithContext acknowledges, resolves, escalates, or reassigns one or more incidents.
func (*Client) MergeIncidents
deprecated
func (*Client) MergeIncidentsWithContext ¶ added in v1.4.0
func (c *Client) MergeIncidentsWithContext(ctx context.Context, from, id string, sourceIncidents []MergeIncidentsOptions) (*Incident, error)
MergeIncidentsWithContext merges a list of source incidents into a specified incident.
func (*Client) PreviewSchedule
deprecated
func (c *Client) PreviewSchedule(s Schedule, o PreviewScheduleOptions) error
PreviewSchedule previews what an on-call schedule would look like without saving it.
Deprecated: Use PreviewScheduleWithContext instead.
func (*Client) PreviewScheduleWithContext ¶ added in v1.4.0
func (c *Client) PreviewScheduleWithContext(ctx context.Context, s Schedule, o PreviewScheduleOptions) error
PreviewScheduleWithContext previews what an on-call schedule would look like without saving it. Nothing is returned from this method, because the API should return the Schedule as we posted it. If this method call returns no error, the schedule should be valid and can be updated.
func (*Client) RemoveEscalationPolicyFromTeam
deprecated
func (*Client) RemoveEscalationPolicyFromTeamWithContext ¶ added in v1.4.0
func (c *Client) RemoveEscalationPolicyFromTeamWithContext(ctx context.Context, teamID, epID string) error
RemoveEscalationPolicyFromTeamWithContext removes an escalation policy from a team.
func (*Client) RemoveIncidentNotificationSubscribersWithContext ¶ added in v1.7.0
func (c *Client) RemoveIncidentNotificationSubscribersWithContext(ctx context.Context, id string, subscribers []IncidentNotificationSubscriber) (*RemoveIncidentNotificationSubscribersResponse, error)
RemoveIncidentNotificationSubscribersWithContext removes notification subscribers for the specified incident.
func (*Client) RemoveUserFromTeam
deprecated
func (*Client) RemoveUserFromTeamWithContext ¶ added in v1.4.0
RemoveUserFromTeamWithContext removes a user from a team.
func (*Client) ResponderRequest
deprecated
func (c *Client) ResponderRequest(id string, o ResponderRequestOptions) (*ResponderRequestResponse, error)
ResponderRequest will submit a request to have a responder join an incident.
Deprecated: Use ResponderRequestWithContext instead.
func (*Client) ResponderRequestWithContext ¶ added in v1.4.0
func (c *Client) ResponderRequestWithContext(ctx context.Context, id string, o ResponderRequestOptions) (*ResponderRequestResponse, error)
ResponderRequestWithContext will submit a request to have a responder join an incident.
func (*Client) RunResponsePlay ¶ added in v1.5.0
func (c *Client) RunResponsePlay(ctx context.Context, from string, responsePlayID string, incidentID string) error
RunResponsePlay runs a response play on a given incident.
func (*Client) SetDebugFlag ¶ added in v1.5.0
SetDebugFlag sets the DebugFlag of the client, which are just bit flags that tell the client how to behave. They can be bitwise-ORed together to enable multiple behaviors.
func (*Client) SnoozeIncident
deprecated
func (*Client) SnoozeIncidentWithContext ¶ added in v1.4.0
func (c *Client) SnoozeIncidentWithContext(ctx context.Context, id string, duration uint) (*Incident, error)
SnoozeIncidentWithContext sets an incident to not alert for a specified period of time.
func (*Client) TestAbility
deprecated
func (*Client) TestAbilityWithContext ¶ added in v1.4.0
TestAbilityWithContext checks if your account has the given ability.
func (*Client) UpdateAddonWithContext ¶ added in v1.4.0
UpdateAddonWithContext updates an existing add-on.
func (*Client) UpdateBusinessService
deprecated
added in
v1.3.0
func (c *Client) UpdateBusinessService(b *BusinessService) (*BusinessService, error)
UpdateBusinessService updates a business_service.
Deprecated: Use UpdateBusinessServiceWithContext instead.
func (*Client) UpdateBusinessServiceWithContext ¶ added in v1.4.0
func (c *Client) UpdateBusinessServiceWithContext(ctx context.Context, b *BusinessService) (*BusinessService, error)
UpdateBusinessServiceWithContext updates a business_service.
func (*Client) UpdateEscalationPolicy
deprecated
func (c *Client) UpdateEscalationPolicy(id string, e *EscalationPolicy) (*EscalationPolicy, error)
UpdateEscalationPolicy updates an existing escalation policy and its rules.
Deprecated: Use UpdateEscalationPolicyWithContext instead.
func (*Client) UpdateEscalationPolicyWithContext ¶ added in v1.4.0
func (c *Client) UpdateEscalationPolicyWithContext(ctx context.Context, id string, e EscalationPolicy) (*EscalationPolicy, error)
UpdateEscalationPolicyWithContext updates an existing escalation policy and its rules.
func (*Client) UpdateEscalationRule
deprecated
func (c *Client) UpdateEscalationRule(escID string, id string, e *EscalationRule) (*EscalationRule, error)
UpdateEscalationRule updates an existing escalation rule.
Deprecated: Use UpdateEscalationRuleWithContext instead.
func (*Client) UpdateEscalationRuleWithContext ¶ added in v1.4.0
func (c *Client) UpdateEscalationRuleWithContext(ctx context.Context, escID string, id string, e EscalationRule) (*EscalationRule, error)
UpdateEscalationRuleWithContext updates an existing escalation rule.
func (*Client) UpdateExtensionWithContext ¶ added in v1.4.0
func (c *Client) UpdateExtensionWithContext(ctx context.Context, id string, e *Extension) (*Extension, error)
UpdateExtensionWithContext updates an extension by its ID.
func (*Client) UpdateIntegration
deprecated
func (c *Client) UpdateIntegration(serviceID string, i Integration) (*Integration, error)
UpdateIntegration updates an integration belonging to a service.
Deprecated: Use UpdateIntegrationWithContext instead.
func (*Client) UpdateIntegrationWithContext ¶ added in v1.4.0
func (c *Client) UpdateIntegrationWithContext(ctx context.Context, serviceID string, i Integration) (*Integration, error)
UpdateIntegrationWithContext updates an integration belonging to a service.
func (*Client) UpdateMaintenanceWindow
deprecated
func (c *Client) UpdateMaintenanceWindow(m MaintenanceWindow) (*MaintenanceWindow, error)
UpdateMaintenanceWindow updates an existing maintenance window.
Deprecated: Use UpdateMaintenanceWindowWithContext instead.
func (*Client) UpdateMaintenanceWindowWithContext ¶ added in v1.4.0
func (c *Client) UpdateMaintenanceWindowWithContext(ctx context.Context, m MaintenanceWindow) (*MaintenanceWindow, error)
UpdateMaintenanceWindowWithContext updates an existing maintenance window.
func (*Client) UpdateOrchestrationRouterWithContext ¶ added in v1.7.0
func (c *Client) UpdateOrchestrationRouterWithContext(ctx context.Context, id string, e OrchestrationRouter) (*OrchestrationRouter, error)
UpdateOrchestrationRouterWithContext updates the routing rules of an existing event orchestration.
func (*Client) UpdateOrchestrationUnroutedWithContext ¶ added in v1.7.0
func (c *Client) UpdateOrchestrationUnroutedWithContext(ctx context.Context, id string, e OrchestrationUnrouted) (*OrchestrationUnrouted, error)
UpdateOrchestrationUnroutedWithContext updates the routing rules for unrouted events.
func (*Client) UpdateOrchestrationWithContext ¶ added in v1.7.0
func (c *Client) UpdateOrchestrationWithContext(ctx context.Context, id string, e Orchestration) (*Orchestration, error)
UpdateOrchestrationWithContext updates an existing event orchestration.
func (*Client) UpdateResponsePlay ¶ added in v1.5.0
func (c *Client) UpdateResponsePlay(ctx context.Context, rp ResponsePlay) (ResponsePlay, error)
UpdateResponsePlay updates an existing response play.
func (*Client) UpdateRuleset
deprecated
added in
v1.2.0
func (*Client) UpdateRulesetRule
deprecated
added in
v1.2.0
func (c *Client) UpdateRulesetRule(rulesetID, ruleID string, r *RulesetRule) (*RulesetRule, error)
UpdateRulesetRule updates a rule.
Deprecated: Use UpdateRulesetRuleWithContext instead.
func (*Client) UpdateRulesetRuleWithContext ¶ added in v1.4.0
func (c *Client) UpdateRulesetRuleWithContext(ctx context.Context, rulesetID, ruleID string, r *RulesetRule) (*RulesetRule, error)
UpdateRulesetRuleWithContext updates a rule.
func (*Client) UpdateRulesetWithContext ¶ added in v1.4.0
UpdateRulesetWithContext updates a ruleset.
func (*Client) UpdateScheduleWithContext ¶ added in v1.4.0
func (c *Client) UpdateScheduleWithContext(ctx context.Context, id string, s Schedule) (*Schedule, error)
UpdateScheduleWithContext updates an existing on-call schedule.
func (*Client) UpdateService
deprecated
func (*Client) UpdateServiceOrchestrationActiveWithContext ¶ added in v1.7.0
func (c *Client) UpdateServiceOrchestrationActiveWithContext(ctx context.Context, id string, e ServiceOrchestrationActive) (*ServiceOrchestrationActive, error)
UpdateServiceOrchestrationActiveWithContext updates a service orchestration's active status.
func (*Client) UpdateServiceOrchestrationWithContext ¶ added in v1.7.0
func (c *Client) UpdateServiceOrchestrationWithContext(ctx context.Context, id string, e ServiceOrchestration) (*ServiceOrchestration, error)
UpdateServiceOrchestrationWithContext updates the routing rules of a service orchestration.
func (*Client) UpdateServiceRule ¶ added in v1.4.0
func (c *Client) UpdateServiceRule(ctx context.Context, serviceID, ruleID string, rule ServiceRule) (ServiceRule, error)
UpdateServiceRule updates a service rule.
func (*Client) UpdateServiceWithContext ¶ added in v1.4.0
UpdateServiceWithContext updates an existing service.
func (*Client) UpdateStandard ¶ added in v1.8.0
UpdateStandard updates an existing standard.
func (*Client) UpdateTeamWithContext ¶ added in v1.4.0
UpdateTeamWithContext updates an existing team.
func (*Client) UpdateUser
deprecated
func (*Client) UpdateUserContactMethod ¶
func (c *Client) UpdateUserContactMethod(userID string, cm ContactMethod) (*ContactMethod, error)
UpdateUserContactMethod updates an existing user. It's recommended to use UpdateUserContactMethodWithContext instead.
func (*Client) UpdateUserContactMethodWthContext ¶ added in v1.4.0
func (c *Client) UpdateUserContactMethodWthContext(ctx context.Context, userID string, cm ContactMethod) (*ContactMethod, error)
UpdateUserContactMethodWthContext updates an existing user.
func (*Client) UpdateUserNotificationRule
deprecated
added in
v1.2.0
func (c *Client) UpdateUserNotificationRule(userID string, rule NotificationRule) (*NotificationRule, error)
UpdateUserNotificationRule updates a notification rule for a user.
Deprecated: Use UpdateUserNotificationRuleWithContext instead.
func (*Client) UpdateUserNotificationRuleWithContext ¶ added in v1.4.0
func (c *Client) UpdateUserNotificationRuleWithContext(ctx context.Context, userID string, rule NotificationRule) (*NotificationRule, error)
UpdateUserNotificationRuleWithContext updates a notification rule for a user.
type ClientOptions ¶ added in v1.2.0
type ClientOptions func(*Client)
ClientOptions allows for options to be passed into the Client for customization
func WithAPIEndpoint ¶ added in v1.2.0
func WithAPIEndpoint(endpoint string) ClientOptions
WithAPIEndpoint allows for a custom API endpoint to be passed into the the client
func WithOAuth ¶ added in v1.2.0
func WithOAuth() ClientOptions
WithOAuth allows for an OAuth token to be passed into the the client
func WithTerraformProvider ¶ added in v1.8.0
func WithTerraformProvider(version string) ClientOptions
WithTerraformProvider configures the client to be used as the PagerDuty Terraform provider
func WithV2EventsAPIEndpoint ¶ added in v1.4.0
func WithV2EventsAPIEndpoint(endpoint string) ClientOptions
WithV2EventsAPIEndpoint allows for a custom V2 Events API endpoint to be passed into the client
type CommonLogEntryField ¶ added in v1.3.0
type CommonLogEntryField struct { APIObject CreatedAt string `json:"created_at,omitempty"` Agent Agent `json:"agent,omitempty"` Channel Channel `json:"channel,omitempty"` Teams []Team `json:"teams,omitempty"` Contexts []Context `json:"contexts,omitempty"` AcknowledgementTimeout int `json:"acknowledgement_timeout"` EventDetails map[string]string `json:"event_details,omitempty"` Assignees []APIObject `json:"assignees,omitempty"` }
CommonLogEntryField is the list of shared log entry between Incident and LogEntry
type ConditionParameter ¶ added in v1.2.0
type ConditionParameter struct { Path string `json:"path,omitempty"` Value string `json:"value,omitempty"` }
ConditionParameter represents parameters in a rule condition
type ConferenceBridge ¶ added in v1.3.0
type ConferenceBridge struct { // ConferenceNumber is the phone number of the conference call for the // conference bridge. Phone numbers should be formatted like // +1 415-555-1212,,,,1234#, where a comma (,) represents a one-second // wait and pound (#) completes access code input. ConferenceNumber string `json:"conference_number,omitempty"` // ConferenceURL is the URL for the conference bridge. This could be a link // to a video conference or Slack channel. ConferenceURL string `json:"conference_url,omitempty"` }
ConferenceBridge is a struct for the conference_bridge object on an incident
type ContactMethod ¶
type ContactMethod struct { ID string `json:"id,omitempty"` Type string `json:"type,omitempty"` Summary string `json:"summary,omitempty"` Self string `json:"self,omitempty"` HTMLURL string `json:"html_url,omitempty"` Label string `json:"label"` Address string `json:"address"` SendShortEmail bool `json:"send_short_email,omitempty"` SendHTMLEmail bool `json:"send_html_email,omitempty"` Blacklisted bool `json:"blacklisted,omitempty"` CountryCode int `json:"country_code,omitempty"` Enabled bool `json:"enabled,omitempty"` }
ContactMethod is a way of contacting the user.
type CreateIncidentNoteResponse ¶
type CreateIncidentNoteResponse struct {
IncidentNote IncidentNote `json:"note"`
}
CreateIncidentNoteResponse is returned from the API as a response to creating an incident note.
type CreateIncidentOptions ¶
type CreateIncidentOptions struct { // Type is the type of API object this is. // // Deprecated: Because the Type field can only have the value of "incident" // when creating an incident, the CreateIncident* methods always set this // value to "incident". Any other value will be overwritten. This will be // removed in v2.0.0. Type string `json:"type"` Title string `json:"title"` Service *APIReference `json:"service"` Priority *APIReference `json:"priority"` Urgency string `json:"urgency,omitempty"` IncidentKey string `json:"incident_key,omitempty"` Body *APIDetails `json:"body,omitempty"` EscalationPolicy *APIReference `json:"escalation_policy,omitempty"` Assignments []Assignee `json:"assignments,omitempty"` ConferenceBridge *ConferenceBridge `json:"conference_bridge,omitempty"` }
CreateIncidentOptions is the structure used when POSTing to the CreateIncident API endpoint.
type DebugFlag ¶ added in v1.5.0
type DebugFlag uint64
DebugFlag represents a set of debug bit flags that can be bitwise-ORed together to configure the different behaviors. This allows us to expand functionality in the future without introducing breaking changes.
const ( // DebugDisabled disables all debug behaviors. DebugDisabled DebugFlag = 0 // DebugCaptureLastRequest captures the last HTTP request made to the API // (if there was one) and makes it available via the LastAPIRequest() // method. // // This may increase memory usage / GC, as we'll be making a copy of the // full HTTP request body on each request and capturing it for inspection. DebugCaptureLastRequest DebugFlag = 1 << 0 // DebugCaptureLastResponse captures the last HTTP response from the API (if // there was one) and makes it available via the LastAPIResponse() method. // // This may increase memory usage / GC, as we'll be making a copy of the // full HTTP response body on each request and capturing it for inspection. DebugCaptureLastResponse DebugFlag = 1 << 1 )
type Details ¶ added in v1.5.0
type Details struct { Resource APIObject `json:"resource,omitempty"` // A set of fields that have been affected. // The fields that have not been affected MAY be returned. Fields []Field `json:"fields,omitempty"` // A set of references that have been affected. References []Reference `json:"references,omitempty"` }
Details contain additional information about the action or the resource that has been audited.
type EscalationPolicy ¶
type EscalationPolicy struct { APIObject Name string `json:"name,omitempty"` EscalationRules []EscalationRule `json:"escalation_rules,omitempty"` Services []APIObject `json:"services,omitempty"` NumLoops uint `json:"num_loops,omitempty"` Teams []APIReference `json:"teams"` Description string `json:"description,omitempty"` OnCallHandoffNotifications string `json:"on_call_handoff_notifications,omitempty"` }
EscalationPolicy is a collection of escalation rules.
type EscalationRule ¶
type EscalationRule struct { ID string `json:"id,omitempty"` Delay uint `json:"escalation_delay_in_minutes,omitempty"` Targets []APIObject `json:"targets"` }
EscalationRule is a rule for an escalation policy to trigger.
type Event ¶
type Event struct { ServiceKey string `json:"service_key"` Type string `json:"event_type"` IncidentKey string `json:"incident_key,omitempty"` Description string `json:"description"` Client string `json:"client,omitempty"` ClientURL string `json:"client_url,omitempty"` Details interface{} `json:"details,omitempty"` Contexts []interface{} `json:"contexts,omitempty"` }
Event stores data for problem reporting, acknowledgement, and resolution.
type EventResponse ¶
type EventResponse struct { Status string `json:"status"` Message string `json:"message"` IncidentKey string `json:"incident_key"` HTTPStatus int }
EventResponse is the data returned from the CreateEvent API endpoint.
func CreateEvent ¶
func CreateEvent(e Event) (*EventResponse, error)
CreateEvent sends PagerDuty an event to trigger, acknowledge, or resolve a problem. If you need to provide a custom HTTP client, please use CreateEventWithHTTPClient.
func CreateEventWithHTTPClient ¶
func CreateEventWithHTTPClient(e Event, client HTTPClient) (*EventResponse, error)
CreateEventWithHTTPClient sends PagerDuty an event to trigger, acknowledge, or resolve a problem. This function accepts a custom HTTP Client, if the default one used by this package doesn't fit your needs. If you don't need a custom HTTP client, please use CreateEvent instead.
type EventsAPIV2Error ¶ added in v1.6.0
type EventsAPIV2Error struct { // StatusCode is the HTTP response status code. StatusCode int `json:"-"` // APIError represents the object returned by the API when an error occurs, // which includes messages that should hopefully provide useful context // to the end user. // // If the API response did not contain an error object, the .Valid field of // APIError will be false. If .Valid is true, the .ErrorObject field is // valid and should be consulted. APIError NullEventsAPIV2ErrorObject // contains filtered or unexported fields }
EventsAPIV2Error represents the error response received when an Events API V2 call fails. The HTTP response code is set inside of the StatusCode field, with the EventsAPIV2Error field being the wrapper around the JSON error object returned from the Events API V2.
This type also provides some helper methods like .BadRequest(), .RateLimited(), and .Temporary() to help callers reason about how to handle the error.
func (EventsAPIV2Error) APITimeout ¶ added in v1.6.0
func (e EventsAPIV2Error) APITimeout() bool
APITimeout returns whether whether the response had a status of 408, indicating there was a request timeout on PagerDuty's side. This error is considered temporary, and so the request should be retried.
Please note, this does not returnn true if the Go context.Context deadline was exceeded when making the request.
func (EventsAPIV2Error) BadRequest ¶ added in v1.6.0
func (e EventsAPIV2Error) BadRequest() bool
BadRequest returns whether the event request was rejected by PagerDuty as an incorrect or invalid event structure.
func (EventsAPIV2Error) Error ¶ added in v1.6.0
func (e EventsAPIV2Error) Error() string
Error satisfies the error interface, and should contain the StatusCode, APIError.Message, APIError.ErrorObject.Status, and APIError.Errors.
func (EventsAPIV2Error) RateLimited ¶ added in v1.6.0
func (e EventsAPIV2Error) RateLimited() bool
RateLimited returns whether the response had a status of 429, and as such the client is rate limited. The PagerDuty rate limits should reset once per minute, and for the REST API they are an account-wide rate limit (not per API key or IP).
func (EventsAPIV2Error) Temporary ¶ added in v1.6.0
func (e EventsAPIV2Error) Temporary() bool
Temporary returns whether it was a temporary error, one of which is a RateLimited error.
func (*EventsAPIV2Error) UnmarshalJSON ¶ added in v1.6.0
func (e *EventsAPIV2Error) UnmarshalJSON(data []byte) error
UnmarshalJSON satisfies encoding/json.Unmarshaler.
type EventsAPIV2ErrorObject ¶ added in v1.6.0
type EventsAPIV2ErrorObject struct { Status string `json:"status,omitempty"` Message string `json:"message,omitempty"` // Errors is likely to be empty, with the relevant error presented via the // Status field instead. Errors []string `json:"errors,omitempty"` }
EventsAPIV2ErrorObject represents the object returned by the Events V2 API when an error occurs. This includes messages that should hopefully provide useful context to the end user.
type ExecutionContext ¶ added in v1.5.0
type ExecutionContext struct { RequestID string `json:"request_id,omitempty"` RemoteAddress string `json:"remote_address,omitempty"` }
ExecutionContext contains information about the action execution context.
type Extension ¶
type Extension struct { APIObject Name string `json:"name"` EndpointURL string `json:"endpoint_url,omitempty"` ExtensionObjects []APIObject `json:"extension_objects"` ExtensionSchema APIObject `json:"extension_schema"` Config interface{} `json:"config"` TemporarilyDisabled bool `json:"temporarily_disabled,omitempty"` }
Extension represents a single PagerDuty extension. These are addtional features to be used as part of the incident management process.
type ExtensionSchema ¶
type ExtensionSchema struct { APIObject IconURL string `json:"icon_url"` LogoURL string `json:"logo_url"` Label string `json:"label"` Key string `json:"key"` Description string `json:"description"` GuideURL string `json:"guide_url"` SendTypes []string `json:"send_types"` URL string `json:"url"` }
ExtensionSchema represnts the object presented by the API for each extension schema.
type Field ¶ added in v1.5.0
type Field struct { Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` Value string `json:"value,omitempty"` BeforeValue string `json:"before_value,omitempty"` }
Field contains information about the resource field that have been affected.
type FirstTriggerLogEntry ¶ added in v1.3.0
type FirstTriggerLogEntry struct { CommonLogEntryField Incident APIObject `json:"incident,omitempty"` }
FirstTriggerLogEntry is the first LogEntry
type GetCurrentUserOptions ¶
type GetCurrentUserOptions struct {
Includes []string `url:"include,omitempty,brackets"`
}
GetCurrentUserOptions is the data structure used when calling the GetCurrentUser API endpoint.
type GetEscalationPolicyOptions ¶
type GetEscalationPolicyOptions struct {
Includes []string `url:"include,omitempty,brackets"`
}
GetEscalationPolicyOptions is the data structure used when calling the GetEscalationPolicy API endpoint.
type GetEscalationRuleOptions ¶
type GetEscalationRuleOptions struct {
Includes []string `url:"include,omitempty,brackets"`
}
GetEscalationRuleOptions is the data structure used when calling the GetEscalationRule API endpoint.
type GetIntegrationOptions ¶
type GetIntegrationOptions struct {
Includes []string `url:"include,omitempty,brackets"`
}
GetIntegrationOptions is the data structure used when calling the GetIntegration API endpoint.
type GetLogEntryOptions ¶
type GetLogEntryOptions struct { TimeZone string `url:"time_zone,omitempty"` Includes []string `url:"include,omitempty,brackets"` }
GetLogEntryOptions is the data structure used when calling the GetLogEntry API endpoint.
type GetMaintenanceWindowOptions ¶
type GetMaintenanceWindowOptions struct {
Includes []string `url:"include,omitempty,brackets"`
}
GetMaintenanceWindowOptions is the data structure used when calling the GetMaintenanceWindow API endpoint.
type GetOrchestrationOptions ¶ added in v1.7.0
type GetOrchestrationOptions struct { }
GetOrchestrationOptions is the data structure used when calling the GetOrchestration API endpoint.
type GetOrchestrationRouterOptions ¶ added in v1.7.0
type GetOrchestrationRouterOptions struct { }
GetOrchestrationRouterOptions is the data structure used when calling the GetOrchestrationRouter API endpoint.
type GetOrchestrationUnroutedOptions ¶ added in v1.7.0
type GetOrchestrationUnroutedOptions struct { }
GetOrchestrationUnroutedOptions is the data structure used when calling the GetOrchestrationUnrouted API endpoint.
type GetScheduleOptions ¶
type GetScheduleOptions struct { TimeZone string `url:"time_zone,omitempty"` Since string `url:"since,omitempty"` Until string `url:"until,omitempty"` }
GetScheduleOptions is the data structure used when calling the GetSchedule API endpoint.
type GetServiceOptions ¶
type GetServiceOptions struct {
Includes []string `url:"include,brackets,omitempty"`
}
GetServiceOptions is the data structure used when calling the GetService API endpoint.
type GetServiceOrchestrationOptions ¶ added in v1.7.0
type GetServiceOrchestrationOptions struct { }
GetServiceOrchestrationOptions is the data structure used when calling the GetServiceOrchestration API endpoint.
type GetUserOptions ¶
type GetUserOptions struct {
Includes []string `url:"include,omitempty,brackets"`
}
GetUserOptions is the data structure used when calling the GetUser API endpoint.
type HTTPClient ¶
HTTPClient is an interface which declares the functionality we need from an HTTP client. This is to allow consumers to provide their own HTTP client as needed, without restricting them to only using *http.Client.
type Incident ¶
type Incident struct { APIObject IncidentNumber uint `json:"incident_number,omitempty"` Title string `json:"title,omitempty"` Description string `json:"description,omitempty"` CreatedAt string `json:"created_at,omitempty"` PendingActions []PendingAction `json:"pending_actions,omitempty"` IncidentKey string `json:"incident_key,omitempty"` Service APIObject `json:"service,omitempty"` Assignments []Assignment `json:"assignments,omitempty"` Acknowledgements []Acknowledgement `json:"acknowledgements,omitempty"` LastStatusChangeAt string `json:"last_status_change_at,omitempty"` LastStatusChangeBy APIObject `json:"last_status_change_by,omitempty"` FirstTriggerLogEntry FirstTriggerLogEntry `json:"first_trigger_log_entry,omitempty"` EscalationPolicy APIObject `json:"escalation_policy,omitempty"` Teams []APIObject `json:"teams,omitempty"` Priority *Priority `json:"priority,omitempty"` Urgency string `json:"urgency,omitempty"` Status string `json:"status,omitempty"` ResolveReason ResolveReason `json:"resolve_reason,omitempty"` AlertCounts AlertCounts `json:"alert_counts,omitempty"` Body IncidentBody `json:"body,omitempty"` IsMergeable bool `json:"is_mergeable,omitempty"` ConferenceBridge *ConferenceBridge `json:"conference_bridge,omitempty"` AssignedVia string `json:"assigned_via,omitempty"` Occurrence *Occurrence `json:"occurrence,omitempty"` IncidentResponders []IncidentResponders `json:"incidents_responders,omitempty"` ResponderRequests []ResponderRequest `json:"responder_requests,omitempty"` ResolvedAt string `json:"resolved_at,omitempty"` UpdatedAt string `json:"updated_at,omitempty"` }
Incident is a normalized, de-duplicated event generated by a PagerDuty integration.
type IncidentAlert ¶
type IncidentAlert struct { APIObject CreatedAt string `json:"created_at,omitempty"` Status string `json:"status,omitempty"` AlertKey string `json:"alert_key,omitempty"` Service APIObject `json:"service,omitempty"` Body map[string]interface{} `json:"body,omitempty"` Incident APIReference `json:"incident,omitempty"` Suppressed bool `json:"suppressed,omitempty"` Severity string `json:"severity,omitempty"` Integration APIObject `json:"integration,omitempty"` }
IncidentAlert is a alert for the specified incident.
type IncidentAlertList ¶ added in v1.3.0
type IncidentAlertList struct {
Alerts []IncidentAlert `json:"alerts,omitempty"`
}
IncidentAlertList is the generic structure of a list of alerts
type IncidentAlertResponse ¶ added in v1.3.0
type IncidentAlertResponse struct {
IncidentAlert *IncidentAlert `json:"alert,omitempty"`
}
IncidentAlertResponse is the response of a sincle incident alert
type IncidentBody ¶
type IncidentBody struct { Type string `json:"type,omitempty"` Details string `json:"details,omitempty"` }
IncidentBody is the datastructure containing data describing the incident.
type IncidentDetails ¶ added in v1.2.0
type IncidentDetails struct { APIObject IncidentNumber int `json:"incident_number"` Title string `json:"title"` CreatedAt time.Time `json:"created_at"` Status string `json:"status"` IncidentKey *string `json:"incident_key"` PendingActions []PendingAction `json:"pending_actions"` Service Service `json:"service"` Assignments []Assignment `json:"assignments"` Acknowledgements []Acknowledgement `json:"acknowledgements"` LastStatusChangeAt time.Time `json:"last_status_change_at"` LastStatusChangeBy APIObject `json:"last_status_change_by"` FirstTriggerLogEntry APIObject `json:"first_trigger_log_entry"` EscalationPolicy APIObject `json:"escalation_policy"` Teams []APIObject `json:"teams"` Priority Priority `json:"priority"` Urgency string `json:"urgency"` ResolveReason *string `json:"resolve_reason"` AlertCounts AlertCounts `json:"alert_counts"` Metadata interface{} `json:"metadata"` // Alerts is the list of alerts within this incident. Each item in the slice // is not fully hydrated, so only the AlertKey field will be set. Alerts []IncidentAlert `json:"alerts,omitempty"` // Description is deprecated, use Title instead. Description string `json:"description"` }
IncidentDetails contains a representation of the incident associated with the action that caused this webhook message
type IncidentNote ¶
type IncidentNote struct { ID string `json:"id,omitempty"` User APIObject `json:"user,omitempty"` Content string `json:"content,omitempty"` CreatedAt string `json:"created_at,omitempty"` }
IncidentNote is a note for the specified incident.
type IncidentNotificationSubscriber ¶ added in v1.7.0
type IncidentNotificationSubscriber struct { SubscriberID string `json:"subscriber_id"` SubscriberType string `json:"subscriber_type"` }
IncidentNotificationSubscriber is a Notification Subscriber on a Incident.
type IncidentNotificationSubscriberVia ¶ added in v1.7.0
type IncidentNotificationSubscriptionWithContext ¶ added in v1.7.0
type IncidentNotificationSubscriptionWithContext struct { IncidentNotificationSubscriber HasIndirectSubscription bool `json:"has_indirect_subscription,omitempty"` SubscribedVia []IncidentNotificationSubscriberVia `json:"subscribed_via,omitempty"` SubscribableID string `json:"subscribable_id,omitempty"` SubscribableType string `json:"subscribable_type,omitempty"` AccountID string `json:"account_id,omitempty"` Result string `json:"result,omitempty"` }
IncidentNotificationSubscriptionWithContext contains extra context returned from the API.
type IncidentResponders ¶
type IncidentResponders struct { State string `json:"state"` User APIObject `json:"user"` Incident APIObject `json:"incident"` UpdatedAt string `json:"updated_at"` Message string `json:"message"` Requester APIObject `json:"requester"` RequestedAt string `json:"requested_at"` }
IncidentResponders contains details about responders to an incident.
type IncidentStatusUpdate ¶ added in v1.5.0
type IncidentStatusUpdate struct { ID string `json:"id"` Message string `json:"message"` CreatedAt string `json:"created_at"` Sender APIObject `json:"sender"` }
IncidentStatusUpdate is a status update for the specified incident.
type IncidentUrgencyRule ¶
type IncidentUrgencyRule struct { Type string `json:"type,omitempty"` Urgency string `json:"urgency,omitempty"` DuringSupportHours *IncidentUrgencyType `json:"during_support_hours,omitempty"` OutsideSupportHours *IncidentUrgencyType `json:"outside_support_hours,omitempty"` }
IncidentUrgencyRule is the default urgency for new incidents.
type IncidentUrgencyType ¶
type IncidentUrgencyType struct { Type string `json:"type,omitempty"` Urgency string `json:"urgency,omitempty"` }
IncidentUrgencyType are the incidents urgency during or outside support hours.
type InlineModel ¶
InlineModel represents when a scheduled action will occur.
type Integration ¶
type Integration struct { APIObject Name string `json:"name,omitempty"` Service *APIObject `json:"service,omitempty"` CreatedAt string `json:"created_at,omitempty"` Vendor *APIObject `json:"vendor,omitempty"` IntegrationKey string `json:"integration_key,omitempty"` IntegrationEmail string `json:"integration_email,omitempty"` EmailFilterMode IntegrationEmailFilterMode `json:"email_filter_mode,omitempty"` EmailFilters []IntegrationEmailFilterRule `json:"email_filters,omitempty"` }
Integration is an endpoint (like Nagios, email, or an API call) that generates events, which are normalized and de-duplicated by PagerDuty to create incidents.
type IntegrationEmailFilterMode ¶ added in v1.5.0
type IntegrationEmailFilterMode uint8
IntegrationEmailFilterMode is a type to respresent the different filter modes for a Generic Email Integration. This defines how the email filter rules (IntegrationEmailFilterRuleMode) are used when emails are ingested.
const ( // EmailFilterModeInvalid only exists to make it harder to use values of // this type incorrectly. Please instead use one of EmailFilterModeAll, // EmailFilterModeOr, EmailFilterModeAnd // // This value should not get marshaled to JSON by the encoding/json package. EmailFilterModeInvalid IntegrationEmailFilterMode = iota // EmailFilterModeAll means that all incoming email will be be accepted, and // no email rules will be considered. EmailFilterModeAll // EmailFilterModeOr instructs the email filtering system to accept the // email if one or more rules match the message. EmailFilterModeOr // EmailFilterModeAnd instructs the email filtering system to accept the // email only if all of the rules match the message. EmailFilterModeAnd )
func (IntegrationEmailFilterMode) MarshalJSON ¶ added in v1.5.0
func (i IntegrationEmailFilterMode) MarshalJSON() ([]byte, error)
MarshalJSON satisfies json.Marshaler
func (IntegrationEmailFilterMode) String ¶ added in v1.5.0
func (i IntegrationEmailFilterMode) String() string
func (*IntegrationEmailFilterMode) UnmarshalJSON ¶ added in v1.5.0
func (i *IntegrationEmailFilterMode) UnmarshalJSON(b []byte) error
UnmarshalJSON satisfies json.Unmarshaler
type IntegrationEmailFilterRule ¶ added in v1.5.0
type IntegrationEmailFilterRule struct { // SubjectMode and SubjectRegex control the behaviors of how this filter // matches the subject of an inbound email. SubjectMode IntegrationEmailFilterRuleMode `json:"subject_mode,omitempty"` SubjectRegex *string `json:"subject_regex,omitempty"` // BodyMode and BodyRegex control the behaviors of how this filter matches // the body of an inbound email. BodyMode IntegrationEmailFilterRuleMode `json:"body_mode,omitempty"` BodyRegex *string `json:"body_regex,omitempty"` FromEmailMode IntegrationEmailFilterRuleMode `json:"from_email_mode,omitempty"` FromEmailRegex *string `json:"from_email_regex,omitempty"` }
IntegrationEmailFilterRule represents a single email filter rule for an integration of type generic_email_inbound_integration. Information about how to configure email rules can be found here: https://support.pagerduty.com/docs/email-management-filters-and-rules.
func (*IntegrationEmailFilterRule) UnmarshalJSON ¶ added in v1.5.0
func (i *IntegrationEmailFilterRule) UnmarshalJSON(b []byte) error
UnmarshalJSON satisfies json.Unmarshaler.
type IntegrationEmailFilterRuleMode ¶ added in v1.5.0
type IntegrationEmailFilterRuleMode uint8
IntegrationEmailFilterRuleMode is a type to represent the different matching modes of Generic Email Integration Filer Rules without consumers of this package needing to be intimately familiar with the specifics of the REST API.
const ( // EmailFilterRuleModeInvalid only exists to make it harder to use values of this // type incorrectly. Please instead use one of EmailFilterRuleModeAlways, // EmailFilterRuleModeMatch, or EmailFilterRuleModeNoMatch. // // This value should not get marshaled to JSON by the encoding/json package. EmailFilterRuleModeInvalid IntegrationEmailFilterRuleMode = iota // EmailFilterRuleModeAlways means that the specific value can be anything. Any // associated regular expression will be ignored. EmailFilterRuleModeAlways // EmailFilterRuleModeMatch means that the associated regular expression must // match the associated value. EmailFilterRuleModeMatch // EmailFilterRuleModeNoMatch means that the associated regular expression must NOT // match the associated value. EmailFilterRuleModeNoMatch )
func (IntegrationEmailFilterRuleMode) MarshalJSON ¶ added in v1.5.0
func (i IntegrationEmailFilterRuleMode) MarshalJSON() ([]byte, error)
MarshalJSON satisfies json.Marshaler
func (IntegrationEmailFilterRuleMode) String ¶ added in v1.5.0
func (i IntegrationEmailFilterRuleMode) String() string
func (*IntegrationEmailFilterRuleMode) UnmarshalJSON ¶ added in v1.5.0
func (i *IntegrationEmailFilterRuleMode) UnmarshalJSON(b []byte) error
UnmarshalJSON satisfies json.Unmarshaler
type License ¶ added in v1.8.0
type License struct { APIObject Name string `json:"name"` Description string `json:"description"` ValidRoles []string `json:"valid_roles"` RoleGroup string `json:"role_group"` Summary string `json:"summary"` CurrentValue int `json:"current_value"` AllocationsAvailable int `json:"allocations_available"` }
type LicenseAllocated ¶ added in v1.8.0
type LicenseAllocation ¶ added in v1.8.0
type LicenseAllocation struct { AllocatedAt string `json:"allocated_at"` User APIObject License LicenseAllocated `json:"license"` }
type ListAbilityResponse ¶
type ListAbilityResponse struct {
Abilities []string `json:"abilities"`
}
ListAbilityResponse is the response when calling the ListAbility API endpoint.
type ListAddonOptions ¶
type ListAddonOptions struct { // Limit is the pagination parameter that limits the number of results per // page. PagerDuty defaults this value to 25 if omitted, and sets an upper // bound of 100. Limit uint `url:"limit,omitempty"` // Offset is the pagination parameter that specifies the offset at which to // start pagination results. When trying to request the next page of // results, the new Offset value should be currentOffset + Limit. Offset uint `url:"offset,omitempty"` // Total is the pagination parameter to request that the API return the // total count of items in the response. If this field is omitted or set to // false, the total number of results will not be sent back from the PagerDuty API. // // Setting this to true will slow down the API response times, and so it's // recommended to omit it unless you've a specific reason for wanting the // total count of items in the collection. Total bool `url:"total,omitempty"` Includes []string `url:"include,omitempty,brackets"` ServiceIDs []string `url:"service_ids,omitempty,brackets"` Filter string `url:"filter,omitempty"` }
ListAddonOptions are the options available when calling the ListAddons API endpoint.
type ListAddonResponse ¶
type ListAddonResponse struct { APIListObject Addons []Addon `json:"addons"` }
ListAddonResponse is the response when calling the ListAddons API endpoint.
type ListAlertsResponse ¶
type ListAlertsResponse struct { APIListObject Alerts []IncidentAlert `json:"alerts,omitempty"` }
ListAlertsResponse is the response structure when calling the ListAlert API endpoint.
type ListAuditRecordsOptions ¶ added in v1.5.0
type ListAuditRecordsOptions struct { Actions []string `url:"actions,omitempty,brackets"` ActorID string `url:"actor_id,omitempty"` ActorType string `url:"actor_type,omitempty"` Cursor string `url:"cursor,omitempty"` Limit uint `url:"limit,omitempty"` MethodTruncatedToken string `url:"method_truncated_token,omitempty"` MethodType string `url:"method_type,omitempty"` RootResourcesTypes []string `url:"root_resources_types,omitempty,brackets"` Since string `url:"since,omitempty"` Until string `url:"until,omitempty"` }
ListAuditRecordsOptions is the data structure used when calling the ListAuditRecords API endpoint.
type ListAuditRecordsResponse ¶ added in v1.5.0
type ListAuditRecordsResponse struct { Records []AuditRecord `json:"records,omitempty"` // ResponseMetadata is not a required field in the pagerduty API response, // using a pointer allows us to not marshall an empty ResponseMetaData struct // into a JSON. ResponseMetaData *ResponseMetadata `json:"response_metadata,omitempty"` Limit uint `json:"limit,omitempty"` // NextCursor is an opaque string that will deliver the next set of results // when provided as the cursor parameter in a subsequent request. // A null value for this field indicates that there are no additional results. // We use a pointer here to marshall the string value into null // when NextCursor is an empty string. NextCursor *string `json:"next_cursor"` }
ListAuditRecordsResponse is the response data received when calling the ListAuditRecords API endpoint.
type ListBusinessServiceOptions ¶ added in v1.3.0
type ListBusinessServiceOptions struct { // Limit is the pagination parameter that limits the number of results per // page. PagerDuty defaults this value to 25 if omitted, and sets an upper // bound of 100. Limit uint `url:"limit,omitempty"` // Offset is the pagination parameter that specifies the offset at which to // start pagination results. When trying to request the next page of // results, the new Offset value should be currentOffset + Limit. Offset uint `url:"offset,omitempty"` // Total is the pagination parameter to request that the API return the // total count of items in the response. If this field is omitted or set to // false, the total number of results will not be sent back from the PagerDuty API. // // Setting this to true will slow down the API response times, and so it's // recommended to omit it unless you've a specific reason for wanting the // total count of items in the collection. Total bool `url:"total,omitempty"` }
ListBusinessServiceOptions is the data structure used when calling the ListBusinessServices API endpoint.
type ListBusinessServicesResponse ¶ added in v1.3.0
type ListBusinessServicesResponse struct { Total uint `json:"total,omitempty"` BusinessServices []*BusinessService `json:"business_services,omitempty"` Offset uint `json:"offset,omitempty"` More bool `json:"more,omitempty"` Limit uint `json:"limit,omitempty"` }
ListBusinessServicesResponse represents a list response of business services.
type ListContactMethodsResponse ¶
type ListContactMethodsResponse struct { APIListObject ContactMethods []ContactMethod `json:"contact_methods"` }
ListContactMethodsResponse is the data structure returned from calling the GetUserContactMethod API endpoint.
type ListEPResponse ¶ added in v1.4.0
type ListEPResponse struct { APIListObject EscalationPolicies []*APIObject `json:"escalation_policies,omitempty"` }
ListEPResponse is the structure used to list escalation policies assigned a given tag
type ListEscalationPoliciesOptions ¶
type ListEscalationPoliciesOptions struct { // Limit is the pagination parameter that limits the number of results per // page. PagerDuty defaults this value to 25 if omitted, and sets an upper // bound of 100. Limit uint `url:"limit,omitempty"` // Offset is the pagination parameter that specifies the offset at which to // start pagination results. When trying to request the next page of // results, the new Offset value should be currentOffset + Limit. Offset uint `url:"offset,omitempty"` // Total is the pagination parameter to request that the API return the // total count of items in the response. If this field is omitted or set to // false, the total number of results will not be sent back from the PagerDuty API. // // Setting this to true will slow down the API response times, and so it's // recommended to omit it unless you've a specific reason for wanting the // total count of items in the collection. Total bool `url:"total,omitempty"` Query string `url:"query,omitempty"` UserIDs []string `url:"user_ids,omitempty,brackets"` TeamIDs []string `url:"team_ids,omitempty,brackets"` Includes []string `url:"include,omitempty,brackets"` SortBy string `url:"sort_by,omitempty"` }
ListEscalationPoliciesOptions is the data structure used when calling the ListEscalationPolicies API endpoint.
type ListEscalationPoliciesResponse ¶
type ListEscalationPoliciesResponse struct { APIListObject EscalationPolicies []EscalationPolicy `json:"escalation_policies"` }
ListEscalationPoliciesResponse is the data structure returned from calling the ListEscalationPolicies API endpoint.
type ListEscalationRulesResponse ¶
type ListEscalationRulesResponse struct { APIListObject EscalationRules []EscalationRule `json:"escalation_rules"` }
ListEscalationRulesResponse represents the data structure returned when calling the ListEscalationRules API endpoint.
type ListExtensionOptions ¶
type ListExtensionOptions struct { // Limit is the pagination parameter that limits the number of results per // page. PagerDuty defaults this value to 25 if omitted, and sets an upper // bound of 100. Limit uint `url:"limit,omitempty"` // Offset is the pagination parameter that specifies the offset at which to // start pagination results. When trying to request the next page of // results, the new Offset value should be currentOffset + Limit. Offset uint `url:"offset,omitempty"` // Total is the pagination parameter to request that the API return the // total count of items in the response. If this field is omitted or set to // false, the total number of results will not be sent back from the PagerDuty API. // // Setting this to true will slow down the API response times, and so it's // recommended to omit it unless you've a specific reason for wanting the // total count of items in the collection. Total bool `url:"total,omitempty"` ExtensionObjectID string `url:"extension_object_id,omitempty"` ExtensionSchemaID string `url:"extension_schema_id,omitempty"` Query string `url:"query,omitempty"` }
ListExtensionOptions are the options to use when listing extensions.
type ListExtensionResponse ¶
type ListExtensionResponse struct { APIListObject Extensions []Extension `json:"extensions"` }
ListExtensionResponse represents the single response from the PagerDuty API when listing extensions.
type ListExtensionSchemaOptions ¶
type ListExtensionSchemaOptions struct { // Limit is the pagination parameter that limits the number of results per // page. PagerDuty defaults this value to 25 if omitted, and sets an upper // bound of 100. Limit uint `url:"limit,omitempty"` // Offset is the pagination parameter that specifies the offset at which to // start pagination results. When trying to request the next page of // results, the new Offset value should be currentOffset + Limit. Offset uint `url:"offset,omitempty"` // Total is the pagination parameter to request that the API return the // total count of items in the response. If this field is omitted or set to // false, the total number of results will not be sent back from the PagerDuty API. // // Setting this to true will slow down the API response times, and so it's // recommended to omit it unless you've a specific reason for wanting the // total count of items in the collection. Total bool `url:"total,omitempty"` }
ListExtensionSchemaOptions are the options to send with the ListExtensionSchema reques(s).
type ListExtensionSchemaResponse ¶
type ListExtensionSchemaResponse struct { APIListObject ExtensionSchemas []ExtensionSchema `json:"extension_schemas"` }
ListExtensionSchemaResponse is the object presented in response to the request to list all extension schemas.
type ListIncidentAlertsOptions ¶ added in v1.2.0
type ListIncidentAlertsOptions struct { // Limit is the pagination parameter that limits the number of results per // page. PagerDuty defaults this value to 25 if omitted, and sets an upper // bound of 100. Limit uint `url:"limit,omitempty"` // Offset is the pagination parameter that specifies the offset at which to // start pagination results. When trying to request the next page of // results, the new Offset value should be currentOffset + Limit. Offset uint `url:"offset,omitempty"` // Total is the pagination parameter to request that the API return the // total count of items in the response. If this field is omitted or set to // false, the total number of results will not be sent back from the PagerDuty API. // // Setting this to true will slow down the API response times, and so it's // recommended to omit it unless you've a specific reason for wanting the // total count of items in the collection. Total bool `url:"total,omitempty"` Statuses []string `url:"statuses,omitempty,brackets"` SortBy string `url:"sort_by,omitempty"` Includes []string `url:"include,omitempty,brackets"` }
ListIncidentAlertsOptions is the structure used when passing parameters to the ListIncidentAlerts API endpoint.
type ListIncidentLogEntriesOptions ¶
type ListIncidentLogEntriesOptions struct { // Limit is the pagination parameter that limits the number of results per // page. PagerDuty defaults this value to 25 if omitted, and sets an upper // bound of 100. Limit uint `url:"limit,omitempty"` // Offset is the pagination parameter that specifies the offset at which to // start pagination results. When trying to request the next page of // results, the new Offset value should be currentOffset + Limit. Offset uint `url:"offset,omitempty"` // Total is the pagination parameter to request that the API return the // total count of items in the response. If this field is omitted or set to // false, the total number of results will not be sent back from the PagerDuty API. // // Setting this to true will slow down the API response times, and so it's // recommended to omit it unless you've a specific reason for wanting the // total count of items in the collection. Total bool `url:"total,omitempty"` Includes []string `url:"include,omitempty,brackets"` IsOverview bool `url:"is_overview,omitempty"` TimeZone string `url:"time_zone,omitempty"` Since string `url:"since,omitempty"` Until string `url:"until,omitempty"` }
ListIncidentLogEntriesOptions is the structure used when passing parameters to the ListIncidentLogEntries API endpoint.
type ListIncidentLogEntriesResponse ¶
type ListIncidentLogEntriesResponse struct { APIListObject LogEntries []LogEntry `json:"log_entries,omitempty"` }
ListIncidentLogEntriesResponse is the response structure when calling the ListIncidentLogEntries API endpoint.
type ListIncidentNotificationSubscribersResponse ¶ added in v1.7.0
type ListIncidentNotificationSubscribersResponse struct { APIListObject Subscribers []IncidentNotificationSubscriptionWithContext `json:"subscribers,omitempty"` AccountID string `json:"account_id,omitempty"` }
ListIncidentNotificationSubscribersResponse is the response structure when calling the ListNotificationSubscribers API endpoint.
type ListIncidentsOptions ¶
type ListIncidentsOptions struct { // Limit is the pagination parameter that limits the number of results per // page. PagerDuty defaults this value to 25 if omitted, and sets an upper // bound of 100. Limit uint `url:"limit,omitempty"` // Offset is the pagination parameter that specifies the offset at which to // start pagination results. When trying to request the next page of // results, the new Offset value should be currentOffset + Limit. Offset uint `url:"offset,omitempty"` // Total is the pagination parameter to request that the API return the // total count of items in the response. If this field is omitted or set to // false, the total number of results will not be sent back from the PagerDuty API. // // Setting this to true will slow down the API response times, and so it's // recommended to omit it unless you've a specific reason for wanting the // total count of items in the collection. Total bool `url:"total,omitempty"` Since string `url:"since,omitempty"` Until string `url:"until,omitempty"` DateRange string `url:"date_range,omitempty"` Statuses []string `url:"statuses,omitempty,brackets"` IncidentKey string `url:"incident_key,omitempty"` ServiceIDs []string `url:"service_ids,omitempty,brackets"` TeamIDs []string `url:"team_ids,omitempty,brackets"` UserIDs []string `url:"user_ids,omitempty,brackets"` Urgencies []string `url:"urgencies,omitempty,brackets"` TimeZone string `url:"time_zone,omitempty"` SortBy string `url:"sort_by,omitempty"` Includes []string `url:"include,omitempty,brackets"` }
ListIncidentsOptions is the structure used when passing parameters to the ListIncident API endpoint.
type ListIncidentsResponse ¶
type ListIncidentsResponse struct { APIListObject Incidents []Incident `json:"incidents,omitempty"` }
ListIncidentsResponse is the response structure when calling the ListIncident API endpoint.
type ListLicenseAllocationsOptions ¶ added in v1.8.0
type ListLicenseAllocationsResponse ¶ added in v1.8.0
type ListLicenseAllocationsResponse struct { APIListObject LicenseAllocations []LicenseAllocation `json:"license_allocations"` }
type ListLicensesResponse ¶ added in v1.8.0
type ListLicensesResponse struct {
Licenses []License `json:"licenses"`
}
type ListLogEntriesOptions ¶
type ListLogEntriesOptions struct { // Limit is the pagination parameter that limits the number of results per // page. PagerDuty defaults this value to 25 if omitted, and sets an upper // bound of 100. Limit uint `url:"limit,omitempty"` // Offset is the pagination parameter that specifies the offset at which to // start pagination results. When trying to request the next page of // results, the new Offset value should be currentOffset + Limit. Offset uint `url:"offset,omitempty"` // Total is the pagination parameter to request that the API return the // total count of items in the response. If this field is omitted or set to // false, the total number of results will not be sent back from the PagerDuty API. // // Setting this to true will slow down the API response times, and so it's // recommended to omit it unless you've a specific reason for wanting the // total count of items in the collection. Total bool `url:"total,omitempty"` TimeZone string `url:"time_zone,omitempty"` Since string `url:"since,omitempty"` Until string `url:"until,omitempty"` IsOverview bool `url:"is_overview,omitempty"` Includes []string `url:"include,omitempty,brackets"` TeamIDs []string `url:"team_ids,omitempty,brackets"` }
ListLogEntriesOptions is the data structure used when calling the ListLogEntry API endpoint.
type ListLogEntryResponse ¶
type ListLogEntryResponse struct { APIListObject LogEntries []LogEntry `json:"log_entries"` }
ListLogEntryResponse is the response data when calling the ListLogEntry API endpoint.
type ListMaintenanceWindowsOptions ¶
type ListMaintenanceWindowsOptions struct { // Limit is the pagination parameter that limits the number of results per // page. PagerDuty defaults this value to 25 if omitted, and sets an upper // bound of 100. Limit uint `url:"limit,omitempty"` // Offset is the pagination parameter that specifies the offset at which to // start pagination results. When trying to request the next page of // results, the new Offset value should be currentOffset + Limit. Offset uint `url:"offset,omitempty"` // Total is the pagination parameter to request that the API return the // total count of items in the response. If this field is omitted or set to // false, the total number of results will not be sent back from the PagerDuty API. // // Setting this to true will slow down the API response times, and so it's // recommended to omit it unless you've a specific reason for wanting the // total count of items in the collection. Total bool `url:"total,omitempty"` Query string `url:"query,omitempty"` Includes []string `url:"include,omitempty,brackets"` TeamIDs []string `url:"team_ids,omitempty,brackets"` ServiceIDs []string `url:"service_ids,omitempty,brackets"` Filter string `url:"filter,omitempty,brackets"` }
ListMaintenanceWindowsOptions is the data structure used when calling the ListMaintenanceWindows API endpoint.
type ListMaintenanceWindowsResponse ¶
type ListMaintenanceWindowsResponse struct { APIListObject MaintenanceWindows []MaintenanceWindow `json:"maintenance_windows"` }
ListMaintenanceWindowsResponse is the data structur returned from calling the ListMaintenanceWindows API endpoint.
type ListMembersOptions
deprecated
type ListMembersOptions = ListTeamMembersOptions
ListMembersOptions is the original type name and is retained as an alias for API compatibility.
Deprecated: Use type ListTeamMembersOptions instead; will be removed in V2
type ListMembersResponse
deprecated
type ListMembersResponse = ListTeamMembersResponse
ListMembersResponse is the original type name and is retained as an alias for API compatibility.
Deprecated: Use type ListTeamMembersResponse instead; will be removed in V2
type ListMultiResourcesStandardScoresOptions ¶ added in v1.8.0
type ListMultiResourcesStandardScoresOptions struct { // Ids of resources to apply the standards. Maximum of 100 items IDs []string `url:"ids,omitempty,brackets"` }
type ListMultiResourcesStandardScoresResponse ¶ added in v1.8.0
type ListMultiResourcesStandardScoresResponse struct {
Resources []ResourceStandardScore `json:"resources,omitempty"`
}
type ListNotificationOptions ¶
type ListNotificationOptions struct { // Limit is the pagination parameter that limits the number of results per // page. PagerDuty defaults this value to 25 if omitted, and sets an upper // bound of 100. Limit uint `url:"limit,omitempty"` // Offset is the pagination parameter that specifies the offset at which to // start pagination results. When trying to request the next page of // results, the new Offset value should be currentOffset + Limit. Offset uint `url:"offset,omitempty"` // Total is the pagination parameter to request that the API return the // total count of items in the response. If this field is omitted or set to // false, the total number of results will not be sent back from the PagerDuty API. // // Setting this to true will slow down the API response times, and so it's // recommended to omit it unless you've a specific reason for wanting the // total count of items in the collection. Total bool `url:"total,omitempty"` TimeZone string `url:"time_zone,omitempty"` Since string `url:"since,omitempty"` Until string `url:"until,omitempty"` Filter string `url:"filter,omitempty"` Includes []string `url:"include,omitempty,brackets"` }
ListNotificationOptions is the data structure used when calling the ListNotifications API endpoint.
type ListNotificationsResponse ¶
type ListNotificationsResponse struct { APIListObject Notifications []Notification }
ListNotificationsResponse is the data structure returned from the ListNotifications API endpoint.
type ListOnCallOptions ¶
type ListOnCallOptions struct { // Limit is the pagination parameter that limits the number of results per // page. PagerDuty defaults this value to 25 if omitted, and sets an upper // bound of 100. Limit uint `url:"limit,omitempty"` // Offset is the pagination parameter that specifies the offset at which to // start pagination results. When trying to request the next page of // results, the new Offset value should be currentOffset + Limit. Offset uint `url:"offset,omitempty"` // Total is the pagination parameter to request that the API return the // total count of items in the response. If this field is omitted or set to // false, the total number of results will not be sent back from the PagerDuty API. // // Setting this to true will slow down the API response times, and so it's // recommended to omit it unless you've a specific reason for wanting the // total count of items in the collection. Total bool `url:"total,omitempty"` TimeZone string `url:"time_zone,omitempty"` Includes []string `url:"include,omitempty,brackets"` UserIDs []string `url:"user_ids,omitempty,brackets"` EscalationPolicyIDs []string `url:"escalation_policy_ids,omitempty,brackets"` ScheduleIDs []string `url:"schedule_ids,omitempty,brackets"` Since string `url:"since,omitempty"` Until string `url:"until,omitempty"` Earliest bool `url:"earliest,omitempty"` }
ListOnCallOptions is the data structure used when calling the ListOnCalls API endpoint.
type ListOnCallUsersOptions ¶
type ListOnCallUsersOptions struct { Since string `url:"since,omitempty"` Until string `url:"until,omitempty"` }
ListOnCallUsersOptions is the data structure used when calling the ListOnCallUsers API endpoint.
type ListOnCallsResponse ¶
type ListOnCallsResponse struct { APIListObject OnCalls []OnCall `json:"oncalls"` }
ListOnCallsResponse is the data structure returned from calling the ListOnCalls API endpoint.
type ListOrchestrationsOptions ¶ added in v1.7.0
type ListOrchestrationsOptions struct { // Limit is the pagination parameter that limits the number of results per // page. PagerDuty defaults this value to 25 if omitted, and sets an upper // bound of 100. Limit uint `url:"limit,omitempty"` // Offset is the pagination parameter that specifies the offset at which to // start pagination results. When trying to request the next page of // results, the new Offset value should be currentOffset + Limit. Offset uint `url:"offset,omitempty"` // Total is the pagination parameter to request that the API return the // total count of items in the response. If this field is omitted or set to // false, the total number of results will not be sent back from the PagerDuty API. // // Setting this to true will slow down the API response times, and so it's // recommended to omit it unless you've a specific reason for wanting the // total count of items in the collection. Total bool `url:"total,omitempty"` SortBy string `url:"sort_by,omitempty"` }
ListOrchestrationsOptions is the data structure used when calling the ListOrchestrations API endpoint.
type ListOrchestrationsResponse ¶ added in v1.7.0
type ListOrchestrationsResponse struct { APIListObject Orchestrations []Orchestration `json:"orchestrations"` }
ListOrchestrationsResponse is the data structure returned from calling the ListOrchestrations API endpoint.
type ListOverridesOptions ¶
type ListOverridesOptions struct { Since string `url:"since,omitempty"` Until string `url:"until,omitempty"` Editable bool `url:"editable,omitempty"` Overflow bool `url:"overflow,omitempty"` }
ListOverridesOptions is the data structure used when calling the ListOverrides API endpoint.
type ListOverridesResponse ¶
type ListOverridesResponse struct {
Overrides []Override `json:"overrides,omitempty"`
}
ListOverridesResponse is the data structure returned from calling the ListOverrides API endpoint.
type ListPrioritiesOptions ¶ added in v1.5.0
type ListPrioritiesOptions struct { // Limit is the pagination parameter that limits the number of results per // page. PagerDuty defaults this value to 25 if omitted, and sets an upper // bound of 100. Limit uint `url:"limit,omitempty"` // Offset is the pagination parameter that specifies the offset at which to // start pagination results. When trying to request the next page of // results, the new Offset value should be currentOffset + Limit. Offset uint `url:"offset,omitempty"` // Total is the pagination parameter to request that the API return the // total count of items in the response. If this field is omitted or set to // false, the total number of results will not be sent back from the PagerDuty API. // // Setting this to true will slow down the API response times, and so it's // recommended to omit it unless you've a specific reason for wanting the // total count of items in the collection. Total bool `url:"total,omitempty"` }
ListPrioritiesOptions is the data structure used when calling the ListPriorities API endpoint.
type ListPrioritiesResponse ¶ added in v1.5.0
type ListPrioritiesResponse struct { APIListObject Priorities []Priority `json:"priorities"` }
ListPrioritiesResponse repreents the API response from PagerDuty when listing the configured priorities.
type ListResponsePlaysOptions ¶ added in v1.5.0
type ListResponsePlaysOptions struct { // FilterForManualRun limits results to show only response plays that can be // invoked manually. FilterForManualRun bool `url:"filter_for_manual_run,omitempty"` Query string `url:"query,omitempty"` From string }
ListResponsePlaysOptions are the options for listing response plays.
type ListResponsePlaysResponse ¶ added in v1.5.0
type ListResponsePlaysResponse struct {
ResponsePlays []ResponsePlay `json:"response_plays"`
}
ListResponsePlaysResponse represents the list of response plays.
type ListRulesetRulesResponse ¶ added in v1.2.0
type ListRulesetRulesResponse struct { Total uint `json:"total,omitempty"` Rules []*RulesetRule `json:"rules,omitempty"` Offset uint `json:"offset,omitempty"` More bool `json:"more,omitempty"` Limit uint `json:"limit,omitempty"` }
ListRulesetRulesResponse represents a list of rules in a ruleset
type ListRulesetsResponse ¶ added in v1.2.0
type ListRulesetsResponse struct { Total uint `json:"total,omitempty"` Rulesets []*Ruleset `json:"rulesets,omitempty"` Offset uint `json:"offset,omitempty"` More bool `json:"more,omitempty"` Limit uint `json:"limit,omitempty"` }
ListRulesetsResponse represents a list response of rulesets.
type ListSchedulesOptions ¶
type ListSchedulesOptions struct { // Limit is the pagination parameter that limits the number of results per // page. PagerDuty defaults this value to 25 if omitted, and sets an upper // bound of 100. Limit uint `url:"limit,omitempty"` // Offset is the pagination parameter that specifies the offset at which to // start pagination results. When trying to request the next page of // results, the new Offset value should be currentOffset + Limit. Offset uint `url:"offset,omitempty"` // Total is the pagination parameter to request that the API return the // total count of items in the response. If this field is omitted or set to // false, the total number of results will not be sent back from the PagerDuty API. // // Setting this to true will slow down the API response times, and so it's // recommended to omit it unless you've a specific reason for wanting the // total count of items in the collection. Total bool `url:"total,omitempty"` Query string `url:"query,omitempty"` Includes []string `url:"include,omitempty,brackets"` }
ListSchedulesOptions is the data structure used when calling the ListSchedules API endpoint.
type ListSchedulesResponse ¶
type ListSchedulesResponse struct { APIListObject Schedules []Schedule `json:"schedules"` }
ListSchedulesResponse is the data structure returned from calling the ListSchedules API endpoint.
type ListServiceDependencies ¶ added in v1.3.0
type ListServiceDependencies struct {
Relationships []*ServiceDependency `json:"relationships,omitempty"`
}
ListServiceDependencies represents a list of dependencies for a service
type ListServiceOptions ¶
type ListServiceOptions struct { // Limit is the pagination parameter that limits the number of results per // page. PagerDuty defaults this value to 25 if omitted, and sets an upper // bound of 100. Limit uint `url:"limit,omitempty"` // Offset is the pagination parameter that specifies the offset at which to // start pagination results. When trying to request the next page of // results, the new Offset value should be currentOffset + Limit. Offset uint `url:"offset,omitempty"` // Total is the pagination parameter to request that the API return the // total count of items in the response. If this field is omitted or set to // false, the total number of results will not be sent back from the PagerDuty API. // // Setting this to true will slow down the API response times, and so it's // recommended to omit it unless you've a specific reason for wanting the // total count of items in the collection. Total bool `url:"total,omitempty"` TeamIDs []string `url:"team_ids,omitempty,brackets"` TimeZone string `url:"time_zone,omitempty"` SortBy string `url:"sort_by,omitempty"` Query string `url:"query,omitempty"` Includes []string `url:"include,omitempty,brackets"` }
ListServiceOptions is the data structure used when calling the ListServices API endpoint.
type ListServiceResponse ¶
type ListServiceResponse struct { APIListObject Services []Service }
ListServiceResponse is the data structure returned from calling the ListServices API endpoint.
type ListServiceRulesResponse ¶ added in v1.4.0
type ListServiceRulesResponse struct { Offset uint `json:"offset,omitempty"` Limit uint `json:"limit,omitempty"` More bool `json:"more,omitempty"` Total uint `json:"total,omitempty"` Rules []ServiceRule `json:"rules,omitempty"` }
ListServiceRulesResponse represents a list of rules in a service
type ListStandardsOptions ¶ added in v1.8.0
type ListStandardsOptions struct { Active bool `url:"active,omitempty"` // ResourceType query for a specific resource type. // Allowed value: technical_service ResourceType string `url:"resource_type,omitempty"` }
ListStandardsOptions is the data structure used when calling the ListStandards API endpoint.
type ListStandardsResponse ¶ added in v1.8.0
type ListStandardsResponse struct {
Standards []Standard `json:"standards"`
}
ListStandardsResponse is the data structure returned from calling the ListStandards API endpoint.
type ListTagOptions ¶ added in v1.4.0
type ListTagOptions struct { // Limit is the pagination parameter that limits the number of results per // page. PagerDuty defaults this value to 25 if omitted, and sets an upper // bound of 100. Limit uint `url:"limit,omitempty"` // Offset is the pagination parameter that specifies the offset at which to // start pagination results. When trying to request the next page of // results, the new Offset value should be currentOffset + Limit. Offset uint `url:"offset,omitempty"` // Total is the pagination parameter to request that the API return the // total count of items in the response. If this field is omitted or set to // false, the total number of results will not be sent back from the PagerDuty API. // // Setting this to true will slow down the API response times, and so it's // recommended to omit it unless you've a specific reason for wanting the // total count of items in the collection. Total bool `url:"total,omitempty"` Query string `url:"query,omitempty"` }
ListTagOptions are the input parameters used when calling the ListTags API endpoint.
type ListTagResponse ¶ added in v1.4.0
type ListTagResponse struct { APIListObject Tags []*Tag `json:"tags"` }
ListTagResponse is the structure used when calling the ListTags API endpoint.
type ListTeamMembersOptions ¶ added in v1.5.0
type ListTeamMembersOptions struct { // Limit is the pagination parameter that limits the number of results per // page. PagerDuty defaults this value to 25 if omitted, and sets an upper // bound of 100. Limit uint `url:"limit,omitempty"` // Offset is the pagination parameter that specifies the offset at which to // start pagination results. When trying to request the next page of // results, the new Offset value should be currentOffset + Limit. Offset uint `url:"offset,omitempty"` // Total is the pagination parameter to request that the API return the // total count of items in the response. If this field is omitted or set to // false, the total number of results will not be sent back from the PagerDuty API. // // Setting this to true will slow down the API response times, and so it's // recommended to omit it unless you've a specific reason for wanting the // total count of items in the collection. Total bool `url:"total,omitempty"` }
ListTeamMembersOptions are the optional parameters for a members request.
type ListTeamMembersResponse ¶ added in v1.5.0
type ListTeamMembersResponse struct { APIListObject Members []Member `json:"members"` }
ListTeamMembersResponse is the response from the members endpoint.
type ListTeamOptions ¶
type ListTeamOptions struct { // Limit is the pagination parameter that limits the number of results per // page. PagerDuty defaults this value to 25 if omitted, and sets an upper // bound of 100. Limit uint `url:"limit,omitempty"` // Offset is the pagination parameter that specifies the offset at which to // start pagination results. When trying to request the next page of // results, the new Offset value should be currentOffset + Limit. Offset uint `url:"offset,omitempty"` // Total is the pagination parameter to request that the API return the // total count of items in the response. If this field is omitted or set to // false, the total number of results will not be sent back from the PagerDuty API. // // Setting this to true will slow down the API response times, and so it's // recommended to omit it unless you've a specific reason for wanting the // total count of items in the collection. Total bool `url:"total,omitempty"` Query string `url:"query,omitempty"` }
ListTeamOptions are the input parameters used when calling the ListTeams API endpoint.
type ListTeamResponse ¶
type ListTeamResponse struct { APIListObject Teams []Team }
ListTeamResponse is the structure used when calling the ListTeams API endpoint.
type ListTeamsForTagResponse ¶ added in v1.4.0
type ListTeamsForTagResponse struct { APIListObject Teams []*APIObject `json:"teams,omitempty"` }
ListTeamsForTagResponse is the structure used to list teams assigned a given tag
type ListUserNotificationRulesResponse ¶ added in v1.2.0
type ListUserNotificationRulesResponse struct { APIListObject NotificationRules []NotificationRule `json:"notification_rules"` }
ListUserNotificationRulesResponse the data structure returned from calling the ListNotificationRules API endpoint.
type ListUserResponse ¶ added in v1.4.0
type ListUserResponse struct { APIListObject Users []*APIObject `json:"users,omitempty"` }
ListUserResponse is the structure used to list users assigned a given tag
type ListUsersOptions ¶
type ListUsersOptions struct { // Limit is the pagination parameter that limits the number of results per // page. PagerDuty defaults this value to 25 if omitted, and sets an upper // bound of 100. Limit uint `url:"limit,omitempty"` // Offset is the pagination parameter that specifies the offset at which to // start pagination results. When trying to request the next page of // results, the new Offset value should be currentOffset + Limit. Offset uint `url:"offset,omitempty"` // Total is the pagination parameter to request that the API return the // total count of items in the response. If this field is omitted or set to // false, the total number of results will not be sent back from the PagerDuty API. // // Setting this to true will slow down the API response times, and so it's // recommended to omit it unless you've a specific reason for wanting the // total count of items in the collection. Total bool `url:"total,omitempty"` Query string `url:"query,omitempty"` TeamIDs []string `url:"team_ids,omitempty,brackets"` Includes []string `url:"include,omitempty,brackets"` }
ListUsersOptions is the data structure used when calling the ListUsers API endpoint.
type ListUsersResponse ¶
type ListUsersResponse struct { APIListObject Users []User `json:"users"` }
ListUsersResponse is the data structure returned from calling the ListUsers API endpoint.
type ListVendorOptions ¶
type ListVendorOptions struct { // Limit is the pagination parameter that limits the number of results per // page. PagerDuty defaults this value to 25 if omitted, and sets an upper // bound of 100. Limit uint `url:"limit,omitempty"` // Offset is the pagination parameter that specifies the offset at which to // start pagination results. When trying to request the next page of // results, the new Offset value should be currentOffset + Limit. Offset uint `url:"offset,omitempty"` // Total is the pagination parameter to request that the API return the // total count of items in the response. If this field is omitted or set to // false, the total number of results will not be sent back from the PagerDuty API. // // Setting this to true will slow down the API response times, and so it's // recommended to omit it unless you've a specific reason for wanting the // total count of items in the collection. Total bool `url:"total,omitempty"` }
ListVendorOptions is the data structure used when calling the ListVendors API endpoint.
type ListVendorResponse ¶
type ListVendorResponse struct { APIListObject Vendors []Vendor }
ListVendorResponse is the data structure returned from calling the ListVendors API endpoint.
type LogEntry ¶
type LogEntry struct { CommonLogEntryField Incident Incident `json:"incident"` Service APIObject `json:"service"` User APIObject `json:"user"` }
LogEntry is a list of all of the events that happened to an incident.
type MaintenanceWindow ¶
type MaintenanceWindow struct { APIObject SequenceNumber uint `json:"sequence_number,omitempty"` StartTime string `json:"start_time"` EndTime string `json:"end_time"` Description string `json:"description"` Services []APIObject `json:"services"` Teams []APIObject `json:"teams,omitempty"` CreatedBy *APIObject `json:"created_by,omitempty"` }
MaintenanceWindow is used to temporarily disable one or more services for a set period of time.
type ManageIncidentsOptions ¶
type ManageIncidentsOptions struct { ID string `json:"id"` // Type is the type of API object this is. // // Deprecated: Because the Type field can only have the value of "incident" // or "incident_reference" when managing an incident, the CreateIncident* // methods always set this value to "incident" because this struct is not an // incident_reference. Any other value will be overwritten. This will be // removed in v2.0.0. Type string `json:"type"` Status string `json:"status,omitempty"` Title string `json:"title,omitempty"` Priority *APIReference `json:"priority,omitempty"` Assignments []Assignee `json:"assignments,omitempty"` EscalationLevel uint `json:"escalation_level,omitempty"` EscalationPolicy *APIReference `json:"escalation_policy,omitempty"` Resolution string `json:"resolution,omitempty"` ConferenceBridge *ConferenceBridge `json:"conference_bridge,omitempty"` }
ManageIncidentsOptions is the structure used when PUTing updates to incidents to the ManageIncidents func
type MergeIncidentsOptions ¶
MergeIncidentsOptions is the structure used when merging incidents with MergeIncidents func
type Method ¶ added in v1.5.0
type Method struct { Description string `json:"description,omitempty"` TruncatedToken string `json:"truncated_token,omitempty"` Type string `json:"type,omitempty"` }
Method contains information on the method used to perform the action.
type Notification ¶
type Notification struct { ID string `json:"id"` Type string `json:"type"` StartedAt string `json:"started_at"` Address string `json:"address"` User APIObject `json:"user"` ConferenceAddress string `json:"conferenceAddress"` Status string `json:"status"` }
Notification is a message containing the details of the incident.
type NotificationRule ¶
type NotificationRule struct { ID string `json:"id,omitempty"` Type string `json:"type,omitempty"` Summary string `json:"summary,omitempty"` Self string `json:"self,omitempty"` HTMLURL string `json:"html_url,omitempty"` StartDelayInMinutes uint `json:"start_delay_in_minutes"` CreatedAt string `json:"created_at"` ContactMethod ContactMethod `json:"contact_method"` Urgency string `json:"urgency"` }
NotificationRule is a rule for notifying the user.
type NullAPIErrorObject ¶ added in v1.4.0
type NullAPIErrorObject struct { Valid bool ErrorObject APIErrorObject }
NullAPIErrorObject is a wrapper around the APIErrorObject type. If the Valid field is true, the API response included a structured error JSON object. This structured object is then set on the ErrorObject field.
While the PagerDuty REST API is documented to always return the error object, we assume it's possible in exceptional failure modes for this to be omitted. As such, this wrapper type provides us a way to check if the object was provided while avoiding consumers accidentally missing a nil pointer check, thus crashing their whole program.
func (*NullAPIErrorObject) UnmarshalJSON ¶ added in v1.4.0
func (n *NullAPIErrorObject) UnmarshalJSON(data []byte) error
UnmarshalJSON satisfies encoding/json.Unmarshaler
type NullEventsAPIV2ErrorObject ¶ added in v1.6.0
type NullEventsAPIV2ErrorObject struct { Valid bool ErrorObject EventsAPIV2ErrorObject }
NullEventsAPIV2ErrorObject is a wrapper around the EventsAPIV2ErrorObject type. If the Valid field is true, the API response included a structured error JSON object. This structured object is then set on the ErrorObject field.
We assume it's possible in exceptional failure modes for error objects to be omitted by PagerDuty. As such, this wrapper type provides us a way to check if the object was provided while avoiding consumers accidentally missing a nil pointer check, thus crashing their whole program.
type Occurrence ¶ added in v1.5.0
type Occurrence struct { Count uint `json:"count,omitempty"` Frequency uint `json:"frequency,omitempty"` Category string `json:"category,omitempty"` Since string `json:"since,omitempty"` Until string `json:"until,omitempty"` }
Occurrence is the data around whether this is a reocurring issue.
type OnCall ¶
type OnCall struct { User User `json:"user,omitempty"` Schedule Schedule `json:"schedule,omitempty"` EscalationPolicy EscalationPolicy `json:"escalation_policy,omitempty"` EscalationLevel uint `json:"escalation_level,omitempty"` Start string `json:"start,omitempty"` End string `json:"end,omitempty"` }
OnCall represents a contiguous unit of time for which a user will be on call for a given escalation policy and escalation rule.
type Orchestration ¶ added in v1.7.0
type Orchestration struct { APIObject Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` Team *APIReference `json:"team,omitempty"` Integrations []*OrchestrationIntegration `json:"integrations,omitempty"` Routes uint `json:"routes,omitempty"` CreatedAt string `json:"created_at,omitempty"` CreatedBy *APIReference `json:"created_by,omitempty"` UpdatedAt string `json:"updated_at,omitempty"` UpdatedBy *APIReference `json:"updated_by,omitempty"` Version string `json:"version,omitempty"` }
Orchestration defines a global orchestration to route events the same source to different services.
type OrchestrationExtraction ¶ added in v1.7.0
type OrchestrationExtraction struct { Target string `json:"target,omitempty"` Regex string `json:"regex,omitempty"` Source string `json:"source,omitempty"` Template string `json:"template,omitempty"` }
OrchestrationExtraction defines a value extraction in an orchestration rule.
type OrchestrationHeader ¶ added in v1.7.0
type OrchestrationIntegration ¶ added in v1.7.0
type OrchestrationIntegration struct { ID string `json:"id,omitempty"` Parameters *OrchestrationIntegrationParameters `json:"parameters,omitempty"` }
OrchestrationIntegration is a route into an orchestration.
type OrchestrationIntegrationParameters ¶ added in v1.7.0
type OrchestrationParameter ¶ added in v1.7.0
type OrchestrationRouter ¶ added in v1.7.0
type OrchestrationRouter struct { Type string `json:"type,omitempty"` Parent *APIReference `json:"parent,omitempty"` Sets []*OrchestrationRouterRuleSet `json:"sets,omitempty"` CatchAll *OrchestrationRouterCatchAllRule `json:"catch_all,omitempty"` CreatedAt string `json:"created_at,omitempty"` CreatedBy *APIReference `json:"created_by,omitempty"` UpdatedAt string `json:"updated_at,omitempty"` UpdatedBy *APIReference `json:"updated_by,omitempty"` Version string `json:"version,omitempty"` }
OrchestrationRouter is an event router.
type OrchestrationRouterActions ¶ added in v1.7.0
type OrchestrationRouterActions struct {
RouteTo string `json:"route_to,omitempty"`
}
OrchestrationRouterActions are the actions that will be taken to change the resulting alert and incident.
type OrchestrationRouterCatchAllRule ¶ added in v1.7.0
type OrchestrationRouterCatchAllRule struct {
Actions *OrchestrationRouterActions `json:"actions,omitempty"`
}
OrchestrationRouterCatchAllRule routes an event when none of the rules match an event.
type OrchestrationRouterRule ¶ added in v1.7.0
type OrchestrationRouterRule struct { ID string `json:"id,omitempty"` Label string `json:"label,omitempty"` Conditions []*OrchestrationRouterRuleCondition `json:"conditions,omitempty"` Actions *OrchestrationRouterActions `json:"actions,omitempty"` Disabled bool `json:"disabled,omitempty"` }
type OrchestrationRouterRuleCondition ¶ added in v1.7.0
type OrchestrationRouterRuleCondition struct {
Expression string `json:"expression,omitempty"`
}
type OrchestrationRouterRuleSet ¶ added in v1.7.0
type OrchestrationRouterRuleSet struct { ID string `json:"id,omitempty"` Rules []*OrchestrationRouterRule `json:"rules,omitempty"` }
type OrchestrationUnrouted ¶ added in v1.7.0
type OrchestrationUnrouted struct { Type string `json:"type,omitempty"` Parent *APIReference `json:"parent,omitempty"` Sets []*ServiceOrchestrationRuleSet `json:"sets,omitempty"` CatchAll *OrchestrationUnroutedCatchAllRule `json:"catch_all,omitempty"` CreatedAt string `json:"created_at,omitempty"` CreatedBy *APIReference `json:"created_by,omitempty"` UpdatedAt string `json:"updated_at,omitempty"` UpdatedBy *APIReference `json:"updated_by,omitempty"` Version string `json:"version,omitempty"` }
OrchestrationUnrouted defines sets of rules to be applied to unrouted events.
type OrchestrationUnroutedCatchAllRule ¶ added in v1.7.0
type OrchestrationUnroutedCatchAllRule struct {
Actions *OrchestrationUnroutedRuleActions `json:"actions,omitempty"`
}
type OrchestrationUnroutedRule ¶ added in v1.7.0
type OrchestrationUnroutedRule struct { ID string `json:"id,omitempty"` Label string `json:"label,omitempty"` Conditions []*OrchestrationUnroutedRuleCondition `json:"conditions,omitempty"` Actions *OrchestrationUnroutedRuleActions `json:"actions,omitempty"` Disabled bool `json:"disabled,omitempty"` }
type OrchestrationUnroutedRuleActions ¶ added in v1.7.0
type OrchestrationUnroutedRuleActions struct { RouteTo string `json:"route_to,omitempty"` Severity string `json:"severity,omitempty"` EventAction string `json:"event_action,omitempty"` Variables []*OrchestrationVariable `json:"variables,omitempty"` Extractions []*OrchestrationExtraction `json:"extractions,omitempty"` }
OrchestrationUnroutedRuleActions are the actions that will be taken to change the resulting alert and incident.
type OrchestrationUnroutedRuleCondition ¶ added in v1.7.0
type OrchestrationUnroutedRuleCondition struct {
Expression string `json:"expression,omitempty"`
}
type OrchestrationUnroutedRuleSet ¶ added in v1.7.0
type OrchestrationUnroutedRuleSet struct { ID string `json:"id,omitempty"` Rules []*OrchestrationUnroutedRule `json:"rules,omitempty"` }
type OrchestrationVariable ¶ added in v1.7.0
type OrchestrationVariable struct { Name string `json:"name,omitempty"` Path string `json:"path,omitempty"` Type string `json:"type,omitempty"` Value string `json:"value,omitempty"` }
OrchestrationVariable defines a variable in an orchestration rule.
type Override ¶
type Override struct { ID string `json:"id,omitempty"` Type string `json:"type,omitempty"` Summary string `json:"summary,omitempty"` Self string `json:"self,omitempty"` HTMLURL string `json:"html_url,omitempty"` Start string `json:"start,omitempty"` End string `json:"end,omitempty"` User APIObject `json:"user,omitempty"` }
Override are any schedule layers from the override layer.
type PagerDutyAutomationAction ¶ added in v1.7.0
type PagerDutyAutomationAction struct {
ActionID string `json:"action_id,omitempty"`
}
type PendingAction ¶
PendingAction is the data structure for any pending actions on an incident.
type PreviewScheduleOptions ¶
type PreviewScheduleOptions struct { Since string `url:"since,omitempty"` Until string `url:"until,omitempty"` Overflow bool `url:"overflow,omitempty"` }
PreviewScheduleOptions is the data structure used when calling the PreviewSchedule API endpoint.
type Priorities
deprecated
type Priorities = ListPrioritiesResponse
Priorities is the original type name and is retained as an alias for API compatibility.
Deprecated: Use type ListPrioritiesResponse instead; will be removed in V2
type Priority ¶
type Priority struct { APIObject Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` }
Priority is the data structure describing the priority of an incident.
type PriorityProperty
deprecated
type PriorityProperty = Priority
PriorityProperty is the original type name and is retained as an alias for API compatibility.
Deprecated: Use type Priority instead; will be removed in V2
type Reference ¶ added in v1.5.0
type Reference struct { Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` Added []APIObject `json:"added,omitempty"` Removed []APIObject `json:"removed,omitempty"` }
Reference contains information about the reference that have been affected.
type RemoveIncidentNotificationSubscribersResponse ¶ added in v1.7.0
type RemoveIncidentNotificationSubscribersResponse struct { DeleteCount uint `json:"deleted_count"` NonExistentCount uint `json:"non_existent_count"` }
RemoveIncidentNotificationSubscribersResponse is the response structure when calling the RemoveNotificationSubscriber API endpoint.
type RenderedScheduleEntry ¶
type RenderedScheduleEntry struct { Start string `json:"start,omitempty"` End string `json:"end,omitempty"` User APIObject `json:"user,omitempty"` }
RenderedScheduleEntry represents the computed set of schedule layer entries that put users on call for a schedule, and cannot be modified directly.
type ResolveReason ¶
type ResolveReason struct { Type string `json:"type,omitempty"` Incident APIObject `json:"incident"` }
ResolveReason is the data structure describing the reason an incident was resolved
type ResourceScore ¶ added in v1.8.0
type ResourceStandard ¶ added in v1.8.0
type ResourceStandardScore ¶ added in v1.8.0
type ResourceStandardScore struct { ResourceID string `json:"resource_id,omitempty"` ResourceType string `json:"resource_type,omitempty"` Score *ResourceScore `json:"score,omitempty"` Standards []ResourceStandard `json:"standards,omitempty"` }
type ResponderRequest ¶
type ResponderRequest struct { Incident Incident `json:"incident"` Requester User `json:"requester,omitempty"` RequestedAt string `json:"request_at,omitempty"` Message string `json:"message,omitempty"` Targets []ResponderRequestTargetWrapper `json:"responder_request_targets"` }
ResponderRequest contains the API structure for an incident responder request.
type ResponderRequestOptions ¶
type ResponderRequestOptions struct { From string `json:"-"` Message string `json:"message"` RequesterID string `json:"requester_id"` Targets []ResponderRequestTargetWrapper `json:"responder_request_targets"` }
ResponderRequestOptions defines the input options for the Create Responder function.
type ResponderRequestResponse ¶
type ResponderRequestResponse struct {
ResponderRequest ResponderRequest `json:"responder_request"`
}
ResponderRequestResponse is the response from the API when requesting someone respond to an incident.
type ResponderRequestTarget ¶
type ResponderRequestTarget struct { APIObject Responders []IncidentResponders `json:"incidents_responders,omitempty"` }
ResponderRequestTarget specifies an individual target for the responder request.
type ResponderRequestTargetWrapper ¶ added in v1.6.0
type ResponderRequestTargetWrapper struct {
Target ResponderRequestTarget `json:"responder_request_target"`
}
ResponderRequestTargetWrapper is a wrapper for a ResponderRequestTarget.
type ResponseMetadata ¶ added in v1.5.0
type ResponseMetadata struct {
Messages []string `json:"messages,omitempty"`
}
ResponseMetadata contains information about the response.
type ResponsePlay ¶ added in v1.5.0
type ResponsePlay struct { ID string `json:"id,omitempty"` Type string `json:"type,omitempty"` Summary string `json:"summary,omitempty"` Self string `json:"self,omitempty"` HTMLURL string `json:"html_url,omitempty"` Name string `json:"name,omitempty"` Description string `json:"description"` Team *APIReference `json:"team,omitempty"` Subscribers []*APIReference `json:"subscribers,omitempty"` SubscribersMessage string `json:"subscribers_message"` Responders []*APIReference `json:"responders,omitempty"` RespondersMessage string `json:"responders_message"` Runnability *string `json:"runnability"` ConferenceNumber *string `json:"conference_number"` ConferenceURL *string `json:"conference_url"` ConferenceType *string `json:"conference_type"` }
ResponsePlay represents the API object for a response object:
https://developer.pagerduty.com/api-reference/b3A6Mjc0ODE2Ng-create-a-response-play
type Restriction ¶
type Restriction struct { Type string `json:"type,omitempty"` StartTimeOfDay string `json:"start_time_of_day,omitempty"` StartDayOfWeek uint `json:"start_day_of_week,omitempty"` DurationSeconds uint `json:"duration_seconds,omitempty"` }
Restriction limits on-call responsibility for a layer to certain times of the day or week.
type RuleActionExtraction ¶ added in v1.2.0
type RuleActionExtraction struct { Target string `json:"target,omitempty"` Source string `json:"source,omitempty"` Regex string `json:"regex,omitempty"` }
RuleActionExtraction represents a rule extraction action object
type RuleActionParameter ¶ added in v1.2.0
type RuleActionParameter struct {
Value string `json:"value,omitempty"`
}
RuleActionParameter represents a generic parameter object on a rule action
type RuleActionSuppress ¶ added in v1.2.0
type RuleActionSuppress struct { Value bool `json:"value"` ThresholdValue int `json:"threshold_value,omitempty"` ThresholdTimeUnit string `json:"threshold_time_unit,omitempty"` ThresholdTimeAmount int `json:"threshold_time_amount,omitempty"` }
RuleActionSuppress represents a rule suppress action object
type RuleActionSuspend ¶ added in v1.4.0
type RuleActionSuspend struct { // Value specifies for how long to suspend the alert in seconds. Value int `json:"value,omitempty"` }
RuleActionSuspend represents a rule suspend action object
type RuleActions ¶ added in v1.2.0
type RuleActions struct { Annotate *RuleActionParameter `json:"annotate,omitempty"` EventAction *RuleActionParameter `json:"event_action,omitempty"` Extractions []*RuleActionExtraction `json:"extractions,omitempty"` Priority *RuleActionParameter `json:"priority,omitempty"` Severity *RuleActionParameter `json:"severity,omitempty"` Suppress *RuleActionSuppress `json:"suppress,omitempty"` Suspend *RuleActionSuspend `json:"suspend,omitempty"` Route *RuleActionParameter `json:"route"` }
RuleActions represents a rule action
type RuleConditions ¶ added in v1.2.0
type RuleConditions struct { Operator string `json:"operator,omitempty"` RuleSubconditions []*RuleSubcondition `json:"subconditions,omitempty"` }
RuleConditions represents the conditions field for a Ruleset
type RuleSubcondition ¶ added in v1.2.0
type RuleSubcondition struct { Operator string `json:"operator,omitempty"` Parameters *ConditionParameter `json:"parameters,omitempty"` }
RuleSubcondition represents a subcondition of a ruleset condition
type RuleTimeFrame ¶ added in v1.2.0
type RuleTimeFrame struct { ScheduledWeekly *ScheduledWeekly `json:"scheduled_weekly,omitempty"` ActiveBetween *ActiveBetween `json:"active_between,omitempty"` }
RuleTimeFrame represents a time_frame object on the rule object
type Ruleset ¶ added in v1.2.0
type Ruleset struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Type string `json:"type,omitempty"` Self string `json:"self,omitempty"` RoutingKeys []string `json:"routing_keys,omitempty"` CreatedAt string `json:"created_at"` Creator *RulesetObject `json:"creator,omitempty"` UpdatedAt string `json:"updated_at"` Updater *RulesetObject `json:"updater,omitempty"` Team *RulesetObject `json:"team,omitempty"` }
Ruleset represents a ruleset.
type RulesetObject ¶ added in v1.2.0
type RulesetObject struct { ID string `json:"id,omitempty"` Type string `json:"type,omitempty"` Self string `json:"self,omitempty"` }
RulesetObject represents a generic object that is common within a ruleset object
type RulesetPayload ¶ added in v1.2.0
type RulesetPayload struct {
Ruleset *Ruleset `json:"ruleset,omitempty"`
}
RulesetPayload represents payload with a ruleset object
type RulesetRule ¶ added in v1.2.0
type RulesetRule struct { ID string `json:"id,omitempty"` Self string `json:"self,omitempty"` Position *int `json:"position,omitempty"` Disabled bool `json:"disabled,omitempty"` Conditions *RuleConditions `json:"conditions,omitempty"` Actions *RuleActions `json:"actions,omitempty"` Ruleset *APIObject `json:"ruleset,omitempty"` CatchAll bool `json:"catch_all,omitempty"` TimeFrame *RuleTimeFrame `json:"time_frame,omitempty"` }
RulesetRule represents a Ruleset rule
type RulesetRulePayload ¶ added in v1.2.0
type RulesetRulePayload struct {
Rule *RulesetRule `json:"rule,omitempty"`
}
RulesetRulePayload represents a payload for ruleset rules
type Schedule ¶
type Schedule struct { APIObject Name string `json:"name,omitempty"` TimeZone string `json:"time_zone,omitempty"` Description string `json:"description,omitempty"` EscalationPolicies []APIObject `json:"escalation_policies,omitempty"` Users []APIObject `json:"users,omitempty"` Teams []APIObject `json:"teams,omitempty"` ScheduleLayers []ScheduleLayer `json:"schedule_layers,omitempty"` OverrideSubschedule ScheduleLayer `json:"override_subschedule,omitempty"` FinalSchedule ScheduleLayer `json:"final_schedule,omitempty"` }
Schedule determines the time periods that users are on call.
type ScheduleLayer ¶
type ScheduleLayer struct { APIObject Name string `json:"name,omitempty"` Start string `json:"start,omitempty"` End string `json:"end,omitempty"` RotationVirtualStart string `json:"rotation_virtual_start,omitempty"` RotationTurnLengthSeconds uint `json:"rotation_turn_length_seconds,omitempty"` Users []UserReference `json:"users,omitempty"` Restrictions []Restriction `json:"restrictions,omitempty"` RenderedScheduleEntries []RenderedScheduleEntry `json:"rendered_schedule_entries,omitempty"` RenderedCoveragePercentage float64 `json:"rendered_coverage_percentage,omitempty"` }
ScheduleLayer is an entry that puts users on call for a schedule.
type ScheduledAction ¶
type ScheduledAction struct { Type string `json:"type,omitempty"` At InlineModel `json:"at,omitempty"` ToUrgency string `json:"to_urgency"` }
ScheduledAction contains scheduled actions for the service.
type ScheduledWeekly ¶ added in v1.2.0
type ScheduledWeekly struct { // Weekdays is a 0 indexed slice of days, where 0 is Sunday and 6 is // Saturday, when the window is scheduled for. Weekdays []int `json:"weekdays,omitempty"` Timezone string `json:"timezone,omitempty"` // StartTime is the number of milliseconds into the day at which the window // starts. StartTime int `json:"start_time,omitempty"` // Duration is the window duration in milliseconds. Duration int `json:"duration,omitempty"` }
ScheduledWeekly represents a time_frame object for scheduling rules weekly
type Service ¶
type Service struct { APIObject Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` AutoResolveTimeout *uint `json:"auto_resolve_timeout,omitempty"` AcknowledgementTimeout *uint `json:"acknowledgement_timeout,omitempty"` CreateAt string `json:"created_at,omitempty"` Status string `json:"status,omitempty"` LastIncidentTimestamp string `json:"last_incident_timestamp,omitempty"` Integrations []Integration `json:"integrations,omitempty"` EscalationPolicy EscalationPolicy `json:"escalation_policy,omitempty"` Teams []Team `json:"teams,omitempty"` IncidentUrgencyRule *IncidentUrgencyRule `json:"incident_urgency_rule,omitempty"` SupportHours *SupportHours `json:"support_hours,omitempty"` ScheduledActions []ScheduledAction `json:"scheduled_actions,omitempty"` AlertCreation string `json:"alert_creation,omitempty"` AlertGrouping string `json:"alert_grouping,omitempty"` AlertGroupingTimeout *uint `json:"alert_grouping_timeout,omitempty"` AlertGroupingParameters *AlertGroupingParameters `json:"alert_grouping_parameters,omitempty"` ResponsePlay *APIObject `json:"response_play,omitempty"` Addons []Addon `json:"addons,omitempty"` AutoPauseNotificationsParameters *AutoPauseNotificationsParameters `json:"auto_pause_notifications_parameters,omitempty"` }
Service represents something you monitor (like a web service, email service, or database service).
type ServiceDependency ¶ added in v1.3.0
type ServiceDependency struct { ID string `json:"id,omitempty"` Type string `json:"type,omitempty"` SupportingService *ServiceObj `json:"supporting_service,omitempty"` DependentService *ServiceObj `json:"dependent_service,omitempty"` }
ServiceDependency represents a relationship between a business and technical service
type ServiceObj ¶ added in v1.3.0
ServiceObj represents a service object in service relationship
type ServiceOrchestration ¶ added in v1.7.0
type ServiceOrchestration struct { Type string `json:"type,omitempty"` Parent *APIReference `json:"parent,omitempty"` Sets []*ServiceOrchestrationRuleSet `json:"sets,omitempty"` CatchAll *ServiceOrchestrationCatchAllRule `json:"catch_all,omitempty"` CreatedAt string `json:"created_at,omitempty"` CreatedBy *APIReference `json:"created_by,omitempty"` UpdatedAt string `json:"updated_at,omitempty"` UpdatedBy *APIReference `json:"updated_by,omitempty"` Version string `json:"version,omitempty"` }
ServiceOrchestration defines sets of rules belonging to a service.
type ServiceOrchestrationActive ¶ added in v1.7.0
type ServiceOrchestrationActive struct {
Active bool `json:"active,omitempty"`
}
type ServiceOrchestrationCatchAllRule ¶ added in v1.7.0
type ServiceOrchestrationCatchAllRule struct {
Actions *ServiceOrchestrationRuleActions `json:"actions,omitempty"`
}
type ServiceOrchestrationRule ¶ added in v1.7.0
type ServiceOrchestrationRule struct { ID string `json:"id,omitempty"` Label string `json:"label,omitempty"` Conditions []*ServiceOrchestrationRuleCondition `json:"conditions,omitempty"` Actions *ServiceOrchestrationRuleActions `json:"actions,omitempty"` Disabled bool `json:"disabled,omitempty"` }
type ServiceOrchestrationRuleActions ¶ added in v1.7.0
type ServiceOrchestrationRuleActions struct { RouteTo string `json:"route_to,omitempty"` Suppress bool `json:"suppress,omitempty"` Suspend uint `json:"suspend,omitempty"` Priority string `json:"priority,omitempty"` Annotate string `json:"annotate,omitempty"` PagerDutyAutomationActions []*PagerDutyAutomationAction `json:"pagerduty_automation_actions,omitempty"` AutomationActions []*AutomationAction `json:"automation_actions,omitempty"` Severity string `json:"severity,omitempty"` EventAction string `json:"event_action,omitempty"` Variables []*OrchestrationVariable `json:"variables,omitempty"` Extractions []*OrchestrationExtraction `json:"extractions,omitempty"` }
ServiceOrchestrationRuleActions are the actions that will be taken to change the resulting alert and incident.
type ServiceOrchestrationRuleCondition ¶ added in v1.7.0
type ServiceOrchestrationRuleCondition struct {
Expression string `json:"expression,omitempty"`
}
type ServiceOrchestrationRuleSet ¶ added in v1.7.0
type ServiceOrchestrationRuleSet struct { ID string `json:"id,omitempty"` Rules []*ServiceOrchestrationRule `json:"rules,omitempty"` }
type ServiceRule ¶ added in v1.4.0
type ServiceRule struct { ID string `json:"id,omitempty"` Self string `json:"self,omitempty"` Disabled *bool `json:"disabled,omitempty"` Conditions *RuleConditions `json:"conditions,omitempty"` TimeFrame *RuleTimeFrame `json:"time_frame,omitempty"` Position *int `json:"position,omitempty"` Actions *ServiceRuleActions `json:"actions,omitempty"` }
ServiceRule represents a Service rule
type ServiceRuleActions ¶ added in v1.4.0
type ServiceRuleActions struct { Annotate *RuleActionParameter `json:"annotate,omitempty"` EventAction *RuleActionParameter `json:"event_action,omitempty"` Extractions []RuleActionExtraction `json:"extractions,omitempty"` Priority *RuleActionParameter `json:"priority,omitempty"` Severity *RuleActionParameter `json:"severity,omitempty"` Suppress *RuleActionSuppress `json:"suppress,omitempty"` Suspend *RuleActionSuspend `json:"suspend,omitempty"` }
ServiceRuleActions represents a rule action
type Standard ¶ added in v1.8.0
type Standard struct { Active bool `json:"active"` Description string `json:"description,omitempty"` Exclusions []StandardInclusionExclusion `json:"exclusions,omitempty"` ID string `json:"id,omitempty"` Inclusions []StandardInclusionExclusion `json:"inclusions,omitempty"` Name string `json:"name,omitempty"` ResourceType string `json:"resource_type,omitempty"` Type string `json:"type,omitempty"` }
Standard defines a PagerDuty resource standard.
type StandardInclusionExclusion ¶ added in v1.8.0
type SupportHours ¶
type SupportHours struct { Type string `json:"type,omitempty"` Timezone string `json:"time_zone,omitempty"` StartTime string `json:"start_time,omitempty"` EndTime string `json:"end_time,omitempty"` DaysOfWeek []uint `json:"days_of_week,omitempty"` }
SupportHours are the support hours for the service.
type TagAssignment ¶ added in v1.4.0
type TagAssignment struct { Type string `json:"type"` TagID string `json:"id,omitempty"` Label string `json:"label,omitempty"` }
TagAssignment is the structure for assigning tags to an entity
type TagAssignments ¶ added in v1.4.0
type TagAssignments struct { Add []*TagAssignment `json:"add,omitempty"` Remove []*TagAssignment `json:"remove,omitempty"` }
TagAssignments can be applied teams, users and escalation policies
type Team ¶
type Team struct { APIObject Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` Parent *APIObject `json:"parent,omitempty"` }
Team is a collection of users and escalation policies that represent a group of people within an organization.
type TeamUserRole ¶ added in v1.4.0
type TeamUserRole string
TeamUserRole is a named type to represent the different Team Roles supported by PagerDuty when adding a user to a team.
For more info: https://support.pagerduty.com/docs/advanced-permissions#team-roles
const ( // TeamUserRoleObserver is the obesrver team role, which generally provides // read-only access. They gain responder-level permissions on an incident if // one is assigned to them. TeamUserRoleObserver TeamUserRole = "observer" // TeamUserRoleResponder is the responder team role, and they are given the // same permissions as the observer plus the ability to respond to // incidents, trigger incidents, and manage overrides. TeamUserRoleResponder TeamUserRole = "responder" // TeamUserRoleManager is the manager team role, and they are given the same // permissions as the responder plus the ability to edit and delete the // different resources owned by the team. TeamUserRoleManager TeamUserRole = "manager" )
type UpdateScheduleOptions ¶
type UpdateScheduleOptions struct {
Overflow bool `url:"overflow,omitempty"`
}
UpdateScheduleOptions is the data structure used when calling the UpdateSchedule API endpoint.
type User ¶
type User struct { APIObject Name string `json:"name"` Email string `json:"email"` Timezone string `json:"time_zone,omitempty"` Color string `json:"color,omitempty"` Role string `json:"role,omitempty"` AvatarURL string `json:"avatar_url,omitempty"` Description string `json:"description,omitempty"` InvitationSent bool `json:"invitation_sent,omitempty"` ContactMethods []ContactMethod `json:"contact_methods,omitempty"` NotificationRules []NotificationRule `json:"notification_rules,omitempty"` JobTitle string `json:"job_title,omitempty"` Teams []Team `json:"teams,omitempty"` }
User is a member of a PagerDuty account that has the ability to interact with incidents and other data on the account.
type UserReference ¶
type UserReference struct {
User APIObject `json:"user"`
}
UserReference is a reference to an authorized PagerDuty user.
type V2Event ¶
type V2Event struct { RoutingKey string `json:"routing_key"` Action string `json:"event_action"` DedupKey string `json:"dedup_key,omitempty"` Images []interface{} `json:"images,omitempty"` Links []interface{} `json:"links,omitempty"` Client string `json:"client,omitempty"` ClientURL string `json:"client_url,omitempty"` Payload *V2Payload `json:"payload,omitempty"` }
V2Event includes the incident/alert details
type V2EventResponse ¶
type V2EventResponse struct { Status string `json:"status,omitempty"` DedupKey string `json:"dedup_key,omitempty"` Message string `json:"message,omitempty"` Errors []string `json:"errors,omitempty"` }
V2EventResponse is the json response body for an event
func ManageEvent
deprecated
func ManageEvent(e V2Event) (*V2EventResponse, error)
ManageEvent handles the trigger, acknowledge, and resolve methods for an event.
Deprecated: Use ManageEventWithContext instead.
func ManageEventWithContext ¶ added in v1.4.0
func ManageEventWithContext(ctx context.Context, e V2Event) (*V2EventResponse, error)
ManageEventWithContext handles the trigger, acknowledge, and resolve methods for an event.
type V2Payload ¶
type V2Payload struct { Summary string `json:"summary"` Source string `json:"source"` Severity string `json:"severity"` Timestamp string `json:"timestamp,omitempty"` Component string `json:"component,omitempty"` Group string `json:"group,omitempty"` Class string `json:"class,omitempty"` Details interface{} `json:"custom_details,omitempty"` }
V2Payload represents the individual event details for an event
type Vendor ¶
type Vendor struct { APIObject Name string `json:"name,omitempty"` LogoURL string `json:"logo_url,omitempty"` LongName string `json:"long_name,omitempty"` WebsiteURL string `json:"website_url,omitempty"` Description string `json:"description,omitempty"` Connectable bool `json:"connectable,omitempty"` ThumbnailURL string `json:"thumbnail_url,omitempty"` GenericServiceType string `json:"generic_service_type,omitempty"` IntegrationGuideURL string `json:"integration_guide_url,omitempty"` AlertCreationDefault string `json:"alert_creation_default,omitempty"` AlertCreationEditable bool `json:"alert_creation_editable,omitempty"` IsPDCEF bool `json:"is_pd_cef,omitempty"` }
Vendor represents a specific type of integration. AWS Cloudwatch, Splunk, Datadog, etc are all examples of vendors that can be integrated in PagerDuty by making an integration.
type WebhookPayload ¶
type WebhookPayload struct { ID string `json:"id"` Event string `json:"event"` CreatedOn time.Time `json:"created_on"` Incident IncidentDetails `json:"incident"` LogEntries []LogEntry `json:"log_entries"` }
WebhookPayload represents the V2 webhook payload
type WebhookPayloadMessages ¶ added in v1.2.0
type WebhookPayloadMessages struct {
Messages []WebhookPayload `json:"messages"`
}
WebhookPayloadMessages is the wrapper around the Webhook payloads. The Array may contain multiple message elements if webhook firing actions occurred in quick succession
func DecodeWebhook ¶
func DecodeWebhook(r io.Reader) (*WebhookPayloadMessages, error)
DecodeWebhook decodes a webhook from a response object.
Source Files ¶
- ability.go
- addon.go
- analytics.go
- audit.go
- business_service.go
- change_events.go
- client.go
- escalation_policy.go
- event.go
- event_orchestration.go
- event_v2.go
- extension.go
- extension_schema.go
- incident.go
- license.go
- log_entry.go
- maintenance_window.go
- notification.go
- on_call.go
- priorites.go
- response_play.go
- ruleset.go
- schedule.go
- service.go
- service_dependency.go
- service_integration.go
- standard.go
- tag.go
- team.go
- user.go
- vendor.go
- webhook.go
Directories ¶
Path | Synopsis |
---|---|
Package webhookv3 provides functionality for working with V3 PagerDuty Webhooks, including signature verification and decoding.
|
Package webhookv3 provides functionality for working with V3 PagerDuty Webhooks, including signature verification and decoding. |