Class SlackConfig
- java.lang.Object
-
- io.fabric8.openshift.api.model.monitoring.v1alpha1.SlackConfig
-
- All Implemented Interfaces:
Editable<SlackConfigBuilder>,KubernetesResource,Serializable
@Generated("io.fabric8.kubernetes.schema.generator.model.ModelGenerator") public class SlackConfig extends Object implements Editable<SlackConfigBuilder>, KubernetesResource
SlackConfig configures notifications via Slack. See https://prometheus.io/docs/alerting/latest/configuration/#slack_config- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SlackConfig()No args constructor for use in serializationSlackConfig(List<SlackAction> actions, SecretKeySelector apiURL, String callbackId, String channel, String color, String fallback, List<SlackField> fields, String footer, HTTPConfig httpConfig, String iconEmoji, String iconURL, String imageURL, Boolean linkNames, String messageText, List<String> mrkdwnIn, String pretext, Boolean sendResolved, Boolean shortFields, String text, String thumbURL, String timeout, String title, String titleLink, String username)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SlackConfigBuilderedit()List<SlackAction>getActions()actions defines a list of Slack actions that are sent with each notification.Map<String,Object>getAdditionalProperties()SecretKeySelectorgetApiURL()SlackConfig configures notifications via Slack.StringgetCallbackId()callbackId defines an identifier for the message used in interactive components.StringgetChannel()channel defines the channel or user to send notifications to.StringgetColor()color defines the color of the left border of the Slack message attachment.StringgetFallback()fallback defines a plain-text summary of the attachment for clients that don't support attachments.List<SlackField>getFields()fields defines a list of Slack fields that are sent with each notification.StringgetFooter()footer defines small text displayed at the bottom of the message attachment.HTTPConfiggetHttpConfig()SlackConfig configures notifications via Slack.StringgetIconEmoji()iconEmoji defines the emoji to use as the bot's avatar (e.g., ":ghost:").StringgetIconURL()iconURL defines the URL to an image to use as the bot's avatar.StringgetImageURL()imageURL defines the URL to an image file that will be displayed inside the message attachment.BooleangetLinkNames()linkNames enables automatic linking of channel names and usernames in the message.StringgetMessageText()messageText defines text content of the Slack message.List<String>getMrkdwnIn()mrkdwnIn defines which fields should be parsed as Slack markdown.StringgetPretext()pretext defines optional text that appears above the message attachment block.BooleangetSendResolved()sendResolved defines whether or not to notify about resolved alerts.BooleangetShortFields()shortFields determines whether fields are displayed in a compact format.StringgetText()text defines the main text content of the Slack message attachment.StringgetThumbURL()thumbURL defines the URL to an image file that will be displayed as a thumbnail on the right side of the message attachment.StringgetTimeout()timeout defines the maximum time to wait for a webhook request to complete, before failing the request and allowing it to be retried.StringgetTitle()title defines the title text displayed in the Slack message attachment.StringgetTitleLink()titleLink defines the URL that the title will link to when clicked.StringgetUsername()username defines the slack bot user name.voidsetActions(List<SlackAction> actions)actions defines a list of Slack actions that are sent with each notification.voidsetAdditionalProperties(Map<String,Object> additionalProperties)voidsetAdditionalProperty(String name, Object value)voidsetApiURL(SecretKeySelector apiURL)SlackConfig configures notifications via Slack.voidsetCallbackId(String callbackId)callbackId defines an identifier for the message used in interactive components.voidsetChannel(String channel)channel defines the channel or user to send notifications to.voidsetColor(String color)color defines the color of the left border of the Slack message attachment.voidsetFallback(String fallback)fallback defines a plain-text summary of the attachment for clients that don't support attachments.voidsetFields(List<SlackField> fields)fields defines a list of Slack fields that are sent with each notification.voidsetFooter(String footer)footer defines small text displayed at the bottom of the message attachment.voidsetHttpConfig(HTTPConfig httpConfig)SlackConfig configures notifications via Slack.voidsetIconEmoji(String iconEmoji)iconEmoji defines the emoji to use as the bot's avatar (e.g., ":ghost:").voidsetIconURL(String iconURL)iconURL defines the URL to an image to use as the bot's avatar.voidsetImageURL(String imageURL)imageURL defines the URL to an image file that will be displayed inside the message attachment.voidsetLinkNames(Boolean linkNames)linkNames enables automatic linking of channel names and usernames in the message.voidsetMessageText(String messageText)messageText defines text content of the Slack message.voidsetMrkdwnIn(List<String> mrkdwnIn)mrkdwnIn defines which fields should be parsed as Slack markdown.voidsetPretext(String pretext)pretext defines optional text that appears above the message attachment block.voidsetSendResolved(Boolean sendResolved)sendResolved defines whether or not to notify about resolved alerts.voidsetShortFields(Boolean shortFields)shortFields determines whether fields are displayed in a compact format.voidsetText(String text)text defines the main text content of the Slack message attachment.voidsetThumbURL(String thumbURL)thumbURL defines the URL to an image file that will be displayed as a thumbnail on the right side of the message attachment.voidsetTimeout(String timeout)timeout defines the maximum time to wait for a webhook request to complete, before failing the request and allowing it to be retried.voidsetTitle(String title)title defines the title text displayed in the Slack message attachment.voidsetTitleLink(String titleLink)titleLink defines the URL that the title will link to when clicked.voidsetUsername(String username)username defines the slack bot user name.SlackConfigBuildertoBuilder()
-
-
-
Constructor Detail
-
SlackConfig
public SlackConfig()
No args constructor for use in serialization
-
SlackConfig
public SlackConfig(List<SlackAction> actions, SecretKeySelector apiURL, String callbackId, String channel, String color, String fallback, List<SlackField> fields, String footer, HTTPConfig httpConfig, String iconEmoji, String iconURL, String imageURL, Boolean linkNames, String messageText, List<String> mrkdwnIn, String pretext, Boolean sendResolved, Boolean shortFields, String text, String thumbURL, String timeout, String title, String titleLink, String username)
-
-
Method Detail
-
getActions
public List<SlackAction> getActions()
actions defines a list of Slack actions that are sent with each notification.
-
setActions
public void setActions(List<SlackAction> actions)
actions defines a list of Slack actions that are sent with each notification.
-
getApiURL
public SecretKeySelector getApiURL()
SlackConfig configures notifications via Slack. See https://prometheus.io/docs/alerting/latest/configuration/#slack_config
-
setApiURL
public void setApiURL(SecretKeySelector apiURL)
SlackConfig configures notifications via Slack. See https://prometheus.io/docs/alerting/latest/configuration/#slack_config
-
getCallbackId
public String getCallbackId()
callbackId defines an identifier for the message used in interactive components.
-
setCallbackId
public void setCallbackId(String callbackId)
callbackId defines an identifier for the message used in interactive components.
-
getChannel
public String getChannel()
channel defines the channel or user to send notifications to.
-
setChannel
public void setChannel(String channel)
channel defines the channel or user to send notifications to.
-
getColor
public String getColor()
color defines the color of the left border of the Slack message attachment. Can be a hex color code (e.g., "#ff0000") or a predefined color name.
-
setColor
public void setColor(String color)
color defines the color of the left border of the Slack message attachment. Can be a hex color code (e.g., "#ff0000") or a predefined color name.
-
getFallback
public String getFallback()
fallback defines a plain-text summary of the attachment for clients that don't support attachments.
-
setFallback
public void setFallback(String fallback)
fallback defines a plain-text summary of the attachment for clients that don't support attachments.
-
getFields
public List<SlackField> getFields()
fields defines a list of Slack fields that are sent with each notification.
-
setFields
public void setFields(List<SlackField> fields)
fields defines a list of Slack fields that are sent with each notification.
-
getFooter
public String getFooter()
footer defines small text displayed at the bottom of the message attachment.
-
setFooter
public void setFooter(String footer)
footer defines small text displayed at the bottom of the message attachment.
-
getHttpConfig
public HTTPConfig getHttpConfig()
SlackConfig configures notifications via Slack. See https://prometheus.io/docs/alerting/latest/configuration/#slack_config
-
setHttpConfig
public void setHttpConfig(HTTPConfig httpConfig)
SlackConfig configures notifications via Slack. See https://prometheus.io/docs/alerting/latest/configuration/#slack_config
-
getIconEmoji
public String getIconEmoji()
iconEmoji defines the emoji to use as the bot's avatar (e.g., ":ghost:").
-
setIconEmoji
public void setIconEmoji(String iconEmoji)
iconEmoji defines the emoji to use as the bot's avatar (e.g., ":ghost:").
-
getIconURL
public String getIconURL()
iconURL defines the URL to an image to use as the bot's avatar.
-
setIconURL
public void setIconURL(String iconURL)
iconURL defines the URL to an image to use as the bot's avatar.
-
getImageURL
public String getImageURL()
imageURL defines the URL to an image file that will be displayed inside the message attachment.
-
setImageURL
public void setImageURL(String imageURL)
imageURL defines the URL to an image file that will be displayed inside the message attachment.
-
getLinkNames
public Boolean getLinkNames()
linkNames enables automatic linking of channel names and usernames in the message. When true, @channel and @username will be converted to clickable links.
-
setLinkNames
public void setLinkNames(Boolean linkNames)
linkNames enables automatic linking of channel names and usernames in the message. When true, @channel and @username will be converted to clickable links.
-
getMessageText
public String getMessageText()
messageText defines text content of the Slack message. If set, this is sent as the top-level 'text' field in the Slack payload. It requires Alertmanager >= v0.31.0.
-
setMessageText
public void setMessageText(String messageText)
messageText defines text content of the Slack message. If set, this is sent as the top-level 'text' field in the Slack payload. It requires Alertmanager >= v0.31.0.
-
getMrkdwnIn
public List<String> getMrkdwnIn()
mrkdwnIn defines which fields should be parsed as Slack markdown. Valid values include "pretext", "text", and "fields".
-
setMrkdwnIn
public void setMrkdwnIn(List<String> mrkdwnIn)
mrkdwnIn defines which fields should be parsed as Slack markdown. Valid values include "pretext", "text", and "fields".
-
getPretext
public String getPretext()
pretext defines optional text that appears above the message attachment block.
-
setPretext
public void setPretext(String pretext)
pretext defines optional text that appears above the message attachment block.
-
getSendResolved
public Boolean getSendResolved()
sendResolved defines whether or not to notify about resolved alerts.
-
setSendResolved
public void setSendResolved(Boolean sendResolved)
sendResolved defines whether or not to notify about resolved alerts.
-
getShortFields
public Boolean getShortFields()
shortFields determines whether fields are displayed in a compact format. When true, fields are shown side by side when possible.
-
setShortFields
public void setShortFields(Boolean shortFields)
shortFields determines whether fields are displayed in a compact format. When true, fields are shown side by side when possible.
-
getText
public String getText()
text defines the main text content of the Slack message attachment.
-
setText
public void setText(String text)
text defines the main text content of the Slack message attachment.
-
getThumbURL
public String getThumbURL()
thumbURL defines the URL to an image file that will be displayed as a thumbnail on the right side of the message attachment.
-
setThumbURL
public void setThumbURL(String thumbURL)
thumbURL defines the URL to an image file that will be displayed as a thumbnail on the right side of the message attachment.
-
getTimeout
public String getTimeout()
timeout defines the maximum time to wait for a webhook request to complete, before failing the request and allowing it to be retried. It requires Alertmanager >= v0.30.0.
-
setTimeout
public void setTimeout(String timeout)
timeout defines the maximum time to wait for a webhook request to complete, before failing the request and allowing it to be retried. It requires Alertmanager >= v0.30.0.
-
getTitle
public String getTitle()
title defines the title text displayed in the Slack message attachment.
-
setTitle
public void setTitle(String title)
title defines the title text displayed in the Slack message attachment.
-
getTitleLink
public String getTitleLink()
titleLink defines the URL that the title will link to when clicked.
-
setTitleLink
public void setTitleLink(String titleLink)
titleLink defines the URL that the title will link to when clicked.
-
getUsername
public String getUsername()
username defines the slack bot user name.
-
setUsername
public void setUsername(String username)
username defines the slack bot user name.
-
edit
public SlackConfigBuilder edit()
- Specified by:
editin interfaceEditable<SlackConfigBuilder>
-
toBuilder
public SlackConfigBuilder toBuilder()
-
-