import { Command as $Command } from "@smithy/smithy-client"; import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { CloudWatchClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchClient"; import type { PutCompositeAlarmInput } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link PutCompositeAlarmCommand}. */ export interface PutCompositeAlarmCommandInput extends PutCompositeAlarmInput { } /** * @public * * The output of {@link PutCompositeAlarmCommand}. */ export interface PutCompositeAlarmCommandOutput extends __MetadataBearer { } declare const PutCompositeAlarmCommand_base: { new (input: PutCompositeAlarmCommandInput): import("@smithy/smithy-client").CommandImpl; new (input: PutCompositeAlarmCommandInput): import("@smithy/smithy-client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; }; /** *

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.

*

Composite alarms can take the following actions:

* * *

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.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { CloudWatchClient, PutCompositeAlarmCommand } from "@aws-sdk/client-cloudwatch"; // ES Modules import * // const { CloudWatchClient, PutCompositeAlarmCommand } = require("@aws-sdk/client-cloudwatch"); // CommonJS import * // import type { CloudWatchClientConfig } from "@aws-sdk/client-cloudwatch"; * const config = {}; // type is CloudWatchClientConfig * const client = new CloudWatchClient(config); * const input = { // PutCompositeAlarmInput * ActionsEnabled: true || false, * AlarmActions: [ // ResourceList * "STRING_VALUE", * ], * AlarmDescription: "STRING_VALUE", * AlarmName: "STRING_VALUE", // required * AlarmRule: "STRING_VALUE", // required * InsufficientDataActions: [ * "STRING_VALUE", * ], * OKActions: [ * "STRING_VALUE", * ], * Tags: [ // TagList * { // Tag * Key: "STRING_VALUE", // required * Value: "STRING_VALUE", // required * }, * ], * ActionsSuppressor: "STRING_VALUE", * ActionsSuppressorWaitPeriod: Number("int"), * ActionsSuppressorExtensionPeriod: Number("int"), * }; * const command = new PutCompositeAlarmCommand(input); * const response = await client.send(command); * // {}; * * ``` * * @param PutCompositeAlarmCommandInput - {@link PutCompositeAlarmCommandInput} * @returns {@link PutCompositeAlarmCommandOutput} * @see {@link PutCompositeAlarmCommandInput} for command's `input` shape. * @see {@link PutCompositeAlarmCommandOutput} for command's `response` shape. * @see {@link CloudWatchClientResolvedConfig | config} for CloudWatchClient's `config` shape. * * @throws {@link LimitExceededFault} (client fault) *

The quota for alarms for this customer has already been reached.

* * @throws {@link CloudWatchServiceException} *

Base exception class for all service exceptions from CloudWatch service.

* * * @public */ export declare class PutCompositeAlarmCommand extends PutCompositeAlarmCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: PutCompositeAlarmInput; output: {}; }; sdk: { input: PutCompositeAlarmCommandInput; output: PutCompositeAlarmCommandOutput; }; }; }