Skip to content

GroupMetricRule

This class encapsulates and extends the ROS resource type ALIYUN::CMS::GroupMetricRule.

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)
//  .contactGroups(IResolvable)
//  .contactGroups(java.util.List<java.lang.String)
//  .contactGroups(IResolvable>)
//  .dimensions(java.lang.String)
//  .dimensions(IResolvable)
//  .effectiveInterval(java.lang.String)
//  .effectiveInterval(IResolvable)
//  .emailSubject(java.lang.String)
//  .emailSubject(IResolvable)
//  .extraDimensionJson(IResolvable)
//  .extraDimensionJson(java.util.Map<java.lang.String, java.lang.Object>)
//  .interval(java.lang.Number)
//  .interval(IResolvable)
//  .noDataPolicy(java.lang.String)
//  .noDataPolicy(IResolvable)
//  .noEffectiveInterval(java.lang.String)
//  .noEffectiveInterval(IResolvable)
//  .options(java.lang.String)
//  .options(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.
contactGroups com.aliyun.ros.cdk.core.IResolvable OR java.util.List Property contactGroups: The alert contact groups.
dimensions java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property dimensions: The dimensions that specify the resources to be monitored.
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.
extraDimensionJson com.aliyun.ros.cdk.core.IResolvable OR java.util.Map Property extraDimensionJson: The secondary or tertiary dimensions of the alert rule in the application group.
interval java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property interval: The interval at which the alert rule is triggered.
noDataPolicy java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property noDataPolicy: The handling method when there is no monitoring data.
noEffectiveInterval java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property noEffectiveInterval: The period when the alert rule is ineffective.
options java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property options: The advanced settings.
period java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property period: The statistical period of the metric.
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 callback URL to which alert notifications are sent.

scopeRequired

  • Type: com.aliyun.ros.cdk.core.Construct

idRequired

  • Type: java.lang.String

enableResourcePropertyConstraintOptional

  • Type: java.lang.Boolean

categoryRequired

  • 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)


escalationsRequired

Property escalations: undefined.


groupIdRequired

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property groupId: The ID of application group.


metricNameRequired

  • 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.


namespaceRequired

  • 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.


ruleIdRequired

  • 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.


ruleNameRequired

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property ruleName: The name of the alert rule.


contactGroupsOptional

  • Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List

Property contactGroups: The alert contact groups.


dimensionsOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property dimensions: The dimensions that specify the resources to be monitored.

The value is a collection of key-value pairs. Format: key:value. For example, {"userId":"120886317861**"} and {"instanceId":"i-2ze2d6j5uhg20x47**"}.


effectiveIntervalOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property effectiveInterval: The period when the alert rule is effective.


emailSubjectOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property emailSubject: The subject of the alert notification email.


extraDimensionJsonOptional

  • Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.Map

Property extraDimensionJson: The secondary or tertiary dimensions of the alert rule in the application group.

Format: a collection of key:value pairs, for example, port:80 or \/dev\/xvda:d-m5e6yphgzn3aprwu****.

When the first-level dimension of the alert rule is {"instanceId":"i-m5e1qg6uo38rztr4****"}, its secondary dimension is the disk {"\/dev\/xvda":"d-m5e6yphgzn3aprwu****"}.


intervalOptional

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property interval: The interval at which the alert rule is triggered.

Unit: seconds.

Set the alert detection interval to the same value as the data reporting interval. If the alert detection interval is shorter than the data reporting interval, alerts may not be triggered due to insufficient data.


noDataPolicyOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property noDataPolicy: The handling method when there is no monitoring data.

Valid values:

  • KEEP_LAST_STATE (default): No action is taken.
  • INSUFFICIENT_DATA: Alert content is "No Data".
  • OK: Normal.

noEffectiveIntervalOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property noEffectiveInterval: The period when the alert rule is ineffective.


optionsOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property options: The advanced settings.

Format: {"key1":"value1","key2":"value2"}, for example, {"NotSendOK":true}, indicating whether to send alert recovery notifications. The key is NotSendOK, and the value is true (do not send) or false (send by default).


periodOptional

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property period: The statistical period of the metric.

The value of Period must be an integral multiple of 60. Unit: seconds. Default value: 300.


silenceTimeOptional

  • 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.


webhookOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property webhook: The callback URL to which alert notifications are sent.

Enter a URL that is accessible over the Internet. CloudMonitor sends alert notifications to the URL using POST requests. Only the HTTP protocol is supported.


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.

sessionRequired

  • Type: com.aliyun.ros.cdk.core.ISynthesisSession

The synthesis session.


addCondition

public void addCondition(RosCondition condition)

conditionRequired

  • Type: com.aliyun.ros.cdk.core.RosCondition

addCount

public void addCount(java.lang.Number OR IResolvable count)

countRequired

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

addDependency

public void addDependency(Resource resource)

resourceRequired

  • Type: com.aliyun.ros.cdk.core.Resource

addResourceDesc

public void addResourceDesc(java.lang.String desc)

descRequired

  • Type: java.lang.String

applyRemovalPolicy

public void applyRemovalPolicy(RemovalPolicy policy)

policyRequired

  • 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)

nameRequired

  • Type: java.lang.String

setMetadata

public void setMetadata(java.lang.String key, java.lang.Object value)

keyRequired

  • Type: java.lang.String

valueRequired

  • 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.

xRequired

  • 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.
attrRuleId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute RuleId: Rule ID.
props GroupMetricRuleProps 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

attrRuleIdRequired

public java.lang.Object getAttrRuleId();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute RuleId: Rule ID.


propsRequired

public GroupMetricRuleProps getProps();