Interface PutLogAlarmRequest.Builder
- All Superinterfaces:
AwsRequest.Builder,Buildable,CloudWatchRequest.Builder,CopyableBuilder<PutLogAlarmRequest.Builder,,PutLogAlarmRequest> SdkBuilder<PutLogAlarmRequest.Builder,,PutLogAlarmRequest> SdkPojo,SdkRequest.Builder
- Enclosing class:
PutLogAlarmRequest
-
Method Summary
Modifier and TypeMethodDescriptionactionLogLineCount(Integer actionLogLineCount) The number of log lines from the most recent scheduled query execution to include in alarm action notifications.actionLogLineRoleArn(String actionLogLineRoleArn) The Amazon Resource Name (ARN) of an IAM role that CloudWatch assumes to retrieve log events for inclusion in alarm action notifications.actionsEnabled(Boolean actionsEnabled) Indicates whether actions should be executed during any changes to the alarm state.alarmActions(String... alarmActions) The actions to execute when this alarm transitions to theALARMstate from any other state.alarmActions(Collection<String> alarmActions) The actions to execute when this alarm transitions to theALARMstate from any other state.alarmDescription(String alarmDescription) The description for the alarm.The name for the alarm.comparisonOperator(String comparisonOperator) The arithmetic operation to use when comparing the aggregated query result and the threshold.comparisonOperator(ComparisonOperator comparisonOperator) The arithmetic operation to use when comparing the aggregated query result and the threshold.insufficientDataActions(String... insufficientDataActions) The actions to execute when this alarm transitions to theINSUFFICIENT_DATAstate from any other state.insufficientDataActions(Collection<String> insufficientDataActions) 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.okActions(Collection<String> okActions) The actions to execute when this alarm transitions to theOKstate from any other state.overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Add an optional request override configuration.overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) Add an optional request override configuration.queryResultsToAlarm(Integer queryResultsToAlarm) The 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).queryResultsToEvaluate(Integer queryResultsToEvaluate) The number of most recent scheduled query results to evaluate against the threshold (the N in M-of-N evaluation).default PutLogAlarmRequest.BuilderscheduledQueryConfiguration(Consumer<ScheduledQueryConfiguration.Builder> scheduledQueryConfiguration) The configuration of the underlying CloudWatch Logs scheduled query that this alarm evaluates, including the query string, log groups, schedule, and aggregation expression.scheduledQueryConfiguration(ScheduledQueryConfiguration scheduledQueryConfiguration) The configuration of the underlying CloudWatch Logs scheduled query that this alarm evaluates, including the query string, log groups, schedule, and aggregation expression.tags(Collection<Tag> tags) A list of key-value pairs to associate with the alarm.tags(Consumer<Tag.Builder>... tags) A list of key-value pairs to associate with the alarm.A list of key-value pairs to associate with the alarm.The value to compare with the aggregated query result.treatMissingData(String treatMissingData) Sets how this alarm is to handle missing data points.Methods inherited from interface software.amazon.awssdk.awscore.AwsRequest.Builder
overrideConfigurationMethods inherited from interface software.amazon.awssdk.services.cloudwatch.model.CloudWatchRequest.Builder
buildMethods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copyMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, buildMethods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
Method Details
-
alarmName
The name for the alarm. This name must be unique within the Amazon Web Services account and Region.
- Parameters:
alarmName- The name for the alarm. This name must be unique within the Amazon Web Services account and Region.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
alarmDescription
The description for the alarm.
- Parameters:
alarmDescription- The description for the alarm.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
scheduledQueryConfiguration
PutLogAlarmRequest.Builder scheduledQueryConfiguration(ScheduledQueryConfiguration scheduledQueryConfiguration) The configuration of the underlying CloudWatch Logs scheduled query that this alarm evaluates, including the query string, log groups, schedule, and aggregation expression.
- Parameters:
scheduledQueryConfiguration- The configuration of the underlying CloudWatch Logs scheduled query that this alarm evaluates, including the query string, log groups, schedule, and aggregation expression.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
scheduledQueryConfiguration
default PutLogAlarmRequest.Builder scheduledQueryConfiguration(Consumer<ScheduledQueryConfiguration.Builder> scheduledQueryConfiguration) The configuration of the underlying CloudWatch Logs scheduled query that this alarm evaluates, including the query string, log groups, schedule, and aggregation expression.
This is a convenience method that creates an instance of theScheduledQueryConfiguration.Builderavoiding the need to create one manually viaScheduledQueryConfiguration.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toscheduledQueryConfiguration(ScheduledQueryConfiguration).- Parameters:
scheduledQueryConfiguration- a consumer that will call methods onScheduledQueryConfiguration.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
actionLogLineCount
The number of log lines from the most recent scheduled query execution to include in alarm action notifications. Valid range is 0 through 50. The default is 0, which means no log lines are included.
- Parameters:
actionLogLineCount- The number of log lines from the most recent scheduled query execution to include in alarm action notifications. Valid range is 0 through 50. The default is 0, which means no log lines are included.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
actionLogLineRoleArn
The Amazon Resource Name (ARN) of an IAM role that CloudWatch assumes to retrieve log events for inclusion in alarm action notifications. Required when
ActionLogLineCountis greater than 0.- Parameters:
actionLogLineRoleArn- The Amazon Resource Name (ARN) of an IAM role that CloudWatch assumes to retrieve log events for inclusion in alarm action notifications. Required whenActionLogLineCountis greater than 0.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
actionsEnabled
Indicates whether actions should be executed during any changes to the alarm state. The default is
true.- Parameters:
actionsEnabled- Indicates whether actions should be executed during any changes to the alarm state. The default istrue.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
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).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
- Parameters:
okActions- The actions to execute when this alarm transitions to theOKstate 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
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
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).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
- Parameters:
okActions- The actions to execute when this alarm transitions to theOKstate 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
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
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:severity- Parameters:
alarmActions- The actions to execute when this alarm transitions to theALARMstate 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-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
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:severity- Parameters:
alarmActions- The actions to execute when this alarm transitions to theALARMstate 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-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
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
- Parameters:
insufficientDataActions- The actions to execute when this alarm transitions to theINSUFFICIENT_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
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
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
- Parameters:
insufficientDataActions- The actions to execute when this alarm transitions to theINSUFFICIENT_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
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
queryResultsToEvaluate
The number of most recent scheduled query results to evaluate against the threshold (the N in M-of-N evaluation). Valid range is 1 through 100.
- Parameters:
queryResultsToEvaluate- The number of most recent scheduled query results to evaluate against the threshold (the N in M-of-N evaluation). Valid range is 1 through 100.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
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). Must be less than or equal toQueryResultsToEvaluate.- Parameters:
queryResultsToAlarm- The 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). Must be less than or equal toQueryResultsToEvaluate.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
threshold
The value to compare with the aggregated query result.
- Parameters:
threshold- The value to compare with the aggregated query result.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
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. Valid values are
GreaterThanThreshold,GreaterThanOrEqualToThreshold,LessThanThreshold, andLessThanOrEqualToThreshold.- Parameters:
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. Valid values areGreaterThanThreshold,GreaterThanOrEqualToThreshold,LessThanThreshold, andLessThanOrEqualToThreshold.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
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. Valid values are
GreaterThanThreshold,GreaterThanOrEqualToThreshold,LessThanThreshold, andLessThanOrEqualToThreshold.- Parameters:
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. Valid values areGreaterThanThreshold,GreaterThanOrEqualToThreshold,LessThanThreshold, andLessThanOrEqualToThreshold.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
treatMissingData
Sets how this alarm is to handle missing data points. Valid values are
breaching,notBreaching,ignore, andmissing. If this parameter is omitted, the default behavior ofmissingis used.- Parameters:
treatMissingData- Sets how this alarm is to handle missing data points. Valid values arebreaching,notBreaching,ignore, andmissing. If this parameter is omitted, the default behavior ofmissingis used.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tags
A list of key-value pairs to associate with the alarm. You can use tags to categorize and manage your alarms.
- Parameters:
tags- A list of key-value pairs to associate with the alarm. You can use tags to categorize and manage your alarms.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tags
A list of key-value pairs to associate with the alarm. You can use tags to categorize and manage your alarms.
- Parameters:
tags- A list of key-value pairs to associate with the alarm. You can use tags to categorize and manage your alarms.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
tags
A list of key-value pairs to associate with the alarm. You can use tags to categorize and manage your alarms.
This is a convenience method that creates an instance of theTag.Builderavoiding the need to create one manually viaTag.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed totags(List<Tag>).- Parameters:
tags- a consumer that will call methods onTag.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
overrideConfiguration
PutLogAlarmRequest.Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) Description copied from interface:AwsRequest.BuilderAdd an optional request override configuration.- Specified by:
overrideConfigurationin interfaceAwsRequest.Builder- Parameters:
overrideConfiguration- The override configuration.- Returns:
- This object for method chaining.
-
overrideConfiguration
PutLogAlarmRequest.Builder overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Description copied from interface:AwsRequest.BuilderAdd an optional request override configuration.- Specified by:
overrideConfigurationin interfaceAwsRequest.Builder- Parameters:
builderConsumer- AConsumerto which an emptyAwsRequestOverrideConfiguration.Builderwill be given.- Returns:
- This object for method chaining.
-