/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace CloudWatch { namespace Model { /** */ class PutCompositeAlarmRequest : public CloudWatchRequest { public: AWS_CLOUDWATCH_API PutCompositeAlarmRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "PutCompositeAlarm"; } AWS_CLOUDWATCH_API Aws::String SerializePayload() const override; protected: AWS_CLOUDWATCH_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

Indicates whether actions should be executed during any changes to the alarm * state of the composite alarm. The default is TRUE.

*/ inline bool GetActionsEnabled() const{ return m_actionsEnabled; } /** *

Indicates whether actions should be executed during any changes to the alarm * state of the composite alarm. The default is TRUE.

*/ inline bool ActionsEnabledHasBeenSet() const { return m_actionsEnabledHasBeenSet; } /** *

Indicates whether actions should be executed during any changes to the alarm * state of the composite alarm. The default is TRUE.

*/ inline void SetActionsEnabled(bool value) { m_actionsEnabledHasBeenSet = true; m_actionsEnabled = value; } /** *

Indicates whether actions should be executed during any changes to the alarm * state of the composite alarm. The default is TRUE.

*/ inline PutCompositeAlarmRequest& WithActionsEnabled(bool value) { SetActionsEnabled(value); return *this;} /** *

The actions to execute when this alarm transitions to the ALARM * state from any other state. Each action is specified as an Amazon Resource Name * (ARN).

Valid Values: * arn:aws:sns:region:account-id:sns-topic-name * | arn:aws:ssm:region:account-id:opsitem:severity *

*/ inline const Aws::Vector& GetAlarmActions() const{ return m_alarmActions; } /** *

The actions to execute when this alarm transitions to the ALARM * state from any other state. Each action is specified as an Amazon Resource Name * (ARN).

Valid Values: * arn:aws:sns:region:account-id:sns-topic-name * | arn:aws:ssm:region:account-id:opsitem:severity *

*/ inline bool AlarmActionsHasBeenSet() const { return m_alarmActionsHasBeenSet; } /** *

The actions to execute when this alarm transitions to the ALARM * state from any other state. Each action is specified as an Amazon Resource Name * (ARN).

Valid Values: * arn:aws:sns:region:account-id:sns-topic-name * | arn:aws:ssm:region:account-id:opsitem:severity *

*/ inline void SetAlarmActions(const Aws::Vector& value) { m_alarmActionsHasBeenSet = true; m_alarmActions = value; } /** *

The actions to execute when this alarm transitions to the ALARM * state from any other state. Each action is specified as an Amazon Resource Name * (ARN).

Valid Values: * arn:aws:sns:region:account-id:sns-topic-name * | arn:aws:ssm:region:account-id:opsitem:severity *

*/ inline void SetAlarmActions(Aws::Vector&& value) { m_alarmActionsHasBeenSet = true; m_alarmActions = std::move(value); } /** *

The actions to execute when this alarm transitions to the ALARM * state from any other state. Each action is specified as an Amazon Resource Name * (ARN).

Valid Values: * arn:aws:sns:region:account-id:sns-topic-name * | arn:aws:ssm:region:account-id:opsitem:severity *

*/ inline PutCompositeAlarmRequest& WithAlarmActions(const Aws::Vector& value) { SetAlarmActions(value); return *this;} /** *

The actions to execute when this alarm transitions to the ALARM * state from any other state. Each action is specified as an Amazon Resource Name * (ARN).

Valid Values: * arn:aws:sns:region:account-id:sns-topic-name * | arn:aws:ssm:region:account-id:opsitem:severity *

*/ inline PutCompositeAlarmRequest& WithAlarmActions(Aws::Vector&& value) { SetAlarmActions(std::move(value)); return *this;} /** *

The actions to execute when this alarm transitions to the ALARM * state from any other state. Each action is specified as an Amazon Resource Name * (ARN).

Valid Values: * arn:aws:sns:region:account-id:sns-topic-name * | arn:aws:ssm:region:account-id:opsitem:severity *

*/ inline PutCompositeAlarmRequest& AddAlarmActions(const Aws::String& value) { m_alarmActionsHasBeenSet = true; m_alarmActions.push_back(value); return *this; } /** *

The actions to execute when this alarm transitions to the ALARM * state from any other state. Each action is specified as an Amazon Resource Name * (ARN).

Valid Values: * arn:aws:sns:region:account-id:sns-topic-name * | arn:aws:ssm:region:account-id:opsitem:severity *

*/ inline PutCompositeAlarmRequest& AddAlarmActions(Aws::String&& value) { m_alarmActionsHasBeenSet = true; m_alarmActions.push_back(std::move(value)); return *this; } /** *

The actions to execute when this alarm transitions to the ALARM * state from any other state. Each action is specified as an Amazon Resource Name * (ARN).

Valid Values: * arn:aws:sns:region:account-id:sns-topic-name * | arn:aws:ssm:region:account-id:opsitem:severity *

*/ inline PutCompositeAlarmRequest& AddAlarmActions(const char* value) { m_alarmActionsHasBeenSet = true; m_alarmActions.push_back(value); return *this; } /** *

The description for the composite alarm.

*/ inline const Aws::String& GetAlarmDescription() const{ return m_alarmDescription; } /** *

The description for the composite alarm.

*/ inline bool AlarmDescriptionHasBeenSet() const { return m_alarmDescriptionHasBeenSet; } /** *

The description for the composite alarm.

*/ inline void SetAlarmDescription(const Aws::String& value) { m_alarmDescriptionHasBeenSet = true; m_alarmDescription = value; } /** *

The description for the composite alarm.

*/ inline void SetAlarmDescription(Aws::String&& value) { m_alarmDescriptionHasBeenSet = true; m_alarmDescription = std::move(value); } /** *

The description for the composite alarm.

*/ inline void SetAlarmDescription(const char* value) { m_alarmDescriptionHasBeenSet = true; m_alarmDescription.assign(value); } /** *

The description for the composite alarm.

*/ inline PutCompositeAlarmRequest& WithAlarmDescription(const Aws::String& value) { SetAlarmDescription(value); return *this;} /** *

The description for the composite alarm.

*/ inline PutCompositeAlarmRequest& WithAlarmDescription(Aws::String&& value) { SetAlarmDescription(std::move(value)); return *this;} /** *

The description for the composite alarm.

*/ inline PutCompositeAlarmRequest& WithAlarmDescription(const char* value) { SetAlarmDescription(value); return *this;} /** *

The name for the composite alarm. This name must be unique within the * Region.

*/ inline const Aws::String& GetAlarmName() const{ return m_alarmName; } /** *

The name for the composite alarm. This name must be unique within the * Region.

*/ inline bool AlarmNameHasBeenSet() const { return m_alarmNameHasBeenSet; } /** *

The name for the composite alarm. This name must be unique within the * Region.

*/ inline void SetAlarmName(const Aws::String& value) { m_alarmNameHasBeenSet = true; m_alarmName = value; } /** *

The name for the composite alarm. This name must be unique within the * Region.

*/ inline void SetAlarmName(Aws::String&& value) { m_alarmNameHasBeenSet = true; m_alarmName = std::move(value); } /** *

The name for the composite alarm. This name must be unique within the * Region.

*/ inline void SetAlarmName(const char* value) { m_alarmNameHasBeenSet = true; m_alarmName.assign(value); } /** *

The name for the composite alarm. This name must be unique within the * Region.

*/ inline PutCompositeAlarmRequest& WithAlarmName(const Aws::String& value) { SetAlarmName(value); return *this;} /** *

The name for the composite alarm. This name must be unique within the * Region.

*/ inline PutCompositeAlarmRequest& WithAlarmName(Aws::String&& value) { SetAlarmName(std::move(value)); return *this;} /** *

The name for the composite alarm. This name must be unique within the * Region.

*/ inline PutCompositeAlarmRequest& WithAlarmName(const char* value) { SetAlarmName(value); return *this;} /** *

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:

  • * ALARM("alarm-name or alarm-ARN") is TRUE if the named * alarm is in ALARM state.

  • OK("alarm-name or * alarm-ARN") is TRUE if the named alarm is in OK state.

  • *
  • INSUFFICIENT_DATA("alarm-name or alarm-ARN") * is TRUE if the named alarm is in INSUFFICIENT_DATA state.

  • * TRUE always evaluates to TRUE.

  • * FALSE always evaluates to FALSE.

TRUE and FALSE * are useful for testing a complex AlarmRule structure, and for * testing your alarm actions.

Alarm names specified in * AlarmRule can be surrounded with double-quotes ("), but do not have * to be.

The following are some examples of AlarmRule:

*
  • ALARM(CPUUtilizationTooHigh) AND * ALARM(DiskReadOpsTooHigh) specifies that the composite alarm goes into * ALARM state only if both CPUUtilizationTooHigh and DiskReadOpsTooHigh alarms are * in ALARM state.

  • ALARM(CPUUtilizationTooHigh) AND NOT * ALARM(DeploymentInProgress) specifies that the alarm goes to ALARM state * if CPUUtilizationTooHigh is in ALARM state and DeploymentInProgress is not in * ALARM state. This example reduces alarm noise during a known deployment * window.

  • (ALARM(CPUUtilizationTooHigh) OR * ALARM(DiskReadOpsTooHigh)) AND OK(NetworkOutTooHigh) goes into ALARM * state if CPUUtilizationTooHigh OR DiskReadOpsTooHigh is in ALARM state, and if * NetworkOutTooHigh is in OK state. This provides another example of using a * composite alarm to prevent noise. This rule ensures that you are not notified * with an alarm action on high CPU or disk usage if a known network problem is * also occurring.

The AlarmRule can specify as * many as 100 "children" alarms. The AlarmRule expression can have as * many as 500 elements. Elements are child alarms, TRUE or FALSE statements, and * parentheses.

*/ inline const Aws::String& GetAlarmRule() const{ return m_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:

  • * ALARM("alarm-name or alarm-ARN") is TRUE if the named * alarm is in ALARM state.

  • OK("alarm-name or * alarm-ARN") is TRUE if the named alarm is in OK state.

  • *
  • INSUFFICIENT_DATA("alarm-name or alarm-ARN") * is TRUE if the named alarm is in INSUFFICIENT_DATA state.

  • * TRUE always evaluates to TRUE.

  • * FALSE always evaluates to FALSE.

TRUE and FALSE * are useful for testing a complex AlarmRule structure, and for * testing your alarm actions.

Alarm names specified in * AlarmRule can be surrounded with double-quotes ("), but do not have * to be.

The following are some examples of AlarmRule:

*
  • ALARM(CPUUtilizationTooHigh) AND * ALARM(DiskReadOpsTooHigh) specifies that the composite alarm goes into * ALARM state only if both CPUUtilizationTooHigh and DiskReadOpsTooHigh alarms are * in ALARM state.

  • ALARM(CPUUtilizationTooHigh) AND NOT * ALARM(DeploymentInProgress) specifies that the alarm goes to ALARM state * if CPUUtilizationTooHigh is in ALARM state and DeploymentInProgress is not in * ALARM state. This example reduces alarm noise during a known deployment * window.

  • (ALARM(CPUUtilizationTooHigh) OR * ALARM(DiskReadOpsTooHigh)) AND OK(NetworkOutTooHigh) goes into ALARM * state if CPUUtilizationTooHigh OR DiskReadOpsTooHigh is in ALARM state, and if * NetworkOutTooHigh is in OK state. This provides another example of using a * composite alarm to prevent noise. This rule ensures that you are not notified * with an alarm action on high CPU or disk usage if a known network problem is * also occurring.

The AlarmRule can specify as * many as 100 "children" alarms. The AlarmRule expression can have as * many as 500 elements. Elements are child alarms, TRUE or FALSE statements, and * parentheses.

*/ inline bool AlarmRuleHasBeenSet() const { return m_alarmRuleHasBeenSet; } /** *

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:

  • * ALARM("alarm-name or alarm-ARN") is TRUE if the named * alarm is in ALARM state.

  • OK("alarm-name or * alarm-ARN") is TRUE if the named alarm is in OK state.

  • *
  • INSUFFICIENT_DATA("alarm-name or alarm-ARN") * is TRUE if the named alarm is in INSUFFICIENT_DATA state.

  • * TRUE always evaluates to TRUE.

  • * FALSE always evaluates to FALSE.

TRUE and FALSE * are useful for testing a complex AlarmRule structure, and for * testing your alarm actions.

Alarm names specified in * AlarmRule can be surrounded with double-quotes ("), but do not have * to be.

The following are some examples of AlarmRule:

*
  • ALARM(CPUUtilizationTooHigh) AND * ALARM(DiskReadOpsTooHigh) specifies that the composite alarm goes into * ALARM state only if both CPUUtilizationTooHigh and DiskReadOpsTooHigh alarms are * in ALARM state.

  • ALARM(CPUUtilizationTooHigh) AND NOT * ALARM(DeploymentInProgress) specifies that the alarm goes to ALARM state * if CPUUtilizationTooHigh is in ALARM state and DeploymentInProgress is not in * ALARM state. This example reduces alarm noise during a known deployment * window.

  • (ALARM(CPUUtilizationTooHigh) OR * ALARM(DiskReadOpsTooHigh)) AND OK(NetworkOutTooHigh) goes into ALARM * state if CPUUtilizationTooHigh OR DiskReadOpsTooHigh is in ALARM state, and if * NetworkOutTooHigh is in OK state. This provides another example of using a * composite alarm to prevent noise. This rule ensures that you are not notified * with an alarm action on high CPU or disk usage if a known network problem is * also occurring.

The AlarmRule can specify as * many as 100 "children" alarms. The AlarmRule expression can have as * many as 500 elements. Elements are child alarms, TRUE or FALSE statements, and * parentheses.

*/ inline void SetAlarmRule(const Aws::String& value) { m_alarmRuleHasBeenSet = true; m_alarmRule = value; } /** *

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:

  • * ALARM("alarm-name or alarm-ARN") is TRUE if the named * alarm is in ALARM state.

  • OK("alarm-name or * alarm-ARN") is TRUE if the named alarm is in OK state.

  • *
  • INSUFFICIENT_DATA("alarm-name or alarm-ARN") * is TRUE if the named alarm is in INSUFFICIENT_DATA state.

  • * TRUE always evaluates to TRUE.

  • * FALSE always evaluates to FALSE.

TRUE and FALSE * are useful for testing a complex AlarmRule structure, and for * testing your alarm actions.

Alarm names specified in * AlarmRule can be surrounded with double-quotes ("), but do not have * to be.

The following are some examples of AlarmRule:

*
  • ALARM(CPUUtilizationTooHigh) AND * ALARM(DiskReadOpsTooHigh) specifies that the composite alarm goes into * ALARM state only if both CPUUtilizationTooHigh and DiskReadOpsTooHigh alarms are * in ALARM state.

  • ALARM(CPUUtilizationTooHigh) AND NOT * ALARM(DeploymentInProgress) specifies that the alarm goes to ALARM state * if CPUUtilizationTooHigh is in ALARM state and DeploymentInProgress is not in * ALARM state. This example reduces alarm noise during a known deployment * window.

  • (ALARM(CPUUtilizationTooHigh) OR * ALARM(DiskReadOpsTooHigh)) AND OK(NetworkOutTooHigh) goes into ALARM * state if CPUUtilizationTooHigh OR DiskReadOpsTooHigh is in ALARM state, and if * NetworkOutTooHigh is in OK state. This provides another example of using a * composite alarm to prevent noise. This rule ensures that you are not notified * with an alarm action on high CPU or disk usage if a known network problem is * also occurring.

The AlarmRule can specify as * many as 100 "children" alarms. The AlarmRule expression can have as * many as 500 elements. Elements are child alarms, TRUE or FALSE statements, and * parentheses.

*/ inline void SetAlarmRule(Aws::String&& value) { m_alarmRuleHasBeenSet = true; m_alarmRule = std::move(value); } /** *

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:

  • * ALARM("alarm-name or alarm-ARN") is TRUE if the named * alarm is in ALARM state.

  • OK("alarm-name or * alarm-ARN") is TRUE if the named alarm is in OK state.

  • *
  • INSUFFICIENT_DATA("alarm-name or alarm-ARN") * is TRUE if the named alarm is in INSUFFICIENT_DATA state.

  • * TRUE always evaluates to TRUE.

  • * FALSE always evaluates to FALSE.

TRUE and FALSE * are useful for testing a complex AlarmRule structure, and for * testing your alarm actions.

Alarm names specified in * AlarmRule can be surrounded with double-quotes ("), but do not have * to be.

The following are some examples of AlarmRule:

*
  • ALARM(CPUUtilizationTooHigh) AND * ALARM(DiskReadOpsTooHigh) specifies that the composite alarm goes into * ALARM state only if both CPUUtilizationTooHigh and DiskReadOpsTooHigh alarms are * in ALARM state.

  • ALARM(CPUUtilizationTooHigh) AND NOT * ALARM(DeploymentInProgress) specifies that the alarm goes to ALARM state * if CPUUtilizationTooHigh is in ALARM state and DeploymentInProgress is not in * ALARM state. This example reduces alarm noise during a known deployment * window.

  • (ALARM(CPUUtilizationTooHigh) OR * ALARM(DiskReadOpsTooHigh)) AND OK(NetworkOutTooHigh) goes into ALARM * state if CPUUtilizationTooHigh OR DiskReadOpsTooHigh is in ALARM state, and if * NetworkOutTooHigh is in OK state. This provides another example of using a * composite alarm to prevent noise. This rule ensures that you are not notified * with an alarm action on high CPU or disk usage if a known network problem is * also occurring.

The AlarmRule can specify as * many as 100 "children" alarms. The AlarmRule expression can have as * many as 500 elements. Elements are child alarms, TRUE or FALSE statements, and * parentheses.

*/ inline void SetAlarmRule(const char* value) { m_alarmRuleHasBeenSet = true; m_alarmRule.assign(value); } /** *

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:

  • * ALARM("alarm-name or alarm-ARN") is TRUE if the named * alarm is in ALARM state.

  • OK("alarm-name or * alarm-ARN") is TRUE if the named alarm is in OK state.

  • *
  • INSUFFICIENT_DATA("alarm-name or alarm-ARN") * is TRUE if the named alarm is in INSUFFICIENT_DATA state.

  • * TRUE always evaluates to TRUE.

  • * FALSE always evaluates to FALSE.

TRUE and FALSE * are useful for testing a complex AlarmRule structure, and for * testing your alarm actions.

Alarm names specified in * AlarmRule can be surrounded with double-quotes ("), but do not have * to be.

The following are some examples of AlarmRule:

*
  • ALARM(CPUUtilizationTooHigh) AND * ALARM(DiskReadOpsTooHigh) specifies that the composite alarm goes into * ALARM state only if both CPUUtilizationTooHigh and DiskReadOpsTooHigh alarms are * in ALARM state.

  • ALARM(CPUUtilizationTooHigh) AND NOT * ALARM(DeploymentInProgress) specifies that the alarm goes to ALARM state * if CPUUtilizationTooHigh is in ALARM state and DeploymentInProgress is not in * ALARM state. This example reduces alarm noise during a known deployment * window.

  • (ALARM(CPUUtilizationTooHigh) OR * ALARM(DiskReadOpsTooHigh)) AND OK(NetworkOutTooHigh) goes into ALARM * state if CPUUtilizationTooHigh OR DiskReadOpsTooHigh is in ALARM state, and if * NetworkOutTooHigh is in OK state. This provides another example of using a * composite alarm to prevent noise. This rule ensures that you are not notified * with an alarm action on high CPU or disk usage if a known network problem is * also occurring.

The AlarmRule can specify as * many as 100 "children" alarms. The AlarmRule expression can have as * many as 500 elements. Elements are child alarms, TRUE or FALSE statements, and * parentheses.

*/ inline PutCompositeAlarmRequest& WithAlarmRule(const Aws::String& value) { SetAlarmRule(value); return *this;} /** *

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:

  • * ALARM("alarm-name or alarm-ARN") is TRUE if the named * alarm is in ALARM state.

  • OK("alarm-name or * alarm-ARN") is TRUE if the named alarm is in OK state.

  • *
  • INSUFFICIENT_DATA("alarm-name or alarm-ARN") * is TRUE if the named alarm is in INSUFFICIENT_DATA state.

  • * TRUE always evaluates to TRUE.

  • * FALSE always evaluates to FALSE.

TRUE and FALSE * are useful for testing a complex AlarmRule structure, and for * testing your alarm actions.

Alarm names specified in * AlarmRule can be surrounded with double-quotes ("), but do not have * to be.

The following are some examples of AlarmRule:

*
  • ALARM(CPUUtilizationTooHigh) AND * ALARM(DiskReadOpsTooHigh) specifies that the composite alarm goes into * ALARM state only if both CPUUtilizationTooHigh and DiskReadOpsTooHigh alarms are * in ALARM state.

  • ALARM(CPUUtilizationTooHigh) AND NOT * ALARM(DeploymentInProgress) specifies that the alarm goes to ALARM state * if CPUUtilizationTooHigh is in ALARM state and DeploymentInProgress is not in * ALARM state. This example reduces alarm noise during a known deployment * window.

  • (ALARM(CPUUtilizationTooHigh) OR * ALARM(DiskReadOpsTooHigh)) AND OK(NetworkOutTooHigh) goes into ALARM * state if CPUUtilizationTooHigh OR DiskReadOpsTooHigh is in ALARM state, and if * NetworkOutTooHigh is in OK state. This provides another example of using a * composite alarm to prevent noise. This rule ensures that you are not notified * with an alarm action on high CPU or disk usage if a known network problem is * also occurring.

The AlarmRule can specify as * many as 100 "children" alarms. The AlarmRule expression can have as * many as 500 elements. Elements are child alarms, TRUE or FALSE statements, and * parentheses.

*/ inline PutCompositeAlarmRequest& WithAlarmRule(Aws::String&& value) { SetAlarmRule(std::move(value)); return *this;} /** *

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:

  • * ALARM("alarm-name or alarm-ARN") is TRUE if the named * alarm is in ALARM state.

  • OK("alarm-name or * alarm-ARN") is TRUE if the named alarm is in OK state.

  • *
  • INSUFFICIENT_DATA("alarm-name or alarm-ARN") * is TRUE if the named alarm is in INSUFFICIENT_DATA state.

  • * TRUE always evaluates to TRUE.

  • * FALSE always evaluates to FALSE.

TRUE and FALSE * are useful for testing a complex AlarmRule structure, and for * testing your alarm actions.

Alarm names specified in * AlarmRule can be surrounded with double-quotes ("), but do not have * to be.

The following are some examples of AlarmRule:

*
  • ALARM(CPUUtilizationTooHigh) AND * ALARM(DiskReadOpsTooHigh) specifies that the composite alarm goes into * ALARM state only if both CPUUtilizationTooHigh and DiskReadOpsTooHigh alarms are * in ALARM state.

  • ALARM(CPUUtilizationTooHigh) AND NOT * ALARM(DeploymentInProgress) specifies that the alarm goes to ALARM state * if CPUUtilizationTooHigh is in ALARM state and DeploymentInProgress is not in * ALARM state. This example reduces alarm noise during a known deployment * window.

  • (ALARM(CPUUtilizationTooHigh) OR * ALARM(DiskReadOpsTooHigh)) AND OK(NetworkOutTooHigh) goes into ALARM * state if CPUUtilizationTooHigh OR DiskReadOpsTooHigh is in ALARM state, and if * NetworkOutTooHigh is in OK state. This provides another example of using a * composite alarm to prevent noise. This rule ensures that you are not notified * with an alarm action on high CPU or disk usage if a known network problem is * also occurring.

The AlarmRule can specify as * many as 100 "children" alarms. The AlarmRule expression can have as * many as 500 elements. Elements are child alarms, TRUE or FALSE statements, and * parentheses.

*/ inline PutCompositeAlarmRequest& WithAlarmRule(const char* value) { SetAlarmRule(value); return *this;} /** *

The actions to execute when this alarm transitions to the * INSUFFICIENT_DATA state from any other state. Each action is * specified as an Amazon Resource Name (ARN).

Valid Values: * arn:aws:sns:region:account-id:sns-topic-name *

*/ inline const Aws::Vector& GetInsufficientDataActions() const{ return m_insufficientDataActions; } /** *

The actions to execute when this alarm transitions to the * INSUFFICIENT_DATA state from any other state. Each action is * specified as an Amazon Resource Name (ARN).

Valid Values: * arn:aws:sns:region:account-id:sns-topic-name *

*/ inline bool InsufficientDataActionsHasBeenSet() const { return m_insufficientDataActionsHasBeenSet; } /** *

The actions to execute when this alarm transitions to the * INSUFFICIENT_DATA state from any other state. Each action is * specified as an Amazon Resource Name (ARN).

Valid Values: * arn:aws:sns:region:account-id:sns-topic-name *

*/ inline void SetInsufficientDataActions(const Aws::Vector& value) { m_insufficientDataActionsHasBeenSet = true; m_insufficientDataActions = value; } /** *

The actions to execute when this alarm transitions to the * INSUFFICIENT_DATA state from any other state. Each action is * specified as an Amazon Resource Name (ARN).

Valid Values: * arn:aws:sns:region:account-id:sns-topic-name *

*/ inline void SetInsufficientDataActions(Aws::Vector&& value) { m_insufficientDataActionsHasBeenSet = true; m_insufficientDataActions = std::move(value); } /** *

The actions to execute when this alarm transitions to the * INSUFFICIENT_DATA state from any other state. Each action is * specified as an Amazon Resource Name (ARN).

Valid Values: * arn:aws:sns:region:account-id:sns-topic-name *

*/ inline PutCompositeAlarmRequest& WithInsufficientDataActions(const Aws::Vector& value) { SetInsufficientDataActions(value); return *this;} /** *

The actions to execute when this alarm transitions to the * INSUFFICIENT_DATA state from any other state. Each action is * specified as an Amazon Resource Name (ARN).

Valid Values: * arn:aws:sns:region:account-id:sns-topic-name *

*/ inline PutCompositeAlarmRequest& WithInsufficientDataActions(Aws::Vector&& value) { SetInsufficientDataActions(std::move(value)); return *this;} /** *

The actions to execute when this alarm transitions to the * INSUFFICIENT_DATA state from any other state. Each action is * specified as an Amazon Resource Name (ARN).

Valid Values: * arn:aws:sns:region:account-id:sns-topic-name *

*/ inline PutCompositeAlarmRequest& AddInsufficientDataActions(const Aws::String& value) { m_insufficientDataActionsHasBeenSet = true; m_insufficientDataActions.push_back(value); return *this; } /** *

The actions to execute when this alarm transitions to the * INSUFFICIENT_DATA state from any other state. Each action is * specified as an Amazon Resource Name (ARN).

Valid Values: * arn:aws:sns:region:account-id:sns-topic-name *

*/ inline PutCompositeAlarmRequest& AddInsufficientDataActions(Aws::String&& value) { m_insufficientDataActionsHasBeenSet = true; m_insufficientDataActions.push_back(std::move(value)); return *this; } /** *

The actions to execute when this alarm transitions to the * INSUFFICIENT_DATA state from any other state. Each action is * specified as an Amazon Resource Name (ARN).

Valid Values: * arn:aws:sns:region:account-id:sns-topic-name *

*/ inline PutCompositeAlarmRequest& AddInsufficientDataActions(const char* value) { m_insufficientDataActionsHasBeenSet = true; m_insufficientDataActions.push_back(value); return *this; } /** *

The actions to execute when this alarm transitions to an OK * state from any other state. Each action is specified as an Amazon Resource Name * (ARN).

Valid Values: * arn:aws:sns:region:account-id:sns-topic-name *

*/ inline const Aws::Vector& GetOKActions() const{ return m_oKActions; } /** *

The actions to execute when this alarm transitions to an OK * state from any other state. Each action is specified as an Amazon Resource Name * (ARN).

Valid Values: * arn:aws:sns:region:account-id:sns-topic-name *

*/ inline bool OKActionsHasBeenSet() const { return m_oKActionsHasBeenSet; } /** *

The actions to execute when this alarm transitions to an OK * state from any other state. Each action is specified as an Amazon Resource Name * (ARN).

Valid Values: * arn:aws:sns:region:account-id:sns-topic-name *

*/ inline void SetOKActions(const Aws::Vector& value) { m_oKActionsHasBeenSet = true; m_oKActions = value; } /** *

The actions to execute when this alarm transitions to an OK * state from any other state. Each action is specified as an Amazon Resource Name * (ARN).

Valid Values: * arn:aws:sns:region:account-id:sns-topic-name *

*/ inline void SetOKActions(Aws::Vector&& value) { m_oKActionsHasBeenSet = true; m_oKActions = std::move(value); } /** *

The actions to execute when this alarm transitions to an OK * state from any other state. Each action is specified as an Amazon Resource Name * (ARN).

Valid Values: * arn:aws:sns:region:account-id:sns-topic-name *

*/ inline PutCompositeAlarmRequest& WithOKActions(const Aws::Vector& value) { SetOKActions(value); return *this;} /** *

The actions to execute when this alarm transitions to an OK * state from any other state. Each action is specified as an Amazon Resource Name * (ARN).

Valid Values: * arn:aws:sns:region:account-id:sns-topic-name *

*/ inline PutCompositeAlarmRequest& WithOKActions(Aws::Vector&& value) { SetOKActions(std::move(value)); return *this;} /** *

The actions to execute when this alarm transitions to an OK * state from any other state. Each action is specified as an Amazon Resource Name * (ARN).

Valid Values: * arn:aws:sns:region:account-id:sns-topic-name *

*/ inline PutCompositeAlarmRequest& AddOKActions(const Aws::String& value) { m_oKActionsHasBeenSet = true; m_oKActions.push_back(value); return *this; } /** *

The actions to execute when this alarm transitions to an OK * state from any other state. Each action is specified as an Amazon Resource Name * (ARN).

Valid Values: * arn:aws:sns:region:account-id:sns-topic-name *

*/ inline PutCompositeAlarmRequest& AddOKActions(Aws::String&& value) { m_oKActionsHasBeenSet = true; m_oKActions.push_back(std::move(value)); return *this; } /** *

The actions to execute when this alarm transitions to an OK * state from any other state. Each action is specified as an Amazon Resource Name * (ARN).

Valid Values: * arn:aws:sns:region:account-id:sns-topic-name *

*/ inline PutCompositeAlarmRequest& AddOKActions(const char* value) { m_oKActionsHasBeenSet = true; m_oKActions.push_back(value); return *this; } /** *

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.

*/ inline const Aws::Vector& GetTags() const{ return m_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.

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

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.

*/ inline void SetTags(const Aws::Vector& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

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.

*/ inline void SetTags(Aws::Vector&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

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.

*/ inline PutCompositeAlarmRequest& WithTags(const Aws::Vector& value) { SetTags(value); return *this;} /** *

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.

*/ inline PutCompositeAlarmRequest& WithTags(Aws::Vector&& value) { SetTags(std::move(value)); return *this;} /** *

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.

*/ inline PutCompositeAlarmRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** *

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.

*/ inline PutCompositeAlarmRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } /** *

Actions will be suppressed if the suppressor alarm is in the * ALARM state. ActionsSuppressor can be an AlarmName or * an Amazon Resource Name (ARN) from an existing alarm.

*/ inline const Aws::String& GetActionsSuppressor() const{ return m_actionsSuppressor; } /** *

Actions will be suppressed if the suppressor alarm is in the * ALARM state. ActionsSuppressor can be an AlarmName or * an Amazon Resource Name (ARN) from an existing alarm.

*/ inline bool ActionsSuppressorHasBeenSet() const { return m_actionsSuppressorHasBeenSet; } /** *

Actions will be suppressed if the suppressor alarm is in the * ALARM state. ActionsSuppressor can be an AlarmName or * an Amazon Resource Name (ARN) from an existing alarm.

*/ inline void SetActionsSuppressor(const Aws::String& value) { m_actionsSuppressorHasBeenSet = true; m_actionsSuppressor = value; } /** *

Actions will be suppressed if the suppressor alarm is in the * ALARM state. ActionsSuppressor can be an AlarmName or * an Amazon Resource Name (ARN) from an existing alarm.

*/ inline void SetActionsSuppressor(Aws::String&& value) { m_actionsSuppressorHasBeenSet = true; m_actionsSuppressor = std::move(value); } /** *

Actions will be suppressed if the suppressor alarm is in the * ALARM state. ActionsSuppressor can be an AlarmName or * an Amazon Resource Name (ARN) from an existing alarm.

*/ inline void SetActionsSuppressor(const char* value) { m_actionsSuppressorHasBeenSet = true; m_actionsSuppressor.assign(value); } /** *

Actions will be suppressed if the suppressor alarm is in the * ALARM state. ActionsSuppressor can be an AlarmName or * an Amazon Resource Name (ARN) from an existing alarm.

*/ inline PutCompositeAlarmRequest& WithActionsSuppressor(const Aws::String& value) { SetActionsSuppressor(value); return *this;} /** *

Actions will be suppressed if the suppressor alarm is in the * ALARM state. ActionsSuppressor can be an AlarmName or * an Amazon Resource Name (ARN) from an existing alarm.

*/ inline PutCompositeAlarmRequest& WithActionsSuppressor(Aws::String&& value) { SetActionsSuppressor(std::move(value)); return *this;} /** *

Actions will be suppressed if the suppressor alarm is in the * ALARM state. ActionsSuppressor can be an AlarmName or * an Amazon Resource Name (ARN) from an existing alarm.

*/ inline PutCompositeAlarmRequest& WithActionsSuppressor(const char* value) { SetActionsSuppressor(value); return *this;} /** *

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.

* WaitPeriod is required only when ActionsSuppressor is * specified.

*/ inline int GetActionsSuppressorWaitPeriod() const{ return m_actionsSuppressorWaitPeriod; } /** *

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.

* WaitPeriod is required only when ActionsSuppressor is * specified.

*/ inline bool ActionsSuppressorWaitPeriodHasBeenSet() const { return m_actionsSuppressorWaitPeriodHasBeenSet; } /** *

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.

* WaitPeriod is required only when ActionsSuppressor is * specified.

*/ inline void SetActionsSuppressorWaitPeriod(int value) { m_actionsSuppressorWaitPeriodHasBeenSet = true; m_actionsSuppressorWaitPeriod = value; } /** *

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.

* WaitPeriod is required only when ActionsSuppressor is * specified.

*/ inline PutCompositeAlarmRequest& WithActionsSuppressorWaitPeriod(int value) { SetActionsSuppressorWaitPeriod(value); return *this;} /** *

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.

ExtensionPeriod is * required only when ActionsSuppressor is specified.

* */ inline int GetActionsSuppressorExtensionPeriod() const{ return m_actionsSuppressorExtensionPeriod; } /** *

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.

ExtensionPeriod is * required only when ActionsSuppressor is specified.

* */ inline bool ActionsSuppressorExtensionPeriodHasBeenSet() const { return m_actionsSuppressorExtensionPeriodHasBeenSet; } /** *

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.

ExtensionPeriod is * required only when ActionsSuppressor is specified.

* */ inline void SetActionsSuppressorExtensionPeriod(int value) { m_actionsSuppressorExtensionPeriodHasBeenSet = true; m_actionsSuppressorExtensionPeriod = value; } /** *

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.

ExtensionPeriod is * required only when ActionsSuppressor is specified.

* */ inline PutCompositeAlarmRequest& WithActionsSuppressorExtensionPeriod(int value) { SetActionsSuppressorExtensionPeriod(value); return *this;} private: bool m_actionsEnabled; bool m_actionsEnabledHasBeenSet = false; Aws::Vector m_alarmActions; bool m_alarmActionsHasBeenSet = false; Aws::String m_alarmDescription; bool m_alarmDescriptionHasBeenSet = false; Aws::String m_alarmName; bool m_alarmNameHasBeenSet = false; Aws::String m_alarmRule; bool m_alarmRuleHasBeenSet = false; Aws::Vector m_insufficientDataActions; bool m_insufficientDataActionsHasBeenSet = false; Aws::Vector m_oKActions; bool m_oKActionsHasBeenSet = false; Aws::Vector m_tags; bool m_tagsHasBeenSet = false; Aws::String m_actionsSuppressor; bool m_actionsSuppressorHasBeenSet = false; int m_actionsSuppressorWaitPeriod; bool m_actionsSuppressorWaitPeriodHasBeenSet = false; int m_actionsSuppressorExtensionPeriod; bool m_actionsSuppressorExtensionPeriodHasBeenSet = false; }; } // namespace Model } // namespace CloudWatch } // namespace Aws