public class CreateWebhookRequest
extends com.aliyun.tea.TeaModel
| 限定符和类型 | 字段和说明 |
|---|---|
String |
body
The notification template that is sent when an alert is triggered.
|
String |
contactName
The name of the contact.
|
String |
httpHeaders
The HTTP request header.
|
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 region ID.
|
String |
url
The URL of the request method.
|
| 构造器和说明 |
|---|
CreateWebhookRequest() |
| 限定符和类型 | 方法和说明 |
|---|---|
static CreateWebhookRequest |
build(Map<String,?> map) |
String |
getBody() |
String |
getContactName() |
String |
getHttpHeaders() |
String |
getHttpParams() |
String |
getMethod() |
String |
getRecoverBody() |
String |
getRegionId() |
String |
getUrl() |
CreateWebhookRequest |
setBody(String body) |
CreateWebhookRequest |
setContactName(String contactName) |
CreateWebhookRequest |
setHttpHeaders(String httpHeaders) |
CreateWebhookRequest |
setHttpParams(String httpParams) |
CreateWebhookRequest |
setMethod(String method) |
CreateWebhookRequest |
setRecoverBody(String recoverBody) |
CreateWebhookRequest |
setRegionId(String regionId) |
CreateWebhookRequest |
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 }}", "Alarm Time": "{{ .startTime }}", "Alert Content": "{{ for .alerts }} {{ .annotations.message }} {{ end }}" }
@NameInMap(value="ContactName") public String contactName
The name of the contact.
This parameter is required.
example:WebhookAlert
@NameInMap(value="HttpHeaders") public String httpHeaders
The HTTP request header.
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.
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 }}", "Alarm Time": "{{ .startTime }}", "Alert Content": "{{ for .alerts }} {{ .annotations.message }} {{ end }}" }
@NameInMap(value="RegionId") public String regionId
The region ID.
This parameter is required.
example:cn-hangzhou
@NameInMap(value="Url") public String url
The URL of the request method.
This parameter is required.
example:public static CreateWebhookRequest build(Map<String,?> map) throws Exception
Exceptionpublic CreateWebhookRequest setBody(String body)
public String getBody()
public CreateWebhookRequest setContactName(String contactName)
public String getContactName()
public CreateWebhookRequest setHttpHeaders(String httpHeaders)
public String getHttpHeaders()
public CreateWebhookRequest setHttpParams(String httpParams)
public String getHttpParams()
public CreateWebhookRequest setMethod(String method)
public String getMethod()
public CreateWebhookRequest setRecoverBody(String recoverBody)
public String getRecoverBody()
public CreateWebhookRequest setRegionId(String regionId)
public String getRegionId()
public CreateWebhookRequest setUrl(String url)
public String getUrl()
Copyright © 2024. All rights reserved.