Class PutCompositeAlarmRequest
- All Implemented Interfaces:
SdkPojo,ToCopyableBuilder<PutCompositeAlarmRequest.Builder,PutCompositeAlarmRequest>
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionfinal BooleanIndicates whether actions should be executed during any changes to the alarm state of the composite alarm.final StringActions will be suppressed if the suppressor alarm is in theALARMstate.final IntegerThe maximum time in seconds that the composite alarm waits after suppressor alarm goes out of theALARMstate.final IntegerThe maximum time in seconds that the composite alarm waits for the suppressor alarm to go into theALARMstate.The actions to execute when this alarm transitions to theALARMstate from any other state.final StringThe description for the composite alarm.final StringThe name for the composite alarm.final StringAn expression that specifies which other alarms are to be evaluated to determine this composite alarm's state.builder()final booleanfinal booleanequalsBySdkFields(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) Used to retrieve the value of a field from any class that extendsSdkRequest.final booleanFor responses, this returns true if the service returned a value for the AlarmActions property.final inthashCode()final booleanFor responses, this returns true if the service returned a value for the InsufficientDataActions property.final booleanFor responses, this returns true if the service returned a value for the OKActions property.final booleanhasTags()For responses, this returns true if the service returned a value for the Tags property.The actions to execute when this alarm transitions to theINSUFFICIENT_DATAstate from any other state.The actions to execute when this alarm transitions to anOKstate from any other state.static Class<? extends PutCompositeAlarmRequest.Builder> tags()A list of key-value pairs to associate with the alarm.Take this object and create a builder that contains all of the current property values of this object.final StringtoString()Returns a string representation of this object.Methods inherited from class software.amazon.awssdk.awscore.AwsRequest
overrideConfigurationMethods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
actionsEnabled
Indicates whether actions should be executed during any changes to the alarm state of the composite alarm. The default is
TRUE.- Returns:
- Indicates whether actions should be executed during any changes to the alarm state of the composite
alarm. The default is
TRUE.
-
hasAlarmActions
public final boolean hasAlarmActions()For responses, this returns true if the service returned a value for the AlarmActions property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
alarmActions
The actions to execute when this alarm transitions to the
ALARMstate 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-nameLambda 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:severityAttempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasAlarmActions()method.- Returns:
- The actions to execute when this alarm transitions to the
ALARMstate 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-nameLambda 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 -
-
-
alarmDescription
The description for the composite alarm.
- Returns:
- The description for the composite alarm.
-
alarmName
The name for the composite alarm. This name must be unique within the Region.
- Returns:
- The name for the composite alarm. This name must be unique within the Region.
-
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. -
TRUEalways evaluates to TRUE. -
FALSEalways evaluates to FALSE.
TRUE and FALSE are useful for testing a complex
AlarmRulestructure, and for testing your alarm actions.Alarm names specified in
AlarmRulecan 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
AlarmRulecan specify as many as 100 "children" alarms. TheAlarmRuleexpression can have as many as 500 elements. Elements are child alarms, TRUE or FALSE statements, and parentheses.- Returns:
- 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. -
TRUEalways evaluates to TRUE. -
FALSEalways evaluates to FALSE.
TRUE and FALSE are useful for testing a complex
AlarmRulestructure, and for testing your alarm actions.Alarm names specified in
AlarmRulecan 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
AlarmRulecan specify as many as 100 "children" alarms. TheAlarmRuleexpression can have as many as 500 elements. Elements are child alarms, TRUE or FALSE statements, and parentheses. -
-
-
hasInsufficientDataActions
public final boolean hasInsufficientDataActions()For responses, this returns true if the service returned a value for the InsufficientDataActions property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
insufficientDataActions
The actions to execute when this alarm transitions to the
INSUFFICIENT_DATAstate 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-nameLambda 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
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasInsufficientDataActions()method.- Returns:
- The actions to execute when this alarm transitions to the
INSUFFICIENT_DATAstate 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-nameLambda 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
-
-
-
hasOkActions
public final boolean hasOkActions()For responses, this returns true if the service returned a value for the OKActions property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
okActions
The actions to execute when this alarm transitions to an
OKstate 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-nameLambda 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
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasOkActions()method.- Returns:
- The actions to execute when this alarm transitions to an
OKstate 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-nameLambda 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
-
-
-
hasTags
public final boolean hasTags()For responses, this returns true if the service returned a value for the Tags property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
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:TagResourcepermission.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.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasTags()method.- Returns:
- 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:TagResourcepermission.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.
-
actionsSuppressor
Actions will be suppressed if the suppressor alarm is in the
ALARMstate.ActionsSuppressorcan be an AlarmName or an Amazon Resource Name (ARN) from an existing alarm.- Returns:
- Actions will be suppressed if the suppressor alarm is in the
ALARMstate.ActionsSuppressorcan be an AlarmName or an Amazon Resource Name (ARN) from an existing alarm.
-
actionsSuppressorWaitPeriod
The maximum time in seconds that the composite alarm waits for the suppressor alarm to go into the
ALARMstate. After this time, the composite alarm performs its actions.WaitPeriodis required only whenActionsSuppressoris specified.- Returns:
- The maximum time in seconds that the composite alarm waits for the suppressor alarm to go into the
ALARMstate. After this time, the composite alarm performs its actions.WaitPeriodis required only whenActionsSuppressoris specified.
-
actionsSuppressorExtensionPeriod
The maximum time in seconds that the composite alarm waits after suppressor alarm goes out of the
ALARMstate. After this time, the composite alarm performs its actions.ExtensionPeriodis required only whenActionsSuppressoris specified.- Returns:
- The maximum time in seconds that the composite alarm waits after suppressor alarm goes out of the
ALARMstate. After this time, the composite alarm performs its actions.ExtensionPeriodis required only whenActionsSuppressoris specified.
-
toBuilder
Description copied from interface:ToCopyableBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<PutCompositeAlarmRequest.Builder,PutCompositeAlarmRequest> - Specified by:
toBuilderin classCloudWatchRequest- Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
public final int hashCode()- Overrides:
hashCodein classAwsRequest
-
equals
- Overrides:
equalsin classAwsRequest
-
equalsBySdkFields
Description copied from interface:SdkPojoIndicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojoclass, and is generated based on a service model.If an
SdkPojoclass does not have any inherited fields,equalsBySdkFieldsandequalsare essentially the same.- Specified by:
equalsBySdkFieldsin interfaceSdkPojo- Parameters:
obj- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
-
getValueForField
Description copied from class:SdkRequestUsed to retrieve the value of a field from any class that extendsSdkRequest. The field name specified should match the member name from the corresponding service-2.json model specified in the codegen-resources folder for a given service. The class specifies what class to cast the returned value to. If the returned value is also a modeled class, theSdkRequest.getValueForField(String, Class)method will again be available.- Overrides:
getValueForFieldin classSdkRequest- Parameters:
fieldName- The name of the member to be retrieved.clazz- The class to cast the returned object to.- Returns:
- Optional containing the casted return value
-
sdkFields
-