com.amazonaws.services.cloudwatch.model.PutCompositeAlarmRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-cloudwatch Show documentation
/*
* Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.cloudwatch.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class PutCompositeAlarmRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* Indicates whether actions should be executed during any changes to the alarm state of the composite alarm. The
* default is TRUE
.
*
*/
private Boolean actionsEnabled;
/**
*
* 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: ]
*
*
* Amazon SNS actions:
*
*
* arn:aws:sns:region:account-id:sns-topic-name
*
*
* Lambda actions:
*
*
* -
*
* Invoke the latest version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name
*
*
* -
*
* Invoke a specific version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:version-number
*
*
* -
*
* Invoke a function by using an alias Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:alias-name
*
*
*
*
* Systems Manager actions:
*
*
* arn:aws:ssm:region:account-id:opsitem:severity
*
*/
private com.amazonaws.internal.SdkInternalList alarmActions;
/**
*
* The description for the composite alarm.
*
*/
private String alarmDescription;
/**
*
* The name for the composite alarm. This name must be unique within the Region.
*
*/
private String alarmName;
/**
*
* 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.
*
*/
private String alarmRule;
/**
*
* 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: ]
*
*
* Amazon SNS actions:
*
*
* arn:aws:sns:region:account-id:sns-topic-name
*
*
* Lambda actions:
*
*
* -
*
* Invoke the latest version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name
*
*
* -
*
* Invoke a specific version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:version-number
*
*
* -
*
* Invoke a function by using an alias Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:alias-name
*
*
*
*/
private com.amazonaws.internal.SdkInternalList insufficientDataActions;
/**
*
* 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: ]
*
*
* Amazon SNS actions:
*
*
* arn:aws:sns:region:account-id:sns-topic-name
*
*
* Lambda actions:
*
*
* -
*
* Invoke the latest version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name
*
*
* -
*
* Invoke a specific version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:version-number
*
*
* -
*
* Invoke a function by using an alias Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:alias-name
*
*
*
*/
private com.amazonaws.internal.SdkInternalList oKActions;
/**
*
* A list of key-value pairs to associate with the alarm. You can associate as many as 50 tags with an alarm. To be
* able to associate tags with the alarm when you create the alarm, you must have the
* cloudwatch:TagResource
permission.
*
*
* 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.
*
*
* If you are using this operation to update an existing alarm, any tags you specify in this parameter are ignored.
* To change the tags of an existing alarm, use TagResource or
* UntagResource.
*
*/
private com.amazonaws.internal.SdkInternalList tags;
/**
*
* 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.
*
*/
private String actionsSuppressor;
/**
*
* 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.
*
*
*/
private Integer actionsSuppressorWaitPeriod;
/**
*
* 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.
*
*
*/
private Integer actionsSuppressorExtensionPeriod;
/**
*
* Indicates whether actions should be executed during any changes to the alarm state of the composite alarm. The
* default is TRUE
.
*
*
* @param actionsEnabled
* Indicates whether actions should be executed during any changes to the alarm state of the composite alarm.
* The default is TRUE
.
*/
public void setActionsEnabled(Boolean actionsEnabled) {
this.actionsEnabled = actionsEnabled;
}
/**
*
* Indicates whether actions should be executed during any changes to the alarm state of the composite alarm. The
* default is TRUE
.
*
*
* @return Indicates whether actions should be executed during any changes to the alarm state of the composite
* alarm. The default is TRUE
.
*/
public Boolean getActionsEnabled() {
return this.actionsEnabled;
}
/**
*
* Indicates whether actions should be executed during any changes to the alarm state of the composite alarm. The
* default is TRUE
.
*
*
* @param actionsEnabled
* Indicates whether actions should be executed during any changes to the alarm state of the composite alarm.
* The default is TRUE
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutCompositeAlarmRequest withActionsEnabled(Boolean actionsEnabled) {
setActionsEnabled(actionsEnabled);
return this;
}
/**
*
* Indicates whether actions should be executed during any changes to the alarm state of the composite alarm. The
* default is TRUE
.
*
*
* @return Indicates whether actions should be executed during any changes to the alarm state of the composite
* alarm. The default is TRUE
.
*/
public Boolean isActionsEnabled() {
return this.actionsEnabled;
}
/**
*
* 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: ]
*
*
* Amazon SNS actions:
*
*
* arn:aws:sns:region:account-id:sns-topic-name
*
*
* Lambda actions:
*
*
* -
*
* Invoke the latest version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name
*
*
* -
*
* Invoke a specific version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:version-number
*
*
* -
*
* Invoke a function by using an alias Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:alias-name
*
*
*
*
* Systems Manager actions:
*
*
* arn:aws:ssm:region:account-id:opsitem:severity
*
*
* @return 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: ]
*
*
* Amazon SNS actions:
*
*
* arn:aws:sns:region:account-id:sns-topic-name
*
*
* Lambda actions:
*
*
* -
*
* Invoke the latest version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name
*
*
* -
*
* Invoke a specific version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:version-number
*
*
* -
*
* Invoke a function by using an alias Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:alias-name
*
*
*
*
* Systems Manager actions:
*
*
* arn:aws:ssm:region:account-id:opsitem:severity
*/
public java.util.List getAlarmActions() {
if (alarmActions == null) {
alarmActions = new com.amazonaws.internal.SdkInternalList();
}
return 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: ]
*
*
* Amazon SNS actions:
*
*
* arn:aws:sns:region:account-id:sns-topic-name
*
*
* Lambda actions:
*
*
* -
*
* Invoke the latest version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name
*
*
* -
*
* Invoke a specific version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:version-number
*
*
* -
*
* Invoke a function by using an alias Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:alias-name
*
*
*
*
* Systems Manager actions:
*
*
* arn:aws:ssm:region:account-id:opsitem:severity
*
*
* @param 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: ]
*
*
* Amazon SNS actions:
*
*
* arn:aws:sns:region:account-id:sns-topic-name
*
*
* Lambda actions:
*
*
* -
*
* Invoke the latest version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name
*
*
* -
*
* Invoke a specific version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:version-number
*
*
* -
*
* Invoke a function by using an alias Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:alias-name
*
*
*
*
* Systems Manager actions:
*
*
* arn:aws:ssm:region:account-id:opsitem:severity
*/
public void setAlarmActions(java.util.Collection alarmActions) {
if (alarmActions == null) {
this.alarmActions = null;
return;
}
this.alarmActions = new com.amazonaws.internal.SdkInternalList(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: ]
*
*
* Amazon SNS actions:
*
*
* arn:aws:sns:region:account-id:sns-topic-name
*
*
* Lambda actions:
*
*
* -
*
* Invoke the latest version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name
*
*
* -
*
* Invoke a specific version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:version-number
*
*
* -
*
* Invoke a function by using an alias Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:alias-name
*
*
*
*
* Systems Manager actions:
*
*
* arn:aws:ssm:region:account-id:opsitem:severity
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setAlarmActions(java.util.Collection)} or {@link #withAlarmActions(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param 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: ]
*
*
* Amazon SNS actions:
*
*
* arn:aws:sns:region:account-id:sns-topic-name
*
*
* Lambda actions:
*
*
* -
*
* Invoke the latest version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name
*
*
* -
*
* Invoke a specific version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:version-number
*
*
* -
*
* Invoke a function by using an alias Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:alias-name
*
*
*
*
* Systems Manager actions:
*
*
* arn:aws:ssm:region:account-id:opsitem:severity
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutCompositeAlarmRequest withAlarmActions(String... alarmActions) {
if (this.alarmActions == null) {
setAlarmActions(new com.amazonaws.internal.SdkInternalList(alarmActions.length));
}
for (String ele : alarmActions) {
this.alarmActions.add(ele);
}
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: ]
*
*
* Amazon SNS actions:
*
*
* arn:aws:sns:region:account-id:sns-topic-name
*
*
* Lambda actions:
*
*
* -
*
* Invoke the latest version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name
*
*
* -
*
* Invoke a specific version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:version-number
*
*
* -
*
* Invoke a function by using an alias Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:alias-name
*
*
*
*
* Systems Manager actions:
*
*
* arn:aws:ssm:region:account-id:opsitem:severity
*
*
* @param 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: ]
*
*
* Amazon SNS actions:
*
*
* arn:aws:sns:region:account-id:sns-topic-name
*
*
* Lambda actions:
*
*
* -
*
* Invoke the latest version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name
*
*
* -
*
* Invoke a specific version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:version-number
*
*
* -
*
* Invoke a function by using an alias Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:alias-name
*
*
*
*
* Systems Manager actions:
*
*
* arn:aws:ssm:region:account-id:opsitem:severity
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutCompositeAlarmRequest withAlarmActions(java.util.Collection alarmActions) {
setAlarmActions(alarmActions);
return this;
}
/**
*
* The description for the composite alarm.
*
*
* @param alarmDescription
* The description for the composite alarm.
*/
public void setAlarmDescription(String alarmDescription) {
this.alarmDescription = alarmDescription;
}
/**
*
* The description for the composite alarm.
*
*
* @return The description for the composite alarm.
*/
public String getAlarmDescription() {
return this.alarmDescription;
}
/**
*
* The description for the composite alarm.
*
*
* @param alarmDescription
* The description for the composite alarm.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutCompositeAlarmRequest withAlarmDescription(String alarmDescription) {
setAlarmDescription(alarmDescription);
return this;
}
/**
*
* The name for the composite alarm. This name must be unique within the Region.
*
*
* @param alarmName
* The name for the composite alarm. This name must be unique within the Region.
*/
public void setAlarmName(String alarmName) {
this.alarmName = alarmName;
}
/**
*
* The name for the composite alarm. This name must be unique within the Region.
*
*
* @return The name for the composite alarm. This name must be unique within the Region.
*/
public String getAlarmName() {
return this.alarmName;
}
/**
*
* The name for the composite alarm. This name must be unique within the Region.
*
*
* @param alarmName
* The name for the composite alarm. This name must be unique within the Region.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutCompositeAlarmRequest withAlarmName(String alarmName) {
setAlarmName(alarmName);
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.
*
*
* @param 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.
*/
public void setAlarmRule(String alarmRule) {
this.alarmRule = 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.
*
*
* @return 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.
*/
public String getAlarmRule() {
return this.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.
*
*
* @param 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.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutCompositeAlarmRequest withAlarmRule(String alarmRule) {
setAlarmRule(alarmRule);
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: ]
*
*
* Amazon SNS actions:
*
*
* arn:aws:sns:region:account-id:sns-topic-name
*
*
* Lambda actions:
*
*
* -
*
* Invoke the latest version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name
*
*
* -
*
* Invoke a specific version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:version-number
*
*
* -
*
* Invoke a function by using an alias Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:alias-name
*
*
*
*
* @return 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: ]
*
*
* Amazon SNS actions:
*
*
* arn:aws:sns:region:account-id:sns-topic-name
*
*
* Lambda actions:
*
*
* -
*
* Invoke the latest version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name
*
*
* -
*
* Invoke a specific version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:version-number
*
*
* -
*
* Invoke a function by using an alias Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:alias-name
*
*
*/
public java.util.List getInsufficientDataActions() {
if (insufficientDataActions == null) {
insufficientDataActions = new com.amazonaws.internal.SdkInternalList();
}
return 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: ]
*
*
* Amazon SNS actions:
*
*
* arn:aws:sns:region:account-id:sns-topic-name
*
*
* Lambda actions:
*
*
* -
*
* Invoke the latest version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name
*
*
* -
*
* Invoke a specific version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:version-number
*
*
* -
*
* Invoke a function by using an alias Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:alias-name
*
*
*
*
* @param 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: ]
*
*
* Amazon SNS actions:
*
*
* arn:aws:sns:region:account-id:sns-topic-name
*
*
* Lambda actions:
*
*
* -
*
* Invoke the latest version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name
*
*
* -
*
* Invoke a specific version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:version-number
*
*
* -
*
* Invoke a function by using an alias Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:alias-name
*
*
*/
public void setInsufficientDataActions(java.util.Collection insufficientDataActions) {
if (insufficientDataActions == null) {
this.insufficientDataActions = null;
return;
}
this.insufficientDataActions = new com.amazonaws.internal.SdkInternalList(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: ]
*
*
* Amazon SNS actions:
*
*
* arn:aws:sns:region:account-id:sns-topic-name
*
*
* Lambda actions:
*
*
* -
*
* Invoke the latest version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name
*
*
* -
*
* Invoke a specific version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:version-number
*
*
* -
*
* Invoke a function by using an alias Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:alias-name
*
*
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setInsufficientDataActions(java.util.Collection)} or
* {@link #withInsufficientDataActions(java.util.Collection)} if you want to override the existing values.
*
*
* @param 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: ]
*
*
* Amazon SNS actions:
*
*
* arn:aws:sns:region:account-id:sns-topic-name
*
*
* Lambda actions:
*
*
* -
*
* Invoke the latest version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name
*
*
* -
*
* Invoke a specific version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:version-number
*
*
* -
*
* Invoke a function by using an alias Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:alias-name
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutCompositeAlarmRequest withInsufficientDataActions(String... insufficientDataActions) {
if (this.insufficientDataActions == null) {
setInsufficientDataActions(new com.amazonaws.internal.SdkInternalList(insufficientDataActions.length));
}
for (String ele : insufficientDataActions) {
this.insufficientDataActions.add(ele);
}
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: ]
*
*
* Amazon SNS actions:
*
*
* arn:aws:sns:region:account-id:sns-topic-name
*
*
* Lambda actions:
*
*
* -
*
* Invoke the latest version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name
*
*
* -
*
* Invoke a specific version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:version-number
*
*
* -
*
* Invoke a function by using an alias Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:alias-name
*
*
*
*
* @param 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: ]
*
*
* Amazon SNS actions:
*
*
* arn:aws:sns:region:account-id:sns-topic-name
*
*
* Lambda actions:
*
*
* -
*
* Invoke the latest version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name
*
*
* -
*
* Invoke a specific version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:version-number
*
*
* -
*
* Invoke a function by using an alias Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:alias-name
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutCompositeAlarmRequest withInsufficientDataActions(java.util.Collection insufficientDataActions) {
setInsufficientDataActions(insufficientDataActions);
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: ]
*
*
* Amazon SNS actions:
*
*
* arn:aws:sns:region:account-id:sns-topic-name
*
*
* Lambda actions:
*
*
* -
*
* Invoke the latest version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name
*
*
* -
*
* Invoke a specific version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:version-number
*
*
* -
*
* Invoke a function by using an alias Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:alias-name
*
*
*
*
* @return 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: ]
*
*
* Amazon SNS actions:
*
*
* arn:aws:sns:region:account-id:sns-topic-name
*
*
* Lambda actions:
*
*
* -
*
* Invoke the latest version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name
*
*
* -
*
* Invoke a specific version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:version-number
*
*
* -
*
* Invoke a function by using an alias Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:alias-name
*
*
*/
public java.util.List getOKActions() {
if (oKActions == null) {
oKActions = new com.amazonaws.internal.SdkInternalList();
}
return 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: ]
*
*
* Amazon SNS actions:
*
*
* arn:aws:sns:region:account-id:sns-topic-name
*
*
* Lambda actions:
*
*
* -
*
* Invoke the latest version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name
*
*
* -
*
* Invoke a specific version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:version-number
*
*
* -
*
* Invoke a function by using an alias Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:alias-name
*
*
*
*
* @param 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: ]
*
*
* Amazon SNS actions:
*
*
* arn:aws:sns:region:account-id:sns-topic-name
*
*
* Lambda actions:
*
*
* -
*
* Invoke the latest version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name
*
*
* -
*
* Invoke a specific version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:version-number
*
*
* -
*
* Invoke a function by using an alias Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:alias-name
*
*
*/
public void setOKActions(java.util.Collection oKActions) {
if (oKActions == null) {
this.oKActions = null;
return;
}
this.oKActions = new com.amazonaws.internal.SdkInternalList(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: ]
*
*
* Amazon SNS actions:
*
*
* arn:aws:sns:region:account-id:sns-topic-name
*
*
* Lambda actions:
*
*
* -
*
* Invoke the latest version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name
*
*
* -
*
* Invoke a specific version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:version-number
*
*
* -
*
* Invoke a function by using an alias Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:alias-name
*
*
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setOKActions(java.util.Collection)} or {@link #withOKActions(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param 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: ]
*
*
* Amazon SNS actions:
*
*
* arn:aws:sns:region:account-id:sns-topic-name
*
*
* Lambda actions:
*
*
* -
*
* Invoke the latest version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name
*
*
* -
*
* Invoke a specific version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:version-number
*
*
* -
*
* Invoke a function by using an alias Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:alias-name
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutCompositeAlarmRequest withOKActions(String... oKActions) {
if (this.oKActions == null) {
setOKActions(new com.amazonaws.internal.SdkInternalList(oKActions.length));
}
for (String ele : oKActions) {
this.oKActions.add(ele);
}
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: ]
*
*
* Amazon SNS actions:
*
*
* arn:aws:sns:region:account-id:sns-topic-name
*
*
* Lambda actions:
*
*
* -
*
* Invoke the latest version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name
*
*
* -
*
* Invoke a specific version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:version-number
*
*
* -
*
* Invoke a function by using an alias Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:alias-name
*
*
*
*
* @param 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: ]
*
*
* Amazon SNS actions:
*
*
* arn:aws:sns:region:account-id:sns-topic-name
*
*
* Lambda actions:
*
*
* -
*
* Invoke the latest version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name
*
*
* -
*
* Invoke a specific version of a Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:version-number
*
*
* -
*
* Invoke a function by using an alias Lambda function:
* arn:aws:lambda:region:account-id:function:function-name:alias-name
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutCompositeAlarmRequest withOKActions(java.util.Collection oKActions) {
setOKActions(oKActions);
return this;
}
/**
*
* A list of key-value pairs to associate with the alarm. You can associate as many as 50 tags with an alarm. To be
* able to associate tags with the alarm when you create the alarm, you must have the
* cloudwatch:TagResource
permission.
*
*
* 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.
*
*
* If you are using this operation to update an existing alarm, any tags you specify in this parameter are ignored.
* To change the tags of an existing alarm, use TagResource or
* UntagResource.
*
*
* @return A list of key-value pairs to associate with the alarm. You can associate as many as 50 tags with an
* alarm. To be able to associate tags with the alarm when you create the alarm, you must have the
* cloudwatch:TagResource
permission.
*
* 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.
*
*
* If you are using this operation to update an existing alarm, any tags you specify in this parameter are
* ignored. To change the tags of an existing alarm, use TagResource or UntagResource.
*/
public java.util.List getTags() {
if (tags == null) {
tags = new com.amazonaws.internal.SdkInternalList();
}
return tags;
}
/**
*
* A list of key-value pairs to associate with the alarm. You can associate as many as 50 tags with an alarm. To be
* able to associate tags with the alarm when you create the alarm, you must have the
* cloudwatch:TagResource
permission.
*
*
* 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.
*
*
* If you are using this operation to update an existing alarm, any tags you specify in this parameter are ignored.
* To change the tags of an existing alarm, use TagResource or
* UntagResource.
*
*
* @param tags
* A list of key-value pairs to associate with the alarm. You can associate as many as 50 tags with an alarm.
* To be able to associate tags with the alarm when you create the alarm, you must have the
* cloudwatch:TagResource
permission.
*
* 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.
*
*
* If you are using this operation to update an existing alarm, any tags you specify in this parameter are
* ignored. To change the tags of an existing alarm, use TagResource or UntagResource.
*/
public void setTags(java.util.Collection tags) {
if (tags == null) {
this.tags = null;
return;
}
this.tags = new com.amazonaws.internal.SdkInternalList(tags);
}
/**
*
* A list of key-value pairs to associate with the alarm. You can associate as many as 50 tags with an alarm. To be
* able to associate tags with the alarm when you create the alarm, you must have the
* cloudwatch:TagResource
permission.
*
*
* 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.
*
*
* If you are using this operation to update an existing alarm, any tags you specify in this parameter are ignored.
* To change the tags of an existing alarm, use TagResource or
* UntagResource.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the
* existing values.
*
*
* @param tags
* A list of key-value pairs to associate with the alarm. You can associate as many as 50 tags with an alarm.
* To be able to associate tags with the alarm when you create the alarm, you must have the
* cloudwatch:TagResource
permission.
*
* 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.
*
*
* If you are using this operation to update an existing alarm, any tags you specify in this parameter are
* ignored. To change the tags of an existing alarm, use TagResource or UntagResource.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutCompositeAlarmRequest withTags(Tag... tags) {
if (this.tags == null) {
setTags(new com.amazonaws.internal.SdkInternalList(tags.length));
}
for (Tag ele : tags) {
this.tags.add(ele);
}
return this;
}
/**
*
* A list of key-value pairs to associate with the alarm. You can associate as many as 50 tags with an alarm. To be
* able to associate tags with the alarm when you create the alarm, you must have the
* cloudwatch:TagResource
permission.
*
*
* 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.
*
*
* If you are using this operation to update an existing alarm, any tags you specify in this parameter are ignored.
* To change the tags of an existing alarm, use TagResource or
* UntagResource.
*
*
* @param tags
* A list of key-value pairs to associate with the alarm. You can associate as many as 50 tags with an alarm.
* To be able to associate tags with the alarm when you create the alarm, you must have the
* cloudwatch:TagResource
permission.
*
* 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.
*
*
* If you are using this operation to update an existing alarm, any tags you specify in this parameter are
* ignored. To change the tags of an existing alarm, use TagResource or UntagResource.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutCompositeAlarmRequest withTags(java.util.Collection tags) {
setTags(tags);
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.
*
*
* @param 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.
*/
public void setActionsSuppressor(String actionsSuppressor) {
this.actionsSuppressor = 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.
*
*
* @return 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.
*/
public String getActionsSuppressor() {
return this.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.
*
*
* @param 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.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutCompositeAlarmRequest withActionsSuppressor(String actionsSuppressor) {
setActionsSuppressor(actionsSuppressor);
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.
*
*
*
* @param 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.
*
*/
public void setActionsSuppressorWaitPeriod(Integer actionsSuppressorWaitPeriod) {
this.actionsSuppressorWaitPeriod = 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.
*
*
*
* @return 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.
*
*/
public Integer getActionsSuppressorWaitPeriod() {
return this.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.
*
*
*
* @param 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.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutCompositeAlarmRequest withActionsSuppressorWaitPeriod(Integer actionsSuppressorWaitPeriod) {
setActionsSuppressorWaitPeriod(actionsSuppressorWaitPeriod);
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.
*
*
*
* @param 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.
*
*/
public void setActionsSuppressorExtensionPeriod(Integer actionsSuppressorExtensionPeriod) {
this.actionsSuppressorExtensionPeriod = 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.
*
*
*
* @return 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.
*
*/
public Integer getActionsSuppressorExtensionPeriod() {
return this.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.
*
*
*
* @param 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.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutCompositeAlarmRequest withActionsSuppressorExtensionPeriod(Integer actionsSuppressorExtensionPeriod) {
setActionsSuppressorExtensionPeriod(actionsSuppressorExtensionPeriod);
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getActionsEnabled() != null)
sb.append("ActionsEnabled: ").append(getActionsEnabled()).append(",");
if (getAlarmActions() != null)
sb.append("AlarmActions: ").append(getAlarmActions()).append(",");
if (getAlarmDescription() != null)
sb.append("AlarmDescription: ").append(getAlarmDescription()).append(",");
if (getAlarmName() != null)
sb.append("AlarmName: ").append(getAlarmName()).append(",");
if (getAlarmRule() != null)
sb.append("AlarmRule: ").append(getAlarmRule()).append(",");
if (getInsufficientDataActions() != null)
sb.append("InsufficientDataActions: ").append(getInsufficientDataActions()).append(",");
if (getOKActions() != null)
sb.append("OKActions: ").append(getOKActions()).append(",");
if (getTags() != null)
sb.append("Tags: ").append(getTags()).append(",");
if (getActionsSuppressor() != null)
sb.append("ActionsSuppressor: ").append(getActionsSuppressor()).append(",");
if (getActionsSuppressorWaitPeriod() != null)
sb.append("ActionsSuppressorWaitPeriod: ").append(getActionsSuppressorWaitPeriod()).append(",");
if (getActionsSuppressorExtensionPeriod() != null)
sb.append("ActionsSuppressorExtensionPeriod: ").append(getActionsSuppressorExtensionPeriod());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof PutCompositeAlarmRequest == false)
return false;
PutCompositeAlarmRequest other = (PutCompositeAlarmRequest) obj;
if (other.getActionsEnabled() == null ^ this.getActionsEnabled() == null)
return false;
if (other.getActionsEnabled() != null && other.getActionsEnabled().equals(this.getActionsEnabled()) == false)
return false;
if (other.getAlarmActions() == null ^ this.getAlarmActions() == null)
return false;
if (other.getAlarmActions() != null && other.getAlarmActions().equals(this.getAlarmActions()) == false)
return false;
if (other.getAlarmDescription() == null ^ this.getAlarmDescription() == null)
return false;
if (other.getAlarmDescription() != null && other.getAlarmDescription().equals(this.getAlarmDescription()) == false)
return false;
if (other.getAlarmName() == null ^ this.getAlarmName() == null)
return false;
if (other.getAlarmName() != null && other.getAlarmName().equals(this.getAlarmName()) == false)
return false;
if (other.getAlarmRule() == null ^ this.getAlarmRule() == null)
return false;
if (other.getAlarmRule() != null && other.getAlarmRule().equals(this.getAlarmRule()) == false)
return false;
if (other.getInsufficientDataActions() == null ^ this.getInsufficientDataActions() == null)
return false;
if (other.getInsufficientDataActions() != null && other.getInsufficientDataActions().equals(this.getInsufficientDataActions()) == false)
return false;
if (other.getOKActions() == null ^ this.getOKActions() == null)
return false;
if (other.getOKActions() != null && other.getOKActions().equals(this.getOKActions()) == false)
return false;
if (other.getTags() == null ^ this.getTags() == null)
return false;
if (other.getTags() != null && other.getTags().equals(this.getTags()) == false)
return false;
if (other.getActionsSuppressor() == null ^ this.getActionsSuppressor() == null)
return false;
if (other.getActionsSuppressor() != null && other.getActionsSuppressor().equals(this.getActionsSuppressor()) == false)
return false;
if (other.getActionsSuppressorWaitPeriod() == null ^ this.getActionsSuppressorWaitPeriod() == null)
return false;
if (other.getActionsSuppressorWaitPeriod() != null && other.getActionsSuppressorWaitPeriod().equals(this.getActionsSuppressorWaitPeriod()) == false)
return false;
if (other.getActionsSuppressorExtensionPeriod() == null ^ this.getActionsSuppressorExtensionPeriod() == null)
return false;
if (other.getActionsSuppressorExtensionPeriod() != null
&& other.getActionsSuppressorExtensionPeriod().equals(this.getActionsSuppressorExtensionPeriod()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getActionsEnabled() == null) ? 0 : getActionsEnabled().hashCode());
hashCode = prime * hashCode + ((getAlarmActions() == null) ? 0 : getAlarmActions().hashCode());
hashCode = prime * hashCode + ((getAlarmDescription() == null) ? 0 : getAlarmDescription().hashCode());
hashCode = prime * hashCode + ((getAlarmName() == null) ? 0 : getAlarmName().hashCode());
hashCode = prime * hashCode + ((getAlarmRule() == null) ? 0 : getAlarmRule().hashCode());
hashCode = prime * hashCode + ((getInsufficientDataActions() == null) ? 0 : getInsufficientDataActions().hashCode());
hashCode = prime * hashCode + ((getOKActions() == null) ? 0 : getOKActions().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
hashCode = prime * hashCode + ((getActionsSuppressor() == null) ? 0 : getActionsSuppressor().hashCode());
hashCode = prime * hashCode + ((getActionsSuppressorWaitPeriod() == null) ? 0 : getActionsSuppressorWaitPeriod().hashCode());
hashCode = prime * hashCode + ((getActionsSuppressorExtensionPeriod() == null) ? 0 : getActionsSuppressorExtensionPeriod().hashCode());
return hashCode;
}
@Override
public PutCompositeAlarmRequest clone() {
return (PutCompositeAlarmRequest) super.clone();
}
}