GroupMetricRule
This class encapsulates and extends the ROS resource type ALIYUN::CMS::GroupMetricRule
, which is used to create an alert rule for an application group.
Initializers
import com.aliyun.ros.cdk.cms.GroupMetricRule;
GroupMetricRule.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
.category(java.lang.String)
.category(IResolvable)
.escalations(IResolvable)
.escalations(EscalationsProperty)
.groupId(java.lang.String)
.groupId(IResolvable)
.metricName(java.lang.String)
.metricName(IResolvable)
.namespace(java.lang.String)
.namespace(IResolvable)
.ruleId(java.lang.String)
.ruleId(IResolvable)
.ruleName(java.lang.String)
.ruleName(IResolvable)
// .dimensions(java.lang.String)
// .dimensions(IResolvable)
// .effectiveInterval(java.lang.String)
// .effectiveInterval(IResolvable)
// .emailSubject(java.lang.String)
// .emailSubject(IResolvable)
// .interval(java.lang.Number)
// .interval(IResolvable)
// .noEffectiveInterval(java.lang.String)
// .noEffectiveInterval(IResolvable)
// .period(java.lang.Number)
// .period(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. |
category |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property category: The abbreviation of the service name. |
escalations |
com.aliyun.ros.cdk.core.IResolvable OR EscalationsProperty |
Property escalations: undefined. |
groupId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property groupId: The ID of application group. |
metricName |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property metricName: The name of the metric. |
namespace |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property namespace: The data namespace of the service. |
ruleId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property ruleId: The ID of the alert rule. |
ruleName |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property ruleName: The name of the alert rule. |
dimensions |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property dimensions: The expended resource dimensions. |
effectiveInterval |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property effectiveInterval: The period when the alert rule is effective. |
emailSubject |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property emailSubject: The subject of the alert notification email. |
interval |
java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable |
Property interval: The detection period of alerts. |
noEffectiveInterval |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property noEffectiveInterval: The period when the alert rule is ineffective. |
period |
java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable |
Property period: The aggregation period. |
silenceTime |
java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable |
Property silenceTime: The duration of the mute period during which new alerts are not sent even if the trigger conditions are met. |
webhook |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property webhook: The URL of the callback triggered when an alert occurs. |
scope
Required
- Type: com.aliyun.ros.cdk.core.Construct
id
Required
- Type: java.lang.String
enableResourcePropertyConstraint
Optional
- Type: java.lang.Boolean
category
Required
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property category: The abbreviation of the service name.
Valid values: ECS (including Alibaba Cloud and non-Alibaba Cloud hosts) RDS (ApsaraDB for RDS) ADS (AnalyticDB) SLB (Server Load Balancer) VPC (Virtual Private Cloud) APIGATEWAY (API Gateway) CDN CS (Container Service for Swarm) DCDN (Dynamic Route for CDN) DDoS (distributed denial of service) EIP (Elastic IP) ELASTICSEARCH (Elasticsearch) EMR (E-MapReduce) ESS (Auto Scaling) HBASE (ApsaraDB for HBase) IOT_EDGE (IoT Edge) K8S_POD (k8s pod) KVSTORE_SHARDING (ApsaraDB for Redis cluster version) KVSTORE_SPLITRW (ApsaraDB for Redis read/write splitting version) KVSTORE_STANDARD (ApsaraDB for Redis standard version) MEMCACHE (ApsaraDB for Memcache) MNS (Message Service) MONGODB (ApsaraDB for MongoDB replica set instances) MONGODB_CLUSTER (ApsaraDB for MongoDB cluster version) MONGODB_SHARDING (ApsaraDB for MongoDB sharded clusters) MQ_TOPIC (Message Service topic) OCS (original version of ApsaraDB for Memcache) OPENSEARCH (Open Search) OSS (Object Storage Service) POLARDB (ApsaraDB for POLARDB) PETADATA (HybridDB for MySQL) SCDN (Secure Content Delivery Network) SHAREBANDWIDTHPACKAGES (shared bandwidth package) SLS (Log Service) VPN (VPN Gateway)
escalations
Required
- Type: com.aliyun.ros.cdk.core.IResolvable OR EscalationsProperty
Property escalations: undefined.
groupId
Required
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property groupId: The ID of application group.
metricName
Required
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property metricName: The name of the metric.
For more information, call DescribeMetricMetaList or see Preset metrics reference.
namespace
Required
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property namespace: The data namespace of the service.
For more information, call DescribeMetricMetaList or see Preset metrics reference.
ruleId
Required
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property ruleId: The ID of the alert rule.
The IDs of alert rules are generated by callers to ensure uniqueness.
ruleName
Required
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property ruleName: The name of the alert rule.
dimensions
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property dimensions: The expended resource dimensions.
effectiveInterval
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property effectiveInterval: The period when the alert rule is effective.
emailSubject
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property emailSubject: The subject of the alert notification email.
interval
Optional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property interval: The detection period of alerts.
noEffectiveInterval
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property noEffectiveInterval: The period when the alert rule is ineffective.
period
Optional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property period: The aggregation period.
Unite: second.
silenceTime
Optional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property silenceTime: The duration of the mute period during which new alerts are not sent even if the trigger conditions are met.
Unit: second. Default value: 86400. Minimum value: 60.
webhook
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property webhook: The URL of the callback triggered when an alert occurs.
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. |
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
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.GroupMetricRule;
GroupMetricRule.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. |
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. |
attrRuleId |
com.aliyun.ros.cdk.core.IResolvable |
Attribute RuleId: Rule ID. |
node
Required
public ConstructNode getNode();
- Type: com.aliyun.ros.cdk.core.ConstructNode
The construct tree node associated with this construct.
ref
Required
public java.lang.String getRef();
- Type: java.lang.String
stack
Required
public Stack getStack();
- Type: com.aliyun.ros.cdk.core.Stack
The stack in which this resource is defined.
resource
Optional
public RosResource getResource();
- Type: com.aliyun.ros.cdk.core.RosResource
attrRuleId
Required
public IResolvable getAttrRuleId();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute RuleId: Rule ID.