Class LogAlarm
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<LogAlarm.Builder,LogAlarm>
The details about a log alarm.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionfinal IntegerThe number of log lines from the most recent scheduled query execution that are included in alarm action notifications.final StringThe Amazon Resource Name (ARN) of the IAM role that CloudWatch assumes to retrieve log events for inclusion in alarm action notifications.final BooleanIndicates whether actions should be executed during any changes to the alarm state.The actions to execute when this alarm transitions to theALARMstate from any other state.final StringalarmArn()The Amazon Resource Name (ARN) of the alarm.final InstantThe time stamp of the last update to the alarm configuration.final StringThe description of the alarm.final StringThe name of the alarm.static LogAlarm.Builderbuilder()final ComparisonOperatorThe arithmetic operation to use when comparing the aggregated query result and the threshold.final StringThe arithmetic operation to use when comparing the aggregated query result and the threshold.final booleanfinal booleanequalsBySdkFields(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final EvaluationStateIf the value of this field isEVALUATION_ERROR, it indicates configuration errors in the alarm setup that require review and correction.final StringIf the value of this field isEVALUATION_ERROR, it indicates configuration errors in the alarm setup that require review and correction.final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) 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.The actions to execute when this alarm transitions to theINSUFFICIENT_DATAstate from any other state.The actions to execute when this alarm transitions to theOKstate from any other state.final IntegerThe number of query results, out of the most recentQueryResultsToEvaluateresults, that must breach the threshold to trigger the alarm to transition toALARM(the M in M-of-N evaluation).final IntegerThe number of most recent scheduled query results that the alarm evaluates against the threshold (the N in M-of-N evaluation).The configuration of the underlying CloudWatch Logs scheduled query, including the query string, log groups, schedule, aggregation expression, and the ARN of the managed scheduled query.static Class<? extends LogAlarm.Builder> final StringAn explanation for the alarm state, in text format.final StringAn explanation for the alarm state, in JSON format.final InstantThe date and time that the alarm'sStateValuemost recently changed.final InstantThe time stamp of the last update to the value of either theStateValueorEvaluationStateparameters.final StateValueThe state value for the alarm.final StringThe state value for the alarm.final DoubleThe value to compare with the aggregated query result.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.final StringHow this alarm handles missing data points.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
alarmName
-
alarmArn
The Amazon Resource Name (ARN) of the alarm.
- Returns:
- The Amazon Resource Name (ARN) of the alarm.
-
alarmDescription
The description of the alarm.
- Returns:
- The description of the alarm.
-
alarmConfigurationUpdatedTimestamp
The time stamp of the last update to the alarm configuration.
- Returns:
- The time stamp of the last update to the alarm configuration.
-
actionsEnabled
Indicates whether actions should be executed during any changes to the alarm state.
- Returns:
- Indicates whether actions should be executed during any changes to the alarm state.
-
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 the
OKstate from any other state. Each action is specified as an Amazon Resource Name (ARN).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 the
OKstate from any other state. Each action is specified as an Amazon Resource Name (ARN).
-
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).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
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).
-
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).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).
-
stateValue
The state value for the alarm.
If the service returns an enum value that is not available in the current SDK version,
stateValuewill returnStateValue.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromstateValueAsString().- Returns:
- The state value for the alarm.
- See Also:
-
stateValueAsString
The state value for the alarm.
If the service returns an enum value that is not available in the current SDK version,
stateValuewill returnStateValue.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromstateValueAsString().- Returns:
- The state value for the alarm.
- See Also:
-
stateReason
An explanation for the alarm state, in text format.
- Returns:
- An explanation for the alarm state, in text format.
-
stateReasonData
An explanation for the alarm state, in JSON format.
- Returns:
- An explanation for the alarm state, in JSON format.
-
stateUpdatedTimestamp
The time stamp of the last update to the value of either the
StateValueorEvaluationStateparameters.- Returns:
- The time stamp of the last update to the value of either the
StateValueorEvaluationStateparameters.
-
scheduledQueryConfiguration
The configuration of the underlying CloudWatch Logs scheduled query, including the query string, log groups, schedule, aggregation expression, and the ARN of the managed scheduled query.
- Returns:
- The configuration of the underlying CloudWatch Logs scheduled query, including the query string, log groups, schedule, aggregation expression, and the ARN of the managed scheduled query.
-
queryResultsToEvaluate
The number of most recent scheduled query results that the alarm evaluates against the threshold (the N in M-of-N evaluation).
- Returns:
- The number of most recent scheduled query results that the alarm evaluates against the threshold (the N in M-of-N evaluation).
-
queryResultsToAlarm
The number of query results, out of the most recent
QueryResultsToEvaluateresults, that must breach the threshold to trigger the alarm to transition toALARM(the M in M-of-N evaluation).- Returns:
- The number of query results, out of the most recent
QueryResultsToEvaluateresults, that must breach the threshold to trigger the alarm to transition toALARM(the M in M-of-N evaluation).
-
threshold
The value to compare with the aggregated query result.
- Returns:
- The value to compare with the aggregated query result.
-
comparisonOperator
The arithmetic operation to use when comparing the aggregated query result and the threshold. The aggregated query result is used as the first operand.
If the service returns an enum value that is not available in the current SDK version,
comparisonOperatorwill returnComparisonOperator.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromcomparisonOperatorAsString().- Returns:
- The arithmetic operation to use when comparing the aggregated query result and the threshold. The aggregated query result is used as the first operand.
- See Also:
-
comparisonOperatorAsString
The arithmetic operation to use when comparing the aggregated query result and the threshold. The aggregated query result is used as the first operand.
If the service returns an enum value that is not available in the current SDK version,
comparisonOperatorwill returnComparisonOperator.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromcomparisonOperatorAsString().- Returns:
- The arithmetic operation to use when comparing the aggregated query result and the threshold. The aggregated query result is used as the first operand.
- See Also:
-
treatMissingData
How this alarm handles missing data points. Valid values are
breaching,notBreaching,ignore, andmissing.- Returns:
- How this alarm handles missing data points. Valid values are
breaching,notBreaching,ignore, andmissing.
-
stateTransitionedTimestamp
The date and time that the alarm's
StateValuemost recently changed.- Returns:
- The date and time that the alarm's
StateValuemost recently changed.
-
evaluationState
If the value of this field is
EVALUATION_ERROR, it indicates configuration errors in the alarm setup that require review and correction. Refer to theStateReasonfield of the alarm for more details.If the value of this field is
EVALUATION_FAILURE, it indicates temporary CloudWatch issues. We recommend manual monitoring until the issue is resolved.If the value of this field is
PARTIAL_DATA, it indicates that the query returned the maximum 500 contributor groups but more matched. The alarm evaluates the available contributors, but results might be incomplete.If the service returns an enum value that is not available in the current SDK version,
evaluationStatewill returnEvaluationState.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromevaluationStateAsString().- Returns:
- If the value of this field is
EVALUATION_ERROR, it indicates configuration errors in the alarm setup that require review and correction. Refer to theStateReasonfield of the alarm for more details.If the value of this field is
EVALUATION_FAILURE, it indicates temporary CloudWatch issues. We recommend manual monitoring until the issue is resolved.If the value of this field is
PARTIAL_DATA, it indicates that the query returned the maximum 500 contributor groups but more matched. The alarm evaluates the available contributors, but results might be incomplete. - See Also:
-
evaluationStateAsString
If the value of this field is
EVALUATION_ERROR, it indicates configuration errors in the alarm setup that require review and correction. Refer to theStateReasonfield of the alarm for more details.If the value of this field is
EVALUATION_FAILURE, it indicates temporary CloudWatch issues. We recommend manual monitoring until the issue is resolved.If the value of this field is
PARTIAL_DATA, it indicates that the query returned the maximum 500 contributor groups but more matched. The alarm evaluates the available contributors, but results might be incomplete.If the service returns an enum value that is not available in the current SDK version,
evaluationStatewill returnEvaluationState.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromevaluationStateAsString().- Returns:
- If the value of this field is
EVALUATION_ERROR, it indicates configuration errors in the alarm setup that require review and correction. Refer to theStateReasonfield of the alarm for more details.If the value of this field is
EVALUATION_FAILURE, it indicates temporary CloudWatch issues. We recommend manual monitoring until the issue is resolved.If the value of this field is
PARTIAL_DATA, it indicates that the query returned the maximum 500 contributor groups but more matched. The alarm evaluates the available contributors, but results might be incomplete. - See Also:
-
actionLogLineCount
The number of log lines from the most recent scheduled query execution that are included in alarm action notifications. Valid range is 0 through 50. A value of 0 means no log lines are included.
- Returns:
- The number of log lines from the most recent scheduled query execution that are included in alarm action notifications. Valid range is 0 through 50. A value of 0 means no log lines are included.
-
actionLogLineRoleArn
The Amazon Resource Name (ARN) of the IAM role that CloudWatch assumes to retrieve log events for inclusion in alarm action notifications. Set when
ActionLogLineCountis greater than 0.- Returns:
- The Amazon Resource Name (ARN) of the IAM role that CloudWatch assumes to retrieve log events for
inclusion in alarm action notifications. Set when
ActionLogLineCountis greater than 0.
-
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<LogAlarm.Builder,LogAlarm> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
-
equals
-
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
-
sdkFields
-
sdkFieldNameToField
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo- Returns:
- The mapping between the field name and its corresponding field.
-