Interface CreateScheduledQueryRequest.Builder
- All Superinterfaces:
AwsRequest.Builder,Buildable,CloudWatchLogsRequest.Builder,CopyableBuilder<CreateScheduledQueryRequest.Builder,,CreateScheduledQueryRequest> SdkBuilder<CreateScheduledQueryRequest.Builder,,CreateScheduledQueryRequest> SdkPojo,SdkRequest.Builder
- Enclosing class:
CreateScheduledQueryRequest
-
Method Summary
Modifier and TypeMethodDescriptiondescription(String description) An optional description for the scheduled query to help identify its purpose.destinationConfiguration(Consumer<DestinationConfiguration.Builder> destinationConfiguration) Configuration for destinations where the query results will be delivered after successful execution.destinationConfiguration(DestinationConfiguration destinationConfiguration) Configuration for destinations where the query results will be delivered after successful execution.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.logGroupIdentifiers(String... logGroupIdentifiers) The log group identifiers to query.logGroupIdentifiers(Collection<String> logGroupIdentifiers) The log group identifiers to query.A unique name for the scheduled query within the region for an AWS account.overrideConfiguration(Consumer<AwsRequestOverrideConfiguration.Builder> builderConsumer) Add an optional request override configuration.overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) Add an optional request override configuration.queryLanguage(String queryLanguage) The query language to use for the scheduled query.queryLanguage(QueryLanguage queryLanguage) The query language to use for the scheduled query.queryString(String queryString) The CloudWatch Logs Insights query string to execute.scheduleEndTime(Long scheduleEndTime) The end time for the query schedule in Unix epoch time (seconds since January 1, 1970, 00:00:00 UTC).scheduleExpression(String scheduleExpression) A cron expression that defines when the scheduled query runs.scheduleStartTime(Long scheduleStartTime) The start time for the query schedule in Unix epoch time (seconds since January 1, 1970, 00:00:00 UTC).startTimeOffset(Long startTimeOffset) Time offset in seconds from the execution time for the start of the query time range.The initial state of the scheduled query.state(ScheduledQueryState state) The initial state of the scheduled query.An optional list of key-value pairs to associate with the resource.The timezone in which the schedule expression is evaluated.Methods inherited from interface software.amazon.awssdk.awscore.AwsRequest.Builder
overrideConfigurationMethods inherited from interface software.amazon.awssdk.services.cloudwatchlogs.model.CloudWatchLogsRequest.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
-
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
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
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
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
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
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
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
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
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 theDestinationConfiguration.Builderavoiding the need to create one manually viaDestinationConfiguration.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed todestinationConfiguration(DestinationConfiguration).- Parameters:
destinationConfiguration- a consumer that will call methods onDestinationConfiguration.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
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
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
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.BuilderAdd an optional request override configuration.- Specified by:
overrideConfigurationin interfaceAwsRequest.Builder- Parameters:
overrideConfiguration- The override configuration.- Returns:
- This object for method chaining.
-
overrideConfiguration
CreateScheduledQueryRequest.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.
-