public static final class PutMetricRuleTargetsRequest.Targets.Builder extends Object
构造器和说明 |
---|
Builder() |
限定符和类型 | 方法和说明 |
---|---|
PutMetricRuleTargetsRequest.Targets.Builder |
arn(String arn)
The Alibaba Cloud Resource Name (ARN) of the resource.
|
PutMetricRuleTargetsRequest.Targets |
build() |
PutMetricRuleTargetsRequest.Targets.Builder |
id(String id)
The ID of the resource for which alerts are triggered.
|
PutMetricRuleTargetsRequest.Targets.Builder |
jsonParams(String jsonParams)
The JSON-formatted parameters of the alert callback.
|
PutMetricRuleTargetsRequest.Targets.Builder |
level(String level)
The alert level.
|
public PutMetricRuleTargetsRequest.Targets.Builder arn(String arn)
The Alibaba Cloud Resource Name (ARN) of the resource. Message Service (MNS), Auto Scaling, Simple Log Service, and Function Compute are supported.
The following part describes the ARN of MNS and the parameters provided by the ARN:
acs:mns:{regionId}:{userId}:/{Resource type}/{Resource name}/message
.
{regionId}: the region ID of the message queue or topic.
{userId}: the ID of the Alibaba Cloud account that owns the resource.
{Resource type}: the type of the resource for which alerts are triggered. Valid values:
{Resource name}: the resource name.
ARN of Auto Scaling:
acs:ess:{regionId}:{userId}:scalingGroupId/{Scaling group ID}:scalingRuleId/{Scaling rule ID}
ARN of Simple Log Service:
acs:log:{regionId}:{userId}:project/{Project name}/logstore/{Logstore name}
ARN of Function Compute:
acs:fc:{regionId}:{userId}:services/{Service name}/functions/{Function name}
This parameter is required.
example:acs:mns:cn-hangzhou:120886317861****:/queues/test/message
public PutMetricRuleTargetsRequest.Targets.Builder id(String id)
The ID of the resource for which alerts are triggered.
For more information about how to obtain the ID of the resource for which alerts are triggered, see DescribeMetricRuleTargets.
This parameter is required.
example:1
public PutMetricRuleTargetsRequest.Targets.Builder jsonParams(String jsonParams)
The JSON-formatted parameters of the alert callback.
example:{"customField1":"value1","customField2":"$.name"}
public PutMetricRuleTargetsRequest.Targets.Builder level(String level)
The alert level. Valid values:
["INFO", "WARN", "CRITICAL"]
public PutMetricRuleTargetsRequest.Targets build()
Copyright © 2024. All rights reserved.