MetricRuleTemplateDeployment
- Implements: IMetricRuleTemplateDeployment
This class encapsulates and extends the ROS resource type ALIYUN::CMS::MetricRuleTemplateDeployment.
Initializers
import com.aliyun.ros.cdk.cms.MetricRuleTemplateDeployment;
MetricRuleTemplateDeployment.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
.groupId(java.lang.Number)
.groupId(IResolvable)
.templateIds(IResolvable)
.templateIds(java.util.List<java.lang.String)
.templateIds(IResolvable>)
// .appendMode(java.lang.String)
// .appendMode(IResolvable)
// .applyMode(java.lang.String)
// .applyMode(IResolvable)
// .enableEndTime(java.lang.Number)
// .enableEndTime(IResolvable)
// .enableStartTime(java.lang.Number)
// .enableStartTime(IResolvable)
// .notifyLevel(java.lang.Number)
// .notifyLevel(IResolvable)
// .silenceTime(java.lang.Number)
// .silenceTime(IResolvable)
// .webhook(java.lang.String)
// .webhook(IResolvable)
.build();
| Name | Type | Description |
|---|---|---|
scope | com.aliyun.ros.cdk.core.Construct | No description. |
id | java.lang.String | No description. |
enableResourcePropertyConstraint | java.lang.Boolean | No description. |
groupId | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property groupId: Apply group ID. |
templateIds | com.aliyun.ros.cdk.core.IResolvable OR java.util.List | Property templateIds: The ID list of the Alarm Template to be applied. |
appendMode | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property appendMode: Template application policy.Value: all: Delete all rules created by the alarm template on the selected group, and then create a new alarm rule by the template (default). append: Delete the rules created by the alarm template on the selected group, and then create a new alarm rule based on the current template. |
applyMode | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property applyMode: How to apply templates.Value: GROUP_INSTANCE_FIRST: Application grouping instances are preferred.When applying an alarm template, the application grouping instance is preferred. If the instance does not exist in the application grouping, the rules in the template are ignored. ALARM_TEMPLATE_FIRST: Alarm template instances are preferred.When an alarm template is applied, an alarm rule is created regardless of whether the instance exists in the application group. |
enableEndTime | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property enableEndTime: The end time when the alarm takes effect.Value range: 0~23, indicating 00:59 to 23:59. |
enableStartTime | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property enableStartTime: The start time when the alarm takes effect.Value range: 0~23, indicating 00:00 to 23:00. |
notifyLevel | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property notifyLevel: The alert notification method. |
silenceTime | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property silenceTime: Channel silence period.Unit: seconds.Default value: 86400. Note When the monitoring data continues to exceed the alarm rule threshold, only one alarm notification will be sent during each silence cycle. |
webhook | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property webhook: When an alarm occurs, the specified URL address will be called back and a POST request will be sent. |
scopeRequired
- Type: com.aliyun.ros.cdk.core.Construct
idRequired
- Type: java.lang.String
enableResourcePropertyConstraintOptional
- Type: java.lang.Boolean
groupIdRequired
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property groupId: Apply group ID.
For how to get the application group ID, see DescribeMonitorGroups.
templateIdsRequired
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
Property templateIds: The ID list of the Alarm Template to be applied.
For how to get the alarm template ID, see DescribeMetricRuleTemplateList.
appendModeOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property appendMode: Template application policy.Value: all: Delete all rules created by the alarm template on the selected group, and then create a new alarm rule by the template (default). append: Delete the rules created by the alarm template on the selected group, and then create a new alarm rule based on the current template.
applyModeOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property applyMode: How to apply templates.Value: GROUP_INSTANCE_FIRST: Application grouping instances are preferred.When applying an alarm template, the application grouping instance is preferred. If the instance does not exist in the application grouping, the rules in the template are ignored. ALARM_TEMPLATE_FIRST: Alarm template instances are preferred.When an alarm template is applied, an alarm rule is created regardless of whether the instance exists in the application group.
enableEndTimeOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property enableEndTime: The end time when the alarm takes effect.Value range: 0~23, indicating 00:59 to 23:59.
enableStartTimeOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property enableStartTime: The start time when the alarm takes effect.Value range: 0~23, indicating 00:00 to 23:00.
notifyLevelOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property notifyLevel: The alert notification method.
Valid values: Set the value to 4. A value of 4 indicates that alert notifications are sent by using TradeManager and DingTalk chatbots.
silenceTimeOptional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property silenceTime: Channel silence period.Unit: seconds.Default value: 86400. Note When the monitoring data continues to exceed the alarm rule threshold, only one alarm notification will be sent during each silence cycle.
webhookOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property webhook: When an alarm occurs, the specified URL address will be called back and a POST request will be sent.
Methods
| Name | Description |
|---|---|
toString | Returns a string representation of this construct. |
synthesize | Allows this construct to emit artifacts into the cloud assembly during synthesis. |
addCondition | No description. |
addCount | No description. |
addDependency | No description. |
addResourceDesc | No description. |
applyRemovalPolicy | No description. |
fetchCondition | No description. |
fetchDependency | No description. |
fetchResourceDesc | No description. |
getAtt | No description. |
setMetadata | No description. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
synthesize
public void synthesize(ISynthesisSession session)
Allows this construct to emit artifacts into the cloud assembly during synthesis.
This method is usually implemented by framework-level constructs such as Stack and Asset as they participate in synthesizing the cloud assembly.
- Type: com.aliyun.ros.cdk.core.ISynthesisSession
The synthesis session.
addCondition
public void addCondition(RosCondition condition)
- Type: com.aliyun.ros.cdk.core.RosCondition
addCount
public void addCount(java.lang.Number OR IResolvable count)
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
addDependency
public void addDependency(Resource resource)
- Type: com.aliyun.ros.cdk.core.Resource
addResourceDesc
public void addResourceDesc(java.lang.String desc)
- Type: java.lang.String
applyRemovalPolicy
public void applyRemovalPolicy(RemovalPolicy policy)
- Type: com.aliyun.ros.cdk.core.RemovalPolicy
fetchCondition
public RosCondition fetchCondition()
fetchDependency
public java.util.List<java.lang.String> fetchDependency()
fetchResourceDesc
public java.lang.String fetchResourceDesc()
getAtt
public IResolvable getAtt(java.lang.String name)
- Type: java.lang.String
setMetadata
public void setMetadata(java.lang.String key, java.lang.Object value)
- Type: java.lang.String
- Type: java.lang.Object
Static Functions
| Name | Description |
|---|---|
isConstruct | Return whether the given object is a Construct. |
isConstruct
import com.aliyun.ros.cdk.cms.MetricRuleTemplateDeployment;
MetricRuleTemplateDeployment.isConstruct(java.lang.Object x)
Return whether the given object is a Construct.
- Type: java.lang.Object
Properties
| Name | Type | Description |
|---|---|---|
node | com.aliyun.ros.cdk.core.ConstructNode | The construct tree node associated with this construct. |
env | com.aliyun.ros.cdk.core.IResourceEnvironment | The environment this resource belongs to. |
ref | java.lang.String | No description. |
stack | com.aliyun.ros.cdk.core.Stack | The stack in which this resource is defined. |
resource | com.aliyun.ros.cdk.core.RosResource | No description. |
attrGroupId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute GroupId: The ID of the group that applied the template to. |
attrRuleIds | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute RuleIds: The IDs of rhe generated rules. |
props | MetricRuleTemplateDeploymentProps | No description. |
nodeRequired
public ConstructNode getNode();
- Type: com.aliyun.ros.cdk.core.ConstructNode
The construct tree node associated with this construct.
envRequired
public IResourceEnvironment getEnv();
- Type: com.aliyun.ros.cdk.core.IResourceEnvironment
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
refRequired
public java.lang.String getRef();
- Type: java.lang.String
stackRequired
public Stack getStack();
- Type: com.aliyun.ros.cdk.core.Stack
The stack in which this resource is defined.
resourceOptional
public RosResource getResource();
- Type: com.aliyun.ros.cdk.core.RosResource
attrGroupIdRequired
public java.lang.Object getAttrGroupId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute GroupId: The ID of the group that applied the template to.
attrRuleIdsRequired
public java.lang.Object getAttrRuleIds();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute RuleIds: The IDs of rhe generated rules.
propsRequired
public MetricRuleTemplateDeploymentProps getProps();