Interface PutLogAlarmRequest.Builder

  • Method Details

    • alarmName

      PutLogAlarmRequest.Builder alarmName(String 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

      PutLogAlarmRequest.Builder alarmDescription(String 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 the ScheduledQueryConfiguration.Builder avoiding the need to create one manually via ScheduledQueryConfiguration.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to scheduledQueryConfiguration(ScheduledQueryConfiguration).

      Parameters:
      scheduledQueryConfiguration - a consumer that will call methods on ScheduledQueryConfiguration.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • actionLogLineCount

      PutLogAlarmRequest.Builder actionLogLineCount(Integer 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

      PutLogAlarmRequest.Builder 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. Required when ActionLogLineCount is 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 when ActionLogLineCount is greater than 0.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • actionsEnabled

      PutLogAlarmRequest.Builder actionsEnabled(Boolean 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 is true.
      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 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

      Parameters:
      okActions - The actions to execute when this alarm transitions to the 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

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • okActions

      PutLogAlarmRequest.Builder okActions(String... okActions)

      The actions to execute when this alarm transitions to the 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

      Parameters:
      okActions - The actions to execute when this alarm transitions to the 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

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • alarmActions

      PutLogAlarmRequest.Builder alarmActions(Collection<String> 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

      Parameters:
      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

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • alarmActions

      PutLogAlarmRequest.Builder alarmActions(String... 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

      Parameters:
      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

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • insufficientDataActions

      PutLogAlarmRequest.Builder insufficientDataActions(Collection<String> 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

      Parameters:
      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

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • insufficientDataActions

      PutLogAlarmRequest.Builder insufficientDataActions(String... 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

      Parameters:
      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

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • queryResultsToEvaluate

      PutLogAlarmRequest.Builder queryResultsToEvaluate(Integer 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

      PutLogAlarmRequest.Builder queryResultsToAlarm(Integer queryResultsToAlarm)

      The number of query results, out of the most recent QueryResultsToEvaluate results, that must breach the threshold to trigger the alarm to transition to ALARM (the M in M-of-N evaluation). Must be less than or equal to QueryResultsToEvaluate.

      Parameters:
      queryResultsToAlarm - The number of query results, out of the most recent QueryResultsToEvaluate results, that must breach the threshold to trigger the alarm to transition to ALARM (the M in M-of-N evaluation). Must be less than or equal to QueryResultsToEvaluate.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • threshold

      PutLogAlarmRequest.Builder threshold(Double 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

      PutLogAlarmRequest.Builder comparisonOperator(String 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, and LessThanOrEqualToThreshold.

      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 are GreaterThanThreshold, GreaterThanOrEqualToThreshold, LessThanThreshold, and LessThanOrEqualToThreshold.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • comparisonOperator

      PutLogAlarmRequest.Builder comparisonOperator(ComparisonOperator 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, and LessThanOrEqualToThreshold.

      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 are GreaterThanThreshold, GreaterThanOrEqualToThreshold, LessThanThreshold, and LessThanOrEqualToThreshold.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • treatMissingData

      PutLogAlarmRequest.Builder treatMissingData(String treatMissingData)

      Sets how this alarm is to handle missing data points. Valid values are breaching, notBreaching, ignore, and missing. If this parameter is omitted, the default behavior of missing is used.

      Parameters:
      treatMissingData - Sets how this alarm is to handle missing data points. Valid values are breaching, notBreaching, ignore, and missing. If this parameter is omitted, the default behavior of missing is 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 the Tag.Builder avoiding the need to create one manually via Tag.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to tags(List<Tag>).

      Parameters:
      tags - a consumer that will call methods on Tag.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.Builder
      Add an optional request override configuration.
      Specified by:
      overrideConfiguration in interface AwsRequest.Builder
      Parameters:
      overrideConfiguration - The override configuration.
      Returns:
      This object for method chaining.
    • overrideConfiguration

      Description copied from interface: AwsRequest.Builder
      Add an optional request override configuration.
      Specified by:
      overrideConfiguration in interface AwsRequest.Builder
      Parameters:
      builderConsumer - A Consumer to which an empty AwsRequestOverrideConfiguration.Builder will be given.
      Returns:
      This object for method chaining.