GroupMetricRule
- Implements: IGroupMetricRule
This class encapsulates and extends the ROS resource type ALIYUN::CMS::GroupMetricRuleThe , which resource creates an alert rule for an application group.
Initializers
import ros_cdk_cms
ros_cdk_cms.GroupMetricRule(
scope: Construct,
id: str,
category: typing.Union[str, IResolvable],
escalations: typing.Union[IResolvable, EscalationsProperty],
group_id: typing.Union[str, IResolvable],
metric_name: typing.Union[str, IResolvable],
namespace: typing.Union[str, IResolvable],
rule_id: typing.Union[str, IResolvable],
rule_name: typing.Union[str, IResolvable],
contact_groups: typing.Union[IResolvable, typing.List[typing.Union[str, IResolvable]]] = None,
dimensions: typing.Union[str, IResolvable] = None,
effective_interval: typing.Union[str, IResolvable] = None,
email_subject: typing.Union[str, IResolvable] = None,
extra_dimension_json: typing.Union[IResolvable, typing.Mapping[typing.Any]] = None,
interval: typing.Union[typing.Union[int, float], IResolvable] = None,
no_data_policy: typing.Union[str, IResolvable] = None,
no_effective_interval: typing.Union[str, IResolvable] = None,
options: typing.Union[str, IResolvable] = None,
period: typing.Union[typing.Union[int, float], IResolvable] = None,
silence_time: typing.Union[typing.Union[int, float], IResolvable] = None,
webhook: typing.Union[str, IResolvable] = None,
enable_resource_property_constraint: bool = None
)
| Name | Type | Description |
|---|---|---|
scope | ros_cdk_core.Construct | No description. |
id | str | No description. |
category | typing.Union[str, ros_cdk_core.IResolvable] | Property category: The abbreviation of the service name. |
escalations | typing.Union[ros_cdk_core.IResolvable, EscalationsProperty] | Property escalations: undefined. |
group_id | typing.Union[str, ros_cdk_core.IResolvable] | Property groupId: The ID of application group. |
metric_name | typing.Union[str, ros_cdk_core.IResolvable] | Property metricName: The name of the metric. |
namespace | typing.Union[str, ros_cdk_core.IResolvable] | Property namespace: The data namespace of the service. |
rule_id | typing.Union[str, ros_cdk_core.IResolvable] | Property ruleId: The ID of the alert rule. |
rule_name | typing.Union[str, ros_cdk_core.IResolvable] | Property ruleName: The name of the alert rule. |
contact_groups | typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[str, ros_cdk_core.IResolvable]]] | Property contactGroups: The alert contact groups. |
dimensions | typing.Union[str, ros_cdk_core.IResolvable] | Property dimensions: The expended resource dimensions. |
effective_interval | typing.Union[str, ros_cdk_core.IResolvable] | Property effectiveInterval: The period when the alert rule is effective. |
email_subject | typing.Union[str, ros_cdk_core.IResolvable] | Property emailSubject: The subject of the alert notification email. |
extra_dimension_json | typing.Union[ros_cdk_core.IResolvable, typing.Mapping[typing.Any]] | Property extraDimensionJson: The secondary or tertiary dimensions of the alert rule in the application group. |
interval | typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] | Property interval: The detection period of alerts. |
no_data_policy | typing.Union[str, ros_cdk_core.IResolvable] | Property noDataPolicy: The handling method when there is no monitoring data. |
no_effective_interval | typing.Union[str, ros_cdk_core.IResolvable] | Property noEffectiveInterval: The period when the alert rule is ineffective. |
options | typing.Union[str, ros_cdk_core.IResolvable] | Property options: The advanced settings. |
period | typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] | Property period: The aggregation period. |
silence_time | typing.Union[typing.Union[int, float], 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 | typing.Union[str, ros_cdk_core.IResolvable] | Property webhook: The URL of the callback triggered when an alert occurs. |
enable_resource_property_constraint | bool | No description. |
scopeRequired
- Type: ros_cdk_core.Construct
idRequired
- Type: str
categoryRequired
- Type: typing.Union[str, 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
- Type: typing.Union[ros_cdk_core.IResolvable, EscalationsProperty]
Property escalations: undefined.
group_idRequired
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property groupId: The ID of application group.
metric_nameRequired
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property metricName: The name of the metric.
For more information, call DescribeMetricMetaList or see Preset metrics reference.
namespaceRequired
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property namespace: The data namespace of the service.
For more information, call DescribeMetricMetaList or see Preset metrics reference.
rule_idRequired
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property ruleId: The ID of the alert rule.
The IDs of alert rules are generated by callers to ensure uniqueness.
rule_nameRequired
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property ruleName: The name of the alert rule.
contact_groupsOptional
- Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[str, ros_cdk_core.IResolvable]]]
Property contactGroups: The alert contact groups.
dimensionsOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property dimensions: The expended resource dimensions.
effective_intervalOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property effectiveInterval: The period when the alert rule is effective.
email_subjectOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property emailSubject: The subject of the alert notification email.
extra_dimension_jsonOptional
- Type: typing.Union[ros_cdk_core.IResolvable, typing.Mapping[typing.Any]]
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: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property interval: The detection period of alerts.
no_data_policyOptional
- Type: typing.Union[str, 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.
no_effective_intervalOptional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property noEffectiveInterval: The period when the alert rule is ineffective.
optionsOptional
- Type: typing.Union[str, 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: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property period: The aggregation period.
Unite: second.
silence_timeOptional
- Type: typing.Union[typing.Union[int, float], 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: typing.Union[str, ros_cdk_core.IResolvable]
Property webhook: The URL of the callback triggered when an alert occurs.
enable_resource_property_constraintOptional
- Type: bool
Methods
| Name | Description |
|---|---|
to_string | Returns a string representation of this construct. |
synthesize | Allows this construct to emit artifacts into the cloud assembly during synthesis. |
add_condition | No description. |
add_count | No description. |
add_dependency | No description. |
add_resource_desc | No description. |
apply_removal_policy | No description. |
fetch_condition | No description. |
fetch_dependency | No description. |
fetch_resource_desc | No description. |
get_att | No description. |
set_metadata | No description. |
to_string
def to_string() -> str
Returns a string representation of this construct.
synthesize
def synthesize(
session: ISynthesisSession
) -> None
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: ros_cdk_core.ISynthesisSession
The synthesis session.
add_condition
def add_condition(
condition: RosCondition
) -> None
- Type: ros_cdk_core.RosCondition
add_count
def add_count(
count: typing.Union[typing.Union[int, float], IResolvable]
) -> None
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
add_dependency
def add_dependency(
resource: Resource
) -> None
- Type: ros_cdk_core.Resource
add_resource_desc
def add_resource_desc(
desc: str
) -> None
- Type: str
apply_removal_policy
def apply_removal_policy(
policy: RemovalPolicy
) -> None
- Type: ros_cdk_core.RemovalPolicy
fetch_condition
def fetch_condition() -> RosCondition
fetch_dependency
def fetch_dependency() -> typing.List[str]
fetch_resource_desc
def fetch_resource_desc() -> str
get_att
def get_att(
name: str
) -> IResolvable
- Type: str
set_metadata
def set_metadata(
key: str,
value: typing.Any
) -> None
- Type: str
- Type: typing.Any
Static Functions
| Name | Description |
|---|---|
is_construct | Return whether the given object is a Construct. |
is_construct
import ros_cdk_cms
ros_cdk_cms.GroupMetricRule.is_construct(
x: typing.Any
)
Return whether the given object is a Construct.
- Type: typing.Any
Properties
| Name | Type | Description |
|---|---|---|
node | ros_cdk_core.ConstructNode | The construct tree node associated with this construct. |
env | ros_cdk_core.IResourceEnvironment | The environment this resource belongs to. |
ref | str | No description. |
stack | ros_cdk_core.Stack | The stack in which this resource is defined. |
resource | ros_cdk_core.RosResource | No description. |
attr_rule_id | typing.Union[str, ros_cdk_core.IResolvable] | Attribute RuleId: Rule ID. |
props | GroupMetricRuleProps | No description. |
nodeRequired
node: ConstructNode
- Type: ros_cdk_core.ConstructNode
The construct tree node associated with this construct.
envRequired
env: IResourceEnvironment
- Type: 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
ref: str
- Type: str
stackRequired
stack: Stack
- Type: ros_cdk_core.Stack
The stack in which this resource is defined.
resourceOptional
resource: RosResource
- Type: ros_cdk_core.RosResource
attr_rule_idRequired
attr_rule_id: typing.Union[str, IResolvable]
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Attribute RuleId: Rule ID.
propsRequired
props: GroupMetricRuleProps
- Type: GroupMetricRuleProps