notifications

package
v1.27.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Types = struct {
	Ansibletower Type
	Email        Type
	Hipchat      Type
	Jira         Type
	OpsGenie     Type
	PagerDuty    Type
	ServiceNow   Type
	Slack        Type
	Trello       Type
	Victorops    Type
	Webhook      Type
	Xmatters     Type
}{
	"ANSIBLETOWER",
	"EMAIL",
	"HIPCHAT",
	"JIRA",
	"OPS_GENIE",
	"PAGER_DUTY",
	"SERVICE_NOW",
	"SLACK",
	"TRELLO",
	"VICTOROPS",
	"WEBHOOK",
	"XMATTERS",
}

Types offers the known enum values

Functions

This section is empty.

Types

type AnsibleTowerConfig

type AnsibleTowerConfig struct {
	BaseNotificationConfig
	AcceptAnyCertificate bool    `json:"acceptAnyCertificate"` // Accept any, including self-signed and invalid, SSL certificate (`true`) or only trusted (`false`) certificates.
	CustomMessage        string  `json:"customMessage"`        // The custom message of the notification.   This message will be displayed in the extra variables **Message** field of your job template.  You can use the following placeholders:  * `{ImpactedEntities}`: Details about the entities impacted by the problem in form of a JSON array.  * `{ImpactedEntity}`: The entity impacted by the problem or *X* impacted entities.  * `{PID}`: The ID of the reported problem.  * `{ProblemDetailsText}`: All problem event details, including root cause, as a text-formatted string.  * `{ProblemID}`: The display number of the reported problem.  * `{ProblemImpact}`: The [impact level](https://www.dynatrace.com/support/help/shortlink/impact-analysis) of the problem. Possible values are `APPLICATION`, `SERVICE`, and `INFRASTRUCTURE`.  * `{ProblemSeverity}`: The [severity level](https://www.dynatrace.com/support/help/shortlink/event-types) of the problem. Possible values are `AVAILABILITY`, `ERROR`, `PERFORMANCE`, `RESOURCE_CONTENTION`, and `CUSTOM_ALERT`.  * `{ProblemTitle}`: A short description of the problem.  * `{ProblemURL}`: The URL of the problem within Dynatrace.  * `{State}`: The state of the problem. Possible values are `OPEN` and `RESOLVED`.  * `{Tags}`: The list of tags that are defined for all impacted entities, separated by commas.
	JobTemplateID        int32   `json:"jobTemplateID"`        // The ID of the target Ansible Tower job template.
	JobTemplateURL       string  `json:"jobTemplateURL"`       // The URL of the target Ansible Tower job template.
	Password             *string `json:"password,omitempty"`   // The password for the Ansible Tower account.
	Username             string  `json:"username"`             // The username of the Ansible Tower account.
}

AnsibleTowerConfig Configuration of the Ansible Tower notification.

func (*AnsibleTowerConfig) FillDemoValues

func (me *AnsibleTowerConfig) FillDemoValues() []string

func (*AnsibleTowerConfig) GetType

func (me *AnsibleTowerConfig) GetType() Type

func (*AnsibleTowerConfig) MarshalHCL

func (me *AnsibleTowerConfig) MarshalHCL(properties hcl.Properties) error

func (*AnsibleTowerConfig) MarshalJSON

func (me *AnsibleTowerConfig) MarshalJSON() ([]byte, error)

func (*AnsibleTowerConfig) PrepareMarshalHCL

func (me *AnsibleTowerConfig) PrepareMarshalHCL(decoder hcl.Decoder) error

func (*AnsibleTowerConfig) Schema

func (me *AnsibleTowerConfig) Schema() map[string]*schema.Schema

func (*AnsibleTowerConfig) UnmarshalHCL

func (me *AnsibleTowerConfig) UnmarshalHCL(decoder hcl.Decoder) error

func (*AnsibleTowerConfig) UnmarshalJSON

func (me *AnsibleTowerConfig) UnmarshalJSON(data []byte) error

type BaseNotificationConfig

type BaseNotificationConfig struct {
	ID              *string                    `json:"id,omitempty" hcl:"-"`                   // The ID of the notification configuration.
	Name            string                     `json:"name" hcl:"name"`                        // The name of the notification configuration.
	Type            Type                       `json:"type" hcl:"type"`                        // Defines the actual set of fields depending on the value. See one of the following objects:  * `EMAIL` -> EmailNotificationConfig  * `PAGER_DUTY` -> PagerDutyNotificationConfig  * `WEBHOOK` -> WebHookNotificationConfig  * `SLACK` -> SlackNotificationConfig  * `HIPCHAT` -> HipChatNotificationConfig  * `VICTOROPS` -> VictorOpsNotificationConfig  * `SERVICE_NOW` -> ServiceNowNotificationConfig  * `XMATTERS` -> XMattersNotificationConfig  * `ANSIBLETOWER` -> AnsibleTowerNotificationConfig  * `OPS_GENIE` -> OpsGenieNotificationConfig  * `JIRA` -> JiraNotificationConfig  * `TRELLO` -> TrelloNotificationConfig
	Active          bool                       `json:"active" hcl:"active"`                    // The configuration is enabled (`true`) or disabled (`false`).
	AlertingProfile string                     `json:"alertingProfile" hcl:"alerting_profile"` // The ID of the associated alerting profile.
	Unknowns        map[string]json.RawMessage `json:"-"`
}

BaseNotificationConfig Configuration of a notification. The actual set of fields depends on the `type` of the notification. See the [Notifications API - JSON models](https://www.dynatrace.com/support/help/shortlink/api-config-notifications-models) help topic for example models of every notification type.

func (*BaseNotificationConfig) GetID

func (me *BaseNotificationConfig) GetID() *string

func (*BaseNotificationConfig) GetName

func (me *BaseNotificationConfig) GetName() string

func (*BaseNotificationConfig) GetType

func (me *BaseNotificationConfig) GetType() Type

func (*BaseNotificationConfig) MarshalHCL

func (me *BaseNotificationConfig) MarshalHCL(properties hcl.Properties) error

func (*BaseNotificationConfig) MarshalJSON

func (me *BaseNotificationConfig) MarshalJSON() ([]byte, error)

func (*BaseNotificationConfig) Schema

func (me *BaseNotificationConfig) Schema() map[string]*schema.Schema

func (*BaseNotificationConfig) SetID

func (me *BaseNotificationConfig) SetID(id *string)

func (*BaseNotificationConfig) UnmarshalHCL

func (me *BaseNotificationConfig) UnmarshalHCL(decoder hcl.Decoder) error

func (*BaseNotificationConfig) UnmarshalJSON

func (me *BaseNotificationConfig) UnmarshalJSON(data []byte) error

type EmailConfig

type EmailConfig struct {
	BaseNotificationConfig
	BccReceivers []string `json:"bccReceivers,omitempty"` // The list of the email BCC-recipients.
	Body         string   `json:"body"`                   // The template of the email notification.  You can use the following placeholders:  * `{ImpactedEntities}`: Details about the entities impacted by the problem in form of a JSON array.  * `{ImpactedEntity}`: The entity impacted by the problem or *X* impacted entities.  * `{PID}`: The ID of the reported problem.  * `{ProblemDetailsHTML}`: All problem event details, including root cause, as an HTML-formatted string.  * `{ProblemDetailsJSON}`: All problem event details, including root cause, as a JSON object.  * `{ProblemDetailsMarkdown}`: All problem event details, including root cause, as a [Markdown-formatted](https://www.markdownguide.org/cheat-sheet/) string.  * `{ProblemDetailsText}`: All problem event details, including root cause, as a text-formatted string.  * `{ProblemID}`: The display number of the reported problem.  * `{ProblemImpact}`: The [impact level](https://www.dynatrace.com/support/help/shortlink/impact-analysis) of the problem. Possible values are `APPLICATION`, `SERVICE`, and `INFRASTRUCTURE`.  * `{ProblemSeverity}`: The [severity level](https://www.dynatrace.com/support/help/shortlink/event-types) of the problem. Possible values are `AVAILABILITY`, `ERROR`, `PERFORMANCE`, `RESOURCE_CONTENTION`, and `CUSTOM_ALERT`.  * `{ProblemTitle}`: A short description of the problem.  * `{ProblemURL}`: The URL of the problem within Dynatrace.  * `{State}`: The state of the problem. Possible values are `OPEN` and `RESOLVED`.  * `{Tags}`: The list of tags that are defined for all impacted entities, separated by commas.
	CcReceivers  []string `json:"ccReceivers,omitempty"`  // The list of the email CC-recipients.
	Receivers    []string `json:"receivers"`              // The list of the email recipients.
	Subject      string   `json:"subject"`                // The subject of the email notifications.
}

EmailConfig Configuration of the email notification.

func (*EmailConfig) GetType

func (me *EmailConfig) GetType() Type

func (*EmailConfig) MarshalHCL

func (me *EmailConfig) MarshalHCL(properties hcl.Properties) error

func (*EmailConfig) MarshalJSON

func (me *EmailConfig) MarshalJSON() ([]byte, error)

func (*EmailConfig) Schema

func (me *EmailConfig) Schema() map[string]*schema.Schema

func (*EmailConfig) UnmarshalHCL

func (me *EmailConfig) UnmarshalHCL(decoder hcl.Decoder) error

func (*EmailConfig) UnmarshalJSON

func (me *EmailConfig) UnmarshalJSON(data []byte) error

type HTTPHeader

type HTTPHeader struct {
	Name  string  `json:"name"`            // The name of the HTTP header.
	Value *string `json:"value,omitempty"` // The value of the HTTP header. May contain an empty value.   Required when creating a new notification.  For the **Authorization** header, GET requests return the `null` value.  If you want update a notification configuration with an **Authorization** header which you want to remain intact, set the **Authorization** header with the `null` value.
}

HTTPHeader The HTTP header.

func (*HTTPHeader) MarshalHCL

func (me *HTTPHeader) MarshalHCL(properties hcl.Properties) error

func (*HTTPHeader) MarshalJSON

func (me *HTTPHeader) MarshalJSON() ([]byte, error)

func (*HTTPHeader) Schema

func (me *HTTPHeader) Schema() map[string]*schema.Schema

func (*HTTPHeader) UnmarshalHCL

func (me *HTTPHeader) UnmarshalHCL(decoder hcl.Decoder) error

func (*HTTPHeader) UnmarshalJSON

func (me *HTTPHeader) UnmarshalJSON(data []byte) error

type JiraConfig

type JiraConfig struct {
	BaseNotificationConfig
	IssueType   string  `json:"issueType"`          // The type of the Jira issue to be created by this notification.
	Password    *string `json:"password,omitempty"` // The password for the Jira profile.
	ProjectKey  string  `json:"projectKey"`         // The project key of the Jira issue to be created by this notification.
	Summary     string  `json:"summary"`            // The summary of the Jira issue to be created by this notification.  You can use the following placeholders:  * `{ImpactedEntity}`: The entity impacted by the problem or *X* impacted entities.  * `{PID}`: The ID of the reported problem.  * `{ProblemDetailsText}`: All problem event details, including root cause, as a text-formatted string.  * `{ProblemID}`: The display number of the reported problem.  * `{ProblemImpact}`: The [impact level](https://www.dynatrace.com/support/help/shortlink/impact-analysis) of the problem. Possible values are `APPLICATION`, `SERVICE`, and `INFRASTRUCTURE`.  * `{ProblemSeverity}`: The [severity level](https://www.dynatrace.com/support/help/shortlink/event-types) of the problem. Possible values are `AVAILABILITY`, `ERROR`, `PERFORMANCE`, `RESOURCE_CONTENTION`, and `CUSTOM_ALERT`.  * `{ProblemTitle}`: A short description of the problem.  * `{ProblemURL}`: The URL of the problem within Dynatrace.  * `{State}`: The state of the problem. Possible values are `OPEN` and `RESOLVED`.  * `{Tags}`: The list of tags that are defined for all impacted entities, separated by commas.
	URL         string  `json:"url"`                // The URL of the Jira API endpoint.
	Username    string  `json:"username"`           // The username of the Jira profile.
	Description string  `json:"description"`        // The description of the Jira issue to be created by this notification.   You can use same placeholders as in issue summary.
}

JiraConfig Configuration of the Jira notification.

func (*JiraConfig) FillDemoValues

func (me *JiraConfig) FillDemoValues() []string

func (*JiraConfig) GetType

func (me *JiraConfig) GetType() Type

func (*JiraConfig) MarshalHCL

func (me *JiraConfig) MarshalHCL(properties hcl.Properties) error

func (*JiraConfig) MarshalJSON

func (me *JiraConfig) MarshalJSON() ([]byte, error)

func (*JiraConfig) PrepareMarshalHCL

func (me *JiraConfig) PrepareMarshalHCL(decoder hcl.Decoder) error

func (*JiraConfig) Schema

func (me *JiraConfig) Schema() map[string]*schema.Schema

func (*JiraConfig) UnmarshalHCL

func (me *JiraConfig) UnmarshalHCL(decoder hcl.Decoder) error

func (*JiraConfig) UnmarshalJSON

func (me *JiraConfig) UnmarshalJSON(data []byte) error

type MarshalPreparer

type MarshalPreparer interface {
	PrepareMarshalHCL(hcl.Decoder) error
}

type NotificationConfig

type NotificationConfig interface {
	GetType() Type
	GetID() *string
	SetID(*string)
	GetName() string
	MarshalHCL(hcl.Properties) error
	UnmarshalHCL(decoder hcl.Decoder) error
}

NotificationConfig Configuration of a notification. The actual set of fields depends on the `type` of the notification. See the [Notifications API - JSON models](https://www.dynatrace.com/support/help/shortlink/api-config-notifications-models) help topic for example models of every notification type.

type NotificationRecord

type NotificationRecord struct {
	NotificationConfig NotificationConfig `json:"-"`
}

func (*NotificationRecord) FillDemoValues

func (me *NotificationRecord) FillDemoValues() []string

func (*NotificationRecord) MarshalHCL

func (me *NotificationRecord) MarshalHCL(properties hcl.Properties) error

func (*NotificationRecord) MarshalJSON

func (me *NotificationRecord) MarshalJSON() ([]byte, error)

func (*NotificationRecord) Name

func (me *NotificationRecord) Name() string

func (*NotificationRecord) PrepareMarshalHCL

func (me *NotificationRecord) PrepareMarshalHCL(d hcl.Decoder) error

func (*NotificationRecord) Schema

func (me *NotificationRecord) Schema() map[string]*schema.Schema

func (*NotificationRecord) UnmarshalHCL

func (me *NotificationRecord) UnmarshalHCL(decoder hcl.Decoder) error

func (*NotificationRecord) UnmarshalJSON

func (me *NotificationRecord) UnmarshalJSON(data []byte) error

type OpsGenieConfig

type OpsGenieConfig struct {
	BaseNotificationConfig
	APIKey  *string `json:"apiKey,omitempty"` // The API key to access OpsGenie.
	Domain  string  `json:"domain"`           // The region domain of the OpsGenie.
	Message string  `json:"message"`          // The content of the message.  You can use the following placeholders:  * `{ProblemID}`: The display number of the reported problem.  * `{ProblemImpact}`: The [impact level](https://www.dynatrace.com/support/help/shortlink/impact-analysis) of the problem. Possible values are `APPLICATION`, `SERVICE`, and `INFRASTRUCTURE`.  * `{ProblemSeverity}`: The [severity level](https://www.dynatrace.com/support/help/shortlink/event-types) of the problem. Possible values are `AVAILABILITY`, `ERROR`, `PERFORMANCE`, `RESOURCE_CONTENTION`, and `CUSTOM_ALERT`.  * `{ProblemTitle}`: A short description of the problem.
}

OpsGenieConfig Configuration of the OpsGenie notification.

func (*OpsGenieConfig) FillDemoValues

func (me *OpsGenieConfig) FillDemoValues() []string

func (*OpsGenieConfig) GetType

func (me *OpsGenieConfig) GetType() Type

func (*OpsGenieConfig) MarshalHCL

func (me *OpsGenieConfig) MarshalHCL(properties hcl.Properties) error

func (*OpsGenieConfig) MarshalJSON

func (me *OpsGenieConfig) MarshalJSON() ([]byte, error)

func (*OpsGenieConfig) PrepareMarshalHCL

func (me *OpsGenieConfig) PrepareMarshalHCL(decoder hcl.Decoder) error

func (*OpsGenieConfig) Schema

func (me *OpsGenieConfig) Schema() map[string]*schema.Schema

func (*OpsGenieConfig) UnmarshalHCL

func (me *OpsGenieConfig) UnmarshalHCL(decoder hcl.Decoder) error

func (*OpsGenieConfig) UnmarshalJSON

func (me *OpsGenieConfig) UnmarshalJSON(data []byte) error

type PagerDutyConfig

type PagerDutyConfig struct {
	BaseNotificationConfig
	Account       string  `json:"account"`                 // The name of the PagerDuty account.
	ServiceAPIKey *string `json:"serviceApiKey,omitempty"` // The API key to access PagerDuty.
	ServiceName   string  `json:"serviceName"`             // The name of the service.
}

PagerDutyConfig Configuration of the PagerDuty notification.

func (*PagerDutyConfig) FillDemoValues

func (me *PagerDutyConfig) FillDemoValues() []string

func (*PagerDutyConfig) GetType

func (me *PagerDutyConfig) GetType() Type

func (*PagerDutyConfig) MarshalHCL

func (me *PagerDutyConfig) MarshalHCL(properties hcl.Properties) error

func (*PagerDutyConfig) MarshalJSON

func (me *PagerDutyConfig) MarshalJSON() ([]byte, error)

func (*PagerDutyConfig) PrepareMarshalHCL

func (me *PagerDutyConfig) PrepareMarshalHCL(decoder hcl.Decoder) error

func (*PagerDutyConfig) Schema

func (me *PagerDutyConfig) Schema() map[string]*schema.Schema

func (*PagerDutyConfig) UnmarshalHCL

func (me *PagerDutyConfig) UnmarshalHCL(decoder hcl.Decoder) error

func (*PagerDutyConfig) UnmarshalJSON

func (me *PagerDutyConfig) UnmarshalJSON(data []byte) error

type ServiceNowConfig

type ServiceNowConfig struct {
	BaseNotificationConfig
	SendEvents    bool    `json:"sendEvents"`             // Send events into ServiceNow ITOM (`true`).
	SendIncidents bool    `json:"sendIncidents"`          // Send incidents into ServiceNow ITSM (`true`).
	URL           *string `json:"url,omitempty"`          // The URL of the on-premise ServiceNow installation.   This field is mutually exclusive with the **instanceName** field. You can only use one of them.
	Username      string  `json:"username"`               // The username of the ServiceNow account.   Make sure that your user account has the `rest_service`, `web_request_admin`, and `x_dynat_ruxit.Integration` roles.
	InstanceName  *string `json:"instanceName,omitempty"` // The ServiceNow instance identifier. It refers to the first part of your own ServiceNow URL.   This field is mutually exclusive with the **url** field. You can only use one of them.
	Message       string  `json:"message"`                // The content of the ServiceNow description.  You can use the following placeholders:  * `{ImpactedEntity}`: The entity impacted by the problem or *X* impacted entities.  * `{PID}`: The ID of the reported problem.  * `{ProblemDetailsHTML}`: All problem event details, including root cause, as an HTML-formatted string.  * `{ProblemID}`: The display number of the reported problem.  * `{ProblemImpact}`: The [impact level](https://www.dynatrace.com/support/help/shortlink/impact-analysis) of the problem. Possible values are `APPLICATION`, `SERVICE`, and `INFRASTRUCTURE`.  * `{ProblemSeverity}`: The [severity level](https://www.dynatrace.com/support/help/shortlink/event-types) of the problem. Possible values are `AVAILABILITY`, `ERROR`, `PERFORMANCE`, `RESOURCE_CONTENTION`, and `CUSTOM_ALERT`.  * `{ProblemTitle}`: A short description of the problem.  * `{ProblemURL}`: The URL of the problem within Dynatrace.  * `{State}`: The state of the problem. Possible values are `OPEN` and `RESOLVED`.  * `{Tags}`: The list of tags that are defined for all impacted entities, separated by commas.
	Password      *string `json:"password,omitempty"`     // The username to the ServiceNow account
}

ServiceNowConfig Configuration of the ServiceNow notification.

func (*ServiceNowConfig) FillDemoValues

func (me *ServiceNowConfig) FillDemoValues() []string

func (*ServiceNowConfig) GetType

func (me *ServiceNowConfig) GetType() Type

func (*ServiceNowConfig) MarshalHCL

func (me *ServiceNowConfig) MarshalHCL(properties hcl.Properties) error

func (*ServiceNowConfig) MarshalJSON

func (me *ServiceNowConfig) MarshalJSON() ([]byte, error)

func (*ServiceNowConfig) PrepareMarshalHCL

func (me *ServiceNowConfig) PrepareMarshalHCL(decoder hcl.Decoder) error

func (*ServiceNowConfig) Schema

func (me *ServiceNowConfig) Schema() map[string]*schema.Schema

func (*ServiceNowConfig) UnmarshalHCL

func (me *ServiceNowConfig) UnmarshalHCL(decoder hcl.Decoder) error

func (*ServiceNowConfig) UnmarshalJSON

func (me *ServiceNowConfig) UnmarshalJSON(data []byte) error

type SlackConfig

type SlackConfig struct {
	BaseNotificationConfig
	Title   string  `json:"title"`         // The content of the message.  You can use the following placeholders:  * `{ImpactedEntity}`: The entity impacted by the problem or *X* impacted entities.  * `{PID}`: The ID of the reported problem.  * `{ProblemDetailsText}`: All problem event details, including root cause, as a text-formatted string.  * `{ProblemID}`: The display number of the reported problem.  * `{ProblemImpact}`: The [impact level](https://www.dynatrace.com/support/help/shortlink/impact-analysis) of the problem. Possible values are `APPLICATION`, `SERVICE`, and `INFRASTRUCTURE`.  * `{ProblemSeverity}`: The [severity level](https://www.dynatrace.com/support/help/shortlink/event-types) of the problem. Possible values are `AVAILABILITY`, `ERROR`, `PERFORMANCE`, `RESOURCE_CONTENTION`, and `CUSTOM_ALERT`.  * `{ProblemTitle}`: A short description of the problem.  * `{ProblemURL}`: The URL of the problem within Dynatrace.  * `{State}`: The state of the problem. Possible values are `OPEN` and `RESOLVED`.  * `{Tags}`: The list of tags that are defined for all impacted entities, separated by commas.
	URL     *string `json:"url,omitempty"` // The URL of the Slack WebHook.  This is confidential information, therefore GET requests return this field with the `null` value, and it is optional for PUT requests.
	Channel string  `json:"channel"`       // The channel (for example, `#general`) or the user (for example, `@john.smith`) to send the message to.
}

SlackConfig Configuration of the Slack notification.

func (*SlackConfig) FillDemoValues

func (me *SlackConfig) FillDemoValues() []string

func (*SlackConfig) GetType

func (me *SlackConfig) GetType() Type

func (*SlackConfig) MarshalHCL

func (me *SlackConfig) MarshalHCL(properties hcl.Properties) error

func (*SlackConfig) MarshalJSON

func (me *SlackConfig) MarshalJSON() ([]byte, error)

func (*SlackConfig) PrepareMarshalHCL

func (me *SlackConfig) PrepareMarshalHCL(decoder hcl.Decoder) error

func (*SlackConfig) Schema

func (me *SlackConfig) Schema() map[string]*schema.Schema

func (*SlackConfig) UnmarshalHCL

func (me *SlackConfig) UnmarshalHCL(decoder hcl.Decoder) error

func (*SlackConfig) UnmarshalJSON

func (me *SlackConfig) UnmarshalJSON(data []byte) error

type Stub

type Stub struct {
	Description *string `json:"description,omitempty"` // A short description of the Dynatrace entity.
	ID          string  `json:"id"`                    // The ID of the Dynatrace entity.
	Name        *string `json:"name,omitempty"`        // The name of the Dynatrace entity.
	Type        *Type   `json:"type,omitempty"`        // The type of the notification.
}

Stub The short representation of a notification.

type StubList

type StubList struct {
	Values []Stub `json:"values,omitempty"` // has no documentation
}

StubList has no documentation

type TrelloConfig

type TrelloConfig struct {
	BaseNotificationConfig
	ResolvedListID     string  `json:"resolvedListId"`               // The Trello list to which the card of the resolved problem should be assigned.
	Text               string  `json:"text"`                         // The text of the generated Trello card.  You can use the following placeholders:  * `{ImpactedEntity}`: The entity impacted by the problem or *X* impacted entities.  * `{PID}`: The ID of the reported problem.  * `{ProblemDetailsMarkdown}`: All problem event details, including root cause, as a [Markdown-formatted](https://www.markdownguide.org/cheat-sheet/) string.  * `{ProblemID}`: The display number of the reported problem.  * `{ProblemImpact}`: The [impact level](https://www.dynatrace.com/support/help/shortlink/impact-analysis) of the problem. Possible values are `APPLICATION`, `SERVICE`, and `INFRASTRUCTURE`.  * `{ProblemSeverity}`: The [severity level](https://www.dynatrace.com/support/help/shortlink/event-types) of the problem. Possible values are `AVAILABILITY`, `ERROR`, `PERFORMANCE`, `RESOURCE_CONTENTION`, and `CUSTOM_ALERT`.  * `{ProblemTitle}`: A short description of the problem.  * `{ProblemURL}`: The URL of the problem within Dynatrace.  * `{State}`: The state of the problem. Possible values are `OPEN` and `RESOLVED`.  * `{Tags}`: The list of tags that are defined for all impacted entities, separated by commas.
	ApplicationKey     string  `json:"applicationKey"`               // The application key for the Trello account.
	AuthorizationToken *string `json:"authorizationToken,omitempty"` // The application token for the Trello account.
	BoardID            string  `json:"boardId"`                      // The Trello board to which the card should be assigned.
	Description        string  `json:"description"`                  // The description of the Trello card.   You can use same placeholders as in card text.
	ListID             string  `json:"listId"`                       // The Trello list to which the card should be assigned.
}

TrelloConfig Configuration of the Trello notification.

func (*TrelloConfig) FillDemoValues

func (me *TrelloConfig) FillDemoValues() []string

func (*TrelloConfig) GetType

func (me *TrelloConfig) GetType() Type

func (*TrelloConfig) MarshalHCL

func (me *TrelloConfig) MarshalHCL(properties hcl.Properties) error

func (*TrelloConfig) MarshalJSON

func (me *TrelloConfig) MarshalJSON() ([]byte, error)

func (*TrelloConfig) PrepareMarshalHCL

func (me *TrelloConfig) PrepareMarshalHCL(decoder hcl.Decoder) error

func (*TrelloConfig) Schema

func (me *TrelloConfig) Schema() map[string]*schema.Schema

func (*TrelloConfig) UnmarshalHCL

func (me *TrelloConfig) UnmarshalHCL(decoder hcl.Decoder) error

func (*TrelloConfig) UnmarshalJSON

func (me *TrelloConfig) UnmarshalJSON(data []byte) error

type Type

type Type string

Type Defines the actual set of fields depending on the value. See one of the following objects: * `EMAIL` -> EmailNotificationConfig * `PAGER_DUTY` -> PagerDutyNotificationConfig * `WEBHOOK` -> WebHookNotificationConfig * `SLACK` -> SlackNotificationConfig * `HIPCHAT` -> HipChatNotificationConfig * `VICTOROPS` -> VictorOpsNotificationConfig * `SERVICE_NOW` -> ServiceNowNotificationConfig * `XMATTERS` -> XMattersNotificationConfig * `ANSIBLETOWER` -> AnsibleTowerNotificationConfig * `OPS_GENIE` -> OpsGenieNotificationConfig * `JIRA` -> JiraNotificationConfig * `TRELLO` -> TrelloNotificationConfig

type VictorOpsConfig

type VictorOpsConfig struct {
	BaseNotificationConfig
	APIKey     *string `json:"apiKey,omitempty"` // The API key for the target VictorOps account.
	Message    string  `json:"message"`          // The content of the message.  You can use the following placeholders:  * `{ImpactedEntity}`: The entity impacted by the problem or *X* impacted entities.  * `{ProblemDetailsText}`: All problem event details, including root cause, as a text-formatted string.  * `{ProblemID}`: The display number of the reported problem.  * `{ProblemImpact}`: The [impact level](https://www.dynatrace.com/support/help/shortlink/impact-analysis) of the problem. Possible values are `APPLICATION`, `SERVICE`, and `INFRASTRUCTURE`.  * `{ProblemSeverity}`: The [severity level](https://www.dynatrace.com/support/help/shortlink/event-types) of the problem. Possible values are `AVAILABILITY`, `ERROR`, `PERFORMANCE`, `RESOURCE_CONTENTION`, and `CUSTOM_ALERT`.  * `{ProblemTitle}`: A short description of the problem.  * `{ProblemURL}`: The URL of the problem within Dynatrace.  * `{State}`: The state of the problem. Possible values are `OPEN` and `RESOLVED`.
	RoutingKey string  `json:"routingKey"`       // The routing key, defining the group to be notified.
}

VictorOpsConfig Configuration of the VictorOps notification.

func (*VictorOpsConfig) FillDemoValues

func (me *VictorOpsConfig) FillDemoValues() []string

func (*VictorOpsConfig) GetType

func (me *VictorOpsConfig) GetType() Type

func (*VictorOpsConfig) MarshalHCL

func (me *VictorOpsConfig) MarshalHCL(properties hcl.Properties) error

func (*VictorOpsConfig) MarshalJSON

func (me *VictorOpsConfig) MarshalJSON() ([]byte, error)

func (*VictorOpsConfig) PrepareMarshalHCL

func (me *VictorOpsConfig) PrepareMarshalHCL(decoder hcl.Decoder) error

func (*VictorOpsConfig) Schema

func (me *VictorOpsConfig) Schema() map[string]*schema.Schema

func (*VictorOpsConfig) UnmarshalHCL

func (me *VictorOpsConfig) UnmarshalHCL(decoder hcl.Decoder) error

func (*VictorOpsConfig) UnmarshalJSON

func (me *VictorOpsConfig) UnmarshalJSON(data []byte) error

type WebHookConfig

type WebHookConfig struct {
	BaseNotificationConfig
	AcceptAnyCertificate     bool          `json:"acceptAnyCertificate"`               // Accept any, including self-signed and invalid, SSL certificate (`true`) or only trusted (`false`) certificates.
	Headers                  []*HTTPHeader `json:"headers,omitempty"`                  // A list of the additional HTTP headers.
	Payload                  string        `json:"payload"`                            // The content of the notification message.  You can use the following placeholders:  * `{ImpactedEntities}`: Details about the entities impacted by the problem in form of a JSON array.  * `{ImpactedEntity}`: The entity impacted by the problem or *X* impacted entities.  * `{PID}`: The ID of the reported problem.  * `{ProblemDetailsHTML}`: All problem event details, including root cause, as an HTML-formatted string.  * `{ProblemDetailsJSON}`: All problem event details, including root cause, as a JSON object.  * `{ProblemDetailsMarkdown}`: All problem event details, including root cause, as a [Markdown-formatted](https://www.markdownguide.org/cheat-sheet/) string.  * `{ProblemDetailsText}`: All problem event details, including root cause, as a text-formatted string.  * `{ProblemID}`: The display number of the reported problem.  * `{ProblemImpact}`: The [impact level](https://www.dynatrace.com/support/help/shortlink/impact-analysis) of the problem. Possible values are `APPLICATION`, `SERVICE`, and `INFRASTRUCTURE`.  * `{ProblemSeverity}`: The [severity level](https://www.dynatrace.com/support/help/shortlink/event-types) of the problem. Possible values are `AVAILABILITY`, `ERROR`, `PERFORMANCE`, `RESOURCE_CONTENTION`, and `CUSTOM_ALERT`.  * `{ProblemTitle}`: A short description of the problem.  * `{ProblemURL}`: The URL of the problem within Dynatrace.  * `{State}`: The state of the problem. Possible values are `OPEN` and `RESOLVED`.  * `{Tags}`: The list of tags that are defined for all impacted entities, separated by commas.
	URL                      string        `json:"url"`                                // The URL of the WebHook endpoint.
	NotifyEventMergesEnabled *bool         `json:"notifyEventMergesEnabled,omitempty"` // Call webhook if new events merge into existing problems
}

WebHookConfig Configuration of the custom WebHook notification.

func (*WebHookConfig) GetType

func (me *WebHookConfig) GetType() Type

func (*WebHookConfig) MarshalHCL

func (me *WebHookConfig) MarshalHCL(properties hcl.Properties) error

func (*WebHookConfig) MarshalJSON

func (me *WebHookConfig) MarshalJSON() ([]byte, error)

func (*WebHookConfig) Schema

func (me *WebHookConfig) Schema() map[string]*schema.Schema

func (*WebHookConfig) UnmarshalHCL

func (me *WebHookConfig) UnmarshalHCL(decoder hcl.Decoder) error

func (*WebHookConfig) UnmarshalJSON

func (me *WebHookConfig) UnmarshalJSON(data []byte) error

type XMattersConfig

type XMattersConfig struct {
	BaseNotificationConfig
	URL                  string        `json:"url"`                  // The URL of the xMatters WebHook.
	AcceptAnyCertificate bool          `json:"acceptAnyCertificate"` // Accept any, including self-signed and invalid, SSL certificate (`true`) or only trusted (`false`) certificates.
	Headers              []*HTTPHeader `json:"headers,omitempty"`    // A list of the additional HTTP headers.
	Payload              string        `json:"payload"`              // The content of the message.  You can use the following placeholders:  * `{ImpactedEntities}`: Details about the entities impacted by the problem in form of a JSON array.  * `{ImpactedEntity}`: The entity impacted by the problem or *X* impacted entities.  * `{PID}`: The ID of the reported problem.  * `{ProblemDetailsHTML}`: All problem event details, including root cause, as an HTML-formatted string.  * `{ProblemDetailsJSON}`: All problem event details, including root cause, as a JSON object.  * `{ProblemDetailsMarkdown}`: All problem event details, including root cause, as a [Markdown-formatted](https://www.markdownguide.org/cheat-sheet/) string.  * `{ProblemDetailsText}`: All problem event details, including root cause, as a text-formatted string.  * `{ProblemID}`: The display number of the reported problem.  * `{ProblemImpact}`: The [impact level](https://www.dynatrace.com/support/help/shortlink/impact-analysis) of the problem. Possible values are `APPLICATION`, `SERVICE`, and `INFRASTRUCTURE`.  * `{ProblemSeverity}`: The [severity level](https://www.dynatrace.com/support/help/shortlink/event-types) of the problem. Possible values are `AVAILABILITY`, `ERROR`, `PERFORMANCE`, `RESOURCE_CONTENTION`, and `CUSTOM_ALERT`.  * `{ProblemTitle}`: A short description of the problem.  * `{ProblemURL}`: The URL of the problem within Dynatrace.  * `{State}`: The state of the problem. Possible values are `OPEN` and `RESOLVED`.  * `{Tags}`: The list of tags that are defined for all impacted entities, separated by commas.
}

XMattersConfig Configuration of the xMatters notification.

func (*XMattersConfig) GetType

func (me *XMattersConfig) GetType() Type

func (*XMattersConfig) MarshalHCL

func (me *XMattersConfig) MarshalHCL(properties hcl.Properties) error

func (*XMattersConfig) MarshalJSON

func (me *XMattersConfig) MarshalJSON() ([]byte, error)

func (*XMattersConfig) Schema

func (me *XMattersConfig) Schema() map[string]*schema.Schema

func (*XMattersConfig) UnmarshalHCL

func (me *XMattersConfig) UnmarshalHCL(decoder hcl.Decoder) error

func (*XMattersConfig) UnmarshalJSON

func (me *XMattersConfig) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL