AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Container for the parameters to the PutCompositeAlarm operation. Creates or updates a composite alarm. When you create a composite alarm, you specify a rule expression for the alarm that takes into account the alarm states of other alarms that you have created. The composite alarm goes into ALARM state only if all conditions of the rule are met.
The alarms specified in a composite alarm's rule expression can include metric alarms and other composite alarms. The rule expression of a composite alarm can include as many as 100 underlying alarms. Any single alarm can be included in the rule expressions of as many as 150 composite alarms.
Using composite alarms can reduce alarm noise. You can create multiple metric alarms, and also create a composite alarm and set up alerts only for the composite alarm. For example, you could create a composite alarm that goes into ALARM state only when more than one of the underlying metric alarms are in ALARM state.
Currently, the only alarm actions that can be taken by composite alarms are notifying SNS topics.
It is possible to create a loop or cycle of composite alarms, where composite alarm A depends on composite alarm B, and composite alarm B also depends on composite alarm A. In this scenario, you can't delete any composite alarm that is part of the cycle because there is always still a composite alarm that depends on that alarm that you want to delete.
To get out of such a situation, you must break the cycle by changing the rule of one
of the composite alarms in the cycle to remove a dependency that creates the cycle.
The simplest change to make to break a cycle is to change the AlarmRule
of
one of the alarms to false
.
Additionally, the evaluation of composite alarms stops if CloudWatch detects a cycle in the evaluation path.
When this operation creates an alarm, the alarm state is immediately set to INSUFFICIENT_DATA
.
The alarm is then evaluated and its state is set appropriately. Any actions associated
with the new state are then executed. For a composite alarm, this initial time after
creation is the only time that the alarm can be in INSUFFICIENT_DATA
state.
When you update an existing alarm, its state is left unchanged, but the update completely overwrites the previous configuration of the alarm.
To use this operation, you must be signed on with the cloudwatch:PutCompositeAlarm
permission that is scoped to *
. You can't create a composite alarms if your
cloudwatch:PutCompositeAlarm
permission has a narrower scope.
If you are an IAM user, you must have iam:CreateServiceLinkedRole
to create
a composite alarm that has Systems Manager OpsItem actions.
Namespace: Amazon.CloudWatch.Model
Assembly: AWSSDK.CloudWatch.dll
Version: 3.x.y.z
public class PutCompositeAlarmRequest : AmazonCloudWatchRequest IAmazonWebServiceRequest
The PutCompositeAlarmRequest type exposes the following members
Name | Description | |
---|---|---|
PutCompositeAlarmRequest() |
Name | Type | Description | |
---|---|---|---|
ActionsEnabled | System.Boolean |
Gets and sets the property ActionsEnabled.
Indicates whether actions should be executed during any changes to the alarm state
of the composite alarm. The default is |
|
ActionsSuppressor | System.String |
Gets and sets the property ActionsSuppressor.
Actions will be suppressed if the suppressor alarm is in the |
|
ActionsSuppressorExtensionPeriod | System.Int32 |
Gets and sets the property ActionsSuppressorExtensionPeriod.
The maximum time in seconds that the composite alarm waits after suppressor alarm
goes out of the
|
|
ActionsSuppressorWaitPeriod | System.Int32 |
Gets and sets the property ActionsSuppressorWaitPeriod.
The maximum time in seconds that the composite alarm waits for the suppressor alarm
to go into the
|
|
AlarmActions | System.Collections.Generic.List<System.String> |
Gets and sets the property AlarmActions.
The actions to execute when this alarm transitions to the
Valid Values: |
|
AlarmDescription | System.String |
Gets and sets the property AlarmDescription. The description for the composite alarm. |
|
AlarmName | System.String |
Gets and sets the property AlarmName. The name for the composite alarm. This name must be unique within the Region. |
|
AlarmRule | System.String |
Gets and sets the property AlarmRule. An expression that specifies which other alarms are to be evaluated to determine this composite alarm's state. For each alarm that you reference, you designate a function that specifies whether that alarm needs to be in ALARM state, OK state, or INSUFFICIENT_DATA state. You can use operators (AND, OR and NOT) to combine multiple functions in a single expression. You can use parenthesis to logically group the functions in your expression. You can use either alarm names or ARNs to reference the other alarms that are to be evaluated. Functions can include the following:
TRUE and FALSE are useful for testing a complex
Alarm names specified in
The following are some examples of
The |
|
InsufficientDataActions | System.Collections.Generic.List<System.String> |
Gets and sets the property InsufficientDataActions.
The actions to execute when this alarm transitions to the
Valid Values: |
|
OKActions | System.Collections.Generic.List<System.String> |
Gets and sets the property OKActions.
The actions to execute when this alarm transitions to an
Valid Values: |
|
Tags | System.Collections.Generic.List<Amazon.CloudWatch.Model.Tag> |
Gets and sets the property Tags. A list of key-value pairs to associate with the composite alarm. You can associate as many as 50 tags with an alarm. Tags can help you organize and categorize your resources. You can also use them to scope user permissions, by granting a user permission to access or change only resources with certain tag values. |
.NET Core App:
Supported in: 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.5, 4.0, 3.5