public class UpdateWebhookRequest
extends com.aliyun.tea.TeaModel
| 限定符和类型 | 字段和说明 |
|---|---|
String |
body
The notification template that is sent when an alert is triggered.
|
Long |
contactId
The ID of the webhook alert contact.
|
String |
contactName
The name of the webhook alert contact.
|
String |
httpHeaders
The HTTP request headers.
|
String |
httpParams
The parameters in the HTTP request.
|
String |
method
The HTTP request method.
|
String |
recoverBody
The notification template that is sent when an alert is resolved.
|
String |
regionId
The ID of the region.
|
String |
url
The URL of the HTTP request method.
|
| 构造器和说明 |
|---|
UpdateWebhookRequest() |
| 限定符和类型 | 方法和说明 |
|---|---|
static UpdateWebhookRequest |
build(Map<String,?> map) |
String |
getBody() |
Long |
getContactId() |
String |
getContactName() |
String |
getHttpHeaders() |
String |
getHttpParams() |
String |
getMethod() |
String |
getRecoverBody() |
String |
getRegionId() |
String |
getUrl() |
UpdateWebhookRequest |
setBody(String body) |
UpdateWebhookRequest |
setContactId(Long contactId) |
UpdateWebhookRequest |
setContactName(String contactName) |
UpdateWebhookRequest |
setHttpHeaders(String httpHeaders) |
UpdateWebhookRequest |
setHttpParams(String httpParams) |
UpdateWebhookRequest |
setMethod(String method) |
UpdateWebhookRequest |
setRecoverBody(String recoverBody) |
UpdateWebhookRequest |
setRegionId(String regionId) |
UpdateWebhookRequest |
setUrl(String url) |
@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.
This parameter is required.
example:{ "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="ContactId") public Long contactId
The ID of the webhook alert contact. You can call the SearchAlertContact operation to obtain the ID.
This parameter is required.
example:48716
@NameInMap(value="ContactName") public String contactName
The name of the webhook alert contact.
This parameter is required.
example:Webhook alert
@NameInMap(value="HttpHeaders") public String httpHeaders
The HTTP request headers.
example:[{"Content-Type":"application/json"}]
@NameInMap(value="HttpParams") public String httpParams
The parameters in the HTTP request.
example:[{"name":"mike"}]
@NameInMap(value="Method") public String method
The HTTP request method. Valid values:
GetPostThis 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.
example:{ "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="RegionId") public String regionId
The ID of the region.
This parameter is required.
example:cn-hangzhou
@NameInMap(value="Url") public String url
The URL of the HTTP request method.
This parameter is required.
example:public static UpdateWebhookRequest build(Map<String,?> map) throws Exception
Exceptionpublic UpdateWebhookRequest setBody(String body)
public String getBody()
public UpdateWebhookRequest setContactId(Long contactId)
public Long getContactId()
public UpdateWebhookRequest setContactName(String contactName)
public String getContactName()
public UpdateWebhookRequest setHttpHeaders(String httpHeaders)
public String getHttpHeaders()
public UpdateWebhookRequest setHttpParams(String httpParams)
public String getHttpParams()
public UpdateWebhookRequest setMethod(String method)
public String getMethod()
public UpdateWebhookRequest setRecoverBody(String recoverBody)
public String getRecoverBody()
public UpdateWebhookRequest setRegionId(String regionId)
public String getRegionId()
public UpdateWebhookRequest setUrl(String url)
public String getUrl()
Copyright © 2024. All rights reserved.