import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages an AWS CloudWatch Alarm Mute Rule. * * ## Example Usage * * ### Basic Usage with Cron Expression * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.cloudwatch.AlarmMuteRule("example", { * rule: { * schedule: { * duration: "PT4H", * expression: "cron(0 2 * * *)", * }, * }, * name: "example", * }); * ``` * * ### With Start/Expire Dates Option * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.cloudwatch.MetricAlarm("example", { * name: "example", * comparisonOperator: "GreaterThanThreshold", * evaluationPeriods: 2, * metricName: "CPUUtilization", * namespace: "AWS/EC2", * period: 120, * statistic: "Average", * threshold: 80, * }); * const exampleAlarmMuteRule = new aws.cloudwatch.AlarmMuteRule("example", { * rule: { * schedule: { * duration: "PT4H", * expression: "cron(0 2 * * *)", * timezone: "Asia/Tokyo", * }, * }, * muteTargets: { * alarmNames: [example.name], * }, * name: "example", * description: "Mute alarms during maintenance window", * startDate: "2026-01-01T00:00:00Z", * expireDate: "2026-12-31T23:59:00Z", * tags: { * Environment: "production", * }, * }); * ``` * * ### With At Expression * * > **NOTE:** When using `at()` expressions, do not set `startDate` or `expireDate`. The CloudWatch API returns the error `Can not set start or expire dates for At expressions`. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.cloudwatch.AlarmMuteRule("example", { * rule: { * schedule: { * duration: "PT4H", * expression: "at(2026-12-31T23:59:59)", * }, * }, * name: "example", * }); * ``` * * ## Import * * ### Identity Schema * * #### Required * * * `name` (String) Name of the CloudWatch Alarm Mute Rule. * * #### Optional * * * `accountId` (String) AWS Account where this resource is managed. * * `region` (String) Region where this resource is managed. * * Using `pulumi import`, import CloudWatch Alarm Mute Rule using the `name`. For example: * * ```sh * $ pulumi import aws:cloudwatch/alarmMuteRule:AlarmMuteRule example example * ``` */ export declare class AlarmMuteRule extends pulumi.CustomResource { /** * Get an existing AlarmMuteRule resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: AlarmMuteRuleState, opts?: pulumi.CustomResourceOptions): AlarmMuteRule; /** * Returns true if the given object is an instance of AlarmMuteRule. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is AlarmMuteRule; /** * ARN of the Alarm Mute Rule. */ readonly arn: pulumi.Output; /** * Description of the alarm mute rule. */ readonly description: pulumi.Output; /** * Date and time in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8) when the mute rule expires. Seconds must be set to `00` (e.g., `2026-12-31T23:59:00Z`). Must not be set when using `at()` expressions. */ readonly expireDate: pulumi.Output; /** * Timestamp of when the mute rule was last updated. */ readonly lastUpdatedTimestamp: pulumi.Output; /** * Alarms to mute. See `muteTargets` block below for details. */ readonly muteTargets: pulumi.Output; /** * Indicates whether the mute rule is one-time or recurring. Valid values are `ONE_TIME` or `RECURRING`. See [Alarm mute rules](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/alarm-mute-rules.html) for details. */ readonly muteType: pulumi.Output; /** * Name of the alarm mute rule. Changing this forces a new resource. */ readonly name: pulumi.Output; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ readonly region: pulumi.Output; /** * Rule definition for the mute rule. See `rule` block below for details. * * The following arguments are optional: */ readonly rule: pulumi.Output; /** * Date and time in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8) when the mute rule becomes active. Seconds must be set to `00` (e.g., `2026-01-01T00:00:00Z`). Must not be set when using `at()` expressions. */ readonly startDate: pulumi.Output; /** * Current status of the mute rule. Valid values are `SCHEDULED`, `ACTIVE`, or `EXPIRED`. */ readonly status: pulumi.Output; /** * Map of tags assigned to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ readonly tagsAll: pulumi.Output<{ [key: string]: string; }>; /** * Create a AlarmMuteRule resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args?: AlarmMuteRuleArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering AlarmMuteRule resources. */ export interface AlarmMuteRuleState { /** * ARN of the Alarm Mute Rule. */ arn?: pulumi.Input; /** * Description of the alarm mute rule. */ description?: pulumi.Input; /** * Date and time in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8) when the mute rule expires. Seconds must be set to `00` (e.g., `2026-12-31T23:59:00Z`). Must not be set when using `at()` expressions. */ expireDate?: pulumi.Input; /** * Timestamp of when the mute rule was last updated. */ lastUpdatedTimestamp?: pulumi.Input; /** * Alarms to mute. See `muteTargets` block below for details. */ muteTargets?: pulumi.Input; /** * Indicates whether the mute rule is one-time or recurring. Valid values are `ONE_TIME` or `RECURRING`. See [Alarm mute rules](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/alarm-mute-rules.html) for details. */ muteType?: pulumi.Input; /** * Name of the alarm mute rule. Changing this forces a new resource. */ name?: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * Rule definition for the mute rule. See `rule` block below for details. * * The following arguments are optional: */ rule?: pulumi.Input; /** * Date and time in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8) when the mute rule becomes active. Seconds must be set to `00` (e.g., `2026-01-01T00:00:00Z`). Must not be set when using `at()` expressions. */ startDate?: pulumi.Input; /** * Current status of the mute rule. Valid values are `SCHEDULED`, `ACTIVE`, or `EXPIRED`. */ status?: pulumi.Input; /** * Map of tags assigned to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ tagsAll?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; } /** * The set of arguments for constructing a AlarmMuteRule resource. */ export interface AlarmMuteRuleArgs { /** * Description of the alarm mute rule. */ description?: pulumi.Input; /** * Date and time in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8) when the mute rule expires. Seconds must be set to `00` (e.g., `2026-12-31T23:59:00Z`). Must not be set when using `at()` expressions. */ expireDate?: pulumi.Input; /** * Alarms to mute. See `muteTargets` block below for details. */ muteTargets?: pulumi.Input; /** * Name of the alarm mute rule. Changing this forces a new resource. */ name?: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * Rule definition for the mute rule. See `rule` block below for details. * * The following arguments are optional: */ rule?: pulumi.Input; /** * Date and time in [RFC3339 format](https://tools.ietf.org/html/rfc3339#section-5.8) when the mute rule becomes active. Seconds must be set to `00` (e.g., `2026-01-01T00:00:00Z`). Must not be set when using `at()` expressions. */ startDate?: pulumi.Input; /** * Map of tags assigned to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; } //# sourceMappingURL=alarmMuteRule.d.ts.map