Interface CreateScheduledQueryRequest.Builder

  • Method Details

    • name

      A unique name for the scheduled query within the region for an AWS account. The name can contain letters, numbers, underscores, hyphens, forward slashes, periods, and hash symbols.

      Parameters:
      name - A unique name for the scheduled query within the region for an AWS account. The name can contain letters, numbers, underscores, hyphens, forward slashes, periods, and hash symbols.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • description

      CreateScheduledQueryRequest.Builder description(String description)

      An optional description for the scheduled query to help identify its purpose.

      Parameters:
      description - An optional description for the scheduled query to help identify its purpose.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • queryLanguage

      CreateScheduledQueryRequest.Builder queryLanguage(String queryLanguage)

      The query language to use for the scheduled query. Valid values are LogsQL (CloudWatch Logs Insights query language), PPL (OpenSearch Service Piped Processing Language), and SQL (OpenSearch Service Structured Query Language).

      Parameters:
      queryLanguage - The query language to use for the scheduled query. Valid values are LogsQL (CloudWatch Logs Insights query language), PPL (OpenSearch Service Piped Processing Language), and SQL (OpenSearch Service Structured Query Language).
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • queryLanguage

      CreateScheduledQueryRequest.Builder queryLanguage(QueryLanguage queryLanguage)

      The query language to use for the scheduled query. Valid values are LogsQL (CloudWatch Logs Insights query language), PPL (OpenSearch Service Piped Processing Language), and SQL (OpenSearch Service Structured Query Language).

      Parameters:
      queryLanguage - The query language to use for the scheduled query. Valid values are LogsQL (CloudWatch Logs Insights query language), PPL (OpenSearch Service Piped Processing Language), and SQL (OpenSearch Service Structured Query Language).
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • queryString

      CreateScheduledQueryRequest.Builder queryString(String queryString)

      The CloudWatch Logs Insights query string to execute. This is the actual query that will be run against your log data on the specified schedule.

      Parameters:
      queryString - The CloudWatch Logs Insights query string to execute. This is the actual query that will be run against your log data on the specified schedule.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • logGroupIdentifiers

      CreateScheduledQueryRequest.Builder logGroupIdentifiers(Collection<String> logGroupIdentifiers)

      The log group identifiers to query. You can specify log group names or log group ARNs. If querying log groups in a source account from a monitoring account, you must specify the ARN of the log group.

      Parameters:
      logGroupIdentifiers - The log group identifiers to query. You can specify log group names or log group ARNs. If querying log groups in a source account from a monitoring account, you must specify the ARN of the log group.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • logGroupIdentifiers

      CreateScheduledQueryRequest.Builder logGroupIdentifiers(String... logGroupIdentifiers)

      The log group identifiers to query. You can specify log group names or log group ARNs. If querying log groups in a source account from a monitoring account, you must specify the ARN of the log group.

      Parameters:
      logGroupIdentifiers - The log group identifiers to query. You can specify log group names or log group ARNs. If querying log groups in a source account from a monitoring account, you must specify the ARN of the log group.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • scheduleExpression

      CreateScheduledQueryRequest.Builder scheduleExpression(String scheduleExpression)

      A cron expression that defines when the scheduled query runs. The format is cron(fields) where fields consist of six space-separated values: minutes, hours, day_of_month, month, day_of_week, year.

      Parameters:
      scheduleExpression - A cron expression that defines when the scheduled query runs. The format is cron(fields) where fields consist of six space-separated values: minutes, hours, day_of_month, month, day_of_week, year.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • timezone

      The timezone in which the schedule expression is evaluated. If not provided, defaults to UTC.

      Parameters:
      timezone - The timezone in which the schedule expression is evaluated. If not provided, defaults to UTC.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • startTimeOffset

      CreateScheduledQueryRequest.Builder startTimeOffset(Long startTimeOffset)

      Time offset in seconds from the execution time for the start of the query time range. This defines the lookback period for the query (for example, 3600 for the last hour).

      Parameters:
      startTimeOffset - Time offset in seconds from the execution time for the start of the query time range. This defines the lookback period for the query (for example, 3600 for the last hour).
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • destinationConfiguration

      CreateScheduledQueryRequest.Builder destinationConfiguration(DestinationConfiguration destinationConfiguration)

      Configuration for destinations where the query results will be delivered after successful execution. You can configure delivery to S3 buckets or EventBridge event buses.

      Parameters:
      destinationConfiguration - Configuration for destinations where the query results will be delivered after successful execution. You can configure delivery to S3 buckets or EventBridge event buses.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • destinationConfiguration

      default CreateScheduledQueryRequest.Builder destinationConfiguration(Consumer<DestinationConfiguration.Builder> destinationConfiguration)

      Configuration for destinations where the query results will be delivered after successful execution. You can configure delivery to S3 buckets or EventBridge event buses.

      This is a convenience method that creates an instance of the DestinationConfiguration.Builder avoiding the need to create one manually via DestinationConfiguration.builder().

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

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

      CreateScheduledQueryRequest.Builder scheduleStartTime(Long scheduleStartTime)

      The start time for the query schedule in Unix epoch time (seconds since January 1, 1970, 00:00:00 UTC). If not specified, the schedule starts immediately.

      Parameters:
      scheduleStartTime - The start time for the query schedule in Unix epoch time (seconds since January 1, 1970, 00:00:00 UTC). If not specified, the schedule starts immediately.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • scheduleEndTime

      CreateScheduledQueryRequest.Builder scheduleEndTime(Long scheduleEndTime)

      The end time for the query schedule in Unix epoch time (seconds since January 1, 1970, 00:00:00 UTC). If not specified, the schedule runs indefinitely.

      Parameters:
      scheduleEndTime - The end time for the query schedule in Unix epoch time (seconds since January 1, 1970, 00:00:00 UTC). If not specified, the schedule runs indefinitely.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • executionRoleArn

      CreateScheduledQueryRequest.Builder executionRoleArn(String executionRoleArn)

      The Amazon Resource Name (ARN) of the IAM role that CloudWatch Logs will assume to execute the scheduled query and deliver results to the specified destinations.

      Parameters:
      executionRoleArn - The Amazon Resource Name (ARN) of the IAM role that CloudWatch Logs will assume to execute the scheduled query and deliver results to the specified destinations.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • state

      The initial state of the scheduled query. Valid values are ENABLED (the query will run according to its schedule) and DISABLED (the query is paused and will not run). If not provided, defaults to ENABLED.

      Parameters:
      state - The initial state of the scheduled query. Valid values are ENABLED (the query will run according to its schedule) and DISABLED (the query is paused and will not run). If not provided, defaults to ENABLED.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • state

      The initial state of the scheduled query. Valid values are ENABLED (the query will run according to its schedule) and DISABLED (the query is paused and will not run). If not provided, defaults to ENABLED.

      Parameters:
      state - The initial state of the scheduled query. Valid values are ENABLED (the query will run according to its schedule) and DISABLED (the query is paused and will not run). If not provided, defaults to ENABLED.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • tags

      An optional list of key-value pairs to associate with the resource.

      For more information about tagging, see Tagging Amazon Web Services resources

      Parameters:
      tags - An optional list of key-value pairs to associate with the resource.

      For more information about tagging, see Tagging Amazon Web Services resources

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

      CreateScheduledQueryRequest.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.