1. Packages
  2. AWS
  3. API Docs
  4. timestreamquery
  5. ScheduledQuery
AWS v6.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

aws.timestreamquery.ScheduledQuery

Explore with Pulumi AI

Resource for managing an AWS Timestream Query Scheduled Query.

Example Usage

Basic Usage

Before creating a scheduled query, you must have a source database and table with ingested data. Below is a multi-step example, providing an opportunity for data ingestion.

If your infrastructure is already set up—including the source database and table with data, results database and table, error report S3 bucket, SNS topic, and IAM role—you can create a scheduled query as follows:

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.timestreamquery.ScheduledQuery("example", {
    executionRoleArn: exampleAwsIamRole.arn,
    name: exampleAwsTimestreamwriteTable.tableName,
    queryString: `SELECT region, az, hostname, BIN(time, 15s) AS binned_timestamp,
\x09ROUND(AVG(cpu_utilization), 2) AS avg_cpu_utilization,
\x09ROUND(APPROX_PERCENTILE(cpu_utilization, 0.9), 2) AS p90_cpu_utilization,
\x09ROUND(APPROX_PERCENTILE(cpu_utilization, 0.95), 2) AS p95_cpu_utilization,
\x09ROUND(APPROX_PERCENTILE(cpu_utilization, 0.99), 2) AS p99_cpu_utilization
FROM exampledatabase.exampletable
WHERE measure_name = 'metrics' AND time > ago(2h)
GROUP BY region, hostname, az, BIN(time, 15s)
ORDER BY binned_timestamp ASC
LIMIT 5
`,
    errorReportConfiguration: {
        s3Configuration: {
            bucketName: exampleAwsS3Bucket.bucket,
        },
    },
    notificationConfiguration: {
        snsConfiguration: {
            topicArn: exampleAwsSnsTopic.arn,
        },
    },
    scheduleConfiguration: {
        scheduleExpression: "rate(1 hour)",
    },
    targetConfiguration: {
        timestreamConfiguration: {
            databaseName: results.databaseName,
            tableName: resultsAwsTimestreamwriteTable.tableName,
            timeColumn: "binned_timestamp",
            dimensionMappings: [
                {
                    dimensionValueType: "VARCHAR",
                    name: "az",
                },
                {
                    dimensionValueType: "VARCHAR",
                    name: "region",
                },
                {
                    dimensionValueType: "VARCHAR",
                    name: "hostname",
                },
            ],
            multiMeasureMappings: {
                targetMultiMeasureName: "multi-metrics",
                multiMeasureAttributeMappings: [
                    {
                        measureValueType: "DOUBLE",
                        sourceColumn: "avg_cpu_utilization",
                    },
                    {
                        measureValueType: "DOUBLE",
                        sourceColumn: "p90_cpu_utilization",
                    },
                    {
                        measureValueType: "DOUBLE",
                        sourceColumn: "p95_cpu_utilization",
                    },
                    {
                        measureValueType: "DOUBLE",
                        sourceColumn: "p99_cpu_utilization",
                    },
                ],
            },
        },
    },
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.timestreamquery.ScheduledQuery("example",
    execution_role_arn=example_aws_iam_role["arn"],
    name=example_aws_timestreamwrite_table["tableName"],
    query_string="""SELECT region, az, hostname, BIN(time, 15s) AS binned_timestamp,
\x09ROUND(AVG(cpu_utilization), 2) AS avg_cpu_utilization,
\x09ROUND(APPROX_PERCENTILE(cpu_utilization, 0.9), 2) AS p90_cpu_utilization,
\x09ROUND(APPROX_PERCENTILE(cpu_utilization, 0.95), 2) AS p95_cpu_utilization,
\x09ROUND(APPROX_PERCENTILE(cpu_utilization, 0.99), 2) AS p99_cpu_utilization
FROM exampledatabase.exampletable
WHERE measure_name = 'metrics' AND time > ago(2h)
GROUP BY region, hostname, az, BIN(time, 15s)
ORDER BY binned_timestamp ASC
LIMIT 5
""",
    error_report_configuration={
        "s3_configuration": {
            "bucket_name": example_aws_s3_bucket["bucket"],
        },
    },
    notification_configuration={
        "sns_configuration": {
            "topic_arn": example_aws_sns_topic["arn"],
        },
    },
    schedule_configuration={
        "schedule_expression": "rate(1 hour)",
    },
    target_configuration={
        "timestream_configuration": {
            "database_name": results["databaseName"],
            "table_name": results_aws_timestreamwrite_table["tableName"],
            "time_column": "binned_timestamp",
            "dimension_mappings": [
                {
                    "dimension_value_type": "VARCHAR",
                    "name": "az",
                },
                {
                    "dimension_value_type": "VARCHAR",
                    "name": "region",
                },
                {
                    "dimension_value_type": "VARCHAR",
                    "name": "hostname",
                },
            ],
            "multi_measure_mappings": {
                "target_multi_measure_name": "multi-metrics",
                "multi_measure_attribute_mappings": [
                    {
                        "measure_value_type": "DOUBLE",
                        "source_column": "avg_cpu_utilization",
                    },
                    {
                        "measure_value_type": "DOUBLE",
                        "source_column": "p90_cpu_utilization",
                    },
                    {
                        "measure_value_type": "DOUBLE",
                        "source_column": "p95_cpu_utilization",
                    },
                    {
                        "measure_value_type": "DOUBLE",
                        "source_column": "p99_cpu_utilization",
                    },
                ],
            },
        },
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/timestreamquery"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := timestreamquery.NewScheduledQuery(ctx, "example", &timestreamquery.ScheduledQueryArgs{
			ExecutionRoleArn: pulumi.Any(exampleAwsIamRole.Arn),
			Name:             pulumi.Any(exampleAwsTimestreamwriteTable.TableName),
			QueryString: pulumi.String(`SELECT region, az, hostname, BIN(time, 15s) AS binned_timestamp,
	ROUND(AVG(cpu_utilization), 2) AS avg_cpu_utilization,
	ROUND(APPROX_PERCENTILE(cpu_utilization, 0.9), 2) AS p90_cpu_utilization,
	ROUND(APPROX_PERCENTILE(cpu_utilization, 0.95), 2) AS p95_cpu_utilization,
	ROUND(APPROX_PERCENTILE(cpu_utilization, 0.99), 2) AS p99_cpu_utilization
FROM exampledatabase.exampletable
WHERE measure_name = 'metrics' AND time > ago(2h)
GROUP BY region, hostname, az, BIN(time, 15s)
ORDER BY binned_timestamp ASC
LIMIT 5
`),
			ErrorReportConfiguration: &timestreamquery.ScheduledQueryErrorReportConfigurationArgs{
				S3Configuration: &timestreamquery.ScheduledQueryErrorReportConfigurationS3ConfigurationArgs{
					BucketName: pulumi.Any(exampleAwsS3Bucket.Bucket),
				},
			},
			NotificationConfiguration: &timestreamquery.ScheduledQueryNotificationConfigurationArgs{
				SnsConfiguration: &timestreamquery.ScheduledQueryNotificationConfigurationSnsConfigurationArgs{
					TopicArn: pulumi.Any(exampleAwsSnsTopic.Arn),
				},
			},
			ScheduleConfiguration: &timestreamquery.ScheduledQueryScheduleConfigurationArgs{
				ScheduleExpression: pulumi.String("rate(1 hour)"),
			},
			TargetConfiguration: &timestreamquery.ScheduledQueryTargetConfigurationArgs{
				TimestreamConfiguration: &timestreamquery.ScheduledQueryTargetConfigurationTimestreamConfigurationArgs{
					DatabaseName: pulumi.Any(results.DatabaseName),
					TableName:    pulumi.Any(resultsAwsTimestreamwriteTable.TableName),
					TimeColumn:   pulumi.String("binned_timestamp"),
					DimensionMappings: timestreamquery.ScheduledQueryTargetConfigurationTimestreamConfigurationDimensionMappingArray{
						&timestreamquery.ScheduledQueryTargetConfigurationTimestreamConfigurationDimensionMappingArgs{
							DimensionValueType: pulumi.String("VARCHAR"),
							Name:               pulumi.String("az"),
						},
						&timestreamquery.ScheduledQueryTargetConfigurationTimestreamConfigurationDimensionMappingArgs{
							DimensionValueType: pulumi.String("VARCHAR"),
							Name:               pulumi.String("region"),
						},
						&timestreamquery.ScheduledQueryTargetConfigurationTimestreamConfigurationDimensionMappingArgs{
							DimensionValueType: pulumi.String("VARCHAR"),
							Name:               pulumi.String("hostname"),
						},
					},
					MultiMeasureMappings: &timestreamquery.ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsArgs{
						TargetMultiMeasureName: pulumi.String("multi-metrics"),
						MultiMeasureAttributeMappings: timestreamquery.ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsMultiMeasureAttributeMappingArray{
							&timestreamquery.ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsMultiMeasureAttributeMappingArgs{
								MeasureValueType: pulumi.String("DOUBLE"),
								SourceColumn:     pulumi.String("avg_cpu_utilization"),
							},
							&timestreamquery.ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsMultiMeasureAttributeMappingArgs{
								MeasureValueType: pulumi.String("DOUBLE"),
								SourceColumn:     pulumi.String("p90_cpu_utilization"),
							},
							&timestreamquery.ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsMultiMeasureAttributeMappingArgs{
								MeasureValueType: pulumi.String("DOUBLE"),
								SourceColumn:     pulumi.String("p95_cpu_utilization"),
							},
							&timestreamquery.ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsMultiMeasureAttributeMappingArgs{
								MeasureValueType: pulumi.String("DOUBLE"),
								SourceColumn:     pulumi.String("p99_cpu_utilization"),
							},
						},
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = new Aws.TimestreamQuery.ScheduledQuery("example", new()
    {
        ExecutionRoleArn = exampleAwsIamRole.Arn,
        Name = exampleAwsTimestreamwriteTable.TableName,
        QueryString = @"SELECT region, az, hostname, BIN(time, 15s) AS binned_timestamp,
	ROUND(AVG(cpu_utilization), 2) AS avg_cpu_utilization,
	ROUND(APPROX_PERCENTILE(cpu_utilization, 0.9), 2) AS p90_cpu_utilization,
	ROUND(APPROX_PERCENTILE(cpu_utilization, 0.95), 2) AS p95_cpu_utilization,
	ROUND(APPROX_PERCENTILE(cpu_utilization, 0.99), 2) AS p99_cpu_utilization
FROM exampledatabase.exampletable
WHERE measure_name = 'metrics' AND time > ago(2h)
GROUP BY region, hostname, az, BIN(time, 15s)
ORDER BY binned_timestamp ASC
LIMIT 5
",
        ErrorReportConfiguration = new Aws.TimestreamQuery.Inputs.ScheduledQueryErrorReportConfigurationArgs
        {
            S3Configuration = new Aws.TimestreamQuery.Inputs.ScheduledQueryErrorReportConfigurationS3ConfigurationArgs
            {
                BucketName = exampleAwsS3Bucket.Bucket,
            },
        },
        NotificationConfiguration = new Aws.TimestreamQuery.Inputs.ScheduledQueryNotificationConfigurationArgs
        {
            SnsConfiguration = new Aws.TimestreamQuery.Inputs.ScheduledQueryNotificationConfigurationSnsConfigurationArgs
            {
                TopicArn = exampleAwsSnsTopic.Arn,
            },
        },
        ScheduleConfiguration = new Aws.TimestreamQuery.Inputs.ScheduledQueryScheduleConfigurationArgs
        {
            ScheduleExpression = "rate(1 hour)",
        },
        TargetConfiguration = new Aws.TimestreamQuery.Inputs.ScheduledQueryTargetConfigurationArgs
        {
            TimestreamConfiguration = new Aws.TimestreamQuery.Inputs.ScheduledQueryTargetConfigurationTimestreamConfigurationArgs
            {
                DatabaseName = results.DatabaseName,
                TableName = resultsAwsTimestreamwriteTable.TableName,
                TimeColumn = "binned_timestamp",
                DimensionMappings = new[]
                {
                    new Aws.TimestreamQuery.Inputs.ScheduledQueryTargetConfigurationTimestreamConfigurationDimensionMappingArgs
                    {
                        DimensionValueType = "VARCHAR",
                        Name = "az",
                    },
                    new Aws.TimestreamQuery.Inputs.ScheduledQueryTargetConfigurationTimestreamConfigurationDimensionMappingArgs
                    {
                        DimensionValueType = "VARCHAR",
                        Name = "region",
                    },
                    new Aws.TimestreamQuery.Inputs.ScheduledQueryTargetConfigurationTimestreamConfigurationDimensionMappingArgs
                    {
                        DimensionValueType = "VARCHAR",
                        Name = "hostname",
                    },
                },
                MultiMeasureMappings = new Aws.TimestreamQuery.Inputs.ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsArgs
                {
                    TargetMultiMeasureName = "multi-metrics",
                    MultiMeasureAttributeMappings = new[]
                    {
                        new Aws.TimestreamQuery.Inputs.ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsMultiMeasureAttributeMappingArgs
                        {
                            MeasureValueType = "DOUBLE",
                            SourceColumn = "avg_cpu_utilization",
                        },
                        new Aws.TimestreamQuery.Inputs.ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsMultiMeasureAttributeMappingArgs
                        {
                            MeasureValueType = "DOUBLE",
                            SourceColumn = "p90_cpu_utilization",
                        },
                        new Aws.TimestreamQuery.Inputs.ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsMultiMeasureAttributeMappingArgs
                        {
                            MeasureValueType = "DOUBLE",
                            SourceColumn = "p95_cpu_utilization",
                        },
                        new Aws.TimestreamQuery.Inputs.ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsMultiMeasureAttributeMappingArgs
                        {
                            MeasureValueType = "DOUBLE",
                            SourceColumn = "p99_cpu_utilization",
                        },
                    },
                },
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.timestreamquery.ScheduledQuery;
import com.pulumi.aws.timestreamquery.ScheduledQueryArgs;
import com.pulumi.aws.timestreamquery.inputs.ScheduledQueryErrorReportConfigurationArgs;
import com.pulumi.aws.timestreamquery.inputs.ScheduledQueryErrorReportConfigurationS3ConfigurationArgs;
import com.pulumi.aws.timestreamquery.inputs.ScheduledQueryNotificationConfigurationArgs;
import com.pulumi.aws.timestreamquery.inputs.ScheduledQueryNotificationConfigurationSnsConfigurationArgs;
import com.pulumi.aws.timestreamquery.inputs.ScheduledQueryScheduleConfigurationArgs;
import com.pulumi.aws.timestreamquery.inputs.ScheduledQueryTargetConfigurationArgs;
import com.pulumi.aws.timestreamquery.inputs.ScheduledQueryTargetConfigurationTimestreamConfigurationArgs;
import com.pulumi.aws.timestreamquery.inputs.ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new ScheduledQuery("example", ScheduledQueryArgs.builder()
            .executionRoleArn(exampleAwsIamRole.arn())
            .name(exampleAwsTimestreamwriteTable.tableName())
            .queryString("""
SELECT region, az, hostname, BIN(time, 15s) AS binned_timestamp,
	ROUND(AVG(cpu_utilization), 2) AS avg_cpu_utilization,
	ROUND(APPROX_PERCENTILE(cpu_utilization, 0.9), 2) AS p90_cpu_utilization,
	ROUND(APPROX_PERCENTILE(cpu_utilization, 0.95), 2) AS p95_cpu_utilization,
	ROUND(APPROX_PERCENTILE(cpu_utilization, 0.99), 2) AS p99_cpu_utilization
FROM exampledatabase.exampletable
WHERE measure_name = 'metrics' AND time > ago(2h)
GROUP BY region, hostname, az, BIN(time, 15s)
ORDER BY binned_timestamp ASC
LIMIT 5
            """)
            .errorReportConfiguration(ScheduledQueryErrorReportConfigurationArgs.builder()
                .s3Configuration(ScheduledQueryErrorReportConfigurationS3ConfigurationArgs.builder()
                    .bucketName(exampleAwsS3Bucket.bucket())
                    .build())
                .build())
            .notificationConfiguration(ScheduledQueryNotificationConfigurationArgs.builder()
                .snsConfiguration(ScheduledQueryNotificationConfigurationSnsConfigurationArgs.builder()
                    .topicArn(exampleAwsSnsTopic.arn())
                    .build())
                .build())
            .scheduleConfiguration(ScheduledQueryScheduleConfigurationArgs.builder()
                .scheduleExpression("rate(1 hour)")
                .build())
            .targetConfiguration(ScheduledQueryTargetConfigurationArgs.builder()
                .timestreamConfiguration(ScheduledQueryTargetConfigurationTimestreamConfigurationArgs.builder()
                    .databaseName(results.databaseName())
                    .tableName(resultsAwsTimestreamwriteTable.tableName())
                    .timeColumn("binned_timestamp")
                    .dimensionMappings(                    
                        ScheduledQueryTargetConfigurationTimestreamConfigurationDimensionMappingArgs.builder()
                            .dimensionValueType("VARCHAR")
                            .name("az")
                            .build(),
                        ScheduledQueryTargetConfigurationTimestreamConfigurationDimensionMappingArgs.builder()
                            .dimensionValueType("VARCHAR")
                            .name("region")
                            .build(),
                        ScheduledQueryTargetConfigurationTimestreamConfigurationDimensionMappingArgs.builder()
                            .dimensionValueType("VARCHAR")
                            .name("hostname")
                            .build())
                    .multiMeasureMappings(ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsArgs.builder()
                        .targetMultiMeasureName("multi-metrics")
                        .multiMeasureAttributeMappings(                        
                            ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsMultiMeasureAttributeMappingArgs.builder()
                                .measureValueType("DOUBLE")
                                .sourceColumn("avg_cpu_utilization")
                                .build(),
                            ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsMultiMeasureAttributeMappingArgs.builder()
                                .measureValueType("DOUBLE")
                                .sourceColumn("p90_cpu_utilization")
                                .build(),
                            ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsMultiMeasureAttributeMappingArgs.builder()
                                .measureValueType("DOUBLE")
                                .sourceColumn("p95_cpu_utilization")
                                .build(),
                            ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsMultiMeasureAttributeMappingArgs.builder()
                                .measureValueType("DOUBLE")
                                .sourceColumn("p99_cpu_utilization")
                                .build())
                        .build())
                    .build())
                .build())
            .build());

    }
}
Copy
resources:
  example:
    type: aws:timestreamquery:ScheduledQuery
    properties:
      executionRoleArn: ${exampleAwsIamRole.arn}
      name: ${exampleAwsTimestreamwriteTable.tableName}
      queryString: |
        SELECT region, az, hostname, BIN(time, 15s) AS binned_timestamp,
        	ROUND(AVG(cpu_utilization), 2) AS avg_cpu_utilization,
        	ROUND(APPROX_PERCENTILE(cpu_utilization, 0.9), 2) AS p90_cpu_utilization,
        	ROUND(APPROX_PERCENTILE(cpu_utilization, 0.95), 2) AS p95_cpu_utilization,
        	ROUND(APPROX_PERCENTILE(cpu_utilization, 0.99), 2) AS p99_cpu_utilization
        FROM exampledatabase.exampletable
        WHERE measure_name = 'metrics' AND time > ago(2h)
        GROUP BY region, hostname, az, BIN(time, 15s)
        ORDER BY binned_timestamp ASC
        LIMIT 5        
      errorReportConfiguration:
        s3Configuration:
          bucketName: ${exampleAwsS3Bucket.bucket}
      notificationConfiguration:
        snsConfiguration:
          topicArn: ${exampleAwsSnsTopic.arn}
      scheduleConfiguration:
        scheduleExpression: rate(1 hour)
      targetConfiguration:
        timestreamConfiguration:
          databaseName: ${results.databaseName}
          tableName: ${resultsAwsTimestreamwriteTable.tableName}
          timeColumn: binned_timestamp
          dimensionMappings:
            - dimensionValueType: VARCHAR
              name: az
            - dimensionValueType: VARCHAR
              name: region
            - dimensionValueType: VARCHAR
              name: hostname
          multiMeasureMappings:
            targetMultiMeasureName: multi-metrics
            multiMeasureAttributeMappings:
              - measureValueType: DOUBLE
                sourceColumn: avg_cpu_utilization
              - measureValueType: DOUBLE
                sourceColumn: p90_cpu_utilization
              - measureValueType: DOUBLE
                sourceColumn: p95_cpu_utilization
              - measureValueType: DOUBLE
                sourceColumn: p99_cpu_utilization
Copy

Multi-step Example

To ingest data before creating a scheduled query, this example provides multiple steps:

  1. Create the prerequisite infrastructure
  2. Ingest data
  3. Create the scheduled query

Step 1. Create the prerequisite infrastructure

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const test = new aws.s3.BucketV2("test", {
    bucket: "example",
    forceDestroy: true,
});
const testTopic = new aws.sns.Topic("test", {name: "example"});
const testQueue = new aws.sqs.Queue("test", {
    name: "example",
    sqsManagedSseEnabled: true,
});
const testTopicSubscription = new aws.sns.TopicSubscription("test", {
    topic: testTopic.arn,
    protocol: "sqs",
    endpoint: testQueue.arn,
});
const testQueuePolicy = new aws.sqs.QueuePolicy("test", {
    queueUrl: testQueue.id,
    policy: pulumi.jsonStringify({
        Version: "2012-10-17",
        Statement: [{
            Effect: "Allow",
            Principal: {
                AWS: "*",
            },
            Action: ["sqs:SendMessage"],
            Resource: testQueue.arn,
            Condition: {
                ArnEquals: {
                    "aws:SourceArn": testTopic.arn,
                },
            },
        }],
    }),
});
const testRole = new aws.iam.Role("test", {
    name: "example",
    assumeRolePolicy: JSON.stringify({
        Version: "2012-10-17",
        Statement: [{
            Effect: "Allow",
            Principal: {
                Service: "timestream.amazonaws.com",
            },
            Action: "sts:AssumeRole",
        }],
    }),
    tags: {
        Name: "example",
    },
});
const testRolePolicy = new aws.iam.RolePolicy("test", {
    name: "example",
    role: testRole.id,
    policy: JSON.stringify({
        Version: "2012-10-17",
        Statement: [{
            Action: [
                "kms:Decrypt",
                "sns:Publish",
                "timestream:describeEndpoints",
                "timestream:Select",
                "timestream:SelectValues",
                "timestream:WriteRecords",
                "s3:PutObject",
            ],
            Resource: "*",
            Effect: "Allow",
        }],
    }),
});
const testDatabase = new aws.timestreamwrite.Database("test", {databaseName: "exampledatabase"});
const testTable = new aws.timestreamwrite.Table("test", {
    databaseName: testDatabase.databaseName,
    tableName: "exampletable",
    magneticStoreWriteProperties: {
        enableMagneticStoreWrites: true,
    },
    retentionProperties: {
        magneticStoreRetentionPeriodInDays: 1,
        memoryStoreRetentionPeriodInHours: 1,
    },
});
const results = new aws.timestreamwrite.Database("results", {databaseName: "exampledatabase-results"});
const resultsTable = new aws.timestreamwrite.Table("results", {
    databaseName: results.databaseName,
    tableName: "exampletable-results",
    magneticStoreWriteProperties: {
        enableMagneticStoreWrites: true,
    },
    retentionProperties: {
        magneticStoreRetentionPeriodInDays: 1,
        memoryStoreRetentionPeriodInHours: 1,
    },
});
Copy
import pulumi
import json
import pulumi_aws as aws

test = aws.s3.BucketV2("test",
    bucket="example",
    force_destroy=True)
test_topic = aws.sns.Topic("test", name="example")
test_queue = aws.sqs.Queue("test",
    name="example",
    sqs_managed_sse_enabled=True)
test_topic_subscription = aws.sns.TopicSubscription("test",
    topic=test_topic.arn,
    protocol="sqs",
    endpoint=test_queue.arn)
test_queue_policy = aws.sqs.QueuePolicy("test",
    queue_url=test_queue.id,
    policy=pulumi.Output.json_dumps({
        "Version": "2012-10-17",
        "Statement": [{
            "Effect": "Allow",
            "Principal": {
                "AWS": "*",
            },
            "Action": ["sqs:SendMessage"],
            "Resource": test_queue.arn,
            "Condition": {
                "ArnEquals": {
                    "aws:SourceArn": test_topic.arn,
                },
            },
        }],
    }))
test_role = aws.iam.Role("test",
    name="example",
    assume_role_policy=json.dumps({
        "Version": "2012-10-17",
        "Statement": [{
            "Effect": "Allow",
            "Principal": {
                "Service": "timestream.amazonaws.com",
            },
            "Action": "sts:AssumeRole",
        }],
    }),
    tags={
        "Name": "example",
    })
test_role_policy = aws.iam.RolePolicy("test",
    name="example",
    role=test_role.id,
    policy=json.dumps({
        "Version": "2012-10-17",
        "Statement": [{
            "Action": [
                "kms:Decrypt",
                "sns:Publish",
                "timestream:describeEndpoints",
                "timestream:Select",
                "timestream:SelectValues",
                "timestream:WriteRecords",
                "s3:PutObject",
            ],
            "Resource": "*",
            "Effect": "Allow",
        }],
    }))
test_database = aws.timestreamwrite.Database("test", database_name="exampledatabase")
test_table = aws.timestreamwrite.Table("test",
    database_name=test_database.database_name,
    table_name="exampletable",
    magnetic_store_write_properties={
        "enable_magnetic_store_writes": True,
    },
    retention_properties={
        "magnetic_store_retention_period_in_days": 1,
        "memory_store_retention_period_in_hours": 1,
    })
results = aws.timestreamwrite.Database("results", database_name="exampledatabase-results")
results_table = aws.timestreamwrite.Table("results",
    database_name=results.database_name,
    table_name="exampletable-results",
    magnetic_store_write_properties={
        "enable_magnetic_store_writes": True,
    },
    retention_properties={
        "magnetic_store_retention_period_in_days": 1,
        "memory_store_retention_period_in_hours": 1,
    })
Copy
package main

import (
	"encoding/json"

	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3"
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/sns"
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/sqs"
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/timestreamwrite"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := s3.NewBucketV2(ctx, "test", &s3.BucketV2Args{
			Bucket:       pulumi.String("example"),
			ForceDestroy: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		testTopic, err := sns.NewTopic(ctx, "test", &sns.TopicArgs{
			Name: pulumi.String("example"),
		})
		if err != nil {
			return err
		}
		testQueue, err := sqs.NewQueue(ctx, "test", &sqs.QueueArgs{
			Name:                 pulumi.String("example"),
			SqsManagedSseEnabled: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		_, err = sns.NewTopicSubscription(ctx, "test", &sns.TopicSubscriptionArgs{
			Topic:    testTopic.Arn,
			Protocol: pulumi.String("sqs"),
			Endpoint: testQueue.Arn,
		})
		if err != nil {
			return err
		}
		_, err = sqs.NewQueuePolicy(ctx, "test", &sqs.QueuePolicyArgs{
			QueueUrl: testQueue.ID(),
			Policy: pulumi.All(testQueue.Arn, testTopic.Arn).ApplyT(func(_args []interface{}) (string, error) {
				testQueueArn := _args[0].(string)
				testTopicArn := _args[1].(string)
				var _zero string
				tmpJSON0, err := json.Marshal(map[string]interface{}{
					"Version": "2012-10-17",
					"Statement": []map[string]interface{}{
						map[string]interface{}{
							"Effect": "Allow",
							"Principal": map[string]interface{}{
								"AWS": "*",
							},
							"Action": []string{
								"sqs:SendMessage",
							},
							"Resource": testQueueArn,
							"Condition": map[string]interface{}{
								"ArnEquals": map[string]interface{}{
									"aws:SourceArn": testTopicArn,
								},
							},
						},
					},
				})
				if err != nil {
					return _zero, err
				}
				json0 := string(tmpJSON0)
				return json0, nil
			}).(pulumi.StringOutput),
		})
		if err != nil {
			return err
		}
		tmpJSON1, err := json.Marshal(map[string]interface{}{
			"Version": "2012-10-17",
			"Statement": []map[string]interface{}{
				map[string]interface{}{
					"Effect": "Allow",
					"Principal": map[string]interface{}{
						"Service": "timestream.amazonaws.com",
					},
					"Action": "sts:AssumeRole",
				},
			},
		})
		if err != nil {
			return err
		}
		json1 := string(tmpJSON1)
		testRole, err := iam.NewRole(ctx, "test", &iam.RoleArgs{
			Name:             pulumi.String("example"),
			AssumeRolePolicy: pulumi.String(json1),
			Tags: pulumi.StringMap{
				"Name": pulumi.String("example"),
			},
		})
		if err != nil {
			return err
		}
		tmpJSON2, err := json.Marshal(map[string]interface{}{
			"Version": "2012-10-17",
			"Statement": []map[string]interface{}{
				map[string]interface{}{
					"Action": []string{
						"kms:Decrypt",
						"sns:Publish",
						"timestream:describeEndpoints",
						"timestream:Select",
						"timestream:SelectValues",
						"timestream:WriteRecords",
						"s3:PutObject",
					},
					"Resource": "*",
					"Effect":   "Allow",
				},
			},
		})
		if err != nil {
			return err
		}
		json2 := string(tmpJSON2)
		_, err = iam.NewRolePolicy(ctx, "test", &iam.RolePolicyArgs{
			Name:   pulumi.String("example"),
			Role:   testRole.ID(),
			Policy: pulumi.String(json2),
		})
		if err != nil {
			return err
		}
		testDatabase, err := timestreamwrite.NewDatabase(ctx, "test", &timestreamwrite.DatabaseArgs{
			DatabaseName: pulumi.String("exampledatabase"),
		})
		if err != nil {
			return err
		}
		_, err = timestreamwrite.NewTable(ctx, "test", &timestreamwrite.TableArgs{
			DatabaseName: testDatabase.DatabaseName,
			TableName:    pulumi.String("exampletable"),
			MagneticStoreWriteProperties: &timestreamwrite.TableMagneticStoreWritePropertiesArgs{
				EnableMagneticStoreWrites: pulumi.Bool(true),
			},
			RetentionProperties: &timestreamwrite.TableRetentionPropertiesArgs{
				MagneticStoreRetentionPeriodInDays: pulumi.Int(1),
				MemoryStoreRetentionPeriodInHours:  pulumi.Int(1),
			},
		})
		if err != nil {
			return err
		}
		results, err := timestreamwrite.NewDatabase(ctx, "results", &timestreamwrite.DatabaseArgs{
			DatabaseName: pulumi.String("exampledatabase-results"),
		})
		if err != nil {
			return err
		}
		_, err = timestreamwrite.NewTable(ctx, "results", &timestreamwrite.TableArgs{
			DatabaseName: results.DatabaseName,
			TableName:    pulumi.String("exampletable-results"),
			MagneticStoreWriteProperties: &timestreamwrite.TableMagneticStoreWritePropertiesArgs{
				EnableMagneticStoreWrites: pulumi.Bool(true),
			},
			RetentionProperties: &timestreamwrite.TableRetentionPropertiesArgs{
				MagneticStoreRetentionPeriodInDays: pulumi.Int(1),
				MemoryStoreRetentionPeriodInHours:  pulumi.Int(1),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var test = new Aws.S3.BucketV2("test", new()
    {
        Bucket = "example",
        ForceDestroy = true,
    });

    var testTopic = new Aws.Sns.Topic("test", new()
    {
        Name = "example",
    });

    var testQueue = new Aws.Sqs.Queue("test", new()
    {
        Name = "example",
        SqsManagedSseEnabled = true,
    });

    var testTopicSubscription = new Aws.Sns.TopicSubscription("test", new()
    {
        Topic = testTopic.Arn,
        Protocol = "sqs",
        Endpoint = testQueue.Arn,
    });

    var testQueuePolicy = new Aws.Sqs.QueuePolicy("test", new()
    {
        QueueUrl = testQueue.Id,
        Policy = Output.JsonSerialize(Output.Create(new Dictionary<string, object?>
        {
            ["Version"] = "2012-10-17",
            ["Statement"] = new[]
            {
                new Dictionary<string, object?>
                {
                    ["Effect"] = "Allow",
                    ["Principal"] = new Dictionary<string, object?>
                    {
                        ["AWS"] = "*",
                    },
                    ["Action"] = new[]
                    {
                        "sqs:SendMessage",
                    },
                    ["Resource"] = testQueue.Arn,
                    ["Condition"] = new Dictionary<string, object?>
                    {
                        ["ArnEquals"] = new Dictionary<string, object?>
                        {
                            ["aws:SourceArn"] = testTopic.Arn,
                        },
                    },
                },
            },
        })),
    });

    var testRole = new Aws.Iam.Role("test", new()
    {
        Name = "example",
        AssumeRolePolicy = JsonSerializer.Serialize(new Dictionary<string, object?>
        {
            ["Version"] = "2012-10-17",
            ["Statement"] = new[]
            {
                new Dictionary<string, object?>
                {
                    ["Effect"] = "Allow",
                    ["Principal"] = new Dictionary<string, object?>
                    {
                        ["Service"] = "timestream.amazonaws.com",
                    },
                    ["Action"] = "sts:AssumeRole",
                },
            },
        }),
        Tags = 
        {
            { "Name", "example" },
        },
    });

    var testRolePolicy = new Aws.Iam.RolePolicy("test", new()
    {
        Name = "example",
        Role = testRole.Id,
        Policy = JsonSerializer.Serialize(new Dictionary<string, object?>
        {
            ["Version"] = "2012-10-17",
            ["Statement"] = new[]
            {
                new Dictionary<string, object?>
                {
                    ["Action"] = new[]
                    {
                        "kms:Decrypt",
                        "sns:Publish",
                        "timestream:describeEndpoints",
                        "timestream:Select",
                        "timestream:SelectValues",
                        "timestream:WriteRecords",
                        "s3:PutObject",
                    },
                    ["Resource"] = "*",
                    ["Effect"] = "Allow",
                },
            },
        }),
    });

    var testDatabase = new Aws.TimestreamWrite.Database("test", new()
    {
        DatabaseName = "exampledatabase",
    });

    var testTable = new Aws.TimestreamWrite.Table("test", new()
    {
        DatabaseName = testDatabase.DatabaseName,
        TableName = "exampletable",
        MagneticStoreWriteProperties = new Aws.TimestreamWrite.Inputs.TableMagneticStoreWritePropertiesArgs
        {
            EnableMagneticStoreWrites = true,
        },
        RetentionProperties = new Aws.TimestreamWrite.Inputs.TableRetentionPropertiesArgs
        {
            MagneticStoreRetentionPeriodInDays = 1,
            MemoryStoreRetentionPeriodInHours = 1,
        },
    });

    var results = new Aws.TimestreamWrite.Database("results", new()
    {
        DatabaseName = "exampledatabase-results",
    });

    var resultsTable = new Aws.TimestreamWrite.Table("results", new()
    {
        DatabaseName = results.DatabaseName,
        TableName = "exampletable-results",
        MagneticStoreWriteProperties = new Aws.TimestreamWrite.Inputs.TableMagneticStoreWritePropertiesArgs
        {
            EnableMagneticStoreWrites = true,
        },
        RetentionProperties = new Aws.TimestreamWrite.Inputs.TableRetentionPropertiesArgs
        {
            MagneticStoreRetentionPeriodInDays = 1,
            MemoryStoreRetentionPeriodInHours = 1,
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.s3.BucketV2;
import com.pulumi.aws.s3.BucketV2Args;
import com.pulumi.aws.sns.Topic;
import com.pulumi.aws.sns.TopicArgs;
import com.pulumi.aws.sqs.Queue;
import com.pulumi.aws.sqs.QueueArgs;
import com.pulumi.aws.sns.TopicSubscription;
import com.pulumi.aws.sns.TopicSubscriptionArgs;
import com.pulumi.aws.sqs.QueuePolicy;
import com.pulumi.aws.sqs.QueuePolicyArgs;
import com.pulumi.aws.iam.Role;
import com.pulumi.aws.iam.RoleArgs;
import com.pulumi.aws.iam.RolePolicy;
import com.pulumi.aws.iam.RolePolicyArgs;
import com.pulumi.aws.timestreamwrite.Database;
import com.pulumi.aws.timestreamwrite.DatabaseArgs;
import com.pulumi.aws.timestreamwrite.Table;
import com.pulumi.aws.timestreamwrite.TableArgs;
import com.pulumi.aws.timestreamwrite.inputs.TableMagneticStoreWritePropertiesArgs;
import com.pulumi.aws.timestreamwrite.inputs.TableRetentionPropertiesArgs;
import static com.pulumi.codegen.internal.Serialization.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var test = new BucketV2("test", BucketV2Args.builder()
            .bucket("example")
            .forceDestroy(true)
            .build());

        var testTopic = new Topic("testTopic", TopicArgs.builder()
            .name("example")
            .build());

        var testQueue = new Queue("testQueue", QueueArgs.builder()
            .name("example")
            .sqsManagedSseEnabled(true)
            .build());

        var testTopicSubscription = new TopicSubscription("testTopicSubscription", TopicSubscriptionArgs.builder()
            .topic(testTopic.arn())
            .protocol("sqs")
            .endpoint(testQueue.arn())
            .build());

        var testQueuePolicy = new QueuePolicy("testQueuePolicy", QueuePolicyArgs.builder()
            .queueUrl(testQueue.id())
            .policy(Output.tuple(testQueue.arn(), testTopic.arn()).applyValue(values -> {
                var testQueueArn = values.t1;
                var testTopicArn = values.t2;
                return serializeJson(
                    jsonObject(
                        jsonProperty("Version", "2012-10-17"),
                        jsonProperty("Statement", jsonArray(jsonObject(
                            jsonProperty("Effect", "Allow"),
                            jsonProperty("Principal", jsonObject(
                                jsonProperty("AWS", "*")
                            )),
                            jsonProperty("Action", jsonArray("sqs:SendMessage")),
                            jsonProperty("Resource", testQueueArn),
                            jsonProperty("Condition", jsonObject(
                                jsonProperty("ArnEquals", jsonObject(
                                    jsonProperty("aws:SourceArn", testTopicArn)
                                ))
                            ))
                        )))
                    ));
            }))
            .build());

        var testRole = new Role("testRole", RoleArgs.builder()
            .name("example")
            .assumeRolePolicy(serializeJson(
                jsonObject(
                    jsonProperty("Version", "2012-10-17"),
                    jsonProperty("Statement", jsonArray(jsonObject(
                        jsonProperty("Effect", "Allow"),
                        jsonProperty("Principal", jsonObject(
                            jsonProperty("Service", "timestream.amazonaws.com")
                        )),
                        jsonProperty("Action", "sts:AssumeRole")
                    )))
                )))
            .tags(Map.of("Name", "example"))
            .build());

        var testRolePolicy = new RolePolicy("testRolePolicy", RolePolicyArgs.builder()
            .name("example")
            .role(testRole.id())
            .policy(serializeJson(
                jsonObject(
                    jsonProperty("Version", "2012-10-17"),
                    jsonProperty("Statement", jsonArray(jsonObject(
                        jsonProperty("Action", jsonArray(
                            "kms:Decrypt", 
                            "sns:Publish", 
                            "timestream:describeEndpoints", 
                            "timestream:Select", 
                            "timestream:SelectValues", 
                            "timestream:WriteRecords", 
                            "s3:PutObject"
                        )),
                        jsonProperty("Resource", "*"),
                        jsonProperty("Effect", "Allow")
                    )))
                )))
            .build());

        var testDatabase = new Database("testDatabase", DatabaseArgs.builder()
            .databaseName("exampledatabase")
            .build());

        var testTable = new Table("testTable", TableArgs.builder()
            .databaseName(testDatabase.databaseName())
            .tableName("exampletable")
            .magneticStoreWriteProperties(TableMagneticStoreWritePropertiesArgs.builder()
                .enableMagneticStoreWrites(true)
                .build())
            .retentionProperties(TableRetentionPropertiesArgs.builder()
                .magneticStoreRetentionPeriodInDays(1)
                .memoryStoreRetentionPeriodInHours(1)
                .build())
            .build());

        var results = new Database("results", DatabaseArgs.builder()
            .databaseName("exampledatabase-results")
            .build());

        var resultsTable = new Table("resultsTable", TableArgs.builder()
            .databaseName(results.databaseName())
            .tableName("exampletable-results")
            .magneticStoreWriteProperties(TableMagneticStoreWritePropertiesArgs.builder()
                .enableMagneticStoreWrites(true)
                .build())
            .retentionProperties(TableRetentionPropertiesArgs.builder()
                .magneticStoreRetentionPeriodInDays(1)
                .memoryStoreRetentionPeriodInHours(1)
                .build())
            .build());

    }
}
Copy
resources:
  test:
    type: aws:s3:BucketV2
    properties:
      bucket: example
      forceDestroy: true
  testTopic:
    type: aws:sns:Topic
    name: test
    properties:
      name: example
  testQueue:
    type: aws:sqs:Queue
    name: test
    properties:
      name: example
      sqsManagedSseEnabled: true
  testTopicSubscription:
    type: aws:sns:TopicSubscription
    name: test
    properties:
      topic: ${testTopic.arn}
      protocol: sqs
      endpoint: ${testQueue.arn}
  testQueuePolicy:
    type: aws:sqs:QueuePolicy
    name: test
    properties:
      queueUrl: ${testQueue.id}
      policy:
        fn::toJSON:
          Version: 2012-10-17
          Statement:
            - Effect: Allow
              Principal:
                AWS: '*'
              Action:
                - sqs:SendMessage
              Resource: ${testQueue.arn}
              Condition:
                ArnEquals:
                  aws:SourceArn: ${testTopic.arn}
  testRole:
    type: aws:iam:Role
    name: test
    properties:
      name: example
      assumeRolePolicy:
        fn::toJSON:
          Version: 2012-10-17
          Statement:
            - Effect: Allow
              Principal:
                Service: timestream.amazonaws.com
              Action: sts:AssumeRole
      tags:
        Name: example
  testRolePolicy:
    type: aws:iam:RolePolicy
    name: test
    properties:
      name: example
      role: ${testRole.id}
      policy:
        fn::toJSON:
          Version: 2012-10-17
          Statement:
            - Action:
                - kms:Decrypt
                - sns:Publish
                - timestream:describeEndpoints
                - timestream:Select
                - timestream:SelectValues
                - timestream:WriteRecords
                - s3:PutObject
              Resource: '*'
              Effect: Allow
  testDatabase:
    type: aws:timestreamwrite:Database
    name: test
    properties:
      databaseName: exampledatabase
  testTable:
    type: aws:timestreamwrite:Table
    name: test
    properties:
      databaseName: ${testDatabase.databaseName}
      tableName: exampletable
      magneticStoreWriteProperties:
        enableMagneticStoreWrites: true
      retentionProperties:
        magneticStoreRetentionPeriodInDays: 1
        memoryStoreRetentionPeriodInHours: 1
  results:
    type: aws:timestreamwrite:Database
    properties:
      databaseName: exampledatabase-results
  resultsTable:
    type: aws:timestreamwrite:Table
    name: results
    properties:
      databaseName: ${results.databaseName}
      tableName: exampletable-results
      magneticStoreWriteProperties:
        enableMagneticStoreWrites: true
      retentionProperties:
        magneticStoreRetentionPeriodInDays: 1
        memoryStoreRetentionPeriodInHours: 1
Copy

Step 2. Ingest data

This is done with Amazon Timestream Write WriteRecords.

Step 3. Create the scheduled query

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.timestreamquery.ScheduledQuery("example", {
    executionRoleArn: exampleAwsIamRole.arn,
    name: exampleAwsTimestreamwriteTable.tableName,
    queryString: `SELECT region, az, hostname, BIN(time, 15s) AS binned_timestamp,
\x09ROUND(AVG(cpu_utilization), 2) AS avg_cpu_utilization,
\x09ROUND(APPROX_PERCENTILE(cpu_utilization, 0.9), 2) AS p90_cpu_utilization,
\x09ROUND(APPROX_PERCENTILE(cpu_utilization, 0.95), 2) AS p95_cpu_utilization,
\x09ROUND(APPROX_PERCENTILE(cpu_utilization, 0.99), 2) AS p99_cpu_utilization
FROM exampledatabase.exampletable
WHERE measure_name = 'metrics' AND time > ago(2h)
GROUP BY region, hostname, az, BIN(time, 15s)
ORDER BY binned_timestamp ASC
LIMIT 5
`,
    errorReportConfiguration: {
        s3Configuration: {
            bucketName: exampleAwsS3Bucket.bucket,
        },
    },
    notificationConfiguration: {
        snsConfiguration: {
            topicArn: exampleAwsSnsTopic.arn,
        },
    },
    scheduleConfiguration: {
        scheduleExpression: "rate(1 hour)",
    },
    targetConfiguration: {
        timestreamConfiguration: {
            databaseName: results.databaseName,
            tableName: resultsAwsTimestreamwriteTable.tableName,
            timeColumn: "binned_timestamp",
            dimensionMappings: [
                {
                    dimensionValueType: "VARCHAR",
                    name: "az",
                },
                {
                    dimensionValueType: "VARCHAR",
                    name: "region",
                },
                {
                    dimensionValueType: "VARCHAR",
                    name: "hostname",
                },
            ],
            multiMeasureMappings: {
                targetMultiMeasureName: "multi-metrics",
                multiMeasureAttributeMappings: [
                    {
                        measureValueType: "DOUBLE",
                        sourceColumn: "avg_cpu_utilization",
                    },
                    {
                        measureValueType: "DOUBLE",
                        sourceColumn: "p90_cpu_utilization",
                    },
                    {
                        measureValueType: "DOUBLE",
                        sourceColumn: "p95_cpu_utilization",
                    },
                    {
                        measureValueType: "DOUBLE",
                        sourceColumn: "p99_cpu_utilization",
                    },
                ],
            },
        },
    },
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.timestreamquery.ScheduledQuery("example",
    execution_role_arn=example_aws_iam_role["arn"],
    name=example_aws_timestreamwrite_table["tableName"],
    query_string="""SELECT region, az, hostname, BIN(time, 15s) AS binned_timestamp,
\x09ROUND(AVG(cpu_utilization), 2) AS avg_cpu_utilization,
\x09ROUND(APPROX_PERCENTILE(cpu_utilization, 0.9), 2) AS p90_cpu_utilization,
\x09ROUND(APPROX_PERCENTILE(cpu_utilization, 0.95), 2) AS p95_cpu_utilization,
\x09ROUND(APPROX_PERCENTILE(cpu_utilization, 0.99), 2) AS p99_cpu_utilization
FROM exampledatabase.exampletable
WHERE measure_name = 'metrics' AND time > ago(2h)
GROUP BY region, hostname, az, BIN(time, 15s)
ORDER BY binned_timestamp ASC
LIMIT 5
""",
    error_report_configuration={
        "s3_configuration": {
            "bucket_name": example_aws_s3_bucket["bucket"],
        },
    },
    notification_configuration={
        "sns_configuration": {
            "topic_arn": example_aws_sns_topic["arn"],
        },
    },
    schedule_configuration={
        "schedule_expression": "rate(1 hour)",
    },
    target_configuration={
        "timestream_configuration": {
            "database_name": results["databaseName"],
            "table_name": results_aws_timestreamwrite_table["tableName"],
            "time_column": "binned_timestamp",
            "dimension_mappings": [
                {
                    "dimension_value_type": "VARCHAR",
                    "name": "az",
                },
                {
                    "dimension_value_type": "VARCHAR",
                    "name": "region",
                },
                {
                    "dimension_value_type": "VARCHAR",
                    "name": "hostname",
                },
            ],
            "multi_measure_mappings": {
                "target_multi_measure_name": "multi-metrics",
                "multi_measure_attribute_mappings": [
                    {
                        "measure_value_type": "DOUBLE",
                        "source_column": "avg_cpu_utilization",
                    },
                    {
                        "measure_value_type": "DOUBLE",
                        "source_column": "p90_cpu_utilization",
                    },
                    {
                        "measure_value_type": "DOUBLE",
                        "source_column": "p95_cpu_utilization",
                    },
                    {
                        "measure_value_type": "DOUBLE",
                        "source_column": "p99_cpu_utilization",
                    },
                ],
            },
        },
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/timestreamquery"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := timestreamquery.NewScheduledQuery(ctx, "example", &timestreamquery.ScheduledQueryArgs{
			ExecutionRoleArn: pulumi.Any(exampleAwsIamRole.Arn),
			Name:             pulumi.Any(exampleAwsTimestreamwriteTable.TableName),
			QueryString: pulumi.String(`SELECT region, az, hostname, BIN(time, 15s) AS binned_timestamp,
	ROUND(AVG(cpu_utilization), 2) AS avg_cpu_utilization,
	ROUND(APPROX_PERCENTILE(cpu_utilization, 0.9), 2) AS p90_cpu_utilization,
	ROUND(APPROX_PERCENTILE(cpu_utilization, 0.95), 2) AS p95_cpu_utilization,
	ROUND(APPROX_PERCENTILE(cpu_utilization, 0.99), 2) AS p99_cpu_utilization
FROM exampledatabase.exampletable
WHERE measure_name = 'metrics' AND time > ago(2h)
GROUP BY region, hostname, az, BIN(time, 15s)
ORDER BY binned_timestamp ASC
LIMIT 5
`),
			ErrorReportConfiguration: &timestreamquery.ScheduledQueryErrorReportConfigurationArgs{
				S3Configuration: &timestreamquery.ScheduledQueryErrorReportConfigurationS3ConfigurationArgs{
					BucketName: pulumi.Any(exampleAwsS3Bucket.Bucket),
				},
			},
			NotificationConfiguration: &timestreamquery.ScheduledQueryNotificationConfigurationArgs{
				SnsConfiguration: &timestreamquery.ScheduledQueryNotificationConfigurationSnsConfigurationArgs{
					TopicArn: pulumi.Any(exampleAwsSnsTopic.Arn),
				},
			},
			ScheduleConfiguration: &timestreamquery.ScheduledQueryScheduleConfigurationArgs{
				ScheduleExpression: pulumi.String("rate(1 hour)"),
			},
			TargetConfiguration: &timestreamquery.ScheduledQueryTargetConfigurationArgs{
				TimestreamConfiguration: &timestreamquery.ScheduledQueryTargetConfigurationTimestreamConfigurationArgs{
					DatabaseName: pulumi.Any(results.DatabaseName),
					TableName:    pulumi.Any(resultsAwsTimestreamwriteTable.TableName),
					TimeColumn:   pulumi.String("binned_timestamp"),
					DimensionMappings: timestreamquery.ScheduledQueryTargetConfigurationTimestreamConfigurationDimensionMappingArray{
						&timestreamquery.ScheduledQueryTargetConfigurationTimestreamConfigurationDimensionMappingArgs{
							DimensionValueType: pulumi.String("VARCHAR"),
							Name:               pulumi.String("az"),
						},
						&timestreamquery.ScheduledQueryTargetConfigurationTimestreamConfigurationDimensionMappingArgs{
							DimensionValueType: pulumi.String("VARCHAR"),
							Name:               pulumi.String("region"),
						},
						&timestreamquery.ScheduledQueryTargetConfigurationTimestreamConfigurationDimensionMappingArgs{
							DimensionValueType: pulumi.String("VARCHAR"),
							Name:               pulumi.String("hostname"),
						},
					},
					MultiMeasureMappings: &timestreamquery.ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsArgs{
						TargetMultiMeasureName: pulumi.String("multi-metrics"),
						MultiMeasureAttributeMappings: timestreamquery.ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsMultiMeasureAttributeMappingArray{
							&timestreamquery.ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsMultiMeasureAttributeMappingArgs{
								MeasureValueType: pulumi.String("DOUBLE"),
								SourceColumn:     pulumi.String("avg_cpu_utilization"),
							},
							&timestreamquery.ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsMultiMeasureAttributeMappingArgs{
								MeasureValueType: pulumi.String("DOUBLE"),
								SourceColumn:     pulumi.String("p90_cpu_utilization"),
							},
							&timestreamquery.ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsMultiMeasureAttributeMappingArgs{
								MeasureValueType: pulumi.String("DOUBLE"),
								SourceColumn:     pulumi.String("p95_cpu_utilization"),
							},
							&timestreamquery.ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsMultiMeasureAttributeMappingArgs{
								MeasureValueType: pulumi.String("DOUBLE"),
								SourceColumn:     pulumi.String("p99_cpu_utilization"),
							},
						},
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = new Aws.TimestreamQuery.ScheduledQuery("example", new()
    {
        ExecutionRoleArn = exampleAwsIamRole.Arn,
        Name = exampleAwsTimestreamwriteTable.TableName,
        QueryString = @"SELECT region, az, hostname, BIN(time, 15s) AS binned_timestamp,
	ROUND(AVG(cpu_utilization), 2) AS avg_cpu_utilization,
	ROUND(APPROX_PERCENTILE(cpu_utilization, 0.9), 2) AS p90_cpu_utilization,
	ROUND(APPROX_PERCENTILE(cpu_utilization, 0.95), 2) AS p95_cpu_utilization,
	ROUND(APPROX_PERCENTILE(cpu_utilization, 0.99), 2) AS p99_cpu_utilization
FROM exampledatabase.exampletable
WHERE measure_name = 'metrics' AND time > ago(2h)
GROUP BY region, hostname, az, BIN(time, 15s)
ORDER BY binned_timestamp ASC
LIMIT 5
",
        ErrorReportConfiguration = new Aws.TimestreamQuery.Inputs.ScheduledQueryErrorReportConfigurationArgs
        {
            S3Configuration = new Aws.TimestreamQuery.Inputs.ScheduledQueryErrorReportConfigurationS3ConfigurationArgs
            {
                BucketName = exampleAwsS3Bucket.Bucket,
            },
        },
        NotificationConfiguration = new Aws.TimestreamQuery.Inputs.ScheduledQueryNotificationConfigurationArgs
        {
            SnsConfiguration = new Aws.TimestreamQuery.Inputs.ScheduledQueryNotificationConfigurationSnsConfigurationArgs
            {
                TopicArn = exampleAwsSnsTopic.Arn,
            },
        },
        ScheduleConfiguration = new Aws.TimestreamQuery.Inputs.ScheduledQueryScheduleConfigurationArgs
        {
            ScheduleExpression = "rate(1 hour)",
        },
        TargetConfiguration = new Aws.TimestreamQuery.Inputs.ScheduledQueryTargetConfigurationArgs
        {
            TimestreamConfiguration = new Aws.TimestreamQuery.Inputs.ScheduledQueryTargetConfigurationTimestreamConfigurationArgs
            {
                DatabaseName = results.DatabaseName,
                TableName = resultsAwsTimestreamwriteTable.TableName,
                TimeColumn = "binned_timestamp",
                DimensionMappings = new[]
                {
                    new Aws.TimestreamQuery.Inputs.ScheduledQueryTargetConfigurationTimestreamConfigurationDimensionMappingArgs
                    {
                        DimensionValueType = "VARCHAR",
                        Name = "az",
                    },
                    new Aws.TimestreamQuery.Inputs.ScheduledQueryTargetConfigurationTimestreamConfigurationDimensionMappingArgs
                    {
                        DimensionValueType = "VARCHAR",
                        Name = "region",
                    },
                    new Aws.TimestreamQuery.Inputs.ScheduledQueryTargetConfigurationTimestreamConfigurationDimensionMappingArgs
                    {
                        DimensionValueType = "VARCHAR",
                        Name = "hostname",
                    },
                },
                MultiMeasureMappings = new Aws.TimestreamQuery.Inputs.ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsArgs
                {
                    TargetMultiMeasureName = "multi-metrics",
                    MultiMeasureAttributeMappings = new[]
                    {
                        new Aws.TimestreamQuery.Inputs.ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsMultiMeasureAttributeMappingArgs
                        {
                            MeasureValueType = "DOUBLE",
                            SourceColumn = "avg_cpu_utilization",
                        },
                        new Aws.TimestreamQuery.Inputs.ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsMultiMeasureAttributeMappingArgs
                        {
                            MeasureValueType = "DOUBLE",
                            SourceColumn = "p90_cpu_utilization",
                        },
                        new Aws.TimestreamQuery.Inputs.ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsMultiMeasureAttributeMappingArgs
                        {
                            MeasureValueType = "DOUBLE",
                            SourceColumn = "p95_cpu_utilization",
                        },
                        new Aws.TimestreamQuery.Inputs.ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsMultiMeasureAttributeMappingArgs
                        {
                            MeasureValueType = "DOUBLE",
                            SourceColumn = "p99_cpu_utilization",
                        },
                    },
                },
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.timestreamquery.ScheduledQuery;
import com.pulumi.aws.timestreamquery.ScheduledQueryArgs;
import com.pulumi.aws.timestreamquery.inputs.ScheduledQueryErrorReportConfigurationArgs;
import com.pulumi.aws.timestreamquery.inputs.ScheduledQueryErrorReportConfigurationS3ConfigurationArgs;
import com.pulumi.aws.timestreamquery.inputs.ScheduledQueryNotificationConfigurationArgs;
import com.pulumi.aws.timestreamquery.inputs.ScheduledQueryNotificationConfigurationSnsConfigurationArgs;
import com.pulumi.aws.timestreamquery.inputs.ScheduledQueryScheduleConfigurationArgs;
import com.pulumi.aws.timestreamquery.inputs.ScheduledQueryTargetConfigurationArgs;
import com.pulumi.aws.timestreamquery.inputs.ScheduledQueryTargetConfigurationTimestreamConfigurationArgs;
import com.pulumi.aws.timestreamquery.inputs.ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new ScheduledQuery("example", ScheduledQueryArgs.builder()
            .executionRoleArn(exampleAwsIamRole.arn())
            .name(exampleAwsTimestreamwriteTable.tableName())
            .queryString("""
SELECT region, az, hostname, BIN(time, 15s) AS binned_timestamp,
	ROUND(AVG(cpu_utilization), 2) AS avg_cpu_utilization,
	ROUND(APPROX_PERCENTILE(cpu_utilization, 0.9), 2) AS p90_cpu_utilization,
	ROUND(APPROX_PERCENTILE(cpu_utilization, 0.95), 2) AS p95_cpu_utilization,
	ROUND(APPROX_PERCENTILE(cpu_utilization, 0.99), 2) AS p99_cpu_utilization
FROM exampledatabase.exampletable
WHERE measure_name = 'metrics' AND time > ago(2h)
GROUP BY region, hostname, az, BIN(time, 15s)
ORDER BY binned_timestamp ASC
LIMIT 5
            """)
            .errorReportConfiguration(ScheduledQueryErrorReportConfigurationArgs.builder()
                .s3Configuration(ScheduledQueryErrorReportConfigurationS3ConfigurationArgs.builder()
                    .bucketName(exampleAwsS3Bucket.bucket())
                    .build())
                .build())
            .notificationConfiguration(ScheduledQueryNotificationConfigurationArgs.builder()
                .snsConfiguration(ScheduledQueryNotificationConfigurationSnsConfigurationArgs.builder()
                    .topicArn(exampleAwsSnsTopic.arn())
                    .build())
                .build())
            .scheduleConfiguration(ScheduledQueryScheduleConfigurationArgs.builder()
                .scheduleExpression("rate(1 hour)")
                .build())
            .targetConfiguration(ScheduledQueryTargetConfigurationArgs.builder()
                .timestreamConfiguration(ScheduledQueryTargetConfigurationTimestreamConfigurationArgs.builder()
                    .databaseName(results.databaseName())
                    .tableName(resultsAwsTimestreamwriteTable.tableName())
                    .timeColumn("binned_timestamp")
                    .dimensionMappings(                    
                        ScheduledQueryTargetConfigurationTimestreamConfigurationDimensionMappingArgs.builder()
                            .dimensionValueType("VARCHAR")
                            .name("az")
                            .build(),
                        ScheduledQueryTargetConfigurationTimestreamConfigurationDimensionMappingArgs.builder()
                            .dimensionValueType("VARCHAR")
                            .name("region")
                            .build(),
                        ScheduledQueryTargetConfigurationTimestreamConfigurationDimensionMappingArgs.builder()
                            .dimensionValueType("VARCHAR")
                            .name("hostname")
                            .build())
                    .multiMeasureMappings(ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsArgs.builder()
                        .targetMultiMeasureName("multi-metrics")
                        .multiMeasureAttributeMappings(                        
                            ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsMultiMeasureAttributeMappingArgs.builder()
                                .measureValueType("DOUBLE")
                                .sourceColumn("avg_cpu_utilization")
                                .build(),
                            ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsMultiMeasureAttributeMappingArgs.builder()
                                .measureValueType("DOUBLE")
                                .sourceColumn("p90_cpu_utilization")
                                .build(),
                            ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsMultiMeasureAttributeMappingArgs.builder()
                                .measureValueType("DOUBLE")
                                .sourceColumn("p95_cpu_utilization")
                                .build(),
                            ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsMultiMeasureAttributeMappingArgs.builder()
                                .measureValueType("DOUBLE")
                                .sourceColumn("p99_cpu_utilization")
                                .build())
                        .build())
                    .build())
                .build())
            .build());

    }
}
Copy
resources:
  example:
    type: aws:timestreamquery:ScheduledQuery
    properties:
      executionRoleArn: ${exampleAwsIamRole.arn}
      name: ${exampleAwsTimestreamwriteTable.tableName}
      queryString: |
        SELECT region, az, hostname, BIN(time, 15s) AS binned_timestamp,
        	ROUND(AVG(cpu_utilization), 2) AS avg_cpu_utilization,
        	ROUND(APPROX_PERCENTILE(cpu_utilization, 0.9), 2) AS p90_cpu_utilization,
        	ROUND(APPROX_PERCENTILE(cpu_utilization, 0.95), 2) AS p95_cpu_utilization,
        	ROUND(APPROX_PERCENTILE(cpu_utilization, 0.99), 2) AS p99_cpu_utilization
        FROM exampledatabase.exampletable
        WHERE measure_name = 'metrics' AND time > ago(2h)
        GROUP BY region, hostname, az, BIN(time, 15s)
        ORDER BY binned_timestamp ASC
        LIMIT 5        
      errorReportConfiguration:
        s3Configuration:
          bucketName: ${exampleAwsS3Bucket.bucket}
      notificationConfiguration:
        snsConfiguration:
          topicArn: ${exampleAwsSnsTopic.arn}
      scheduleConfiguration:
        scheduleExpression: rate(1 hour)
      targetConfiguration:
        timestreamConfiguration:
          databaseName: ${results.databaseName}
          tableName: ${resultsAwsTimestreamwriteTable.tableName}
          timeColumn: binned_timestamp
          dimensionMappings:
            - dimensionValueType: VARCHAR
              name: az
            - dimensionValueType: VARCHAR
              name: region
            - dimensionValueType: VARCHAR
              name: hostname
          multiMeasureMappings:
            targetMultiMeasureName: multi-metrics
            multiMeasureAttributeMappings:
              - measureValueType: DOUBLE
                sourceColumn: avg_cpu_utilization
              - measureValueType: DOUBLE
                sourceColumn: p90_cpu_utilization
              - measureValueType: DOUBLE
                sourceColumn: p95_cpu_utilization
              - measureValueType: DOUBLE
                sourceColumn: p99_cpu_utilization
Copy

Create ScheduledQuery Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new ScheduledQuery(name: string, args: ScheduledQueryArgs, opts?: CustomResourceOptions);
@overload
def ScheduledQuery(resource_name: str,
                   args: ScheduledQueryArgs,
                   opts: Optional[ResourceOptions] = None)

@overload
def ScheduledQuery(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   error_report_configuration: Optional[ScheduledQueryErrorReportConfigurationArgs] = None,
                   execution_role_arn: Optional[str] = None,
                   notification_configuration: Optional[ScheduledQueryNotificationConfigurationArgs] = None,
                   query_string: Optional[str] = None,
                   schedule_configuration: Optional[ScheduledQueryScheduleConfigurationArgs] = None,
                   target_configuration: Optional[ScheduledQueryTargetConfigurationArgs] = None,
                   kms_key_id: Optional[str] = None,
                   last_run_summaries: Optional[Sequence[ScheduledQueryLastRunSummaryArgs]] = None,
                   name: Optional[str] = None,
                   recently_failed_runs: Optional[Sequence[ScheduledQueryRecentlyFailedRunArgs]] = None,
                   tags: Optional[Mapping[str, str]] = None,
                   timeouts: Optional[ScheduledQueryTimeoutsArgs] = None)
func NewScheduledQuery(ctx *Context, name string, args ScheduledQueryArgs, opts ...ResourceOption) (*ScheduledQuery, error)
public ScheduledQuery(string name, ScheduledQueryArgs args, CustomResourceOptions? opts = null)
public ScheduledQuery(String name, ScheduledQueryArgs args)
public ScheduledQuery(String name, ScheduledQueryArgs args, CustomResourceOptions options)
type: aws:timestreamquery:ScheduledQuery
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ScheduledQueryArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ScheduledQueryArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ScheduledQueryArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ScheduledQueryArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ScheduledQueryArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var scheduledQueryResource = new Aws.TimestreamQuery.ScheduledQuery("scheduledQueryResource", new()
{
    ErrorReportConfiguration = new Aws.TimestreamQuery.Inputs.ScheduledQueryErrorReportConfigurationArgs
    {
        S3Configuration = new Aws.TimestreamQuery.Inputs.ScheduledQueryErrorReportConfigurationS3ConfigurationArgs
        {
            BucketName = "string",
            EncryptionOption = "string",
            ObjectKeyPrefix = "string",
        },
    },
    ExecutionRoleArn = "string",
    NotificationConfiguration = new Aws.TimestreamQuery.Inputs.ScheduledQueryNotificationConfigurationArgs
    {
        SnsConfiguration = new Aws.TimestreamQuery.Inputs.ScheduledQueryNotificationConfigurationSnsConfigurationArgs
        {
            TopicArn = "string",
        },
    },
    QueryString = "string",
    ScheduleConfiguration = new Aws.TimestreamQuery.Inputs.ScheduledQueryScheduleConfigurationArgs
    {
        ScheduleExpression = "string",
    },
    TargetConfiguration = new Aws.TimestreamQuery.Inputs.ScheduledQueryTargetConfigurationArgs
    {
        TimestreamConfiguration = new Aws.TimestreamQuery.Inputs.ScheduledQueryTargetConfigurationTimestreamConfigurationArgs
        {
            DatabaseName = "string",
            TableName = "string",
            TimeColumn = "string",
            DimensionMappings = new[]
            {
                new Aws.TimestreamQuery.Inputs.ScheduledQueryTargetConfigurationTimestreamConfigurationDimensionMappingArgs
                {
                    DimensionValueType = "string",
                    Name = "string",
                },
            },
            MeasureNameColumn = "string",
            MixedMeasureMappings = new[]
            {
                new Aws.TimestreamQuery.Inputs.ScheduledQueryTargetConfigurationTimestreamConfigurationMixedMeasureMappingArgs
                {
                    MeasureValueType = "string",
                    MeasureName = "string",
                    MultiMeasureAttributeMappings = new[]
                    {
                        new Aws.TimestreamQuery.Inputs.ScheduledQueryTargetConfigurationTimestreamConfigurationMixedMeasureMappingMultiMeasureAttributeMappingArgs
                        {
                            MeasureValueType = "string",
                            SourceColumn = "string",
                            TargetMultiMeasureAttributeName = "string",
                        },
                    },
                    SourceColumn = "string",
                    TargetMeasureName = "string",
                },
            },
            MultiMeasureMappings = new Aws.TimestreamQuery.Inputs.ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsArgs
            {
                MultiMeasureAttributeMappings = new[]
                {
                    new Aws.TimestreamQuery.Inputs.ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsMultiMeasureAttributeMappingArgs
                    {
                        MeasureValueType = "string",
                        SourceColumn = "string",
                        TargetMultiMeasureAttributeName = "string",
                    },
                },
                TargetMultiMeasureName = "string",
            },
        },
    },
    KmsKeyId = "string",
    LastRunSummaries = new[]
    {
        new Aws.TimestreamQuery.Inputs.ScheduledQueryLastRunSummaryArgs
        {
            ErrorReportLocations = new[]
            {
                new Aws.TimestreamQuery.Inputs.ScheduledQueryLastRunSummaryErrorReportLocationArgs
                {
                    S3ReportLocations = new[]
                    {
                        new Aws.TimestreamQuery.Inputs.ScheduledQueryLastRunSummaryErrorReportLocationS3ReportLocationArgs
                        {
                            BucketName = "string",
                            ObjectKey = "string",
                        },
                    },
                },
            },
            ExecutionStats = new[]
            {
                new Aws.TimestreamQuery.Inputs.ScheduledQueryLastRunSummaryExecutionStatArgs
                {
                    BytesMetered = 0,
                    CumulativeBytesScanned = 0,
                    DataWrites = 0,
                    ExecutionTimeInMillis = 0,
                    QueryResultRows = 0,
                    RecordsIngested = 0,
                },
            },
            FailureReason = "string",
            InvocationTime = "string",
            QueryInsightsResponses = new[]
            {
                new Aws.TimestreamQuery.Inputs.ScheduledQueryLastRunSummaryQueryInsightsResponseArgs
                {
                    OutputBytes = 0,
                    OutputRows = 0,
                    QuerySpatialCoverages = new[]
                    {
                        new Aws.TimestreamQuery.Inputs.ScheduledQueryLastRunSummaryQueryInsightsResponseQuerySpatialCoverageArgs
                        {
                            Maxes = new[]
                            {
                                new Aws.TimestreamQuery.Inputs.ScheduledQueryLastRunSummaryQueryInsightsResponseQuerySpatialCoverageMaxisArgs
                                {
                                    PartitionKeys = new[]
                                    {
                                        "string",
                                    },
                                    TableArn = "string",
                                    Value = 0,
                                },
                            },
                        },
                    },
                    QueryTableCount = 0,
                    QueryTemporalRanges = new[]
                    {
                        new Aws.TimestreamQuery.Inputs.ScheduledQueryLastRunSummaryQueryInsightsResponseQueryTemporalRangeArgs
                        {
                            Maxes = new[]
                            {
                                new Aws.TimestreamQuery.Inputs.ScheduledQueryLastRunSummaryQueryInsightsResponseQueryTemporalRangeMaxisArgs
                                {
                                    TableArn = "string",
                                    Value = 0,
                                },
                            },
                        },
                    },
                },
            },
            RunStatus = "string",
            TriggerTime = "string",
        },
    },
    Name = "string",
    RecentlyFailedRuns = new[]
    {
        new Aws.TimestreamQuery.Inputs.ScheduledQueryRecentlyFailedRunArgs
        {
            ErrorReportLocations = new[]
            {
                new Aws.TimestreamQuery.Inputs.ScheduledQueryRecentlyFailedRunErrorReportLocationArgs
                {
                    S3ReportLocations = new[]
                    {
                        new Aws.TimestreamQuery.Inputs.ScheduledQueryRecentlyFailedRunErrorReportLocationS3ReportLocationArgs
                        {
                            BucketName = "string",
                            ObjectKey = "string",
                        },
                    },
                },
            },
            ExecutionStats = new[]
            {
                new Aws.TimestreamQuery.Inputs.ScheduledQueryRecentlyFailedRunExecutionStatArgs
                {
                    BytesMetered = 0,
                    CumulativeBytesScanned = 0,
                    DataWrites = 0,
                    ExecutionTimeInMillis = 0,
                    QueryResultRows = 0,
                    RecordsIngested = 0,
                },
            },
            FailureReason = "string",
            InvocationTime = "string",
            QueryInsightsResponses = new[]
            {
                new Aws.TimestreamQuery.Inputs.ScheduledQueryRecentlyFailedRunQueryInsightsResponseArgs
                {
                    OutputBytes = 0,
                    OutputRows = 0,
                    QuerySpatialCoverages = new[]
                    {
                        new Aws.TimestreamQuery.Inputs.ScheduledQueryRecentlyFailedRunQueryInsightsResponseQuerySpatialCoverageArgs
                        {
                            Maxes = new[]
                            {
                                new Aws.TimestreamQuery.Inputs.ScheduledQueryRecentlyFailedRunQueryInsightsResponseQuerySpatialCoverageMaxisArgs
                                {
                                    PartitionKeys = new[]
                                    {
                                        "string",
                                    },
                                    TableArn = "string",
                                    Value = 0,
                                },
                            },
                        },
                    },
                    QueryTableCount = 0,
                    QueryTemporalRanges = new[]
                    {
                        new Aws.TimestreamQuery.Inputs.ScheduledQueryRecentlyFailedRunQueryInsightsResponseQueryTemporalRangeArgs
                        {
                            Maxes = new[]
                            {
                                new Aws.TimestreamQuery.Inputs.ScheduledQueryRecentlyFailedRunQueryInsightsResponseQueryTemporalRangeMaxisArgs
                                {
                                    TableArn = "string",
                                    Value = 0,
                                },
                            },
                        },
                    },
                },
            },
            RunStatus = "string",
            TriggerTime = "string",
        },
    },
    Tags = 
    {
        { "string", "string" },
    },
    Timeouts = new Aws.TimestreamQuery.Inputs.ScheduledQueryTimeoutsArgs
    {
        Create = "string",
        Delete = "string",
        Update = "string",
    },
});
Copy
example, err := timestreamquery.NewScheduledQuery(ctx, "scheduledQueryResource", &timestreamquery.ScheduledQueryArgs{
	ErrorReportConfiguration: &timestreamquery.ScheduledQueryErrorReportConfigurationArgs{
		S3Configuration: &timestreamquery.ScheduledQueryErrorReportConfigurationS3ConfigurationArgs{
			BucketName:       pulumi.String("string"),
			EncryptionOption: pulumi.String("string"),
			ObjectKeyPrefix:  pulumi.String("string"),
		},
	},
	ExecutionRoleArn: pulumi.String("string"),
	NotificationConfiguration: &timestreamquery.ScheduledQueryNotificationConfigurationArgs{
		SnsConfiguration: &timestreamquery.ScheduledQueryNotificationConfigurationSnsConfigurationArgs{
			TopicArn: pulumi.String("string"),
		},
	},
	QueryString: pulumi.String("string"),
	ScheduleConfiguration: &timestreamquery.ScheduledQueryScheduleConfigurationArgs{
		ScheduleExpression: pulumi.String("string"),
	},
	TargetConfiguration: &timestreamquery.ScheduledQueryTargetConfigurationArgs{
		TimestreamConfiguration: &timestreamquery.ScheduledQueryTargetConfigurationTimestreamConfigurationArgs{
			DatabaseName: pulumi.String("string"),
			TableName:    pulumi.String("string"),
			TimeColumn:   pulumi.String("string"),
			DimensionMappings: timestreamquery.ScheduledQueryTargetConfigurationTimestreamConfigurationDimensionMappingArray{
				&timestreamquery.ScheduledQueryTargetConfigurationTimestreamConfigurationDimensionMappingArgs{
					DimensionValueType: pulumi.String("string"),
					Name:               pulumi.String("string"),
				},
			},
			MeasureNameColumn: pulumi.String("string"),
			MixedMeasureMappings: timestreamquery.ScheduledQueryTargetConfigurationTimestreamConfigurationMixedMeasureMappingArray{
				&timestreamquery.ScheduledQueryTargetConfigurationTimestreamConfigurationMixedMeasureMappingArgs{
					MeasureValueType: pulumi.String("string"),
					MeasureName:      pulumi.String("string"),
					MultiMeasureAttributeMappings: timestreamquery.ScheduledQueryTargetConfigurationTimestreamConfigurationMixedMeasureMappingMultiMeasureAttributeMappingArray{
						&timestreamquery.ScheduledQueryTargetConfigurationTimestreamConfigurationMixedMeasureMappingMultiMeasureAttributeMappingArgs{
							MeasureValueType:                pulumi.String("string"),
							SourceColumn:                    pulumi.String("string"),
							TargetMultiMeasureAttributeName: pulumi.String("string"),
						},
					},
					SourceColumn:      pulumi.String("string"),
					TargetMeasureName: pulumi.String("string"),
				},
			},
			MultiMeasureMappings: &timestreamquery.ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsArgs{
				MultiMeasureAttributeMappings: timestreamquery.ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsMultiMeasureAttributeMappingArray{
					&timestreamquery.ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsMultiMeasureAttributeMappingArgs{
						MeasureValueType:                pulumi.String("string"),
						SourceColumn:                    pulumi.String("string"),
						TargetMultiMeasureAttributeName: pulumi.String("string"),
					},
				},
				TargetMultiMeasureName: pulumi.String("string"),
			},
		},
	},
	KmsKeyId: pulumi.String("string"),
	LastRunSummaries: timestreamquery.ScheduledQueryLastRunSummaryArray{
		&timestreamquery.ScheduledQueryLastRunSummaryArgs{
			ErrorReportLocations: timestreamquery.ScheduledQueryLastRunSummaryErrorReportLocationArray{
				&timestreamquery.ScheduledQueryLastRunSummaryErrorReportLocationArgs{
					S3ReportLocations: timestreamquery.ScheduledQueryLastRunSummaryErrorReportLocationS3ReportLocationArray{
						&timestreamquery.ScheduledQueryLastRunSummaryErrorReportLocationS3ReportLocationArgs{
							BucketName: pulumi.String("string"),
							ObjectKey:  pulumi.String("string"),
						},
					},
				},
			},
			ExecutionStats: timestreamquery.ScheduledQueryLastRunSummaryExecutionStatArray{
				&timestreamquery.ScheduledQueryLastRunSummaryExecutionStatArgs{
					BytesMetered:           pulumi.Int(0),
					CumulativeBytesScanned: pulumi.Int(0),
					DataWrites:             pulumi.Int(0),
					ExecutionTimeInMillis:  pulumi.Int(0),
					QueryResultRows:        pulumi.Int(0),
					RecordsIngested:        pulumi.Int(0),
				},
			},
			FailureReason:  pulumi.String("string"),
			InvocationTime: pulumi.String("string"),
			QueryInsightsResponses: timestreamquery.ScheduledQueryLastRunSummaryQueryInsightsResponseArray{
				&timestreamquery.ScheduledQueryLastRunSummaryQueryInsightsResponseArgs{
					OutputBytes: pulumi.Int(0),
					OutputRows:  pulumi.Int(0),
					QuerySpatialCoverages: timestreamquery.ScheduledQueryLastRunSummaryQueryInsightsResponseQuerySpatialCoverageArray{
						&timestreamquery.ScheduledQueryLastRunSummaryQueryInsightsResponseQuerySpatialCoverageArgs{
							Maxes: timestreamquery.ScheduledQueryLastRunSummaryQueryInsightsResponseQuerySpatialCoverageMaxisArray{
								&timestreamquery.ScheduledQueryLastRunSummaryQueryInsightsResponseQuerySpatialCoverageMaxisArgs{
									PartitionKeys: pulumi.StringArray{
										pulumi.String("string"),
									},
									TableArn: pulumi.String("string"),
									Value:    pulumi.Float64(0),
								},
							},
						},
					},
					QueryTableCount: pulumi.Int(0),
					QueryTemporalRanges: timestreamquery.ScheduledQueryLastRunSummaryQueryInsightsResponseQueryTemporalRangeArray{
						&timestreamquery.ScheduledQueryLastRunSummaryQueryInsightsResponseQueryTemporalRangeArgs{
							Maxes: timestreamquery.ScheduledQueryLastRunSummaryQueryInsightsResponseQueryTemporalRangeMaxisArray{
								&timestreamquery.ScheduledQueryLastRunSummaryQueryInsightsResponseQueryTemporalRangeMaxisArgs{
									TableArn: pulumi.String("string"),
									Value:    pulumi.Int(0),
								},
							},
						},
					},
				},
			},
			RunStatus:   pulumi.String("string"),
			TriggerTime: pulumi.String("string"),
		},
	},
	Name: pulumi.String("string"),
	RecentlyFailedRuns: timestreamquery.ScheduledQueryRecentlyFailedRunArray{
		&timestreamquery.ScheduledQueryRecentlyFailedRunArgs{
			ErrorReportLocations: timestreamquery.ScheduledQueryRecentlyFailedRunErrorReportLocationArray{
				&timestreamquery.ScheduledQueryRecentlyFailedRunErrorReportLocationArgs{
					S3ReportLocations: timestreamquery.ScheduledQueryRecentlyFailedRunErrorReportLocationS3ReportLocationArray{
						&timestreamquery.ScheduledQueryRecentlyFailedRunErrorReportLocationS3ReportLocationArgs{
							BucketName: pulumi.String("string"),
							ObjectKey:  pulumi.String("string"),
						},
					},
				},
			},
			ExecutionStats: timestreamquery.ScheduledQueryRecentlyFailedRunExecutionStatArray{
				&timestreamquery.ScheduledQueryRecentlyFailedRunExecutionStatArgs{
					BytesMetered:           pulumi.Int(0),
					CumulativeBytesScanned: pulumi.Int(0),
					DataWrites:             pulumi.Int(0),
					ExecutionTimeInMillis:  pulumi.Int(0),
					QueryResultRows:        pulumi.Int(0),
					RecordsIngested:        pulumi.Int(0),
				},
			},
			FailureReason:  pulumi.String("string"),
			InvocationTime: pulumi.String("string"),
			QueryInsightsResponses: timestreamquery.ScheduledQueryRecentlyFailedRunQueryInsightsResponseArray{
				&timestreamquery.ScheduledQueryRecentlyFailedRunQueryInsightsResponseArgs{
					OutputBytes: pulumi.Int(0),
					OutputRows:  pulumi.Int(0),
					QuerySpatialCoverages: timestreamquery.ScheduledQueryRecentlyFailedRunQueryInsightsResponseQuerySpatialCoverageArray{
						&timestreamquery.ScheduledQueryRecentlyFailedRunQueryInsightsResponseQuerySpatialCoverageArgs{
							Maxes: timestreamquery.ScheduledQueryRecentlyFailedRunQueryInsightsResponseQuerySpatialCoverageMaxisArray{
								&timestreamquery.ScheduledQueryRecentlyFailedRunQueryInsightsResponseQuerySpatialCoverageMaxisArgs{
									PartitionKeys: pulumi.StringArray{
										pulumi.String("string"),
									},
									TableArn: pulumi.String("string"),
									Value:    pulumi.Float64(0),
								},
							},
						},
					},
					QueryTableCount: pulumi.Int(0),
					QueryTemporalRanges: timestreamquery.ScheduledQueryRecentlyFailedRunQueryInsightsResponseQueryTemporalRangeArray{
						&timestreamquery.ScheduledQueryRecentlyFailedRunQueryInsightsResponseQueryTemporalRangeArgs{
							Maxes: timestreamquery.ScheduledQueryRecentlyFailedRunQueryInsightsResponseQueryTemporalRangeMaxisArray{
								&timestreamquery.ScheduledQueryRecentlyFailedRunQueryInsightsResponseQueryTemporalRangeMaxisArgs{
									TableArn: pulumi.String("string"),
									Value:    pulumi.Int(0),
								},
							},
						},
					},
				},
			},
			RunStatus:   pulumi.String("string"),
			TriggerTime: pulumi.String("string"),
		},
	},
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Timeouts: &timestreamquery.ScheduledQueryTimeoutsArgs{
		Create: pulumi.String("string"),
		Delete: pulumi.String("string"),
		Update: pulumi.String("string"),
	},
})
Copy
var scheduledQueryResource = new ScheduledQuery("scheduledQueryResource", ScheduledQueryArgs.builder()
    .errorReportConfiguration(ScheduledQueryErrorReportConfigurationArgs.builder()
        .s3Configuration(ScheduledQueryErrorReportConfigurationS3ConfigurationArgs.builder()
            .bucketName("string")
            .encryptionOption("string")
            .objectKeyPrefix("string")
            .build())
        .build())
    .executionRoleArn("string")
    .notificationConfiguration(ScheduledQueryNotificationConfigurationArgs.builder()
        .snsConfiguration(ScheduledQueryNotificationConfigurationSnsConfigurationArgs.builder()
            .topicArn("string")
            .build())
        .build())
    .queryString("string")
    .scheduleConfiguration(ScheduledQueryScheduleConfigurationArgs.builder()
        .scheduleExpression("string")
        .build())
    .targetConfiguration(ScheduledQueryTargetConfigurationArgs.builder()
        .timestreamConfiguration(ScheduledQueryTargetConfigurationTimestreamConfigurationArgs.builder()
            .databaseName("string")
            .tableName("string")
            .timeColumn("string")
            .dimensionMappings(ScheduledQueryTargetConfigurationTimestreamConfigurationDimensionMappingArgs.builder()
                .dimensionValueType("string")
                .name("string")
                .build())
            .measureNameColumn("string")
            .mixedMeasureMappings(ScheduledQueryTargetConfigurationTimestreamConfigurationMixedMeasureMappingArgs.builder()
                .measureValueType("string")
                .measureName("string")
                .multiMeasureAttributeMappings(ScheduledQueryTargetConfigurationTimestreamConfigurationMixedMeasureMappingMultiMeasureAttributeMappingArgs.builder()
                    .measureValueType("string")
                    .sourceColumn("string")
                    .targetMultiMeasureAttributeName("string")
                    .build())
                .sourceColumn("string")
                .targetMeasureName("string")
                .build())
            .multiMeasureMappings(ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsArgs.builder()
                .multiMeasureAttributeMappings(ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsMultiMeasureAttributeMappingArgs.builder()
                    .measureValueType("string")
                    .sourceColumn("string")
                    .targetMultiMeasureAttributeName("string")
                    .build())
                .targetMultiMeasureName("string")
                .build())
            .build())
        .build())
    .kmsKeyId("string")
    .lastRunSummaries(ScheduledQueryLastRunSummaryArgs.builder()
        .errorReportLocations(ScheduledQueryLastRunSummaryErrorReportLocationArgs.builder()
            .s3ReportLocations(ScheduledQueryLastRunSummaryErrorReportLocationS3ReportLocationArgs.builder()
                .bucketName("string")
                .objectKey("string")
                .build())
            .build())
        .executionStats(ScheduledQueryLastRunSummaryExecutionStatArgs.builder()
            .bytesMetered(0)
            .cumulativeBytesScanned(0)
            .dataWrites(0)
            .executionTimeInMillis(0)
            .queryResultRows(0)
            .recordsIngested(0)
            .build())
        .failureReason("string")
        .invocationTime("string")
        .queryInsightsResponses(ScheduledQueryLastRunSummaryQueryInsightsResponseArgs.builder()
            .outputBytes(0)
            .outputRows(0)
            .querySpatialCoverages(ScheduledQueryLastRunSummaryQueryInsightsResponseQuerySpatialCoverageArgs.builder()
                .maxes(ScheduledQueryLastRunSummaryQueryInsightsResponseQuerySpatialCoverageMaxisArgs.builder()
                    .partitionKeys("string")
                    .tableArn("string")
                    .value(0)
                    .build())
                .build())
            .queryTableCount(0)
            .queryTemporalRanges(ScheduledQueryLastRunSummaryQueryInsightsResponseQueryTemporalRangeArgs.builder()
                .maxes(ScheduledQueryLastRunSummaryQueryInsightsResponseQueryTemporalRangeMaxisArgs.builder()
                    .tableArn("string")
                    .value(0)
                    .build())
                .build())
            .build())
        .runStatus("string")
        .triggerTime("string")
        .build())
    .name("string")
    .recentlyFailedRuns(ScheduledQueryRecentlyFailedRunArgs.builder()
        .errorReportLocations(ScheduledQueryRecentlyFailedRunErrorReportLocationArgs.builder()
            .s3ReportLocations(ScheduledQueryRecentlyFailedRunErrorReportLocationS3ReportLocationArgs.builder()
                .bucketName("string")
                .objectKey("string")
                .build())
            .build())
        .executionStats(ScheduledQueryRecentlyFailedRunExecutionStatArgs.builder()
            .bytesMetered(0)
            .cumulativeBytesScanned(0)
            .dataWrites(0)
            .executionTimeInMillis(0)
            .queryResultRows(0)
            .recordsIngested(0)
            .build())
        .failureReason("string")
        .invocationTime("string")
        .queryInsightsResponses(ScheduledQueryRecentlyFailedRunQueryInsightsResponseArgs.builder()
            .outputBytes(0)
            .outputRows(0)
            .querySpatialCoverages(ScheduledQueryRecentlyFailedRunQueryInsightsResponseQuerySpatialCoverageArgs.builder()
                .maxes(ScheduledQueryRecentlyFailedRunQueryInsightsResponseQuerySpatialCoverageMaxisArgs.builder()
                    .partitionKeys("string")
                    .tableArn("string")
                    .value(0)
                    .build())
                .build())
            .queryTableCount(0)
            .queryTemporalRanges(ScheduledQueryRecentlyFailedRunQueryInsightsResponseQueryTemporalRangeArgs.builder()
                .maxes(ScheduledQueryRecentlyFailedRunQueryInsightsResponseQueryTemporalRangeMaxisArgs.builder()
                    .tableArn("string")
                    .value(0)
                    .build())
                .build())
            .build())
        .runStatus("string")
        .triggerTime("string")
        .build())
    .tags(Map.of("string", "string"))
    .timeouts(ScheduledQueryTimeoutsArgs.builder()
        .create("string")
        .delete("string")
        .update("string")
        .build())
    .build());
Copy
scheduled_query_resource = aws.timestreamquery.ScheduledQuery("scheduledQueryResource",
    error_report_configuration={
        "s3_configuration": {
            "bucket_name": "string",
            "encryption_option": "string",
            "object_key_prefix": "string",
        },
    },
    execution_role_arn="string",
    notification_configuration={
        "sns_configuration": {
            "topic_arn": "string",
        },
    },
    query_string="string",
    schedule_configuration={
        "schedule_expression": "string",
    },
    target_configuration={
        "timestream_configuration": {
            "database_name": "string",
            "table_name": "string",
            "time_column": "string",
            "dimension_mappings": [{
                "dimension_value_type": "string",
                "name": "string",
            }],
            "measure_name_column": "string",
            "mixed_measure_mappings": [{
                "measure_value_type": "string",
                "measure_name": "string",
                "multi_measure_attribute_mappings": [{
                    "measure_value_type": "string",
                    "source_column": "string",
                    "target_multi_measure_attribute_name": "string",
                }],
                "source_column": "string",
                "target_measure_name": "string",
            }],
            "multi_measure_mappings": {
                "multi_measure_attribute_mappings": [{
                    "measure_value_type": "string",
                    "source_column": "string",
                    "target_multi_measure_attribute_name": "string",
                }],
                "target_multi_measure_name": "string",
            },
        },
    },
    kms_key_id="string",
    last_run_summaries=[{
        "error_report_locations": [{
            "s3_report_locations": [{
                "bucket_name": "string",
                "object_key": "string",
            }],
        }],
        "execution_stats": [{
            "bytes_metered": 0,
            "cumulative_bytes_scanned": 0,
            "data_writes": 0,
            "execution_time_in_millis": 0,
            "query_result_rows": 0,
            "records_ingested": 0,
        }],
        "failure_reason": "string",
        "invocation_time": "string",
        "query_insights_responses": [{
            "output_bytes": 0,
            "output_rows": 0,
            "query_spatial_coverages": [{
                "maxes": [{
                    "partition_keys": ["string"],
                    "table_arn": "string",
                    "value": 0,
                }],
            }],
            "query_table_count": 0,
            "query_temporal_ranges": [{
                "maxes": [{
                    "table_arn": "string",
                    "value": 0,
                }],
            }],
        }],
        "run_status": "string",
        "trigger_time": "string",
    }],
    name="string",
    recently_failed_runs=[{
        "error_report_locations": [{
            "s3_report_locations": [{
                "bucket_name": "string",
                "object_key": "string",
            }],
        }],
        "execution_stats": [{
            "bytes_metered": 0,
            "cumulative_bytes_scanned": 0,
            "data_writes": 0,
            "execution_time_in_millis": 0,
            "query_result_rows": 0,
            "records_ingested": 0,
        }],
        "failure_reason": "string",
        "invocation_time": "string",
        "query_insights_responses": [{
            "output_bytes": 0,
            "output_rows": 0,
            "query_spatial_coverages": [{
                "maxes": [{
                    "partition_keys": ["string"],
                    "table_arn": "string",
                    "value": 0,
                }],
            }],
            "query_table_count": 0,
            "query_temporal_ranges": [{
                "maxes": [{
                    "table_arn": "string",
                    "value": 0,
                }],
            }],
        }],
        "run_status": "string",
        "trigger_time": "string",
    }],
    tags={
        "string": "string",
    },
    timeouts={
        "create": "string",
        "delete": "string",
        "update": "string",
    })
Copy
const scheduledQueryResource = new aws.timestreamquery.ScheduledQuery("scheduledQueryResource", {
    errorReportConfiguration: {
        s3Configuration: {
            bucketName: "string",
            encryptionOption: "string",
            objectKeyPrefix: "string",
        },
    },
    executionRoleArn: "string",
    notificationConfiguration: {
        snsConfiguration: {
            topicArn: "string",
        },
    },
    queryString: "string",
    scheduleConfiguration: {
        scheduleExpression: "string",
    },
    targetConfiguration: {
        timestreamConfiguration: {
            databaseName: "string",
            tableName: "string",
            timeColumn: "string",
            dimensionMappings: [{
                dimensionValueType: "string",
                name: "string",
            }],
            measureNameColumn: "string",
            mixedMeasureMappings: [{
                measureValueType: "string",
                measureName: "string",
                multiMeasureAttributeMappings: [{
                    measureValueType: "string",
                    sourceColumn: "string",
                    targetMultiMeasureAttributeName: "string",
                }],
                sourceColumn: "string",
                targetMeasureName: "string",
            }],
            multiMeasureMappings: {
                multiMeasureAttributeMappings: [{
                    measureValueType: "string",
                    sourceColumn: "string",
                    targetMultiMeasureAttributeName: "string",
                }],
                targetMultiMeasureName: "string",
            },
        },
    },
    kmsKeyId: "string",
    lastRunSummaries: [{
        errorReportLocations: [{
            s3ReportLocations: [{
                bucketName: "string",
                objectKey: "string",
            }],
        }],
        executionStats: [{
            bytesMetered: 0,
            cumulativeBytesScanned: 0,
            dataWrites: 0,
            executionTimeInMillis: 0,
            queryResultRows: 0,
            recordsIngested: 0,
        }],
        failureReason: "string",
        invocationTime: "string",
        queryInsightsResponses: [{
            outputBytes: 0,
            outputRows: 0,
            querySpatialCoverages: [{
                maxes: [{
                    partitionKeys: ["string"],
                    tableArn: "string",
                    value: 0,
                }],
            }],
            queryTableCount: 0,
            queryTemporalRanges: [{
                maxes: [{
                    tableArn: "string",
                    value: 0,
                }],
            }],
        }],
        runStatus: "string",
        triggerTime: "string",
    }],
    name: "string",
    recentlyFailedRuns: [{
        errorReportLocations: [{
            s3ReportLocations: [{
                bucketName: "string",
                objectKey: "string",
            }],
        }],
        executionStats: [{
            bytesMetered: 0,
            cumulativeBytesScanned: 0,
            dataWrites: 0,
            executionTimeInMillis: 0,
            queryResultRows: 0,
            recordsIngested: 0,
        }],
        failureReason: "string",
        invocationTime: "string",
        queryInsightsResponses: [{
            outputBytes: 0,
            outputRows: 0,
            querySpatialCoverages: [{
                maxes: [{
                    partitionKeys: ["string"],
                    tableArn: "string",
                    value: 0,
                }],
            }],
            queryTableCount: 0,
            queryTemporalRanges: [{
                maxes: [{
                    tableArn: "string",
                    value: 0,
                }],
            }],
        }],
        runStatus: "string",
        triggerTime: "string",
    }],
    tags: {
        string: "string",
    },
    timeouts: {
        create: "string",
        "delete": "string",
        update: "string",
    },
});
Copy
type: aws:timestreamquery:ScheduledQuery
properties:
    errorReportConfiguration:
        s3Configuration:
            bucketName: string
            encryptionOption: string
            objectKeyPrefix: string
    executionRoleArn: string
    kmsKeyId: string
    lastRunSummaries:
        - errorReportLocations:
            - s3ReportLocations:
                - bucketName: string
                  objectKey: string
          executionStats:
            - bytesMetered: 0
              cumulativeBytesScanned: 0
              dataWrites: 0
              executionTimeInMillis: 0
              queryResultRows: 0
              recordsIngested: 0
          failureReason: string
          invocationTime: string
          queryInsightsResponses:
            - outputBytes: 0
              outputRows: 0
              querySpatialCoverages:
                - maxes:
                    - partitionKeys:
                        - string
                      tableArn: string
                      value: 0
              queryTableCount: 0
              queryTemporalRanges:
                - maxes:
                    - tableArn: string
                      value: 0
          runStatus: string
          triggerTime: string
    name: string
    notificationConfiguration:
        snsConfiguration:
            topicArn: string
    queryString: string
    recentlyFailedRuns:
        - errorReportLocations:
            - s3ReportLocations:
                - bucketName: string
                  objectKey: string
          executionStats:
            - bytesMetered: 0
              cumulativeBytesScanned: 0
              dataWrites: 0
              executionTimeInMillis: 0
              queryResultRows: 0
              recordsIngested: 0
          failureReason: string
          invocationTime: string
          queryInsightsResponses:
            - outputBytes: 0
              outputRows: 0
              querySpatialCoverages:
                - maxes:
                    - partitionKeys:
                        - string
                      tableArn: string
                      value: 0
              queryTableCount: 0
              queryTemporalRanges:
                - maxes:
                    - tableArn: string
                      value: 0
          runStatus: string
          triggerTime: string
    scheduleConfiguration:
        scheduleExpression: string
    tags:
        string: string
    targetConfiguration:
        timestreamConfiguration:
            databaseName: string
            dimensionMappings:
                - dimensionValueType: string
                  name: string
            measureNameColumn: string
            mixedMeasureMappings:
                - measureName: string
                  measureValueType: string
                  multiMeasureAttributeMappings:
                    - measureValueType: string
                      sourceColumn: string
                      targetMultiMeasureAttributeName: string
                  sourceColumn: string
                  targetMeasureName: string
            multiMeasureMappings:
                multiMeasureAttributeMappings:
                    - measureValueType: string
                      sourceColumn: string
                      targetMultiMeasureAttributeName: string
                targetMultiMeasureName: string
            tableName: string
            timeColumn: string
    timeouts:
        create: string
        delete: string
        update: string
Copy

ScheduledQuery Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The ScheduledQuery resource accepts the following input properties:

ErrorReportConfiguration This property is required. ScheduledQueryErrorReportConfiguration
Configuration block for error reporting configuration. See below.
ExecutionRoleArn This property is required. string
ARN for the IAM role that Timestream will assume when running the scheduled query.
NotificationConfiguration This property is required. ScheduledQueryNotificationConfiguration
Configuration block for notification configuration for a scheduled query. A notification is sent by Timestream when a scheduled query is created, its state is updated, or when it is deleted. See below.
QueryString This property is required. string
Query string to run. Parameter names can be specified in the query string using the @ character followed by an identifier. The named parameter @scheduled_runtime is reserved and can be used in the query to get the time at which the query is scheduled to run. The timestamp calculated according to the schedule_configuration parameter, will be the value of @scheduled_runtime paramater for each query run. For example, consider an instance of a scheduled query executing on 2021-12-01 00:00:00. For this instance, the @scheduled_runtime parameter is initialized to the timestamp 2021-12-01 00:00:00 when invoking the query.
ScheduleConfiguration This property is required. ScheduledQueryScheduleConfiguration
Configuration block for schedule configuration for the query. See below.
TargetConfiguration This property is required. ScheduledQueryTargetConfiguration

Configuration block for writing the result of a query. See below.

The following arguments are optional:

KmsKeyId string
Amazon KMS key used to encrypt the scheduled query resource, at-rest. If not specified, the scheduled query resource will be encrypted with a Timestream owned Amazon KMS key. To specify a KMS key, use the key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix the name with "alias/". If error_report_configuration uses SSE_KMS as the encryption type, the same kms_key_id is used to encrypt the error report at rest.
LastRunSummaries List<ScheduledQueryLastRunSummary>
Runtime summary for the last scheduled query run.
Name string
Name of the scheduled query.
RecentlyFailedRuns List<ScheduledQueryRecentlyFailedRun>
Runtime summary for the last five failed scheduled query runs.
Tags Dictionary<string, string>
Map of tags assigned to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Timeouts ScheduledQueryTimeouts
ErrorReportConfiguration This property is required. ScheduledQueryErrorReportConfigurationArgs
Configuration block for error reporting configuration. See below.
ExecutionRoleArn This property is required. string
ARN for the IAM role that Timestream will assume when running the scheduled query.
NotificationConfiguration This property is required. ScheduledQueryNotificationConfigurationArgs
Configuration block for notification configuration for a scheduled query. A notification is sent by Timestream when a scheduled query is created, its state is updated, or when it is deleted. See below.
QueryString This property is required. string
Query string to run. Parameter names can be specified in the query string using the @ character followed by an identifier. The named parameter @scheduled_runtime is reserved and can be used in the query to get the time at which the query is scheduled to run. The timestamp calculated according to the schedule_configuration parameter, will be the value of @scheduled_runtime paramater for each query run. For example, consider an instance of a scheduled query executing on 2021-12-01 00:00:00. For this instance, the @scheduled_runtime parameter is initialized to the timestamp 2021-12-01 00:00:00 when invoking the query.
ScheduleConfiguration This property is required. ScheduledQueryScheduleConfigurationArgs
Configuration block for schedule configuration for the query. See below.
TargetConfiguration This property is required. ScheduledQueryTargetConfigurationArgs

Configuration block for writing the result of a query. See below.

The following arguments are optional:

KmsKeyId string
Amazon KMS key used to encrypt the scheduled query resource, at-rest. If not specified, the scheduled query resource will be encrypted with a Timestream owned Amazon KMS key. To specify a KMS key, use the key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix the name with "alias/". If error_report_configuration uses SSE_KMS as the encryption type, the same kms_key_id is used to encrypt the error report at rest.
LastRunSummaries []ScheduledQueryLastRunSummaryArgs
Runtime summary for the last scheduled query run.
Name string
Name of the scheduled query.
RecentlyFailedRuns []ScheduledQueryRecentlyFailedRunArgs
Runtime summary for the last five failed scheduled query runs.
Tags map[string]string
Map of tags assigned to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Timeouts ScheduledQueryTimeoutsArgs
errorReportConfiguration This property is required. ScheduledQueryErrorReportConfiguration
Configuration block for error reporting configuration. See below.
executionRoleArn This property is required. String
ARN for the IAM role that Timestream will assume when running the scheduled query.
notificationConfiguration This property is required. ScheduledQueryNotificationConfiguration
Configuration block for notification configuration for a scheduled query. A notification is sent by Timestream when a scheduled query is created, its state is updated, or when it is deleted. See below.
queryString This property is required. String
Query string to run. Parameter names can be specified in the query string using the @ character followed by an identifier. The named parameter @scheduled_runtime is reserved and can be used in the query to get the time at which the query is scheduled to run. The timestamp calculated according to the schedule_configuration parameter, will be the value of @scheduled_runtime paramater for each query run. For example, consider an instance of a scheduled query executing on 2021-12-01 00:00:00. For this instance, the @scheduled_runtime parameter is initialized to the timestamp 2021-12-01 00:00:00 when invoking the query.
scheduleConfiguration This property is required. ScheduledQueryScheduleConfiguration
Configuration block for schedule configuration for the query. See below.
targetConfiguration This property is required. ScheduledQueryTargetConfiguration

Configuration block for writing the result of a query. See below.

The following arguments are optional:

kmsKeyId String
Amazon KMS key used to encrypt the scheduled query resource, at-rest. If not specified, the scheduled query resource will be encrypted with a Timestream owned Amazon KMS key. To specify a KMS key, use the key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix the name with "alias/". If error_report_configuration uses SSE_KMS as the encryption type, the same kms_key_id is used to encrypt the error report at rest.
lastRunSummaries List<ScheduledQueryLastRunSummary>
Runtime summary for the last scheduled query run.
name String
Name of the scheduled query.
recentlyFailedRuns List<ScheduledQueryRecentlyFailedRun>
Runtime summary for the last five failed scheduled query runs.
tags Map<String,String>
Map of tags assigned to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
timeouts ScheduledQueryTimeouts
errorReportConfiguration This property is required. ScheduledQueryErrorReportConfiguration
Configuration block for error reporting configuration. See below.
executionRoleArn This property is required. string
ARN for the IAM role that Timestream will assume when running the scheduled query.
notificationConfiguration This property is required. ScheduledQueryNotificationConfiguration
Configuration block for notification configuration for a scheduled query. A notification is sent by Timestream when a scheduled query is created, its state is updated, or when it is deleted. See below.
queryString This property is required. string
Query string to run. Parameter names can be specified in the query string using the @ character followed by an identifier. The named parameter @scheduled_runtime is reserved and can be used in the query to get the time at which the query is scheduled to run. The timestamp calculated according to the schedule_configuration parameter, will be the value of @scheduled_runtime paramater for each query run. For example, consider an instance of a scheduled query executing on 2021-12-01 00:00:00. For this instance, the @scheduled_runtime parameter is initialized to the timestamp 2021-12-01 00:00:00 when invoking the query.
scheduleConfiguration This property is required. ScheduledQueryScheduleConfiguration
Configuration block for schedule configuration for the query. See below.
targetConfiguration This property is required. ScheduledQueryTargetConfiguration

Configuration block for writing the result of a query. See below.

The following arguments are optional:

kmsKeyId string
Amazon KMS key used to encrypt the scheduled query resource, at-rest. If not specified, the scheduled query resource will be encrypted with a Timestream owned Amazon KMS key. To specify a KMS key, use the key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix the name with "alias/". If error_report_configuration uses SSE_KMS as the encryption type, the same kms_key_id is used to encrypt the error report at rest.
lastRunSummaries ScheduledQueryLastRunSummary[]
Runtime summary for the last scheduled query run.
name string
Name of the scheduled query.
recentlyFailedRuns ScheduledQueryRecentlyFailedRun[]
Runtime summary for the last five failed scheduled query runs.
tags {[key: string]: string}
Map of tags assigned to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
timeouts ScheduledQueryTimeouts
error_report_configuration This property is required. ScheduledQueryErrorReportConfigurationArgs
Configuration block for error reporting configuration. See below.
execution_role_arn This property is required. str
ARN for the IAM role that Timestream will assume when running the scheduled query.
notification_configuration This property is required. ScheduledQueryNotificationConfigurationArgs
Configuration block for notification configuration for a scheduled query. A notification is sent by Timestream when a scheduled query is created, its state is updated, or when it is deleted. See below.
query_string This property is required. str
Query string to run. Parameter names can be specified in the query string using the @ character followed by an identifier. The named parameter @scheduled_runtime is reserved and can be used in the query to get the time at which the query is scheduled to run. The timestamp calculated according to the schedule_configuration parameter, will be the value of @scheduled_runtime paramater for each query run. For example, consider an instance of a scheduled query executing on 2021-12-01 00:00:00. For this instance, the @scheduled_runtime parameter is initialized to the timestamp 2021-12-01 00:00:00 when invoking the query.
schedule_configuration This property is required. ScheduledQueryScheduleConfigurationArgs
Configuration block for schedule configuration for the query. See below.
target_configuration This property is required. ScheduledQueryTargetConfigurationArgs

Configuration block for writing the result of a query. See below.

The following arguments are optional:

kms_key_id str
Amazon KMS key used to encrypt the scheduled query resource, at-rest. If not specified, the scheduled query resource will be encrypted with a Timestream owned Amazon KMS key. To specify a KMS key, use the key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix the name with "alias/". If error_report_configuration uses SSE_KMS as the encryption type, the same kms_key_id is used to encrypt the error report at rest.
last_run_summaries Sequence[ScheduledQueryLastRunSummaryArgs]
Runtime summary for the last scheduled query run.
name str
Name of the scheduled query.
recently_failed_runs Sequence[ScheduledQueryRecentlyFailedRunArgs]
Runtime summary for the last five failed scheduled query runs.
tags Mapping[str, str]
Map of tags assigned to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
timeouts ScheduledQueryTimeoutsArgs
errorReportConfiguration This property is required. Property Map
Configuration block for error reporting configuration. See below.
executionRoleArn This property is required. String
ARN for the IAM role that Timestream will assume when running the scheduled query.
notificationConfiguration This property is required. Property Map
Configuration block for notification configuration for a scheduled query. A notification is sent by Timestream when a scheduled query is created, its state is updated, or when it is deleted. See below.
queryString This property is required. String
Query string to run. Parameter names can be specified in the query string using the @ character followed by an identifier. The named parameter @scheduled_runtime is reserved and can be used in the query to get the time at which the query is scheduled to run. The timestamp calculated according to the schedule_configuration parameter, will be the value of @scheduled_runtime paramater for each query run. For example, consider an instance of a scheduled query executing on 2021-12-01 00:00:00. For this instance, the @scheduled_runtime parameter is initialized to the timestamp 2021-12-01 00:00:00 when invoking the query.
scheduleConfiguration This property is required. Property Map
Configuration block for schedule configuration for the query. See below.
targetConfiguration This property is required. Property Map

Configuration block for writing the result of a query. See below.

The following arguments are optional:

kmsKeyId String
Amazon KMS key used to encrypt the scheduled query resource, at-rest. If not specified, the scheduled query resource will be encrypted with a Timestream owned Amazon KMS key. To specify a KMS key, use the key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix the name with "alias/". If error_report_configuration uses SSE_KMS as the encryption type, the same kms_key_id is used to encrypt the error report at rest.
lastRunSummaries List<Property Map>
Runtime summary for the last scheduled query run.
name String
Name of the scheduled query.
recentlyFailedRuns List<Property Map>
Runtime summary for the last five failed scheduled query runs.
tags Map<String>
Map of tags assigned to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
timeouts Property Map

Outputs

All input properties are implicitly available as output properties. Additionally, the ScheduledQuery resource produces the following output properties:

Arn string
ARN of the Scheduled Query.
CreationTime string
Creation time for the scheduled query.
Id string
The provider-assigned unique ID for this managed resource.
NextInvocationTime string
Next time the scheduled query is scheduled to run.
PreviousInvocationTime string
Last time the scheduled query was run.
State string
State of the scheduled query, either ENABLED or DISABLED.
TagsAll Dictionary<string, string>
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

Arn string
ARN of the Scheduled Query.
CreationTime string
Creation time for the scheduled query.
Id string
The provider-assigned unique ID for this managed resource.
NextInvocationTime string
Next time the scheduled query is scheduled to run.
PreviousInvocationTime string
Last time the scheduled query was run.
State string
State of the scheduled query, either ENABLED or DISABLED.
TagsAll map[string]string
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn String
ARN of the Scheduled Query.
creationTime String
Creation time for the scheduled query.
id String
The provider-assigned unique ID for this managed resource.
nextInvocationTime String
Next time the scheduled query is scheduled to run.
previousInvocationTime String
Last time the scheduled query was run.
state String
State of the scheduled query, either ENABLED or DISABLED.
tagsAll Map<String,String>
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn string
ARN of the Scheduled Query.
creationTime string
Creation time for the scheduled query.
id string
The provider-assigned unique ID for this managed resource.
nextInvocationTime string
Next time the scheduled query is scheduled to run.
previousInvocationTime string
Last time the scheduled query was run.
state string
State of the scheduled query, either ENABLED or DISABLED.
tagsAll {[key: string]: string}
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn str
ARN of the Scheduled Query.
creation_time str
Creation time for the scheduled query.
id str
The provider-assigned unique ID for this managed resource.
next_invocation_time str
Next time the scheduled query is scheduled to run.
previous_invocation_time str
Last time the scheduled query was run.
state str
State of the scheduled query, either ENABLED or DISABLED.
tags_all Mapping[str, str]
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

arn String
ARN of the Scheduled Query.
creationTime String
Creation time for the scheduled query.
id String
The provider-assigned unique ID for this managed resource.
nextInvocationTime String
Next time the scheduled query is scheduled to run.
previousInvocationTime String
Last time the scheduled query was run.
state String
State of the scheduled query, either ENABLED or DISABLED.
tagsAll Map<String>
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

Look up Existing ScheduledQuery Resource

Get an existing ScheduledQuery resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ScheduledQueryState, opts?: CustomResourceOptions): ScheduledQuery
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        arn: Optional[str] = None,
        creation_time: Optional[str] = None,
        error_report_configuration: Optional[ScheduledQueryErrorReportConfigurationArgs] = None,
        execution_role_arn: Optional[str] = None,
        kms_key_id: Optional[str] = None,
        last_run_summaries: Optional[Sequence[ScheduledQueryLastRunSummaryArgs]] = None,
        name: Optional[str] = None,
        next_invocation_time: Optional[str] = None,
        notification_configuration: Optional[ScheduledQueryNotificationConfigurationArgs] = None,
        previous_invocation_time: Optional[str] = None,
        query_string: Optional[str] = None,
        recently_failed_runs: Optional[Sequence[ScheduledQueryRecentlyFailedRunArgs]] = None,
        schedule_configuration: Optional[ScheduledQueryScheduleConfigurationArgs] = None,
        state: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None,
        target_configuration: Optional[ScheduledQueryTargetConfigurationArgs] = None,
        timeouts: Optional[ScheduledQueryTimeoutsArgs] = None) -> ScheduledQuery
func GetScheduledQuery(ctx *Context, name string, id IDInput, state *ScheduledQueryState, opts ...ResourceOption) (*ScheduledQuery, error)
public static ScheduledQuery Get(string name, Input<string> id, ScheduledQueryState? state, CustomResourceOptions? opts = null)
public static ScheduledQuery get(String name, Output<String> id, ScheduledQueryState state, CustomResourceOptions options)
resources:  _:    type: aws:timestreamquery:ScheduledQuery    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Arn string
ARN of the Scheduled Query.
CreationTime string
Creation time for the scheduled query.
ErrorReportConfiguration ScheduledQueryErrorReportConfiguration
Configuration block for error reporting configuration. See below.
ExecutionRoleArn string
ARN for the IAM role that Timestream will assume when running the scheduled query.
KmsKeyId string
Amazon KMS key used to encrypt the scheduled query resource, at-rest. If not specified, the scheduled query resource will be encrypted with a Timestream owned Amazon KMS key. To specify a KMS key, use the key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix the name with "alias/". If error_report_configuration uses SSE_KMS as the encryption type, the same kms_key_id is used to encrypt the error report at rest.
LastRunSummaries List<ScheduledQueryLastRunSummary>
Runtime summary for the last scheduled query run.
Name string
Name of the scheduled query.
NextInvocationTime string
Next time the scheduled query is scheduled to run.
NotificationConfiguration ScheduledQueryNotificationConfiguration
Configuration block for notification configuration for a scheduled query. A notification is sent by Timestream when a scheduled query is created, its state is updated, or when it is deleted. See below.
PreviousInvocationTime string
Last time the scheduled query was run.
QueryString string
Query string to run. Parameter names can be specified in the query string using the @ character followed by an identifier. The named parameter @scheduled_runtime is reserved and can be used in the query to get the time at which the query is scheduled to run. The timestamp calculated according to the schedule_configuration parameter, will be the value of @scheduled_runtime paramater for each query run. For example, consider an instance of a scheduled query executing on 2021-12-01 00:00:00. For this instance, the @scheduled_runtime parameter is initialized to the timestamp 2021-12-01 00:00:00 when invoking the query.
RecentlyFailedRuns List<ScheduledQueryRecentlyFailedRun>
Runtime summary for the last five failed scheduled query runs.
ScheduleConfiguration ScheduledQueryScheduleConfiguration
Configuration block for schedule configuration for the query. See below.
State string
State of the scheduled query, either ENABLED or DISABLED.
Tags Dictionary<string, string>
Map of tags assigned to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
TagsAll Dictionary<string, string>
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

TargetConfiguration ScheduledQueryTargetConfiguration

Configuration block for writing the result of a query. See below.

The following arguments are optional:

Timeouts ScheduledQueryTimeouts
Arn string
ARN of the Scheduled Query.
CreationTime string
Creation time for the scheduled query.
ErrorReportConfiguration ScheduledQueryErrorReportConfigurationArgs
Configuration block for error reporting configuration. See below.
ExecutionRoleArn string
ARN for the IAM role that Timestream will assume when running the scheduled query.
KmsKeyId string
Amazon KMS key used to encrypt the scheduled query resource, at-rest. If not specified, the scheduled query resource will be encrypted with a Timestream owned Amazon KMS key. To specify a KMS key, use the key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix the name with "alias/". If error_report_configuration uses SSE_KMS as the encryption type, the same kms_key_id is used to encrypt the error report at rest.
LastRunSummaries []ScheduledQueryLastRunSummaryArgs
Runtime summary for the last scheduled query run.
Name string
Name of the scheduled query.
NextInvocationTime string
Next time the scheduled query is scheduled to run.
NotificationConfiguration ScheduledQueryNotificationConfigurationArgs
Configuration block for notification configuration for a scheduled query. A notification is sent by Timestream when a scheduled query is created, its state is updated, or when it is deleted. See below.
PreviousInvocationTime string
Last time the scheduled query was run.
QueryString string
Query string to run. Parameter names can be specified in the query string using the @ character followed by an identifier. The named parameter @scheduled_runtime is reserved and can be used in the query to get the time at which the query is scheduled to run. The timestamp calculated according to the schedule_configuration parameter, will be the value of @scheduled_runtime paramater for each query run. For example, consider an instance of a scheduled query executing on 2021-12-01 00:00:00. For this instance, the @scheduled_runtime parameter is initialized to the timestamp 2021-12-01 00:00:00 when invoking the query.
RecentlyFailedRuns []ScheduledQueryRecentlyFailedRunArgs
Runtime summary for the last five failed scheduled query runs.
ScheduleConfiguration ScheduledQueryScheduleConfigurationArgs
Configuration block for schedule configuration for the query. See below.
State string
State of the scheduled query, either ENABLED or DISABLED.
Tags map[string]string
Map of tags assigned to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
TagsAll map[string]string
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

TargetConfiguration ScheduledQueryTargetConfigurationArgs

Configuration block for writing the result of a query. See below.

The following arguments are optional:

Timeouts ScheduledQueryTimeoutsArgs
arn String
ARN of the Scheduled Query.
creationTime String
Creation time for the scheduled query.
errorReportConfiguration ScheduledQueryErrorReportConfiguration
Configuration block for error reporting configuration. See below.
executionRoleArn String
ARN for the IAM role that Timestream will assume when running the scheduled query.
kmsKeyId String
Amazon KMS key used to encrypt the scheduled query resource, at-rest. If not specified, the scheduled query resource will be encrypted with a Timestream owned Amazon KMS key. To specify a KMS key, use the key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix the name with "alias/". If error_report_configuration uses SSE_KMS as the encryption type, the same kms_key_id is used to encrypt the error report at rest.
lastRunSummaries List<ScheduledQueryLastRunSummary>
Runtime summary for the last scheduled query run.
name String
Name of the scheduled query.
nextInvocationTime String
Next time the scheduled query is scheduled to run.
notificationConfiguration ScheduledQueryNotificationConfiguration
Configuration block for notification configuration for a scheduled query. A notification is sent by Timestream when a scheduled query is created, its state is updated, or when it is deleted. See below.
previousInvocationTime String
Last time the scheduled query was run.
queryString String
Query string to run. Parameter names can be specified in the query string using the @ character followed by an identifier. The named parameter @scheduled_runtime is reserved and can be used in the query to get the time at which the query is scheduled to run. The timestamp calculated according to the schedule_configuration parameter, will be the value of @scheduled_runtime paramater for each query run. For example, consider an instance of a scheduled query executing on 2021-12-01 00:00:00. For this instance, the @scheduled_runtime parameter is initialized to the timestamp 2021-12-01 00:00:00 when invoking the query.
recentlyFailedRuns List<ScheduledQueryRecentlyFailedRun>
Runtime summary for the last five failed scheduled query runs.
scheduleConfiguration ScheduledQueryScheduleConfiguration
Configuration block for schedule configuration for the query. See below.
state String
State of the scheduled query, either ENABLED or DISABLED.
tags Map<String,String>
Map of tags assigned to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tagsAll Map<String,String>
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

targetConfiguration ScheduledQueryTargetConfiguration

Configuration block for writing the result of a query. See below.

The following arguments are optional:

timeouts ScheduledQueryTimeouts
arn string
ARN of the Scheduled Query.
creationTime string
Creation time for the scheduled query.
errorReportConfiguration ScheduledQueryErrorReportConfiguration
Configuration block for error reporting configuration. See below.
executionRoleArn string
ARN for the IAM role that Timestream will assume when running the scheduled query.
kmsKeyId string
Amazon KMS key used to encrypt the scheduled query resource, at-rest. If not specified, the scheduled query resource will be encrypted with a Timestream owned Amazon KMS key. To specify a KMS key, use the key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix the name with "alias/". If error_report_configuration uses SSE_KMS as the encryption type, the same kms_key_id is used to encrypt the error report at rest.
lastRunSummaries ScheduledQueryLastRunSummary[]
Runtime summary for the last scheduled query run.
name string
Name of the scheduled query.
nextInvocationTime string
Next time the scheduled query is scheduled to run.
notificationConfiguration ScheduledQueryNotificationConfiguration
Configuration block for notification configuration for a scheduled query. A notification is sent by Timestream when a scheduled query is created, its state is updated, or when it is deleted. See below.
previousInvocationTime string
Last time the scheduled query was run.
queryString string
Query string to run. Parameter names can be specified in the query string using the @ character followed by an identifier. The named parameter @scheduled_runtime is reserved and can be used in the query to get the time at which the query is scheduled to run. The timestamp calculated according to the schedule_configuration parameter, will be the value of @scheduled_runtime paramater for each query run. For example, consider an instance of a scheduled query executing on 2021-12-01 00:00:00. For this instance, the @scheduled_runtime parameter is initialized to the timestamp 2021-12-01 00:00:00 when invoking the query.
recentlyFailedRuns ScheduledQueryRecentlyFailedRun[]
Runtime summary for the last five failed scheduled query runs.
scheduleConfiguration ScheduledQueryScheduleConfiguration
Configuration block for schedule configuration for the query. See below.
state string
State of the scheduled query, either ENABLED or DISABLED.
tags {[key: string]: string}
Map of tags assigned to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tagsAll {[key: string]: string}
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

targetConfiguration ScheduledQueryTargetConfiguration

Configuration block for writing the result of a query. See below.

The following arguments are optional:

timeouts ScheduledQueryTimeouts
arn str
ARN of the Scheduled Query.
creation_time str
Creation time for the scheduled query.
error_report_configuration ScheduledQueryErrorReportConfigurationArgs
Configuration block for error reporting configuration. See below.
execution_role_arn str
ARN for the IAM role that Timestream will assume when running the scheduled query.
kms_key_id str
Amazon KMS key used to encrypt the scheduled query resource, at-rest. If not specified, the scheduled query resource will be encrypted with a Timestream owned Amazon KMS key. To specify a KMS key, use the key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix the name with "alias/". If error_report_configuration uses SSE_KMS as the encryption type, the same kms_key_id is used to encrypt the error report at rest.
last_run_summaries Sequence[ScheduledQueryLastRunSummaryArgs]
Runtime summary for the last scheduled query run.
name str
Name of the scheduled query.
next_invocation_time str
Next time the scheduled query is scheduled to run.
notification_configuration ScheduledQueryNotificationConfigurationArgs
Configuration block for notification configuration for a scheduled query. A notification is sent by Timestream when a scheduled query is created, its state is updated, or when it is deleted. See below.
previous_invocation_time str
Last time the scheduled query was run.
query_string str
Query string to run. Parameter names can be specified in the query string using the @ character followed by an identifier. The named parameter @scheduled_runtime is reserved and can be used in the query to get the time at which the query is scheduled to run. The timestamp calculated according to the schedule_configuration parameter, will be the value of @scheduled_runtime paramater for each query run. For example, consider an instance of a scheduled query executing on 2021-12-01 00:00:00. For this instance, the @scheduled_runtime parameter is initialized to the timestamp 2021-12-01 00:00:00 when invoking the query.
recently_failed_runs Sequence[ScheduledQueryRecentlyFailedRunArgs]
Runtime summary for the last five failed scheduled query runs.
schedule_configuration ScheduledQueryScheduleConfigurationArgs
Configuration block for schedule configuration for the query. See below.
state str
State of the scheduled query, either ENABLED or DISABLED.
tags Mapping[str, str]
Map of tags assigned to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tags_all Mapping[str, str]
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

target_configuration ScheduledQueryTargetConfigurationArgs

Configuration block for writing the result of a query. See below.

The following arguments are optional:

timeouts ScheduledQueryTimeoutsArgs
arn String
ARN of the Scheduled Query.
creationTime String
Creation time for the scheduled query.
errorReportConfiguration Property Map
Configuration block for error reporting configuration. See below.
executionRoleArn String
ARN for the IAM role that Timestream will assume when running the scheduled query.
kmsKeyId String
Amazon KMS key used to encrypt the scheduled query resource, at-rest. If not specified, the scheduled query resource will be encrypted with a Timestream owned Amazon KMS key. To specify a KMS key, use the key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix the name with "alias/". If error_report_configuration uses SSE_KMS as the encryption type, the same kms_key_id is used to encrypt the error report at rest.
lastRunSummaries List<Property Map>
Runtime summary for the last scheduled query run.
name String
Name of the scheduled query.
nextInvocationTime String
Next time the scheduled query is scheduled to run.
notificationConfiguration Property Map
Configuration block for notification configuration for a scheduled query. A notification is sent by Timestream when a scheduled query is created, its state is updated, or when it is deleted. See below.
previousInvocationTime String
Last time the scheduled query was run.
queryString String
Query string to run. Parameter names can be specified in the query string using the @ character followed by an identifier. The named parameter @scheduled_runtime is reserved and can be used in the query to get the time at which the query is scheduled to run. The timestamp calculated according to the schedule_configuration parameter, will be the value of @scheduled_runtime paramater for each query run. For example, consider an instance of a scheduled query executing on 2021-12-01 00:00:00. For this instance, the @scheduled_runtime parameter is initialized to the timestamp 2021-12-01 00:00:00 when invoking the query.
recentlyFailedRuns List<Property Map>
Runtime summary for the last five failed scheduled query runs.
scheduleConfiguration Property Map
Configuration block for schedule configuration for the query. See below.
state String
State of the scheduled query, either ENABLED or DISABLED.
tags Map<String>
Map of tags assigned to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
tagsAll Map<String>
Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Deprecated: Please use tags instead.

targetConfiguration Property Map

Configuration block for writing the result of a query. See below.

The following arguments are optional:

timeouts Property Map

Supporting Types

ScheduledQueryErrorReportConfiguration
, ScheduledQueryErrorReportConfigurationArgs

S3Configuration This property is required. ScheduledQueryErrorReportConfigurationS3Configuration
Configuration block for the S3 configuration for the error reports. See below.
S3Configuration This property is required. ScheduledQueryErrorReportConfigurationS3Configuration
Configuration block for the S3 configuration for the error reports. See below.
s3Configuration This property is required. ScheduledQueryErrorReportConfigurationS3Configuration
Configuration block for the S3 configuration for the error reports. See below.
s3Configuration This property is required. ScheduledQueryErrorReportConfigurationS3Configuration
Configuration block for the S3 configuration for the error reports. See below.
s3_configuration This property is required. ScheduledQueryErrorReportConfigurationS3Configuration
Configuration block for the S3 configuration for the error reports. See below.
s3Configuration This property is required. Property Map
Configuration block for the S3 configuration for the error reports. See below.

ScheduledQueryErrorReportConfigurationS3Configuration
, ScheduledQueryErrorReportConfigurationS3ConfigurationArgs

BucketName This property is required. string
Name of the S3 bucket under which error reports will be created.
EncryptionOption string
Encryption at rest options for the error reports. If no encryption option is specified, Timestream will choose SSE_S3 as default. Valid values are SSE_S3, SSE_KMS.
ObjectKeyPrefix string
Prefix for the error report key.
BucketName This property is required. string
Name of the S3 bucket under which error reports will be created.
EncryptionOption string
Encryption at rest options for the error reports. If no encryption option is specified, Timestream will choose SSE_S3 as default. Valid values are SSE_S3, SSE_KMS.
ObjectKeyPrefix string
Prefix for the error report key.
bucketName This property is required. String
Name of the S3 bucket under which error reports will be created.
encryptionOption String
Encryption at rest options for the error reports. If no encryption option is specified, Timestream will choose SSE_S3 as default. Valid values are SSE_S3, SSE_KMS.
objectKeyPrefix String
Prefix for the error report key.
bucketName This property is required. string
Name of the S3 bucket under which error reports will be created.
encryptionOption string
Encryption at rest options for the error reports. If no encryption option is specified, Timestream will choose SSE_S3 as default. Valid values are SSE_S3, SSE_KMS.
objectKeyPrefix string
Prefix for the error report key.
bucket_name This property is required. str
Name of the S3 bucket under which error reports will be created.
encryption_option str
Encryption at rest options for the error reports. If no encryption option is specified, Timestream will choose SSE_S3 as default. Valid values are SSE_S3, SSE_KMS.
object_key_prefix str
Prefix for the error report key.
bucketName This property is required. String
Name of the S3 bucket under which error reports will be created.
encryptionOption String
Encryption at rest options for the error reports. If no encryption option is specified, Timestream will choose SSE_S3 as default. Valid values are SSE_S3, SSE_KMS.
objectKeyPrefix String
Prefix for the error report key.

ScheduledQueryLastRunSummary
, ScheduledQueryLastRunSummaryArgs

ErrorReportLocations List<ScheduledQueryLastRunSummaryErrorReportLocation>
S3 location for error report.
ExecutionStats List<ScheduledQueryLastRunSummaryExecutionStat>
Statistics for a single scheduled query run.
FailureReason string
Error message for the scheduled query in case of failure. You might have to look at the error report to get more detailed error reasons.
InvocationTime string
InvocationTime for this run. This is the time at which the query is scheduled to run. Parameter @scheduled_runtime can be used in the query to get the value.
QueryInsightsResponses List<ScheduledQueryLastRunSummaryQueryInsightsResponse>
Various insights and metrics related to the run summary of the scheduled query.
RunStatus string
Status of a scheduled query run. Valid values: AUTO_TRIGGER_SUCCESS, AUTO_TRIGGER_FAILURE, MANUAL_TRIGGER_SUCCESS, MANUAL_TRIGGER_FAILURE.
TriggerTime string
Actual time when the query was run.
ErrorReportLocations []ScheduledQueryLastRunSummaryErrorReportLocation
S3 location for error report.
ExecutionStats []ScheduledQueryLastRunSummaryExecutionStat
Statistics for a single scheduled query run.
FailureReason string
Error message for the scheduled query in case of failure. You might have to look at the error report to get more detailed error reasons.
InvocationTime string
InvocationTime for this run. This is the time at which the query is scheduled to run. Parameter @scheduled_runtime can be used in the query to get the value.
QueryInsightsResponses []ScheduledQueryLastRunSummaryQueryInsightsResponse
Various insights and metrics related to the run summary of the scheduled query.
RunStatus string
Status of a scheduled query run. Valid values: AUTO_TRIGGER_SUCCESS, AUTO_TRIGGER_FAILURE, MANUAL_TRIGGER_SUCCESS, MANUAL_TRIGGER_FAILURE.
TriggerTime string
Actual time when the query was run.
errorReportLocations List<ScheduledQueryLastRunSummaryErrorReportLocation>
S3 location for error report.
executionStats List<ScheduledQueryLastRunSummaryExecutionStat>
Statistics for a single scheduled query run.
failureReason String
Error message for the scheduled query in case of failure. You might have to look at the error report to get more detailed error reasons.
invocationTime String
InvocationTime for this run. This is the time at which the query is scheduled to run. Parameter @scheduled_runtime can be used in the query to get the value.
queryInsightsResponses List<ScheduledQueryLastRunSummaryQueryInsightsResponse>
Various insights and metrics related to the run summary of the scheduled query.
runStatus String
Status of a scheduled query run. Valid values: AUTO_TRIGGER_SUCCESS, AUTO_TRIGGER_FAILURE, MANUAL_TRIGGER_SUCCESS, MANUAL_TRIGGER_FAILURE.
triggerTime String
Actual time when the query was run.
errorReportLocations ScheduledQueryLastRunSummaryErrorReportLocation[]
S3 location for error report.
executionStats ScheduledQueryLastRunSummaryExecutionStat[]
Statistics for a single scheduled query run.
failureReason string
Error message for the scheduled query in case of failure. You might have to look at the error report to get more detailed error reasons.
invocationTime string
InvocationTime for this run. This is the time at which the query is scheduled to run. Parameter @scheduled_runtime can be used in the query to get the value.
queryInsightsResponses ScheduledQueryLastRunSummaryQueryInsightsResponse[]
Various insights and metrics related to the run summary of the scheduled query.
runStatus string
Status of a scheduled query run. Valid values: AUTO_TRIGGER_SUCCESS, AUTO_TRIGGER_FAILURE, MANUAL_TRIGGER_SUCCESS, MANUAL_TRIGGER_FAILURE.
triggerTime string
Actual time when the query was run.
error_report_locations Sequence[ScheduledQueryLastRunSummaryErrorReportLocation]
S3 location for error report.
execution_stats Sequence[ScheduledQueryLastRunSummaryExecutionStat]
Statistics for a single scheduled query run.
failure_reason str
Error message for the scheduled query in case of failure. You might have to look at the error report to get more detailed error reasons.
invocation_time str
InvocationTime for this run. This is the time at which the query is scheduled to run. Parameter @scheduled_runtime can be used in the query to get the value.
query_insights_responses Sequence[ScheduledQueryLastRunSummaryQueryInsightsResponse]
Various insights and metrics related to the run summary of the scheduled query.
run_status str
Status of a scheduled query run. Valid values: AUTO_TRIGGER_SUCCESS, AUTO_TRIGGER_FAILURE, MANUAL_TRIGGER_SUCCESS, MANUAL_TRIGGER_FAILURE.
trigger_time str
Actual time when the query was run.
errorReportLocations List<Property Map>
S3 location for error report.
executionStats List<Property Map>
Statistics for a single scheduled query run.
failureReason String
Error message for the scheduled query in case of failure. You might have to look at the error report to get more detailed error reasons.
invocationTime String
InvocationTime for this run. This is the time at which the query is scheduled to run. Parameter @scheduled_runtime can be used in the query to get the value.
queryInsightsResponses List<Property Map>
Various insights and metrics related to the run summary of the scheduled query.
runStatus String
Status of a scheduled query run. Valid values: AUTO_TRIGGER_SUCCESS, AUTO_TRIGGER_FAILURE, MANUAL_TRIGGER_SUCCESS, MANUAL_TRIGGER_FAILURE.
triggerTime String
Actual time when the query was run.

ScheduledQueryLastRunSummaryErrorReportLocation
, ScheduledQueryLastRunSummaryErrorReportLocationArgs

s3ReportLocations List<Property Map>
S3 location where error reports are written.

ScheduledQueryLastRunSummaryErrorReportLocationS3ReportLocation
, ScheduledQueryLastRunSummaryErrorReportLocationS3ReportLocationArgs

BucketName string
S3 bucket name.
ObjectKey string
S3 key.
BucketName string
S3 bucket name.
ObjectKey string
S3 key.
bucketName String
S3 bucket name.
objectKey String
S3 key.
bucketName string
S3 bucket name.
objectKey string
S3 key.
bucket_name str
S3 bucket name.
object_key str
S3 key.
bucketName String
S3 bucket name.
objectKey String
S3 key.

ScheduledQueryLastRunSummaryExecutionStat
, ScheduledQueryLastRunSummaryExecutionStatArgs

BytesMetered int
Bytes metered for a single scheduled query run.
CumulativeBytesScanned int
Bytes scanned for a single scheduled query run.
DataWrites int
Data writes metered for records ingested in a single scheduled query run.
ExecutionTimeInMillis int
Total time, measured in milliseconds, that was needed for the scheduled query run to complete.
QueryResultRows int
Number of rows present in the output from running a query before ingestion to destination data source.
RecordsIngested int
Number of records ingested for a single scheduled query run.
BytesMetered int
Bytes metered for a single scheduled query run.
CumulativeBytesScanned int
Bytes scanned for a single scheduled query run.
DataWrites int
Data writes metered for records ingested in a single scheduled query run.
ExecutionTimeInMillis int
Total time, measured in milliseconds, that was needed for the scheduled query run to complete.
QueryResultRows int
Number of rows present in the output from running a query before ingestion to destination data source.
RecordsIngested int
Number of records ingested for a single scheduled query run.
bytesMetered Integer
Bytes metered for a single scheduled query run.
cumulativeBytesScanned Integer
Bytes scanned for a single scheduled query run.
dataWrites Integer
Data writes metered for records ingested in a single scheduled query run.
executionTimeInMillis Integer
Total time, measured in milliseconds, that was needed for the scheduled query run to complete.
queryResultRows Integer
Number of rows present in the output from running a query before ingestion to destination data source.
recordsIngested Integer
Number of records ingested for a single scheduled query run.
bytesMetered number
Bytes metered for a single scheduled query run.
cumulativeBytesScanned number
Bytes scanned for a single scheduled query run.
dataWrites number
Data writes metered for records ingested in a single scheduled query run.
executionTimeInMillis number
Total time, measured in milliseconds, that was needed for the scheduled query run to complete.
queryResultRows number
Number of rows present in the output from running a query before ingestion to destination data source.
recordsIngested number
Number of records ingested for a single scheduled query run.
bytes_metered int
Bytes metered for a single scheduled query run.
cumulative_bytes_scanned int
Bytes scanned for a single scheduled query run.
data_writes int
Data writes metered for records ingested in a single scheduled query run.
execution_time_in_millis int
Total time, measured in milliseconds, that was needed for the scheduled query run to complete.
query_result_rows int
Number of rows present in the output from running a query before ingestion to destination data source.
records_ingested int
Number of records ingested for a single scheduled query run.
bytesMetered Number
Bytes metered for a single scheduled query run.
cumulativeBytesScanned Number
Bytes scanned for a single scheduled query run.
dataWrites Number
Data writes metered for records ingested in a single scheduled query run.
executionTimeInMillis Number
Total time, measured in milliseconds, that was needed for the scheduled query run to complete.
queryResultRows Number
Number of rows present in the output from running a query before ingestion to destination data source.
recordsIngested Number
Number of records ingested for a single scheduled query run.

ScheduledQueryLastRunSummaryQueryInsightsResponse
, ScheduledQueryLastRunSummaryQueryInsightsResponseArgs

OutputBytes int
Size of query result set in bytes. You can use this data to validate if the result set has changed as part of the query tuning exercise.
OutputRows int
Total number of rows returned as part of the query result set. You can use this data to validate if the number of rows in the result set have changed as part of the query tuning exercise.
QuerySpatialCoverages List<ScheduledQueryLastRunSummaryQueryInsightsResponseQuerySpatialCoverage>
Insights into the spatial coverage of the query, including the table with sub-optimal (max) spatial pruning. This information can help you identify areas for improvement in your partitioning strategy to enhance spatial pruning.
QueryTableCount int
Number of tables in the query.
QueryTemporalRanges List<ScheduledQueryLastRunSummaryQueryInsightsResponseQueryTemporalRange>
Insights into the temporal range of the query, including the table with the largest (max) time range. Following are some of the potential options for optimizing time-based pruning: add missing time-predicates, remove functions around the time predicates, add time predicates to all the sub-queries.
OutputBytes int
Size of query result set in bytes. You can use this data to validate if the result set has changed as part of the query tuning exercise.
OutputRows int
Total number of rows returned as part of the query result set. You can use this data to validate if the number of rows in the result set have changed as part of the query tuning exercise.
QuerySpatialCoverages []ScheduledQueryLastRunSummaryQueryInsightsResponseQuerySpatialCoverage
Insights into the spatial coverage of the query, including the table with sub-optimal (max) spatial pruning. This information can help you identify areas for improvement in your partitioning strategy to enhance spatial pruning.
QueryTableCount int
Number of tables in the query.
QueryTemporalRanges []ScheduledQueryLastRunSummaryQueryInsightsResponseQueryTemporalRange
Insights into the temporal range of the query, including the table with the largest (max) time range. Following are some of the potential options for optimizing time-based pruning: add missing time-predicates, remove functions around the time predicates, add time predicates to all the sub-queries.
outputBytes Integer
Size of query result set in bytes. You can use this data to validate if the result set has changed as part of the query tuning exercise.
outputRows Integer
Total number of rows returned as part of the query result set. You can use this data to validate if the number of rows in the result set have changed as part of the query tuning exercise.
querySpatialCoverages List<ScheduledQueryLastRunSummaryQueryInsightsResponseQuerySpatialCoverage>
Insights into the spatial coverage of the query, including the table with sub-optimal (max) spatial pruning. This information can help you identify areas for improvement in your partitioning strategy to enhance spatial pruning.
queryTableCount Integer
Number of tables in the query.
queryTemporalRanges List<ScheduledQueryLastRunSummaryQueryInsightsResponseQueryTemporalRange>
Insights into the temporal range of the query, including the table with the largest (max) time range. Following are some of the potential options for optimizing time-based pruning: add missing time-predicates, remove functions around the time predicates, add time predicates to all the sub-queries.
outputBytes number
Size of query result set in bytes. You can use this data to validate if the result set has changed as part of the query tuning exercise.
outputRows number
Total number of rows returned as part of the query result set. You can use this data to validate if the number of rows in the result set have changed as part of the query tuning exercise.
querySpatialCoverages ScheduledQueryLastRunSummaryQueryInsightsResponseQuerySpatialCoverage[]
Insights into the spatial coverage of the query, including the table with sub-optimal (max) spatial pruning. This information can help you identify areas for improvement in your partitioning strategy to enhance spatial pruning.
queryTableCount number
Number of tables in the query.
queryTemporalRanges ScheduledQueryLastRunSummaryQueryInsightsResponseQueryTemporalRange[]
Insights into the temporal range of the query, including the table with the largest (max) time range. Following are some of the potential options for optimizing time-based pruning: add missing time-predicates, remove functions around the time predicates, add time predicates to all the sub-queries.
output_bytes int
Size of query result set in bytes. You can use this data to validate if the result set has changed as part of the query tuning exercise.
output_rows int
Total number of rows returned as part of the query result set. You can use this data to validate if the number of rows in the result set have changed as part of the query tuning exercise.
query_spatial_coverages Sequence[ScheduledQueryLastRunSummaryQueryInsightsResponseQuerySpatialCoverage]
Insights into the spatial coverage of the query, including the table with sub-optimal (max) spatial pruning. This information can help you identify areas for improvement in your partitioning strategy to enhance spatial pruning.
query_table_count int
Number of tables in the query.
query_temporal_ranges Sequence[ScheduledQueryLastRunSummaryQueryInsightsResponseQueryTemporalRange]
Insights into the temporal range of the query, including the table with the largest (max) time range. Following are some of the potential options for optimizing time-based pruning: add missing time-predicates, remove functions around the time predicates, add time predicates to all the sub-queries.
outputBytes Number
Size of query result set in bytes. You can use this data to validate if the result set has changed as part of the query tuning exercise.
outputRows Number
Total number of rows returned as part of the query result set. You can use this data to validate if the number of rows in the result set have changed as part of the query tuning exercise.
querySpatialCoverages List<Property Map>
Insights into the spatial coverage of the query, including the table with sub-optimal (max) spatial pruning. This information can help you identify areas for improvement in your partitioning strategy to enhance spatial pruning.
queryTableCount Number
Number of tables in the query.
queryTemporalRanges List<Property Map>
Insights into the temporal range of the query, including the table with the largest (max) time range. Following are some of the potential options for optimizing time-based pruning: add missing time-predicates, remove functions around the time predicates, add time predicates to all the sub-queries.

ScheduledQueryLastRunSummaryQueryInsightsResponseQuerySpatialCoverage
, ScheduledQueryLastRunSummaryQueryInsightsResponseQuerySpatialCoverageArgs

Maxes List<ScheduledQueryLastRunSummaryQueryInsightsResponseQuerySpatialCoverageMaxis>
Insights into the most sub-optimal performing table on the temporal axis:
Maxes []ScheduledQueryLastRunSummaryQueryInsightsResponseQuerySpatialCoverageMaxis
Insights into the most sub-optimal performing table on the temporal axis:
maxes List<ScheduledQueryLastRunSummaryQueryInsightsResponseQuerySpatialCoverageMaxis>
Insights into the most sub-optimal performing table on the temporal axis:
maxes ScheduledQueryLastRunSummaryQueryInsightsResponseQuerySpatialCoverageMaxis[]
Insights into the most sub-optimal performing table on the temporal axis:
maxes Sequence[ScheduledQueryLastRunSummaryQueryInsightsResponseQuerySpatialCoverageMaxis]
Insights into the most sub-optimal performing table on the temporal axis:
maxes List<Property Map>
Insights into the most sub-optimal performing table on the temporal axis:

ScheduledQueryLastRunSummaryQueryInsightsResponseQuerySpatialCoverageMaxis
, ScheduledQueryLastRunSummaryQueryInsightsResponseQuerySpatialCoverageMaxisArgs

PartitionKeys List<string>
Partition key used for partitioning, which can be a default measure_name or a customer defined partition key.
TableArn string
ARN of the table which is queried with the largest time range.
Value double
Maximum duration in nanoseconds between the start and end of the query.
PartitionKeys []string
Partition key used for partitioning, which can be a default measure_name or a customer defined partition key.
TableArn string
ARN of the table which is queried with the largest time range.
Value float64
Maximum duration in nanoseconds between the start and end of the query.
partitionKeys List<String>
Partition key used for partitioning, which can be a default measure_name or a customer defined partition key.
tableArn String
ARN of the table which is queried with the largest time range.
value Double
Maximum duration in nanoseconds between the start and end of the query.
partitionKeys string[]
Partition key used for partitioning, which can be a default measure_name or a customer defined partition key.
tableArn string
ARN of the table which is queried with the largest time range.
value number
Maximum duration in nanoseconds between the start and end of the query.
partition_keys Sequence[str]
Partition key used for partitioning, which can be a default measure_name or a customer defined partition key.
table_arn str
ARN of the table which is queried with the largest time range.
value float
Maximum duration in nanoseconds between the start and end of the query.
partitionKeys List<String>
Partition key used for partitioning, which can be a default measure_name or a customer defined partition key.
tableArn String
ARN of the table which is queried with the largest time range.
value Number
Maximum duration in nanoseconds between the start and end of the query.

ScheduledQueryLastRunSummaryQueryInsightsResponseQueryTemporalRange
, ScheduledQueryLastRunSummaryQueryInsightsResponseQueryTemporalRangeArgs

Maxes List<ScheduledQueryLastRunSummaryQueryInsightsResponseQueryTemporalRangeMaxis>
Insights into the most sub-optimal performing table on the temporal axis:
Maxes []ScheduledQueryLastRunSummaryQueryInsightsResponseQueryTemporalRangeMaxis
Insights into the most sub-optimal performing table on the temporal axis:
maxes List<ScheduledQueryLastRunSummaryQueryInsightsResponseQueryTemporalRangeMaxis>
Insights into the most sub-optimal performing table on the temporal axis:
maxes ScheduledQueryLastRunSummaryQueryInsightsResponseQueryTemporalRangeMaxis[]
Insights into the most sub-optimal performing table on the temporal axis:
maxes Sequence[ScheduledQueryLastRunSummaryQueryInsightsResponseQueryTemporalRangeMaxis]
Insights into the most sub-optimal performing table on the temporal axis:
maxes List<Property Map>
Insights into the most sub-optimal performing table on the temporal axis:

ScheduledQueryLastRunSummaryQueryInsightsResponseQueryTemporalRangeMaxis
, ScheduledQueryLastRunSummaryQueryInsightsResponseQueryTemporalRangeMaxisArgs

TableArn string
ARN of the table which is queried with the largest time range.
Value int
Maximum duration in nanoseconds between the start and end of the query.
TableArn string
ARN of the table which is queried with the largest time range.
Value int
Maximum duration in nanoseconds between the start and end of the query.
tableArn String
ARN of the table which is queried with the largest time range.
value Integer
Maximum duration in nanoseconds between the start and end of the query.
tableArn string
ARN of the table which is queried with the largest time range.
value number
Maximum duration in nanoseconds between the start and end of the query.
table_arn str
ARN of the table which is queried with the largest time range.
value int
Maximum duration in nanoseconds between the start and end of the query.
tableArn String
ARN of the table which is queried with the largest time range.
value Number
Maximum duration in nanoseconds between the start and end of the query.

ScheduledQueryNotificationConfiguration
, ScheduledQueryNotificationConfigurationArgs

SnsConfiguration This property is required. ScheduledQueryNotificationConfigurationSnsConfiguration
Configuration block for details about the Amazon Simple Notification Service (SNS) configuration. See below.
SnsConfiguration This property is required. ScheduledQueryNotificationConfigurationSnsConfiguration
Configuration block for details about the Amazon Simple Notification Service (SNS) configuration. See below.
snsConfiguration This property is required. ScheduledQueryNotificationConfigurationSnsConfiguration
Configuration block for details about the Amazon Simple Notification Service (SNS) configuration. See below.
snsConfiguration This property is required. ScheduledQueryNotificationConfigurationSnsConfiguration
Configuration block for details about the Amazon Simple Notification Service (SNS) configuration. See below.
sns_configuration This property is required. ScheduledQueryNotificationConfigurationSnsConfiguration
Configuration block for details about the Amazon Simple Notification Service (SNS) configuration. See below.
snsConfiguration This property is required. Property Map
Configuration block for details about the Amazon Simple Notification Service (SNS) configuration. See below.

ScheduledQueryNotificationConfigurationSnsConfiguration
, ScheduledQueryNotificationConfigurationSnsConfigurationArgs

TopicArn This property is required. string
SNS topic ARN that the scheduled query status notifications will be sent to.
TopicArn This property is required. string
SNS topic ARN that the scheduled query status notifications will be sent to.
topicArn This property is required. String
SNS topic ARN that the scheduled query status notifications will be sent to.
topicArn This property is required. string
SNS topic ARN that the scheduled query status notifications will be sent to.
topic_arn This property is required. str
SNS topic ARN that the scheduled query status notifications will be sent to.
topicArn This property is required. String
SNS topic ARN that the scheduled query status notifications will be sent to.

ScheduledQueryRecentlyFailedRun
, ScheduledQueryRecentlyFailedRunArgs

ErrorReportLocations List<ScheduledQueryRecentlyFailedRunErrorReportLocation>
S3 location for error report.
ExecutionStats List<ScheduledQueryRecentlyFailedRunExecutionStat>
Statistics for a single scheduled query run.
FailureReason string
Error message for the scheduled query in case of failure. You might have to look at the error report to get more detailed error reasons.
InvocationTime string
InvocationTime for this run. This is the time at which the query is scheduled to run. Parameter @scheduled_runtime can be used in the query to get the value.
QueryInsightsResponses List<ScheduledQueryRecentlyFailedRunQueryInsightsResponse>
Various insights and metrics related to the run summary of the scheduled query.
RunStatus string
Status of a scheduled query run. Valid values: AUTO_TRIGGER_SUCCESS, AUTO_TRIGGER_FAILURE, MANUAL_TRIGGER_SUCCESS, MANUAL_TRIGGER_FAILURE.
TriggerTime string
Actual time when the query was run.
ErrorReportLocations []ScheduledQueryRecentlyFailedRunErrorReportLocation
S3 location for error report.
ExecutionStats []ScheduledQueryRecentlyFailedRunExecutionStat
Statistics for a single scheduled query run.
FailureReason string
Error message for the scheduled query in case of failure. You might have to look at the error report to get more detailed error reasons.
InvocationTime string
InvocationTime for this run. This is the time at which the query is scheduled to run. Parameter @scheduled_runtime can be used in the query to get the value.
QueryInsightsResponses []ScheduledQueryRecentlyFailedRunQueryInsightsResponse
Various insights and metrics related to the run summary of the scheduled query.
RunStatus string
Status of a scheduled query run. Valid values: AUTO_TRIGGER_SUCCESS, AUTO_TRIGGER_FAILURE, MANUAL_TRIGGER_SUCCESS, MANUAL_TRIGGER_FAILURE.
TriggerTime string
Actual time when the query was run.
errorReportLocations List<ScheduledQueryRecentlyFailedRunErrorReportLocation>
S3 location for error report.
executionStats List<ScheduledQueryRecentlyFailedRunExecutionStat>
Statistics for a single scheduled query run.
failureReason String
Error message for the scheduled query in case of failure. You might have to look at the error report to get more detailed error reasons.
invocationTime String
InvocationTime for this run. This is the time at which the query is scheduled to run. Parameter @scheduled_runtime can be used in the query to get the value.
queryInsightsResponses List<ScheduledQueryRecentlyFailedRunQueryInsightsResponse>
Various insights and metrics related to the run summary of the scheduled query.
runStatus String
Status of a scheduled query run. Valid values: AUTO_TRIGGER_SUCCESS, AUTO_TRIGGER_FAILURE, MANUAL_TRIGGER_SUCCESS, MANUAL_TRIGGER_FAILURE.
triggerTime String
Actual time when the query was run.
errorReportLocations ScheduledQueryRecentlyFailedRunErrorReportLocation[]
S3 location for error report.
executionStats ScheduledQueryRecentlyFailedRunExecutionStat[]
Statistics for a single scheduled query run.
failureReason string
Error message for the scheduled query in case of failure. You might have to look at the error report to get more detailed error reasons.
invocationTime string
InvocationTime for this run. This is the time at which the query is scheduled to run. Parameter @scheduled_runtime can be used in the query to get the value.
queryInsightsResponses ScheduledQueryRecentlyFailedRunQueryInsightsResponse[]
Various insights and metrics related to the run summary of the scheduled query.
runStatus string
Status of a scheduled query run. Valid values: AUTO_TRIGGER_SUCCESS, AUTO_TRIGGER_FAILURE, MANUAL_TRIGGER_SUCCESS, MANUAL_TRIGGER_FAILURE.
triggerTime string
Actual time when the query was run.
error_report_locations Sequence[ScheduledQueryRecentlyFailedRunErrorReportLocation]
S3 location for error report.
execution_stats Sequence[ScheduledQueryRecentlyFailedRunExecutionStat]
Statistics for a single scheduled query run.
failure_reason str
Error message for the scheduled query in case of failure. You might have to look at the error report to get more detailed error reasons.
invocation_time str
InvocationTime for this run. This is the time at which the query is scheduled to run. Parameter @scheduled_runtime can be used in the query to get the value.
query_insights_responses Sequence[ScheduledQueryRecentlyFailedRunQueryInsightsResponse]
Various insights and metrics related to the run summary of the scheduled query.
run_status str
Status of a scheduled query run. Valid values: AUTO_TRIGGER_SUCCESS, AUTO_TRIGGER_FAILURE, MANUAL_TRIGGER_SUCCESS, MANUAL_TRIGGER_FAILURE.
trigger_time str
Actual time when the query was run.
errorReportLocations List<Property Map>
S3 location for error report.
executionStats List<Property Map>
Statistics for a single scheduled query run.
failureReason String
Error message for the scheduled query in case of failure. You might have to look at the error report to get more detailed error reasons.
invocationTime String
InvocationTime for this run. This is the time at which the query is scheduled to run. Parameter @scheduled_runtime can be used in the query to get the value.
queryInsightsResponses List<Property Map>
Various insights and metrics related to the run summary of the scheduled query.
runStatus String
Status of a scheduled query run. Valid values: AUTO_TRIGGER_SUCCESS, AUTO_TRIGGER_FAILURE, MANUAL_TRIGGER_SUCCESS, MANUAL_TRIGGER_FAILURE.
triggerTime String
Actual time when the query was run.

ScheduledQueryRecentlyFailedRunErrorReportLocation
, ScheduledQueryRecentlyFailedRunErrorReportLocationArgs

s3ReportLocations List<Property Map>
S3 location where error reports are written.

ScheduledQueryRecentlyFailedRunErrorReportLocationS3ReportLocation
, ScheduledQueryRecentlyFailedRunErrorReportLocationS3ReportLocationArgs

BucketName string
S3 bucket name.
ObjectKey string
S3 key.
BucketName string
S3 bucket name.
ObjectKey string
S3 key.
bucketName String
S3 bucket name.
objectKey String
S3 key.
bucketName string
S3 bucket name.
objectKey string
S3 key.
bucket_name str
S3 bucket name.
object_key str
S3 key.
bucketName String
S3 bucket name.
objectKey String
S3 key.

ScheduledQueryRecentlyFailedRunExecutionStat
, ScheduledQueryRecentlyFailedRunExecutionStatArgs

BytesMetered int
Bytes metered for a single scheduled query run.
CumulativeBytesScanned int
Bytes scanned for a single scheduled query run.
DataWrites int
Data writes metered for records ingested in a single scheduled query run.
ExecutionTimeInMillis int
Total time, measured in milliseconds, that was needed for the scheduled query run to complete.
QueryResultRows int
Number of rows present in the output from running a query before ingestion to destination data source.
RecordsIngested int
Number of records ingested for a single scheduled query run.
BytesMetered int
Bytes metered for a single scheduled query run.
CumulativeBytesScanned int
Bytes scanned for a single scheduled query run.
DataWrites int
Data writes metered for records ingested in a single scheduled query run.
ExecutionTimeInMillis int
Total time, measured in milliseconds, that was needed for the scheduled query run to complete.
QueryResultRows int
Number of rows present in the output from running a query before ingestion to destination data source.
RecordsIngested int
Number of records ingested for a single scheduled query run.
bytesMetered Integer
Bytes metered for a single scheduled query run.
cumulativeBytesScanned Integer
Bytes scanned for a single scheduled query run.
dataWrites Integer
Data writes metered for records ingested in a single scheduled query run.
executionTimeInMillis Integer
Total time, measured in milliseconds, that was needed for the scheduled query run to complete.
queryResultRows Integer
Number of rows present in the output from running a query before ingestion to destination data source.
recordsIngested Integer
Number of records ingested for a single scheduled query run.
bytesMetered number
Bytes metered for a single scheduled query run.
cumulativeBytesScanned number
Bytes scanned for a single scheduled query run.
dataWrites number
Data writes metered for records ingested in a single scheduled query run.
executionTimeInMillis number
Total time, measured in milliseconds, that was needed for the scheduled query run to complete.
queryResultRows number
Number of rows present in the output from running a query before ingestion to destination data source.
recordsIngested number
Number of records ingested for a single scheduled query run.
bytes_metered int
Bytes metered for a single scheduled query run.
cumulative_bytes_scanned int
Bytes scanned for a single scheduled query run.
data_writes int
Data writes metered for records ingested in a single scheduled query run.
execution_time_in_millis int
Total time, measured in milliseconds, that was needed for the scheduled query run to complete.
query_result_rows int
Number of rows present in the output from running a query before ingestion to destination data source.
records_ingested int
Number of records ingested for a single scheduled query run.
bytesMetered Number
Bytes metered for a single scheduled query run.
cumulativeBytesScanned Number
Bytes scanned for a single scheduled query run.
dataWrites Number
Data writes metered for records ingested in a single scheduled query run.
executionTimeInMillis Number
Total time, measured in milliseconds, that was needed for the scheduled query run to complete.
queryResultRows Number
Number of rows present in the output from running a query before ingestion to destination data source.
recordsIngested Number
Number of records ingested for a single scheduled query run.

ScheduledQueryRecentlyFailedRunQueryInsightsResponse
, ScheduledQueryRecentlyFailedRunQueryInsightsResponseArgs

OutputBytes int
Size of query result set in bytes. You can use this data to validate if the result set has changed as part of the query tuning exercise.
OutputRows int
Total number of rows returned as part of the query result set. You can use this data to validate if the number of rows in the result set have changed as part of the query tuning exercise.
QuerySpatialCoverages List<ScheduledQueryRecentlyFailedRunQueryInsightsResponseQuerySpatialCoverage>
Insights into the spatial coverage of the query, including the table with sub-optimal (max) spatial pruning. This information can help you identify areas for improvement in your partitioning strategy to enhance spatial pruning.
QueryTableCount int
Number of tables in the query.
QueryTemporalRanges List<ScheduledQueryRecentlyFailedRunQueryInsightsResponseQueryTemporalRange>
Insights into the temporal range of the query, including the table with the largest (max) time range. Following are some of the potential options for optimizing time-based pruning: add missing time-predicates, remove functions around the time predicates, add time predicates to all the sub-queries.
OutputBytes int
Size of query result set in bytes. You can use this data to validate if the result set has changed as part of the query tuning exercise.
OutputRows int
Total number of rows returned as part of the query result set. You can use this data to validate if the number of rows in the result set have changed as part of the query tuning exercise.
QuerySpatialCoverages []ScheduledQueryRecentlyFailedRunQueryInsightsResponseQuerySpatialCoverage
Insights into the spatial coverage of the query, including the table with sub-optimal (max) spatial pruning. This information can help you identify areas for improvement in your partitioning strategy to enhance spatial pruning.
QueryTableCount int
Number of tables in the query.
QueryTemporalRanges []ScheduledQueryRecentlyFailedRunQueryInsightsResponseQueryTemporalRange
Insights into the temporal range of the query, including the table with the largest (max) time range. Following are some of the potential options for optimizing time-based pruning: add missing time-predicates, remove functions around the time predicates, add time predicates to all the sub-queries.
outputBytes Integer
Size of query result set in bytes. You can use this data to validate if the result set has changed as part of the query tuning exercise.
outputRows Integer
Total number of rows returned as part of the query result set. You can use this data to validate if the number of rows in the result set have changed as part of the query tuning exercise.
querySpatialCoverages List<ScheduledQueryRecentlyFailedRunQueryInsightsResponseQuerySpatialCoverage>
Insights into the spatial coverage of the query, including the table with sub-optimal (max) spatial pruning. This information can help you identify areas for improvement in your partitioning strategy to enhance spatial pruning.
queryTableCount Integer
Number of tables in the query.
queryTemporalRanges List<ScheduledQueryRecentlyFailedRunQueryInsightsResponseQueryTemporalRange>
Insights into the temporal range of the query, including the table with the largest (max) time range. Following are some of the potential options for optimizing time-based pruning: add missing time-predicates, remove functions around the time predicates, add time predicates to all the sub-queries.
outputBytes number
Size of query result set in bytes. You can use this data to validate if the result set has changed as part of the query tuning exercise.
outputRows number
Total number of rows returned as part of the query result set. You can use this data to validate if the number of rows in the result set have changed as part of the query tuning exercise.
querySpatialCoverages ScheduledQueryRecentlyFailedRunQueryInsightsResponseQuerySpatialCoverage[]
Insights into the spatial coverage of the query, including the table with sub-optimal (max) spatial pruning. This information can help you identify areas for improvement in your partitioning strategy to enhance spatial pruning.
queryTableCount number
Number of tables in the query.
queryTemporalRanges ScheduledQueryRecentlyFailedRunQueryInsightsResponseQueryTemporalRange[]
Insights into the temporal range of the query, including the table with the largest (max) time range. Following are some of the potential options for optimizing time-based pruning: add missing time-predicates, remove functions around the time predicates, add time predicates to all the sub-queries.
output_bytes int
Size of query result set in bytes. You can use this data to validate if the result set has changed as part of the query tuning exercise.
output_rows int
Total number of rows returned as part of the query result set. You can use this data to validate if the number of rows in the result set have changed as part of the query tuning exercise.
query_spatial_coverages Sequence[ScheduledQueryRecentlyFailedRunQueryInsightsResponseQuerySpatialCoverage]
Insights into the spatial coverage of the query, including the table with sub-optimal (max) spatial pruning. This information can help you identify areas for improvement in your partitioning strategy to enhance spatial pruning.
query_table_count int
Number of tables in the query.
query_temporal_ranges Sequence[ScheduledQueryRecentlyFailedRunQueryInsightsResponseQueryTemporalRange]
Insights into the temporal range of the query, including the table with the largest (max) time range. Following are some of the potential options for optimizing time-based pruning: add missing time-predicates, remove functions around the time predicates, add time predicates to all the sub-queries.
outputBytes Number
Size of query result set in bytes. You can use this data to validate if the result set has changed as part of the query tuning exercise.
outputRows Number
Total number of rows returned as part of the query result set. You can use this data to validate if the number of rows in the result set have changed as part of the query tuning exercise.
querySpatialCoverages List<Property Map>
Insights into the spatial coverage of the query, including the table with sub-optimal (max) spatial pruning. This information can help you identify areas for improvement in your partitioning strategy to enhance spatial pruning.
queryTableCount Number
Number of tables in the query.
queryTemporalRanges List<Property Map>
Insights into the temporal range of the query, including the table with the largest (max) time range. Following are some of the potential options for optimizing time-based pruning: add missing time-predicates, remove functions around the time predicates, add time predicates to all the sub-queries.

ScheduledQueryRecentlyFailedRunQueryInsightsResponseQuerySpatialCoverage
, ScheduledQueryRecentlyFailedRunQueryInsightsResponseQuerySpatialCoverageArgs

Maxes List<ScheduledQueryRecentlyFailedRunQueryInsightsResponseQuerySpatialCoverageMaxis>
Insights into the most sub-optimal performing table on the temporal axis:
Maxes []ScheduledQueryRecentlyFailedRunQueryInsightsResponseQuerySpatialCoverageMaxis
Insights into the most sub-optimal performing table on the temporal axis:
maxes List<ScheduledQueryRecentlyFailedRunQueryInsightsResponseQuerySpatialCoverageMaxis>
Insights into the most sub-optimal performing table on the temporal axis:
maxes ScheduledQueryRecentlyFailedRunQueryInsightsResponseQuerySpatialCoverageMaxis[]
Insights into the most sub-optimal performing table on the temporal axis:
maxes Sequence[ScheduledQueryRecentlyFailedRunQueryInsightsResponseQuerySpatialCoverageMaxis]
Insights into the most sub-optimal performing table on the temporal axis:
maxes List<Property Map>
Insights into the most sub-optimal performing table on the temporal axis:

ScheduledQueryRecentlyFailedRunQueryInsightsResponseQuerySpatialCoverageMaxis
, ScheduledQueryRecentlyFailedRunQueryInsightsResponseQuerySpatialCoverageMaxisArgs

PartitionKeys List<string>
Partition key used for partitioning, which can be a default measure_name or a customer defined partition key.
TableArn string
ARN of the table which is queried with the largest time range.
Value double
Maximum duration in nanoseconds between the start and end of the query.
PartitionKeys []string
Partition key used for partitioning, which can be a default measure_name or a customer defined partition key.
TableArn string
ARN of the table which is queried with the largest time range.
Value float64
Maximum duration in nanoseconds between the start and end of the query.
partitionKeys List<String>
Partition key used for partitioning, which can be a default measure_name or a customer defined partition key.
tableArn String
ARN of the table which is queried with the largest time range.
value Double
Maximum duration in nanoseconds between the start and end of the query.
partitionKeys string[]
Partition key used for partitioning, which can be a default measure_name or a customer defined partition key.
tableArn string
ARN of the table which is queried with the largest time range.
value number
Maximum duration in nanoseconds between the start and end of the query.
partition_keys Sequence[str]
Partition key used for partitioning, which can be a default measure_name or a customer defined partition key.
table_arn str
ARN of the table which is queried with the largest time range.
value float
Maximum duration in nanoseconds between the start and end of the query.
partitionKeys List<String>
Partition key used for partitioning, which can be a default measure_name or a customer defined partition key.
tableArn String
ARN of the table which is queried with the largest time range.
value Number
Maximum duration in nanoseconds between the start and end of the query.

ScheduledQueryRecentlyFailedRunQueryInsightsResponseQueryTemporalRange
, ScheduledQueryRecentlyFailedRunQueryInsightsResponseQueryTemporalRangeArgs

Maxes List<ScheduledQueryRecentlyFailedRunQueryInsightsResponseQueryTemporalRangeMaxis>
Insights into the most sub-optimal performing table on the temporal axis:
Maxes []ScheduledQueryRecentlyFailedRunQueryInsightsResponseQueryTemporalRangeMaxis
Insights into the most sub-optimal performing table on the temporal axis:
maxes List<ScheduledQueryRecentlyFailedRunQueryInsightsResponseQueryTemporalRangeMaxis>
Insights into the most sub-optimal performing table on the temporal axis:
maxes ScheduledQueryRecentlyFailedRunQueryInsightsResponseQueryTemporalRangeMaxis[]
Insights into the most sub-optimal performing table on the temporal axis:
maxes Sequence[ScheduledQueryRecentlyFailedRunQueryInsightsResponseQueryTemporalRangeMaxis]
Insights into the most sub-optimal performing table on the temporal axis:
maxes List<Property Map>
Insights into the most sub-optimal performing table on the temporal axis:

ScheduledQueryRecentlyFailedRunQueryInsightsResponseQueryTemporalRangeMaxis
, ScheduledQueryRecentlyFailedRunQueryInsightsResponseQueryTemporalRangeMaxisArgs

TableArn string
ARN of the table which is queried with the largest time range.
Value int
Maximum duration in nanoseconds between the start and end of the query.
TableArn string
ARN of the table which is queried with the largest time range.
Value int
Maximum duration in nanoseconds between the start and end of the query.
tableArn String
ARN of the table which is queried with the largest time range.
value Integer
Maximum duration in nanoseconds between the start and end of the query.
tableArn string
ARN of the table which is queried with the largest time range.
value number
Maximum duration in nanoseconds between the start and end of the query.
table_arn str
ARN of the table which is queried with the largest time range.
value int
Maximum duration in nanoseconds between the start and end of the query.
tableArn String
ARN of the table which is queried with the largest time range.
value Number
Maximum duration in nanoseconds between the start and end of the query.

ScheduledQueryScheduleConfiguration
, ScheduledQueryScheduleConfigurationArgs

ScheduleExpression This property is required. string
When to trigger the scheduled query run. This can be a cron expression or a rate expression.
ScheduleExpression This property is required. string
When to trigger the scheduled query run. This can be a cron expression or a rate expression.
scheduleExpression This property is required. String
When to trigger the scheduled query run. This can be a cron expression or a rate expression.
scheduleExpression This property is required. string
When to trigger the scheduled query run. This can be a cron expression or a rate expression.
schedule_expression This property is required. str
When to trigger the scheduled query run. This can be a cron expression or a rate expression.
scheduleExpression This property is required. String
When to trigger the scheduled query run. This can be a cron expression or a rate expression.

ScheduledQueryTargetConfiguration
, ScheduledQueryTargetConfigurationArgs

TimestreamConfiguration ScheduledQueryTargetConfigurationTimestreamConfiguration
Configuration block for information needed to write data into the Timestream database and table. See below.
TimestreamConfiguration ScheduledQueryTargetConfigurationTimestreamConfiguration
Configuration block for information needed to write data into the Timestream database and table. See below.
timestreamConfiguration ScheduledQueryTargetConfigurationTimestreamConfiguration
Configuration block for information needed to write data into the Timestream database and table. See below.
timestreamConfiguration ScheduledQueryTargetConfigurationTimestreamConfiguration
Configuration block for information needed to write data into the Timestream database and table. See below.
timestream_configuration ScheduledQueryTargetConfigurationTimestreamConfiguration
Configuration block for information needed to write data into the Timestream database and table. See below.
timestreamConfiguration Property Map
Configuration block for information needed to write data into the Timestream database and table. See below.

ScheduledQueryTargetConfigurationTimestreamConfiguration
, ScheduledQueryTargetConfigurationTimestreamConfigurationArgs

DatabaseName This property is required. string
Name of Timestream database to which the query result will be written.
TableName This property is required. string
Name of Timestream table that the query result will be written to. The table should be within the same database that is provided in Timestream configuration.
TimeColumn This property is required. string
Column from query result that should be used as the time column in destination table. Column type for this should be TIMESTAMP.
DimensionMappings List<ScheduledQueryTargetConfigurationTimestreamConfigurationDimensionMapping>
Configuration block for mapping of column(s) from the query result to the dimension in the destination table. See below.
MeasureNameColumn string
Name of the measure column.
MixedMeasureMappings List<ScheduledQueryTargetConfigurationTimestreamConfigurationMixedMeasureMapping>
Configuration block for how to map measures to multi-measure records. See below.
MultiMeasureMappings ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappings
Configuration block for multi-measure mappings. Only one of mixed_measure_mappings or multi_measure_mappings can be provided. multi_measure_mappings can be used to ingest data as multi measures in the derived table. See below.
DatabaseName This property is required. string
Name of Timestream database to which the query result will be written.
TableName This property is required. string
Name of Timestream table that the query result will be written to. The table should be within the same database that is provided in Timestream configuration.
TimeColumn This property is required. string
Column from query result that should be used as the time column in destination table. Column type for this should be TIMESTAMP.
DimensionMappings []ScheduledQueryTargetConfigurationTimestreamConfigurationDimensionMapping
Configuration block for mapping of column(s) from the query result to the dimension in the destination table. See below.
MeasureNameColumn string
Name of the measure column.
MixedMeasureMappings []ScheduledQueryTargetConfigurationTimestreamConfigurationMixedMeasureMapping
Configuration block for how to map measures to multi-measure records. See below.
MultiMeasureMappings ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappings
Configuration block for multi-measure mappings. Only one of mixed_measure_mappings or multi_measure_mappings can be provided. multi_measure_mappings can be used to ingest data as multi measures in the derived table. See below.
databaseName This property is required. String
Name of Timestream database to which the query result will be written.
tableName This property is required. String
Name of Timestream table that the query result will be written to. The table should be within the same database that is provided in Timestream configuration.
timeColumn This property is required. String
Column from query result that should be used as the time column in destination table. Column type for this should be TIMESTAMP.
dimensionMappings List<ScheduledQueryTargetConfigurationTimestreamConfigurationDimensionMapping>
Configuration block for mapping of column(s) from the query result to the dimension in the destination table. See below.
measureNameColumn String
Name of the measure column.
mixedMeasureMappings List<ScheduledQueryTargetConfigurationTimestreamConfigurationMixedMeasureMapping>
Configuration block for how to map measures to multi-measure records. See below.
multiMeasureMappings ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappings
Configuration block for multi-measure mappings. Only one of mixed_measure_mappings or multi_measure_mappings can be provided. multi_measure_mappings can be used to ingest data as multi measures in the derived table. See below.
databaseName This property is required. string
Name of Timestream database to which the query result will be written.
tableName This property is required. string
Name of Timestream table that the query result will be written to. The table should be within the same database that is provided in Timestream configuration.
timeColumn This property is required. string
Column from query result that should be used as the time column in destination table. Column type for this should be TIMESTAMP.
dimensionMappings ScheduledQueryTargetConfigurationTimestreamConfigurationDimensionMapping[]
Configuration block for mapping of column(s) from the query result to the dimension in the destination table. See below.
measureNameColumn string
Name of the measure column.
mixedMeasureMappings ScheduledQueryTargetConfigurationTimestreamConfigurationMixedMeasureMapping[]
Configuration block for how to map measures to multi-measure records. See below.
multiMeasureMappings ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappings
Configuration block for multi-measure mappings. Only one of mixed_measure_mappings or multi_measure_mappings can be provided. multi_measure_mappings can be used to ingest data as multi measures in the derived table. See below.
database_name This property is required. str
Name of Timestream database to which the query result will be written.
table_name This property is required. str
Name of Timestream table that the query result will be written to. The table should be within the same database that is provided in Timestream configuration.
time_column This property is required. str
Column from query result that should be used as the time column in destination table. Column type for this should be TIMESTAMP.
dimension_mappings Sequence[ScheduledQueryTargetConfigurationTimestreamConfigurationDimensionMapping]
Configuration block for mapping of column(s) from the query result to the dimension in the destination table. See below.
measure_name_column str
Name of the measure column.
mixed_measure_mappings Sequence[ScheduledQueryTargetConfigurationTimestreamConfigurationMixedMeasureMapping]
Configuration block for how to map measures to multi-measure records. See below.
multi_measure_mappings ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappings
Configuration block for multi-measure mappings. Only one of mixed_measure_mappings or multi_measure_mappings can be provided. multi_measure_mappings can be used to ingest data as multi measures in the derived table. See below.
databaseName This property is required. String
Name of Timestream database to which the query result will be written.
tableName This property is required. String
Name of Timestream table that the query result will be written to. The table should be within the same database that is provided in Timestream configuration.
timeColumn This property is required. String
Column from query result that should be used as the time column in destination table. Column type for this should be TIMESTAMP.
dimensionMappings List<Property Map>
Configuration block for mapping of column(s) from the query result to the dimension in the destination table. See below.
measureNameColumn String
Name of the measure column.
mixedMeasureMappings List<Property Map>
Configuration block for how to map measures to multi-measure records. See below.
multiMeasureMappings Property Map
Configuration block for multi-measure mappings. Only one of mixed_measure_mappings or multi_measure_mappings can be provided. multi_measure_mappings can be used to ingest data as multi measures in the derived table. See below.

ScheduledQueryTargetConfigurationTimestreamConfigurationDimensionMapping
, ScheduledQueryTargetConfigurationTimestreamConfigurationDimensionMappingArgs

DimensionValueType This property is required. string
Type for the dimension. Valid value: VARCHAR.
Name This property is required. string
Column name from query result.
DimensionValueType This property is required. string
Type for the dimension. Valid value: VARCHAR.
Name This property is required. string
Column name from query result.
dimensionValueType This property is required. String
Type for the dimension. Valid value: VARCHAR.
name This property is required. String
Column name from query result.
dimensionValueType This property is required. string
Type for the dimension. Valid value: VARCHAR.
name This property is required. string
Column name from query result.
dimension_value_type This property is required. str
Type for the dimension. Valid value: VARCHAR.
name This property is required. str
Column name from query result.
dimensionValueType This property is required. String
Type for the dimension. Valid value: VARCHAR.
name This property is required. String
Column name from query result.

ScheduledQueryTargetConfigurationTimestreamConfigurationMixedMeasureMapping
, ScheduledQueryTargetConfigurationTimestreamConfigurationMixedMeasureMappingArgs

MeasureValueType This property is required. string
Type of the value that is to be read from source_column. Valid values are BIGINT, BOOLEAN, DOUBLE, VARCHAR, MULTI.
MeasureName string
Refers to the value of measure_name in a result row. This field is required if measure_name_column is provided.
MultiMeasureAttributeMappings List<ScheduledQueryTargetConfigurationTimestreamConfigurationMixedMeasureMappingMultiMeasureAttributeMapping>
Configuration block for attribute mappings for MULTI value measures. Required when measure_value_type is MULTI. See below.
SourceColumn string
Source column from which measure-value is to be read for result materialization.
TargetMeasureName string
Target measure name to be used. If not provided, the target measure name by default is measure_name, if provided, or source_column otherwise.
MeasureValueType This property is required. string
Type of the value that is to be read from source_column. Valid values are BIGINT, BOOLEAN, DOUBLE, VARCHAR, MULTI.
MeasureName string
Refers to the value of measure_name in a result row. This field is required if measure_name_column is provided.
MultiMeasureAttributeMappings []ScheduledQueryTargetConfigurationTimestreamConfigurationMixedMeasureMappingMultiMeasureAttributeMapping
Configuration block for attribute mappings for MULTI value measures. Required when measure_value_type is MULTI. See below.
SourceColumn string
Source column from which measure-value is to be read for result materialization.
TargetMeasureName string
Target measure name to be used. If not provided, the target measure name by default is measure_name, if provided, or source_column otherwise.
measureValueType This property is required. String
Type of the value that is to be read from source_column. Valid values are BIGINT, BOOLEAN, DOUBLE, VARCHAR, MULTI.
measureName String
Refers to the value of measure_name in a result row. This field is required if measure_name_column is provided.
multiMeasureAttributeMappings List<ScheduledQueryTargetConfigurationTimestreamConfigurationMixedMeasureMappingMultiMeasureAttributeMapping>
Configuration block for attribute mappings for MULTI value measures. Required when measure_value_type is MULTI. See below.
sourceColumn String
Source column from which measure-value is to be read for result materialization.
targetMeasureName String
Target measure name to be used. If not provided, the target measure name by default is measure_name, if provided, or source_column otherwise.
measureValueType This property is required. string
Type of the value that is to be read from source_column. Valid values are BIGINT, BOOLEAN, DOUBLE, VARCHAR, MULTI.
measureName string
Refers to the value of measure_name in a result row. This field is required if measure_name_column is provided.
multiMeasureAttributeMappings ScheduledQueryTargetConfigurationTimestreamConfigurationMixedMeasureMappingMultiMeasureAttributeMapping[]
Configuration block for attribute mappings for MULTI value measures. Required when measure_value_type is MULTI. See below.
sourceColumn string
Source column from which measure-value is to be read for result materialization.
targetMeasureName string
Target measure name to be used. If not provided, the target measure name by default is measure_name, if provided, or source_column otherwise.
measure_value_type This property is required. str
Type of the value that is to be read from source_column. Valid values are BIGINT, BOOLEAN, DOUBLE, VARCHAR, MULTI.
measure_name str
Refers to the value of measure_name in a result row. This field is required if measure_name_column is provided.
multi_measure_attribute_mappings Sequence[ScheduledQueryTargetConfigurationTimestreamConfigurationMixedMeasureMappingMultiMeasureAttributeMapping]
Configuration block for attribute mappings for MULTI value measures. Required when measure_value_type is MULTI. See below.
source_column str
Source column from which measure-value is to be read for result materialization.
target_measure_name str
Target measure name to be used. If not provided, the target measure name by default is measure_name, if provided, or source_column otherwise.
measureValueType This property is required. String
Type of the value that is to be read from source_column. Valid values are BIGINT, BOOLEAN, DOUBLE, VARCHAR, MULTI.
measureName String
Refers to the value of measure_name in a result row. This field is required if measure_name_column is provided.
multiMeasureAttributeMappings List<Property Map>
Configuration block for attribute mappings for MULTI value measures. Required when measure_value_type is MULTI. See below.
sourceColumn String
Source column from which measure-value is to be read for result materialization.
targetMeasureName String
Target measure name to be used. If not provided, the target measure name by default is measure_name, if provided, or source_column otherwise.

ScheduledQueryTargetConfigurationTimestreamConfigurationMixedMeasureMappingMultiMeasureAttributeMapping
, ScheduledQueryTargetConfigurationTimestreamConfigurationMixedMeasureMappingMultiMeasureAttributeMappingArgs

MeasureValueType This property is required. string
Type of the attribute to be read from the source column. Valid values are BIGINT, BOOLEAN, DOUBLE, VARCHAR, TIMESTAMP.
SourceColumn This property is required. string
Source column from where the attribute value is to be read.
TargetMultiMeasureAttributeName string
Custom name to be used for attribute name in derived table. If not provided, source_column is used.
MeasureValueType This property is required. string
Type of the attribute to be read from the source column. Valid values are BIGINT, BOOLEAN, DOUBLE, VARCHAR, TIMESTAMP.
SourceColumn This property is required. string
Source column from where the attribute value is to be read.
TargetMultiMeasureAttributeName string
Custom name to be used for attribute name in derived table. If not provided, source_column is used.
measureValueType This property is required. String
Type of the attribute to be read from the source column. Valid values are BIGINT, BOOLEAN, DOUBLE, VARCHAR, TIMESTAMP.
sourceColumn This property is required. String
Source column from where the attribute value is to be read.
targetMultiMeasureAttributeName String
Custom name to be used for attribute name in derived table. If not provided, source_column is used.
measureValueType This property is required. string
Type of the attribute to be read from the source column. Valid values are BIGINT, BOOLEAN, DOUBLE, VARCHAR, TIMESTAMP.
sourceColumn This property is required. string
Source column from where the attribute value is to be read.
targetMultiMeasureAttributeName string
Custom name to be used for attribute name in derived table. If not provided, source_column is used.
measure_value_type This property is required. str
Type of the attribute to be read from the source column. Valid values are BIGINT, BOOLEAN, DOUBLE, VARCHAR, TIMESTAMP.
source_column This property is required. str
Source column from where the attribute value is to be read.
target_multi_measure_attribute_name str
Custom name to be used for attribute name in derived table. If not provided, source_column is used.
measureValueType This property is required. String
Type of the attribute to be read from the source column. Valid values are BIGINT, BOOLEAN, DOUBLE, VARCHAR, TIMESTAMP.
sourceColumn This property is required. String
Source column from where the attribute value is to be read.
targetMultiMeasureAttributeName String
Custom name to be used for attribute name in derived table. If not provided, source_column is used.

ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappings
, ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsArgs

MultiMeasureAttributeMappings List<ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsMultiMeasureAttributeMapping>
Attribute mappings to be used for mapping query results to ingest data for multi-measure attributes. See above.
TargetMultiMeasureName string
Name of the target multi-measure name in the derived table. This input is required when measure_name_column is not provided. If measure_name_column is provided, then the value from that column will be used as the multi-measure name.
MultiMeasureAttributeMappings []ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsMultiMeasureAttributeMapping
Attribute mappings to be used for mapping query results to ingest data for multi-measure attributes. See above.
TargetMultiMeasureName string
Name of the target multi-measure name in the derived table. This input is required when measure_name_column is not provided. If measure_name_column is provided, then the value from that column will be used as the multi-measure name.
multiMeasureAttributeMappings List<ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsMultiMeasureAttributeMapping>
Attribute mappings to be used for mapping query results to ingest data for multi-measure attributes. See above.
targetMultiMeasureName String
Name of the target multi-measure name in the derived table. This input is required when measure_name_column is not provided. If measure_name_column is provided, then the value from that column will be used as the multi-measure name.
multiMeasureAttributeMappings ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsMultiMeasureAttributeMapping[]
Attribute mappings to be used for mapping query results to ingest data for multi-measure attributes. See above.
targetMultiMeasureName string
Name of the target multi-measure name in the derived table. This input is required when measure_name_column is not provided. If measure_name_column is provided, then the value from that column will be used as the multi-measure name.
multi_measure_attribute_mappings Sequence[ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsMultiMeasureAttributeMapping]
Attribute mappings to be used for mapping query results to ingest data for multi-measure attributes. See above.
target_multi_measure_name str
Name of the target multi-measure name in the derived table. This input is required when measure_name_column is not provided. If measure_name_column is provided, then the value from that column will be used as the multi-measure name.
multiMeasureAttributeMappings List<Property Map>
Attribute mappings to be used for mapping query results to ingest data for multi-measure attributes. See above.
targetMultiMeasureName String
Name of the target multi-measure name in the derived table. This input is required when measure_name_column is not provided. If measure_name_column is provided, then the value from that column will be used as the multi-measure name.

ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsMultiMeasureAttributeMapping
, ScheduledQueryTargetConfigurationTimestreamConfigurationMultiMeasureMappingsMultiMeasureAttributeMappingArgs

MeasureValueType This property is required. string
Type of the attribute to be read from the source column. Valid values are BIGINT, BOOLEAN, DOUBLE, VARCHAR, TIMESTAMP.
SourceColumn This property is required. string
Source column from where the attribute value is to be read.
TargetMultiMeasureAttributeName string
Custom name to be used for attribute name in derived table. If not provided, source_column is used.
MeasureValueType This property is required. string
Type of the attribute to be read from the source column. Valid values are BIGINT, BOOLEAN, DOUBLE, VARCHAR, TIMESTAMP.
SourceColumn This property is required. string
Source column from where the attribute value is to be read.
TargetMultiMeasureAttributeName string
Custom name to be used for attribute name in derived table. If not provided, source_column is used.
measureValueType This property is required. String
Type of the attribute to be read from the source column. Valid values are BIGINT, BOOLEAN, DOUBLE, VARCHAR, TIMESTAMP.
sourceColumn This property is required. String
Source column from where the attribute value is to be read.
targetMultiMeasureAttributeName String
Custom name to be used for attribute name in derived table. If not provided, source_column is used.
measureValueType This property is required. string
Type of the attribute to be read from the source column. Valid values are BIGINT, BOOLEAN, DOUBLE, VARCHAR, TIMESTAMP.
sourceColumn This property is required. string
Source column from where the attribute value is to be read.
targetMultiMeasureAttributeName string
Custom name to be used for attribute name in derived table. If not provided, source_column is used.
measure_value_type This property is required. str
Type of the attribute to be read from the source column. Valid values are BIGINT, BOOLEAN, DOUBLE, VARCHAR, TIMESTAMP.
source_column This property is required. str
Source column from where the attribute value is to be read.
target_multi_measure_attribute_name str
Custom name to be used for attribute name in derived table. If not provided, source_column is used.
measureValueType This property is required. String
Type of the attribute to be read from the source column. Valid values are BIGINT, BOOLEAN, DOUBLE, VARCHAR, TIMESTAMP.
sourceColumn This property is required. String
Source column from where the attribute value is to be read.
targetMultiMeasureAttributeName String
Custom name to be used for attribute name in derived table. If not provided, source_column is used.

ScheduledQueryTimeouts
, ScheduledQueryTimeoutsArgs

Create string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Delete string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
Update string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Create string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Delete string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
Update string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
create String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
delete String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
update String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
create string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
delete string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
update string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
create str
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
delete str
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
update str
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
create String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
delete String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
update String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).

Import

Using pulumi import, import Timestream Query Scheduled Query using the arn. For example:

$ pulumi import aws:timestreamquery/scheduledQuery:ScheduledQuery example arn:aws:timestream:us-west-2:012345678901:scheduled-query/tf-acc-test-7774188528604787105-e13659544fe66c8d
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.