public class CreateOrUpdateWebhookContactRequest
extends com.aliyun.tea.TeaModel
| 限定符和类型 | 字段和说明 |
|---|---|
String |
bizHeaders
The HTTP request headers.
|
String |
bizParams
The parameters in the HTTP request.
|
String |
body
The notification template that is sent when an alert is triggered.
|
String |
method
The HTTP request method.
|
String |
recoverBody
The notification template that is sent when an alert is resolved.
|
String |
url
The URL of the HTTP request method.
|
Long |
webhookId
The ID of the webhook alert contact.
|
String |
webhookName
The name of the webhook alert contact.
|
| 构造器和说明 |
|---|
CreateOrUpdateWebhookContactRequest() |
| 限定符和类型 | 方法和说明 |
|---|---|
static CreateOrUpdateWebhookContactRequest |
build(Map<String,?> map) |
String |
getBizHeaders() |
String |
getBizParams() |
String |
getBody() |
String |
getMethod() |
String |
getRecoverBody() |
String |
getUrl() |
Long |
getWebhookId() |
String |
getWebhookName() |
CreateOrUpdateWebhookContactRequest |
setBizHeaders(String bizHeaders) |
CreateOrUpdateWebhookContactRequest |
setBizParams(String bizParams) |
CreateOrUpdateWebhookContactRequest |
setBody(String body) |
CreateOrUpdateWebhookContactRequest |
setMethod(String method) |
CreateOrUpdateWebhookContactRequest |
setRecoverBody(String recoverBody) |
CreateOrUpdateWebhookContactRequest |
setUrl(String url) |
CreateOrUpdateWebhookContactRequest |
setWebhookId(Long webhookId) |
CreateOrUpdateWebhookContactRequest |
setWebhookName(String webhookName) |
@NameInMap(value="BizHeaders") public String bizHeaders
The HTTP request headers.
example:[{"Content-Type":"application/json;charset=utf-8"}]
@NameInMap(value="BizParams") public String bizParams
The parameters in the HTTP request.
example:[{"content":"mike"}]
@NameInMap(value="Body") public String body
The notification template that is sent when an alert is triggered. This parameter is required if the Method parameter is set to Post. You can use the $content placeholder to specify the notification content. The content cannot exceed 500 characters in length. For more information, see Variable description of a notification template.\\
{ "Alert name":"{{ .commonLabels.alertname }}{{if .commonLabels.clustername }}", "Cluster name":"{{ .commonLabels.clustername }} {{ end }}{{if eq "app" .commonLabels._aliyun_arms_involvedObject_kind }}", "Application name":"{{ .commonLabels._aliyun_arms_involvedObject_name }} {{ end }}", "Notification policy":"{{ .dispatchRuleName }}", "Alert time":"{{ .startTime }}", "Alert content":"{{ for .alerts }} {{ .annotations.message }} {{ end }}" }
@NameInMap(value="Method") public String method
The HTTP request method.
This parameter is required.
example:Post
@NameInMap(value="RecoverBody") public String recoverBody
The notification template that is sent when an alert is resolved. This parameter is required if the Method parameter is set to Post. You can use the $content placeholder to specify the notification content. The content cannot exceed 500 characters in length. For more information, see Variable description of a notification template.
{ "Alert name":"{{ .commonLabels.alertname }}{{if .commonLabels.clustername }}", "Cluster name":"{{ .commonLabels.clustername }} {{ end }}{{if eq "app" .commonLabels._aliyun_arms_involvedObject_kind }}", "Application name":"{{ .commonLabels._aliyun_arms_involvedObject_name }} {{ end }}", "Notification policy":"{{ .dispatchRuleName }}", "Recovery time":"{{ .endTime }}", "Alert content":"{{ for .alerts }} {{ .annotations.message }} {{ end }}" }
@NameInMap(value="Url") public String url
The URL of the HTTP request method.
This parameter is required.
example:https://oapi.dingtalk.com/robot/send?access_token=e1a049121******
@NameInMap(value="WebhookId") public Long webhookId
The ID of the webhook alert contact.
123
@NameInMap(value="WebhookName") public String webhookName
The name of the webhook alert contact.
This parameter is required.
example:Webhook alert
public static CreateOrUpdateWebhookContactRequest build(Map<String,?> map) throws Exception
Exceptionpublic CreateOrUpdateWebhookContactRequest setBizHeaders(String bizHeaders)
public String getBizHeaders()
public CreateOrUpdateWebhookContactRequest setBizParams(String bizParams)
public String getBizParams()
public CreateOrUpdateWebhookContactRequest setBody(String body)
public String getBody()
public CreateOrUpdateWebhookContactRequest setMethod(String method)
public String getMethod()
public CreateOrUpdateWebhookContactRequest setRecoverBody(String recoverBody)
public String getRecoverBody()
public CreateOrUpdateWebhookContactRequest setUrl(String url)
public String getUrl()
public CreateOrUpdateWebhookContactRequest setWebhookId(Long webhookId)
public Long getWebhookId()
public CreateOrUpdateWebhookContactRequest setWebhookName(String webhookName)
public String getWebhookName()
Copyright © 2024. All rights reserved.