aws.cloudwatch.CompositeAlarm
Explore with Pulumi AI
Provides a CloudWatch Composite Alarm resource.
NOTE: An alarm (composite or metric) cannot be destroyed when there are other composite alarms depending on it. This can lead to a cyclical dependency on update, as the provider will unsuccessfully attempt to destroy alarms before updating the rule. Consider using
depends_on
, references to alarm names, and two-stage updates.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.cloudwatch.CompositeAlarm("example", {
alarmDescription: "This is a composite alarm!",
alarmName: "example-composite-alarm",
alarmActions: exampleAwsSnsTopic.arn,
okActions: exampleAwsSnsTopic.arn,
alarmRule: `ALARM(${alpha.alarmName}) OR
ALARM(${bravo.alarmName})
`,
actionsSuppressor: {
alarm: "suppressor-alarm",
extensionPeriod: 10,
waitPeriod: 20,
},
});
import pulumi
import pulumi_aws as aws
example = aws.cloudwatch.CompositeAlarm("example",
alarm_description="This is a composite alarm!",
alarm_name="example-composite-alarm",
alarm_actions=example_aws_sns_topic["arn"],
ok_actions=example_aws_sns_topic["arn"],
alarm_rule=f"""ALARM({alpha["alarmName"]}) OR
ALARM({bravo["alarmName"]})
""",
actions_suppressor={
"alarm": "suppressor-alarm",
"extension_period": 10,
"wait_period": 20,
})
package main
import (
"fmt"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cloudwatch"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudwatch.NewCompositeAlarm(ctx, "example", &cloudwatch.CompositeAlarmArgs{
AlarmDescription: pulumi.String("This is a composite alarm!"),
AlarmName: pulumi.String("example-composite-alarm"),
AlarmActions: pulumi.Any(exampleAwsSnsTopic.Arn),
OkActions: pulumi.Any(exampleAwsSnsTopic.Arn),
AlarmRule: pulumi.Sprintf("ALARM(%v) OR\nALARM(%v)\n", alpha.AlarmName, bravo.AlarmName),
ActionsSuppressor: &cloudwatch.CompositeAlarmActionsSuppressorArgs{
Alarm: pulumi.String("suppressor-alarm"),
ExtensionPeriod: pulumi.Int(10),
WaitPeriod: pulumi.Int(20),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.CloudWatch.CompositeAlarm("example", new()
{
AlarmDescription = "This is a composite alarm!",
AlarmName = "example-composite-alarm",
AlarmActions = exampleAwsSnsTopic.Arn,
OkActions = exampleAwsSnsTopic.Arn,
AlarmRule = @$"ALARM({alpha.AlarmName}) OR
ALARM({bravo.AlarmName})
",
ActionsSuppressor = new Aws.CloudWatch.Inputs.CompositeAlarmActionsSuppressorArgs
{
Alarm = "suppressor-alarm",
ExtensionPeriod = 10,
WaitPeriod = 20,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.cloudwatch.CompositeAlarm;
import com.pulumi.aws.cloudwatch.CompositeAlarmArgs;
import com.pulumi.aws.cloudwatch.inputs.CompositeAlarmActionsSuppressorArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new CompositeAlarm("example", CompositeAlarmArgs.builder()
.alarmDescription("This is a composite alarm!")
.alarmName("example-composite-alarm")
.alarmActions(exampleAwsSnsTopic.arn())
.okActions(exampleAwsSnsTopic.arn())
.alarmRule("""
ALARM(%s) OR
ALARM(%s)
", alpha.alarmName(),bravo.alarmName()))
.actionsSuppressor(CompositeAlarmActionsSuppressorArgs.builder()
.alarm("suppressor-alarm")
.extensionPeriod(10)
.waitPeriod(20)
.build())
.build());
}
}
resources:
example:
type: aws:cloudwatch:CompositeAlarm
properties:
alarmDescription: This is a composite alarm!
alarmName: example-composite-alarm
alarmActions: ${exampleAwsSnsTopic.arn}
okActions: ${exampleAwsSnsTopic.arn}
alarmRule: |
ALARM(${alpha.alarmName}) OR
ALARM(${bravo.alarmName})
actionsSuppressor:
alarm: suppressor-alarm
extensionPeriod: 10
waitPeriod: 20
Create CompositeAlarm Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CompositeAlarm(name: string, args: CompositeAlarmArgs, opts?: CustomResourceOptions);
@overload
def CompositeAlarm(resource_name: str,
args: CompositeAlarmArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CompositeAlarm(resource_name: str,
opts: Optional[ResourceOptions] = None,
alarm_name: Optional[str] = None,
alarm_rule: Optional[str] = None,
actions_enabled: Optional[bool] = None,
actions_suppressor: Optional[CompositeAlarmActionsSuppressorArgs] = None,
alarm_actions: Optional[Sequence[str]] = None,
alarm_description: Optional[str] = None,
insufficient_data_actions: Optional[Sequence[str]] = None,
ok_actions: Optional[Sequence[str]] = None,
tags: Optional[Mapping[str, str]] = None)
func NewCompositeAlarm(ctx *Context, name string, args CompositeAlarmArgs, opts ...ResourceOption) (*CompositeAlarm, error)
public CompositeAlarm(string name, CompositeAlarmArgs args, CustomResourceOptions? opts = null)
public CompositeAlarm(String name, CompositeAlarmArgs args)
public CompositeAlarm(String name, CompositeAlarmArgs args, CustomResourceOptions options)
type: aws:cloudwatch:CompositeAlarm
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args CompositeAlarmArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args CompositeAlarmArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args CompositeAlarmArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CompositeAlarmArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CompositeAlarmArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var compositeAlarmResource = new Aws.CloudWatch.CompositeAlarm("compositeAlarmResource", new()
{
AlarmName = "string",
AlarmRule = "string",
ActionsEnabled = false,
ActionsSuppressor = new Aws.CloudWatch.Inputs.CompositeAlarmActionsSuppressorArgs
{
Alarm = "string",
ExtensionPeriod = 0,
WaitPeriod = 0,
},
AlarmActions = new[]
{
"string",
},
AlarmDescription = "string",
InsufficientDataActions = new[]
{
"string",
},
OkActions = new[]
{
"string",
},
Tags =
{
{ "string", "string" },
},
});
example, err := cloudwatch.NewCompositeAlarm(ctx, "compositeAlarmResource", &cloudwatch.CompositeAlarmArgs{
AlarmName: pulumi.String("string"),
AlarmRule: pulumi.String("string"),
ActionsEnabled: pulumi.Bool(false),
ActionsSuppressor: &cloudwatch.CompositeAlarmActionsSuppressorArgs{
Alarm: pulumi.String("string"),
ExtensionPeriod: pulumi.Int(0),
WaitPeriod: pulumi.Int(0),
},
AlarmActions: pulumi.StringArray{
pulumi.String("string"),
},
AlarmDescription: pulumi.String("string"),
InsufficientDataActions: pulumi.StringArray{
pulumi.String("string"),
},
OkActions: pulumi.StringArray{
pulumi.String("string"),
},
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var compositeAlarmResource = new CompositeAlarm("compositeAlarmResource", CompositeAlarmArgs.builder()
.alarmName("string")
.alarmRule("string")
.actionsEnabled(false)
.actionsSuppressor(CompositeAlarmActionsSuppressorArgs.builder()
.alarm("string")
.extensionPeriod(0)
.waitPeriod(0)
.build())
.alarmActions("string")
.alarmDescription("string")
.insufficientDataActions("string")
.okActions("string")
.tags(Map.of("string", "string"))
.build());
composite_alarm_resource = aws.cloudwatch.CompositeAlarm("compositeAlarmResource",
alarm_name="string",
alarm_rule="string",
actions_enabled=False,
actions_suppressor={
"alarm": "string",
"extension_period": 0,
"wait_period": 0,
},
alarm_actions=["string"],
alarm_description="string",
insufficient_data_actions=["string"],
ok_actions=["string"],
tags={
"string": "string",
})
const compositeAlarmResource = new aws.cloudwatch.CompositeAlarm("compositeAlarmResource", {
alarmName: "string",
alarmRule: "string",
actionsEnabled: false,
actionsSuppressor: {
alarm: "string",
extensionPeriod: 0,
waitPeriod: 0,
},
alarmActions: ["string"],
alarmDescription: "string",
insufficientDataActions: ["string"],
okActions: ["string"],
tags: {
string: "string",
},
});
type: aws:cloudwatch:CompositeAlarm
properties:
actionsEnabled: false
actionsSuppressor:
alarm: string
extensionPeriod: 0
waitPeriod: 0
alarmActions:
- string
alarmDescription: string
alarmName: string
alarmRule: string
insufficientDataActions:
- string
okActions:
- string
tags:
string: string
CompositeAlarm Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The CompositeAlarm resource accepts the following input properties:
- Alarm
Name string - The name for the composite alarm. This name must be unique within the region.
- Alarm
Rule string - An expression that specifies which other alarms are to be evaluated to determine this composite alarm's state. For syntax, see Creating a Composite Alarm. The maximum length is 10240 characters.
- Actions
Enabled bool - Indicates whether actions should be executed during any changes to the alarm state of the composite alarm. Defaults to
true
. - Actions
Suppressor CompositeAlarm Actions Suppressor - Actions will be suppressed if the suppressor alarm is in the ALARM state.
- Alarm
Actions List<string> - The set of actions to execute when this alarm transitions to the
ALARM
state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed. - Alarm
Description string - The description for the composite alarm.
- Insufficient
Data List<string>Actions - The set of actions to execute when this alarm transitions to the
INSUFFICIENT_DATA
state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed. - Ok
Actions List<string> - The set of actions to execute when this alarm transitions to an
OK
state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed. - Dictionary<string, string>
- A map of tags to associate with the alarm. Up to 50 tags are allowed. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- Alarm
Name string - The name for the composite alarm. This name must be unique within the region.
- Alarm
Rule string - An expression that specifies which other alarms are to be evaluated to determine this composite alarm's state. For syntax, see Creating a Composite Alarm. The maximum length is 10240 characters.
- Actions
Enabled bool - Indicates whether actions should be executed during any changes to the alarm state of the composite alarm. Defaults to
true
. - Actions
Suppressor CompositeAlarm Actions Suppressor Args - Actions will be suppressed if the suppressor alarm is in the ALARM state.
- Alarm
Actions []string - The set of actions to execute when this alarm transitions to the
ALARM
state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed. - Alarm
Description string - The description for the composite alarm.
- Insufficient
Data []stringActions - The set of actions to execute when this alarm transitions to the
INSUFFICIENT_DATA
state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed. - Ok
Actions []string - The set of actions to execute when this alarm transitions to an
OK
state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed. - map[string]string
- A map of tags to associate with the alarm. Up to 50 tags are allowed. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- alarm
Name String - The name for the composite alarm. This name must be unique within the region.
- alarm
Rule String - An expression that specifies which other alarms are to be evaluated to determine this composite alarm's state. For syntax, see Creating a Composite Alarm. The maximum length is 10240 characters.
- actions
Enabled Boolean - Indicates whether actions should be executed during any changes to the alarm state of the composite alarm. Defaults to
true
. - actions
Suppressor CompositeAlarm Actions Suppressor - Actions will be suppressed if the suppressor alarm is in the ALARM state.
- alarm
Actions List<String> - The set of actions to execute when this alarm transitions to the
ALARM
state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed. - alarm
Description String - The description for the composite alarm.
- insufficient
Data List<String>Actions - The set of actions to execute when this alarm transitions to the
INSUFFICIENT_DATA
state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed. - ok
Actions List<String> - The set of actions to execute when this alarm transitions to an
OK
state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed. - Map<String,String>
- A map of tags to associate with the alarm. Up to 50 tags are allowed. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- alarm
Name string - The name for the composite alarm. This name must be unique within the region.
- alarm
Rule string - An expression that specifies which other alarms are to be evaluated to determine this composite alarm's state. For syntax, see Creating a Composite Alarm. The maximum length is 10240 characters.
- actions
Enabled boolean - Indicates whether actions should be executed during any changes to the alarm state of the composite alarm. Defaults to
true
. - actions
Suppressor CompositeAlarm Actions Suppressor - Actions will be suppressed if the suppressor alarm is in the ALARM state.
- alarm
Actions string[] - The set of actions to execute when this alarm transitions to the
ALARM
state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed. - alarm
Description string - The description for the composite alarm.
- insufficient
Data string[]Actions - The set of actions to execute when this alarm transitions to the
INSUFFICIENT_DATA
state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed. - ok
Actions string[] - The set of actions to execute when this alarm transitions to an
OK
state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed. - {[key: string]: string}
- A map of tags to associate with the alarm. Up to 50 tags are allowed. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- alarm_
name str - The name for the composite alarm. This name must be unique within the region.
- alarm_
rule str - An expression that specifies which other alarms are to be evaluated to determine this composite alarm's state. For syntax, see Creating a Composite Alarm. The maximum length is 10240 characters.
- actions_
enabled bool - Indicates whether actions should be executed during any changes to the alarm state of the composite alarm. Defaults to
true
. - actions_
suppressor CompositeAlarm Actions Suppressor Args - Actions will be suppressed if the suppressor alarm is in the ALARM state.
- alarm_
actions Sequence[str] - The set of actions to execute when this alarm transitions to the
ALARM
state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed. - alarm_
description str - The description for the composite alarm.
- insufficient_
data_ Sequence[str]actions - The set of actions to execute when this alarm transitions to the
INSUFFICIENT_DATA
state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed. - ok_
actions Sequence[str] - The set of actions to execute when this alarm transitions to an
OK
state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed. - Mapping[str, str]
- A map of tags to associate with the alarm. Up to 50 tags are allowed. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- alarm
Name String - The name for the composite alarm. This name must be unique within the region.
- alarm
Rule String - An expression that specifies which other alarms are to be evaluated to determine this composite alarm's state. For syntax, see Creating a Composite Alarm. The maximum length is 10240 characters.
- actions
Enabled Boolean - Indicates whether actions should be executed during any changes to the alarm state of the composite alarm. Defaults to
true
. - actions
Suppressor Property Map - Actions will be suppressed if the suppressor alarm is in the ALARM state.
- alarm
Actions List<String> - The set of actions to execute when this alarm transitions to the
ALARM
state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed. - alarm
Description String - The description for the composite alarm.
- insufficient
Data List<String>Actions - The set of actions to execute when this alarm transitions to the
INSUFFICIENT_DATA
state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed. - ok
Actions List<String> - The set of actions to execute when this alarm transitions to an
OK
state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed. - Map<String>
- A map of tags to associate with the alarm. Up to 50 tags are allowed. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Outputs
All input properties are implicitly available as output properties. Additionally, the CompositeAlarm resource produces the following output properties:
Look up Existing CompositeAlarm Resource
Get an existing CompositeAlarm resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: CompositeAlarmState, opts?: CustomResourceOptions): CompositeAlarm
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
actions_enabled: Optional[bool] = None,
actions_suppressor: Optional[CompositeAlarmActionsSuppressorArgs] = None,
alarm_actions: Optional[Sequence[str]] = None,
alarm_description: Optional[str] = None,
alarm_name: Optional[str] = None,
alarm_rule: Optional[str] = None,
arn: Optional[str] = None,
insufficient_data_actions: Optional[Sequence[str]] = None,
ok_actions: Optional[Sequence[str]] = None,
tags: Optional[Mapping[str, str]] = None,
tags_all: Optional[Mapping[str, str]] = None) -> CompositeAlarm
func GetCompositeAlarm(ctx *Context, name string, id IDInput, state *CompositeAlarmState, opts ...ResourceOption) (*CompositeAlarm, error)
public static CompositeAlarm Get(string name, Input<string> id, CompositeAlarmState? state, CustomResourceOptions? opts = null)
public static CompositeAlarm get(String name, Output<String> id, CompositeAlarmState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Actions
Enabled bool - Indicates whether actions should be executed during any changes to the alarm state of the composite alarm. Defaults to
true
. - Actions
Suppressor CompositeAlarm Actions Suppressor - Actions will be suppressed if the suppressor alarm is in the ALARM state.
- Alarm
Actions List<string> - The set of actions to execute when this alarm transitions to the
ALARM
state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed. - Alarm
Description string - The description for the composite alarm.
- Alarm
Name string - The name for the composite alarm. This name must be unique within the region.
- Alarm
Rule string - An expression that specifies which other alarms are to be evaluated to determine this composite alarm's state. For syntax, see Creating a Composite Alarm. The maximum length is 10240 characters.
- Arn string
- The ARN of the composite alarm.
- Insufficient
Data List<string>Actions - The set of actions to execute when this alarm transitions to the
INSUFFICIENT_DATA
state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed. - Ok
Actions List<string> - The set of actions to execute when this alarm transitions to an
OK
state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed. - Dictionary<string, string>
- A map of tags to associate with the alarm. Up to 50 tags are allowed. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- Actions
Enabled bool - Indicates whether actions should be executed during any changes to the alarm state of the composite alarm. Defaults to
true
. - Actions
Suppressor CompositeAlarm Actions Suppressor Args - Actions will be suppressed if the suppressor alarm is in the ALARM state.
- Alarm
Actions []string - The set of actions to execute when this alarm transitions to the
ALARM
state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed. - Alarm
Description string - The description for the composite alarm.
- Alarm
Name string - The name for the composite alarm. This name must be unique within the region.
- Alarm
Rule string - An expression that specifies which other alarms are to be evaluated to determine this composite alarm's state. For syntax, see Creating a Composite Alarm. The maximum length is 10240 characters.
- Arn string
- The ARN of the composite alarm.
- Insufficient
Data []stringActions - The set of actions to execute when this alarm transitions to the
INSUFFICIENT_DATA
state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed. - Ok
Actions []string - The set of actions to execute when this alarm transitions to an
OK
state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed. - map[string]string
- A map of tags to associate with the alarm. Up to 50 tags are allowed. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- actions
Enabled Boolean - Indicates whether actions should be executed during any changes to the alarm state of the composite alarm. Defaults to
true
. - actions
Suppressor CompositeAlarm Actions Suppressor - Actions will be suppressed if the suppressor alarm is in the ALARM state.
- alarm
Actions List<String> - The set of actions to execute when this alarm transitions to the
ALARM
state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed. - alarm
Description String - The description for the composite alarm.
- alarm
Name String - The name for the composite alarm. This name must be unique within the region.
- alarm
Rule String - An expression that specifies which other alarms are to be evaluated to determine this composite alarm's state. For syntax, see Creating a Composite Alarm. The maximum length is 10240 characters.
- arn String
- The ARN of the composite alarm.
- insufficient
Data List<String>Actions - The set of actions to execute when this alarm transitions to the
INSUFFICIENT_DATA
state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed. - ok
Actions List<String> - The set of actions to execute when this alarm transitions to an
OK
state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed. - Map<String,String>
- A map of tags to associate with the alarm. Up to 50 tags are allowed. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- actions
Enabled boolean - Indicates whether actions should be executed during any changes to the alarm state of the composite alarm. Defaults to
true
. - actions
Suppressor CompositeAlarm Actions Suppressor - Actions will be suppressed if the suppressor alarm is in the ALARM state.
- alarm
Actions string[] - The set of actions to execute when this alarm transitions to the
ALARM
state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed. - alarm
Description string - The description for the composite alarm.
- alarm
Name string - The name for the composite alarm. This name must be unique within the region.
- alarm
Rule string - An expression that specifies which other alarms are to be evaluated to determine this composite alarm's state. For syntax, see Creating a Composite Alarm. The maximum length is 10240 characters.
- arn string
- The ARN of the composite alarm.
- insufficient
Data string[]Actions - The set of actions to execute when this alarm transitions to the
INSUFFICIENT_DATA
state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed. - ok
Actions string[] - The set of actions to execute when this alarm transitions to an
OK
state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed. - {[key: string]: string}
- A map of tags to associate with the alarm. Up to 50 tags are allowed. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- actions_
enabled bool - Indicates whether actions should be executed during any changes to the alarm state of the composite alarm. Defaults to
true
. - actions_
suppressor CompositeAlarm Actions Suppressor Args - Actions will be suppressed if the suppressor alarm is in the ALARM state.
- alarm_
actions Sequence[str] - The set of actions to execute when this alarm transitions to the
ALARM
state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed. - alarm_
description str - The description for the composite alarm.
- alarm_
name str - The name for the composite alarm. This name must be unique within the region.
- alarm_
rule str - An expression that specifies which other alarms are to be evaluated to determine this composite alarm's state. For syntax, see Creating a Composite Alarm. The maximum length is 10240 characters.
- arn str
- The ARN of the composite alarm.
- insufficient_
data_ Sequence[str]actions - The set of actions to execute when this alarm transitions to the
INSUFFICIENT_DATA
state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed. - ok_
actions Sequence[str] - The set of actions to execute when this alarm transitions to an
OK
state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed. - Mapping[str, str]
- A map of tags to associate with the alarm. Up to 50 tags are allowed. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- actions
Enabled Boolean - Indicates whether actions should be executed during any changes to the alarm state of the composite alarm. Defaults to
true
. - actions
Suppressor Property Map - Actions will be suppressed if the suppressor alarm is in the ALARM state.
- alarm
Actions List<String> - The set of actions to execute when this alarm transitions to the
ALARM
state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed. - alarm
Description String - The description for the composite alarm.
- alarm
Name String - The name for the composite alarm. This name must be unique within the region.
- alarm
Rule String - An expression that specifies which other alarms are to be evaluated to determine this composite alarm's state. For syntax, see Creating a Composite Alarm. The maximum length is 10240 characters.
- arn String
- The ARN of the composite alarm.
- insufficient
Data List<String>Actions - The set of actions to execute when this alarm transitions to the
INSUFFICIENT_DATA
state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed. - ok
Actions List<String> - The set of actions to execute when this alarm transitions to an
OK
state from any other state. Each action is specified as an ARN. Up to 5 actions are allowed. - Map<String>
- A map of tags to associate with the alarm. Up to 50 tags are allowed. .If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
Supporting Types
CompositeAlarmActionsSuppressor, CompositeAlarmActionsSuppressorArgs
- Alarm string
- Can be an AlarmName or an Amazon Resource Name (ARN) from an existing alarm.
- Extension
Period int - The maximum time in seconds that the composite alarm waits after suppressor alarm goes out of the
ALARM
state. After this time, the composite alarm performs its actions. - Wait
Period int - The maximum time in seconds that the composite alarm waits for the suppressor alarm to go into the
ALARM
state. After this time, the composite alarm performs its actions.
- Alarm string
- Can be an AlarmName or an Amazon Resource Name (ARN) from an existing alarm.
- Extension
Period int - The maximum time in seconds that the composite alarm waits after suppressor alarm goes out of the
ALARM
state. After this time, the composite alarm performs its actions. - Wait
Period int - The maximum time in seconds that the composite alarm waits for the suppressor alarm to go into the
ALARM
state. After this time, the composite alarm performs its actions.
- alarm String
- Can be an AlarmName or an Amazon Resource Name (ARN) from an existing alarm.
- extension
Period Integer - The maximum time in seconds that the composite alarm waits after suppressor alarm goes out of the
ALARM
state. After this time, the composite alarm performs its actions. - wait
Period Integer - The maximum time in seconds that the composite alarm waits for the suppressor alarm to go into the
ALARM
state. After this time, the composite alarm performs its actions.
- alarm string
- Can be an AlarmName or an Amazon Resource Name (ARN) from an existing alarm.
- extension
Period number - The maximum time in seconds that the composite alarm waits after suppressor alarm goes out of the
ALARM
state. After this time, the composite alarm performs its actions. - wait
Period number - The maximum time in seconds that the composite alarm waits for the suppressor alarm to go into the
ALARM
state. After this time, the composite alarm performs its actions.
- alarm str
- Can be an AlarmName or an Amazon Resource Name (ARN) from an existing alarm.
- extension_
period int - The maximum time in seconds that the composite alarm waits after suppressor alarm goes out of the
ALARM
state. After this time, the composite alarm performs its actions. - wait_
period int - The maximum time in seconds that the composite alarm waits for the suppressor alarm to go into the
ALARM
state. After this time, the composite alarm performs its actions.
- alarm String
- Can be an AlarmName or an Amazon Resource Name (ARN) from an existing alarm.
- extension
Period Number - The maximum time in seconds that the composite alarm waits after suppressor alarm goes out of the
ALARM
state. After this time, the composite alarm performs its actions. - wait
Period Number - The maximum time in seconds that the composite alarm waits for the suppressor alarm to go into the
ALARM
state. After this time, the composite alarm performs its actions.
Import
Using pulumi import
, import a CloudWatch Composite Alarm using the alarm_name
. For example:
$ pulumi import aws:cloudwatch/compositeAlarm:CompositeAlarm test my-alarm
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.