aws-sdk-timestreamquery 1.7.0 → 1.11.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -119,7 +119,9 @@ module Aws::TimestreamQuery
119
119
  # * EC2/ECS IMDS instance profile - When used by default, the timeouts
120
120
  # are very aggressive. Construct and pass an instance of
121
121
  # `Aws::InstanceProfileCredentails` or `Aws::ECSCredentials` to
122
- # enable retries and extended timeouts.
122
+ # enable retries and extended timeouts. Instance profile credential
123
+ # fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
124
+ # to true.
123
125
  #
124
126
  # @option options [required, String] :region
125
127
  # The AWS region to connect to. The configured `:region` is
@@ -285,6 +287,15 @@ module Aws::TimestreamQuery
285
287
  # ** Please note ** When response stubbing is enabled, no HTTP
286
288
  # requests are made, and retries are disabled.
287
289
  #
290
+ # @option options [Boolean] :use_dualstack_endpoint
291
+ # When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
292
+ # will be used if available.
293
+ #
294
+ # @option options [Boolean] :use_fips_endpoint
295
+ # When set to `true`, fips compatible endpoints will be used if available.
296
+ # When a `fips` region is used, the region is normalized and this config
297
+ # is set to `true`.
298
+ #
288
299
  # @option options [Boolean] :validate_params (true)
289
300
  # When `true`, request parameters are validated before
290
301
  # sending the request.
@@ -337,15 +348,20 @@ module Aws::TimestreamQuery
337
348
 
338
349
  # @!group API Operations
339
350
 
340
- # Cancels a query that has been issued. Cancellation is guaranteed only
341
- # if the query has not completed execution before the cancellation
342
- # request was issued. Because cancellation is an idempotent operation,
351
+ # Cancels a query that has been issued. Cancellation is provided only if
352
+ # the query has not completed running before the cancellation request
353
+ # was issued. Because cancellation is an idempotent operation,
343
354
  # subsequent cancellation requests will return a `CancellationMessage`,
344
- # indicating that the query has already been canceled.
355
+ # indicating that the query has already been canceled. See [code
356
+ # sample][1] for details.
357
+ #
358
+ #
359
+ #
360
+ # [1]: https://docs.aws.amazon.com/Timestream/latest/developerguide/code-samples.cancel-query.html
345
361
  #
346
362
  # @option params [required, String] :query_id
347
- # The id of the query that needs to be cancelled. `QueryID` is returned
348
- # as part of QueryResult.
363
+ # The ID of the query that needs to be cancelled. `QueryID` is returned
364
+ # as part of the query result.
349
365
  #
350
366
  # @return [Types::CancelQueryResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
351
367
  #
@@ -370,26 +386,208 @@ module Aws::TimestreamQuery
370
386
  req.send_request(options)
371
387
  end
372
388
 
389
+ # Create a scheduled query that will be run on your behalf at the
390
+ # configured schedule. Timestream assumes the execution role provided as
391
+ # part of the `ScheduledQueryExecutionRoleArn` parameter to run the
392
+ # query. You can use the `NotificationConfiguration` parameter to
393
+ # configure notification for your scheduled query operations.
394
+ #
395
+ # @option params [required, String] :name
396
+ # Name of the scheduled query.
397
+ #
398
+ # @option params [required, String] :query_string
399
+ # The query string to run. Parameter names can be specified in the query
400
+ # string `@` character followed by an identifier. The named Parameter
401
+ # `@scheduled_runtime` is reserved and can be used in the query to get
402
+ # the time at which the query is scheduled to run.
403
+ #
404
+ # The timestamp calculated according to the ScheduleConfiguration
405
+ # parameter, will be the value of `@scheduled_runtime` paramater for
406
+ # each query run. For example, consider an instance of a scheduled query
407
+ # executing on 2021-12-01 00:00:00. For this instance, the
408
+ # `@scheduled_runtime` parameter is initialized to the timestamp
409
+ # 2021-12-01 00:00:00 when invoking the query.
410
+ #
411
+ # @option params [required, Types::ScheduleConfiguration] :schedule_configuration
412
+ # The schedule configuration for the query.
413
+ #
414
+ # @option params [required, Types::NotificationConfiguration] :notification_configuration
415
+ # Notification configuration for the scheduled query. A notification is
416
+ # sent by Timestream when a query run finishes, when the state is
417
+ # updated or when you delete it.
418
+ #
419
+ # @option params [Types::TargetConfiguration] :target_configuration
420
+ # Configuration used for writing the result of a query.
421
+ #
422
+ # @option params [String] :client_token
423
+ # Using a ClientToken makes the call to CreateScheduledQuery idempotent,
424
+ # in other words, making the same request repeatedly will produce the
425
+ # same result. Making multiple identical CreateScheduledQuery requests
426
+ # has the same effect as making a single request.
427
+ #
428
+ # * If CreateScheduledQuery is called without a `ClientToken`, the Query
429
+ # SDK generates a `ClientToken` on your behalf.
430
+ #
431
+ # * After 8 hours, any request with the same `ClientToken` is treated as
432
+ # a new request.
433
+ #
434
+ # **A suitable default value is auto-generated.** You should normally
435
+ # not need to pass this option.**
436
+ #
437
+ # @option params [required, String] :scheduled_query_execution_role_arn
438
+ # The ARN for the IAM role that Timestream will assume when running the
439
+ # scheduled query.
440
+ #
441
+ # @option params [Array<Types::Tag>] :tags
442
+ # A list of key-value pairs to label the scheduled query.
443
+ #
444
+ # @option params [String] :kms_key_id
445
+ # The Amazon KMS key used to encrypt the scheduled query resource,
446
+ # at-rest. If the Amazon KMS key is not specified, the scheduled query
447
+ # resource will be encrypted with a Timestream owned Amazon KMS key. To
448
+ # specify a KMS key, use the key ID, key ARN, alias name, or alias ARN.
449
+ # When using an alias name, prefix the name with *alias/*
450
+ #
451
+ # If ErrorReportConfiguration uses `SSE_KMS` as encryption type, the
452
+ # same KmsKeyId is used to encrypt the error report at rest.
453
+ #
454
+ # @option params [required, Types::ErrorReportConfiguration] :error_report_configuration
455
+ # Configuration for error reporting. Error reports will be generated
456
+ # when a problem is encountered when writing the query results.
457
+ #
458
+ # @return [Types::CreateScheduledQueryResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
459
+ #
460
+ # * {Types::CreateScheduledQueryResponse#arn #arn} => String
461
+ #
462
+ # @example Request syntax with placeholder values
463
+ #
464
+ # resp = client.create_scheduled_query({
465
+ # name: "ScheduledQueryName", # required
466
+ # query_string: "QueryString", # required
467
+ # schedule_configuration: { # required
468
+ # schedule_expression: "ScheduleExpression", # required
469
+ # },
470
+ # notification_configuration: { # required
471
+ # sns_configuration: { # required
472
+ # topic_arn: "AmazonResourceName", # required
473
+ # },
474
+ # },
475
+ # target_configuration: {
476
+ # timestream_configuration: { # required
477
+ # database_name: "ResourceName", # required
478
+ # table_name: "ResourceName", # required
479
+ # time_column: "SchemaName", # required
480
+ # dimension_mappings: [ # required
481
+ # {
482
+ # name: "SchemaName", # required
483
+ # dimension_value_type: "VARCHAR", # required, accepts VARCHAR
484
+ # },
485
+ # ],
486
+ # multi_measure_mappings: {
487
+ # target_multi_measure_name: "SchemaName",
488
+ # multi_measure_attribute_mappings: [ # required
489
+ # {
490
+ # source_column: "SchemaName", # required
491
+ # target_multi_measure_attribute_name: "SchemaName",
492
+ # measure_value_type: "BIGINT", # required, accepts BIGINT, BOOLEAN, DOUBLE, VARCHAR
493
+ # },
494
+ # ],
495
+ # },
496
+ # mixed_measure_mappings: [
497
+ # {
498
+ # measure_name: "SchemaName",
499
+ # source_column: "SchemaName",
500
+ # target_measure_name: "SchemaName",
501
+ # measure_value_type: "BIGINT", # required, accepts BIGINT, BOOLEAN, DOUBLE, VARCHAR, MULTI
502
+ # multi_measure_attribute_mappings: [
503
+ # {
504
+ # source_column: "SchemaName", # required
505
+ # target_multi_measure_attribute_name: "SchemaName",
506
+ # measure_value_type: "BIGINT", # required, accepts BIGINT, BOOLEAN, DOUBLE, VARCHAR
507
+ # },
508
+ # ],
509
+ # },
510
+ # ],
511
+ # measure_name_column: "SchemaName",
512
+ # },
513
+ # },
514
+ # client_token: "ClientToken",
515
+ # scheduled_query_execution_role_arn: "AmazonResourceName", # required
516
+ # tags: [
517
+ # {
518
+ # key: "TagKey", # required
519
+ # value: "TagValue", # required
520
+ # },
521
+ # ],
522
+ # kms_key_id: "StringValue2048",
523
+ # error_report_configuration: { # required
524
+ # s3_configuration: { # required
525
+ # bucket_name: "S3BucketName", # required
526
+ # object_key_prefix: "S3ObjectKeyPrefix",
527
+ # encryption_option: "SSE_S3", # accepts SSE_S3, SSE_KMS
528
+ # },
529
+ # },
530
+ # })
531
+ #
532
+ # @example Response structure
533
+ #
534
+ # resp.arn #=> String
535
+ #
536
+ # @see http://docs.aws.amazon.com/goto/WebAPI/timestream-query-2018-11-01/CreateScheduledQuery AWS API Documentation
537
+ #
538
+ # @overload create_scheduled_query(params = {})
539
+ # @param [Hash] params ({})
540
+ def create_scheduled_query(params = {}, options = {})
541
+ req = build_request(:create_scheduled_query, params)
542
+ req.send_request(options)
543
+ end
544
+
545
+ # Deletes a given scheduled query. This is an irreversible operation.
546
+ #
547
+ # @option params [required, String] :scheduled_query_arn
548
+ # The ARN of the scheduled query.
549
+ #
550
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
551
+ #
552
+ # @example Request syntax with placeholder values
553
+ #
554
+ # resp = client.delete_scheduled_query({
555
+ # scheduled_query_arn: "AmazonResourceName", # required
556
+ # })
557
+ #
558
+ # @see http://docs.aws.amazon.com/goto/WebAPI/timestream-query-2018-11-01/DeleteScheduledQuery AWS API Documentation
559
+ #
560
+ # @overload delete_scheduled_query(params = {})
561
+ # @param [Hash] params ({})
562
+ def delete_scheduled_query(params = {}, options = {})
563
+ req = build_request(:delete_scheduled_query, params)
564
+ req.send_request(options)
565
+ end
566
+
373
567
  # DescribeEndpoints returns a list of available endpoints to make
374
568
  # Timestream API calls against. This API is available through both Write
375
569
  # and Query.
376
570
  #
377
- # Because Timestream’s SDKs are designed to transparently work with the
378
- # service’s architecture, including the management and mapping of the
379
- # service endpoints, *it is not recommended that you use this API
571
+ # Because the Timestream SDKs are designed to transparently work with
572
+ # the service’s architecture, including the management and mapping of
573
+ # the service endpoints, *it is not recommended that you use this API
380
574
  # unless*\:
381
575
  #
576
+ # * You are using [VPC endpoints (Amazon Web Services PrivateLink) with
577
+ # Timestream ][1]
578
+ #
382
579
  # * Your application uses a programming language that does not yet have
383
580
  # SDK support
384
581
  #
385
582
  # * You require better control over the client-side implementation
386
583
  #
387
- # For detailed information on how to use DescribeEndpoints, see [The
388
- # Endpoint Discovery Pattern and REST APIs][1].
584
+ # For detailed information on how and when to use and implement
585
+ # DescribeEndpoints, see [The Endpoint Discovery Pattern][2].
389
586
  #
390
587
  #
391
588
  #
392
- # [1]: https://docs.aws.amazon.com/timestream/latest/developerguide/Using-API.endpoint-discovery.html
589
+ # [1]: https://docs.aws.amazon.com/Timestream/latest/developerguide/VPCEndpoints
590
+ # [2]: https://docs.aws.amazon.com/Timestream/latest/developerguide/Using.API.html#Using-API.endpoint-discovery
393
591
  #
394
592
  # @return [Types::DescribeEndpointsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
395
593
  #
@@ -410,44 +608,393 @@ module Aws::TimestreamQuery
410
608
  req.send_request(options)
411
609
  end
412
610
 
413
- # Query is a synchronous operation that enables you to execute a query.
414
- # Query will timeout after 60 seconds. You must update the default
415
- # timeout in the SDK to support a timeout of 60 seconds. The result set
416
- # will be truncated to 1MB. Service quotas apply. For more information,
417
- # see Quotas in the Timestream Developer Guide.
611
+ # Provides detailed information about a scheduled query.
612
+ #
613
+ # @option params [required, String] :scheduled_query_arn
614
+ # The ARN of the scheduled query.
615
+ #
616
+ # @return [Types::DescribeScheduledQueryResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
617
+ #
618
+ # * {Types::DescribeScheduledQueryResponse#scheduled_query #scheduled_query} => Types::ScheduledQueryDescription
619
+ #
620
+ # @example Request syntax with placeholder values
621
+ #
622
+ # resp = client.describe_scheduled_query({
623
+ # scheduled_query_arn: "AmazonResourceName", # required
624
+ # })
625
+ #
626
+ # @example Response structure
627
+ #
628
+ # resp.scheduled_query.arn #=> String
629
+ # resp.scheduled_query.name #=> String
630
+ # resp.scheduled_query.query_string #=> String
631
+ # resp.scheduled_query.creation_time #=> Time
632
+ # resp.scheduled_query.state #=> String, one of "ENABLED", "DISABLED"
633
+ # resp.scheduled_query.previous_invocation_time #=> Time
634
+ # resp.scheduled_query.next_invocation_time #=> Time
635
+ # resp.scheduled_query.schedule_configuration.schedule_expression #=> String
636
+ # resp.scheduled_query.notification_configuration.sns_configuration.topic_arn #=> String
637
+ # resp.scheduled_query.target_configuration.timestream_configuration.database_name #=> String
638
+ # resp.scheduled_query.target_configuration.timestream_configuration.table_name #=> String
639
+ # resp.scheduled_query.target_configuration.timestream_configuration.time_column #=> String
640
+ # resp.scheduled_query.target_configuration.timestream_configuration.dimension_mappings #=> Array
641
+ # resp.scheduled_query.target_configuration.timestream_configuration.dimension_mappings[0].name #=> String
642
+ # resp.scheduled_query.target_configuration.timestream_configuration.dimension_mappings[0].dimension_value_type #=> String, one of "VARCHAR"
643
+ # resp.scheduled_query.target_configuration.timestream_configuration.multi_measure_mappings.target_multi_measure_name #=> String
644
+ # resp.scheduled_query.target_configuration.timestream_configuration.multi_measure_mappings.multi_measure_attribute_mappings #=> Array
645
+ # resp.scheduled_query.target_configuration.timestream_configuration.multi_measure_mappings.multi_measure_attribute_mappings[0].source_column #=> String
646
+ # resp.scheduled_query.target_configuration.timestream_configuration.multi_measure_mappings.multi_measure_attribute_mappings[0].target_multi_measure_attribute_name #=> String
647
+ # resp.scheduled_query.target_configuration.timestream_configuration.multi_measure_mappings.multi_measure_attribute_mappings[0].measure_value_type #=> String, one of "BIGINT", "BOOLEAN", "DOUBLE", "VARCHAR"
648
+ # resp.scheduled_query.target_configuration.timestream_configuration.mixed_measure_mappings #=> Array
649
+ # resp.scheduled_query.target_configuration.timestream_configuration.mixed_measure_mappings[0].measure_name #=> String
650
+ # resp.scheduled_query.target_configuration.timestream_configuration.mixed_measure_mappings[0].source_column #=> String
651
+ # resp.scheduled_query.target_configuration.timestream_configuration.mixed_measure_mappings[0].target_measure_name #=> String
652
+ # resp.scheduled_query.target_configuration.timestream_configuration.mixed_measure_mappings[0].measure_value_type #=> String, one of "BIGINT", "BOOLEAN", "DOUBLE", "VARCHAR", "MULTI"
653
+ # resp.scheduled_query.target_configuration.timestream_configuration.mixed_measure_mappings[0].multi_measure_attribute_mappings #=> Array
654
+ # resp.scheduled_query.target_configuration.timestream_configuration.mixed_measure_mappings[0].multi_measure_attribute_mappings[0].source_column #=> String
655
+ # resp.scheduled_query.target_configuration.timestream_configuration.mixed_measure_mappings[0].multi_measure_attribute_mappings[0].target_multi_measure_attribute_name #=> String
656
+ # resp.scheduled_query.target_configuration.timestream_configuration.mixed_measure_mappings[0].multi_measure_attribute_mappings[0].measure_value_type #=> String, one of "BIGINT", "BOOLEAN", "DOUBLE", "VARCHAR"
657
+ # resp.scheduled_query.target_configuration.timestream_configuration.measure_name_column #=> String
658
+ # resp.scheduled_query.scheduled_query_execution_role_arn #=> String
659
+ # resp.scheduled_query.kms_key_id #=> String
660
+ # resp.scheduled_query.error_report_configuration.s3_configuration.bucket_name #=> String
661
+ # resp.scheduled_query.error_report_configuration.s3_configuration.object_key_prefix #=> String
662
+ # resp.scheduled_query.error_report_configuration.s3_configuration.encryption_option #=> String, one of "SSE_S3", "SSE_KMS"
663
+ # resp.scheduled_query.last_run_summary.invocation_time #=> Time
664
+ # resp.scheduled_query.last_run_summary.trigger_time #=> Time
665
+ # resp.scheduled_query.last_run_summary.run_status #=> String, one of "AUTO_TRIGGER_SUCCESS", "AUTO_TRIGGER_FAILURE", "MANUAL_TRIGGER_SUCCESS", "MANUAL_TRIGGER_FAILURE"
666
+ # resp.scheduled_query.last_run_summary.execution_stats.execution_time_in_millis #=> Integer
667
+ # resp.scheduled_query.last_run_summary.execution_stats.data_writes #=> Integer
668
+ # resp.scheduled_query.last_run_summary.execution_stats.bytes_metered #=> Integer
669
+ # resp.scheduled_query.last_run_summary.execution_stats.records_ingested #=> Integer
670
+ # resp.scheduled_query.last_run_summary.execution_stats.query_result_rows #=> Integer
671
+ # resp.scheduled_query.last_run_summary.error_report_location.s3_report_location.bucket_name #=> String
672
+ # resp.scheduled_query.last_run_summary.error_report_location.s3_report_location.object_key #=> String
673
+ # resp.scheduled_query.last_run_summary.failure_reason #=> String
674
+ # resp.scheduled_query.recently_failed_runs #=> Array
675
+ # resp.scheduled_query.recently_failed_runs[0].invocation_time #=> Time
676
+ # resp.scheduled_query.recently_failed_runs[0].trigger_time #=> Time
677
+ # resp.scheduled_query.recently_failed_runs[0].run_status #=> String, one of "AUTO_TRIGGER_SUCCESS", "AUTO_TRIGGER_FAILURE", "MANUAL_TRIGGER_SUCCESS", "MANUAL_TRIGGER_FAILURE"
678
+ # resp.scheduled_query.recently_failed_runs[0].execution_stats.execution_time_in_millis #=> Integer
679
+ # resp.scheduled_query.recently_failed_runs[0].execution_stats.data_writes #=> Integer
680
+ # resp.scheduled_query.recently_failed_runs[0].execution_stats.bytes_metered #=> Integer
681
+ # resp.scheduled_query.recently_failed_runs[0].execution_stats.records_ingested #=> Integer
682
+ # resp.scheduled_query.recently_failed_runs[0].execution_stats.query_result_rows #=> Integer
683
+ # resp.scheduled_query.recently_failed_runs[0].error_report_location.s3_report_location.bucket_name #=> String
684
+ # resp.scheduled_query.recently_failed_runs[0].error_report_location.s3_report_location.object_key #=> String
685
+ # resp.scheduled_query.recently_failed_runs[0].failure_reason #=> String
686
+ #
687
+ # @see http://docs.aws.amazon.com/goto/WebAPI/timestream-query-2018-11-01/DescribeScheduledQuery AWS API Documentation
688
+ #
689
+ # @overload describe_scheduled_query(params = {})
690
+ # @param [Hash] params ({})
691
+ def describe_scheduled_query(params = {}, options = {})
692
+ req = build_request(:describe_scheduled_query, params)
693
+ req.send_request(options)
694
+ end
695
+
696
+ # You can use this API to run a scheduled query manually.
697
+ #
698
+ # @option params [required, String] :scheduled_query_arn
699
+ # ARN of the scheduled query.
700
+ #
701
+ # @option params [required, Time,DateTime,Date,Integer,String] :invocation_time
702
+ # The timestamp in UTC. Query will be run as if it was invoked at this
703
+ # timestamp.
704
+ #
705
+ # @option params [String] :client_token
706
+ # Not used.
707
+ #
708
+ # **A suitable default value is auto-generated.** You should normally
709
+ # not need to pass this option.**
710
+ #
711
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
712
+ #
713
+ # @example Request syntax with placeholder values
714
+ #
715
+ # resp = client.execute_scheduled_query({
716
+ # scheduled_query_arn: "AmazonResourceName", # required
717
+ # invocation_time: Time.now, # required
718
+ # client_token: "ClientToken",
719
+ # })
720
+ #
721
+ # @see http://docs.aws.amazon.com/goto/WebAPI/timestream-query-2018-11-01/ExecuteScheduledQuery AWS API Documentation
722
+ #
723
+ # @overload execute_scheduled_query(params = {})
724
+ # @param [Hash] params ({})
725
+ def execute_scheduled_query(params = {}, options = {})
726
+ req = build_request(:execute_scheduled_query, params)
727
+ req.send_request(options)
728
+ end
729
+
730
+ # Gets a list of all scheduled queries in the caller's Amazon account
731
+ # and Region. `ListScheduledQueries` is eventually consistent.
732
+ #
733
+ # @option params [Integer] :max_results
734
+ # The maximum number of items to return in the output. If the total
735
+ # number of items available is more than the value specified, a
736
+ # `NextToken` is provided in the output. To resume pagination, provide
737
+ # the `NextToken` value as the argument to the subsequent call to
738
+ # `ListScheduledQueriesRequest`.
739
+ #
740
+ # @option params [String] :next_token
741
+ # A pagination token to resume pagination.
742
+ #
743
+ # @return [Types::ListScheduledQueriesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
744
+ #
745
+ # * {Types::ListScheduledQueriesResponse#scheduled_queries #scheduled_queries} => Array&lt;Types::ScheduledQuery&gt;
746
+ # * {Types::ListScheduledQueriesResponse#next_token #next_token} => String
747
+ #
748
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
749
+ #
750
+ # @example Request syntax with placeholder values
751
+ #
752
+ # resp = client.list_scheduled_queries({
753
+ # max_results: 1,
754
+ # next_token: "NextScheduledQueriesResultsToken",
755
+ # })
756
+ #
757
+ # @example Response structure
758
+ #
759
+ # resp.scheduled_queries #=> Array
760
+ # resp.scheduled_queries[0].arn #=> String
761
+ # resp.scheduled_queries[0].name #=> String
762
+ # resp.scheduled_queries[0].creation_time #=> Time
763
+ # resp.scheduled_queries[0].state #=> String, one of "ENABLED", "DISABLED"
764
+ # resp.scheduled_queries[0].previous_invocation_time #=> Time
765
+ # resp.scheduled_queries[0].next_invocation_time #=> Time
766
+ # resp.scheduled_queries[0].error_report_configuration.s3_configuration.bucket_name #=> String
767
+ # resp.scheduled_queries[0].error_report_configuration.s3_configuration.object_key_prefix #=> String
768
+ # resp.scheduled_queries[0].error_report_configuration.s3_configuration.encryption_option #=> String, one of "SSE_S3", "SSE_KMS"
769
+ # resp.scheduled_queries[0].target_destination.timestream_destination.database_name #=> String
770
+ # resp.scheduled_queries[0].target_destination.timestream_destination.table_name #=> String
771
+ # resp.scheduled_queries[0].last_run_status #=> String, one of "AUTO_TRIGGER_SUCCESS", "AUTO_TRIGGER_FAILURE", "MANUAL_TRIGGER_SUCCESS", "MANUAL_TRIGGER_FAILURE"
772
+ # resp.next_token #=> String
773
+ #
774
+ # @see http://docs.aws.amazon.com/goto/WebAPI/timestream-query-2018-11-01/ListScheduledQueries AWS API Documentation
775
+ #
776
+ # @overload list_scheduled_queries(params = {})
777
+ # @param [Hash] params ({})
778
+ def list_scheduled_queries(params = {}, options = {})
779
+ req = build_request(:list_scheduled_queries, params)
780
+ req.send_request(options)
781
+ end
782
+
783
+ # List all tags on a Timestream query resource.
784
+ #
785
+ # @option params [required, String] :resource_arn
786
+ # The Timestream resource with tags to be listed. This value is an
787
+ # Amazon Resource Name (ARN).
788
+ #
789
+ # @option params [Integer] :max_results
790
+ # The maximum number of tags to return.
791
+ #
792
+ # @option params [String] :next_token
793
+ # A pagination token to resume pagination.
794
+ #
795
+ # @return [Types::ListTagsForResourceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
796
+ #
797
+ # * {Types::ListTagsForResourceResponse#tags #tags} => Array&lt;Types::Tag&gt;
798
+ # * {Types::ListTagsForResourceResponse#next_token #next_token} => String
799
+ #
800
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
801
+ #
802
+ # @example Request syntax with placeholder values
803
+ #
804
+ # resp = client.list_tags_for_resource({
805
+ # resource_arn: "AmazonResourceName", # required
806
+ # max_results: 1,
807
+ # next_token: "NextTagsForResourceResultsToken",
808
+ # })
809
+ #
810
+ # @example Response structure
811
+ #
812
+ # resp.tags #=> Array
813
+ # resp.tags[0].key #=> String
814
+ # resp.tags[0].value #=> String
815
+ # resp.next_token #=> String
816
+ #
817
+ # @see http://docs.aws.amazon.com/goto/WebAPI/timestream-query-2018-11-01/ListTagsForResource AWS API Documentation
818
+ #
819
+ # @overload list_tags_for_resource(params = {})
820
+ # @param [Hash] params ({})
821
+ def list_tags_for_resource(params = {}, options = {})
822
+ req = build_request(:list_tags_for_resource, params)
823
+ req.send_request(options)
824
+ end
825
+
826
+ # A synchronous operation that allows you to submit a query with
827
+ # parameters to be stored by Timestream for later running. Timestream
828
+ # only supports using this operation with the
829
+ # `PrepareQueryRequest$ValidateOnly` set to `true`.
830
+ #
831
+ # @option params [required, String] :query_string
832
+ # The Timestream query string that you want to use as a prepared
833
+ # statement. Parameter names can be specified in the query string `@`
834
+ # character followed by an identifier.
835
+ #
836
+ # @option params [Boolean] :validate_only
837
+ # By setting this value to `true`, Timestream will only validate that
838
+ # the query string is a valid Timestream query, and not store the
839
+ # prepared query for later use.
840
+ #
841
+ # @return [Types::PrepareQueryResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
842
+ #
843
+ # * {Types::PrepareQueryResponse#query_string #query_string} => String
844
+ # * {Types::PrepareQueryResponse#columns #columns} => Array&lt;Types::SelectColumn&gt;
845
+ # * {Types::PrepareQueryResponse#parameters #parameters} => Array&lt;Types::ParameterMapping&gt;
846
+ #
847
+ # @example Request syntax with placeholder values
848
+ #
849
+ # resp = client.prepare_query({
850
+ # query_string: "QueryString", # required
851
+ # validate_only: false,
852
+ # })
853
+ #
854
+ # @example Response structure
855
+ #
856
+ # resp.query_string #=> String
857
+ # resp.columns #=> Array
858
+ # resp.columns[0].name #=> String
859
+ # resp.columns[0].type.scalar_type #=> String, one of "VARCHAR", "BOOLEAN", "BIGINT", "DOUBLE", "TIMESTAMP", "DATE", "TIME", "INTERVAL_DAY_TO_SECOND", "INTERVAL_YEAR_TO_MONTH", "UNKNOWN", "INTEGER"
860
+ # resp.columns[0].type.array_column_info.name #=> String
861
+ # resp.columns[0].type.array_column_info.type #=> Types::Type
862
+ # resp.columns[0].type.time_series_measure_value_column_info.name #=> String
863
+ # resp.columns[0].type.time_series_measure_value_column_info.type #=> Types::Type
864
+ # resp.columns[0].type.row_column_info #=> Array
865
+ # resp.columns[0].type.row_column_info[0].name #=> String
866
+ # resp.columns[0].type.row_column_info[0].type #=> Types::Type
867
+ # resp.columns[0].database_name #=> String
868
+ # resp.columns[0].table_name #=> String
869
+ # resp.columns[0].aliased #=> Boolean
870
+ # resp.parameters #=> Array
871
+ # resp.parameters[0].name #=> String
872
+ # resp.parameters[0].type.scalar_type #=> String, one of "VARCHAR", "BOOLEAN", "BIGINT", "DOUBLE", "TIMESTAMP", "DATE", "TIME", "INTERVAL_DAY_TO_SECOND", "INTERVAL_YEAR_TO_MONTH", "UNKNOWN", "INTEGER"
873
+ # resp.parameters[0].type.array_column_info.name #=> String
874
+ # resp.parameters[0].type.array_column_info.type #=> Types::Type
875
+ # resp.parameters[0].type.time_series_measure_value_column_info.name #=> String
876
+ # resp.parameters[0].type.time_series_measure_value_column_info.type #=> Types::Type
877
+ # resp.parameters[0].type.row_column_info #=> Array
878
+ # resp.parameters[0].type.row_column_info[0].name #=> String
879
+ # resp.parameters[0].type.row_column_info[0].type #=> Types::Type
880
+ #
881
+ # @see http://docs.aws.amazon.com/goto/WebAPI/timestream-query-2018-11-01/PrepareQuery AWS API Documentation
882
+ #
883
+ # @overload prepare_query(params = {})
884
+ # @param [Hash] params ({})
885
+ def prepare_query(params = {}, options = {})
886
+ req = build_request(:prepare_query, params)
887
+ req.send_request(options)
888
+ end
889
+
890
+ # `Query` is a synchronous operation that enables you to run a query
891
+ # against your Amazon Timestream data. `Query` will time out after 60
892
+ # seconds. You must update the default timeout in the SDK to support a
893
+ # timeout of 60 seconds. See the [code sample][1] for details.
894
+ #
895
+ # Your query request will fail in the following cases:
896
+ #
897
+ # * If you submit a `Query` request with the same client token outside
898
+ # of the 5-minute idempotency window.
899
+ #
900
+ # * If you submit a `Query` request with the same client token, but
901
+ # change other parameters, within the 5-minute idempotency window.
902
+ #
903
+ # * If the size of the row (including the query metadata) exceeds 1 MB,
904
+ # then the query will fail with the following error message:
905
+ #
906
+ # `Query aborted as max page response size has been exceeded by the
907
+ # output result row`
908
+ #
909
+ # * If the IAM principal of the query initiator and the result reader
910
+ # are not the same and/or the query initiator and the result reader do
911
+ # not have the same query string in the query requests, the query will
912
+ # fail with an `Invalid pagination token` error.
913
+ #
914
+ #
915
+ #
916
+ # [1]: https://docs.aws.amazon.com/Timestream/latest/developerguide/code-samples.run-query.html
418
917
  #
419
918
  # @option params [required, String] :query_string
420
- # The query to be executed by Timestream.
919
+ # The query to be run by Timestream.
421
920
  #
422
921
  # @option params [String] :client_token
423
- # Unique, case-sensitive string of up to 64 ASCII characters that you
424
- # specify when you make a Query request. Providing a `ClientToken` makes
425
- # the call to `Query` idempotent, meaning that multiple identical calls
426
- # have the same effect as one single call.
922
+ # Unique, case-sensitive string of up to 64 ASCII characters specified
923
+ # when a `Query` request is made. Providing a `ClientToken` makes the
924
+ # call to `Query` *idempotent*. This means that running the same query
925
+ # repeatedly will produce the same result. In other words, making
926
+ # multiple identical `Query` requests has the same effect as making a
927
+ # single request. When using `ClientToken` in a query, note the
928
+ # following:
427
929
  #
428
- # Your query request will fail in the following cases:
930
+ # * If the Query API is instantiated without a `ClientToken`, the Query
931
+ # SDK generates a `ClientToken` on your behalf.
429
932
  #
430
- # * If you submit a request with the same client token outside the
431
- # 5-minute idepotency window.
933
+ # * If the `Query` invocation only contains the `ClientToken` but does
934
+ # not include a `NextToken`, that invocation of `Query` is assumed to
935
+ # be a new query run.
432
936
  #
433
- # * If you submit a request with the same client token but a change in
434
- # other parameters within the 5-minute idempotency window.
937
+ # * If the invocation contains `NextToken`, that particular invocation
938
+ # is assumed to be a subsequent invocation of a prior call to the
939
+ # Query API, and a result set is returned.
435
940
  #
436
- # After 4 hours, any request with the same client token is treated as a
437
- # new request.
941
+ # * After 4 hours, any request with the same `ClientToken` is treated as
942
+ # a new request.
438
943
  #
439
944
  # **A suitable default value is auto-generated.** You should normally
440
945
  # not need to pass this option.**
441
946
  #
442
947
  # @option params [String] :next_token
443
- # A pagination token passed to get a set of results.
948
+ # A pagination token used to return a set of results. When the `Query`
949
+ # API is invoked using `NextToken`, that particular invocation is
950
+ # assumed to be a subsequent invocation of a prior call to `Query`, and
951
+ # a result set is returned. However, if the `Query` invocation only
952
+ # contains the `ClientToken`, that invocation of `Query` is assumed to
953
+ # be a new query run.
954
+ #
955
+ # Note the following when using NextToken in a query:
956
+ #
957
+ # * A pagination token can be used for up to five `Query` invocations,
958
+ # OR for a duration of up to 1 hour – whichever comes first.
959
+ #
960
+ # * Using the same `NextToken` will return the same set of records. To
961
+ # keep paginating through the result set, you must to use the most
962
+ # recent `nextToken`.
963
+ #
964
+ # * Suppose a `Query` invocation returns two `NextToken` values,
965
+ # `TokenA` and `TokenB`. If `TokenB` is used in a subsequent `Query`
966
+ # invocation, then `TokenA` is invalidated and cannot be reused.
967
+ #
968
+ # * To request a previous result set from a query after pagination has
969
+ # begun, you must re-invoke the Query API.
970
+ #
971
+ # * The latest `NextToken` should be used to paginate until `null` is
972
+ # returned, at which point a new `NextToken` should be used.
973
+ #
974
+ # * If the IAM principal of the query initiator and the result reader
975
+ # are not the same and/or the query initiator and the result reader do
976
+ # not have the same query string in the query requests, the query will
977
+ # fail with an `Invalid pagination token` error.
444
978
  #
445
979
  # @option params [Integer] :max_rows
446
- # The total number of rows to return in the output. If the total number
447
- # of rows available is more than the value specified, a NextToken is
448
- # provided in the command's output. To resume pagination, provide the
449
- # NextToken value in the starting-token argument of a subsequent
450
- # command.
980
+ # The total number of rows to be returned in the `Query` output. The
981
+ # initial run of `Query` with a `MaxRows` value specified will return
982
+ # the result set of the query in two cases:
983
+ #
984
+ # * The size of the result is less than `1MB`.
985
+ #
986
+ # * The number of rows in the result set is less than the value of
987
+ # `maxRows`.
988
+ #
989
+ # Otherwise, the initial invocation of `Query` only returns a
990
+ # `NextToken`, which can then be used in subsequent calls to fetch the
991
+ # result set. To resume pagination, provide the `NextToken` value in the
992
+ # subsequent command.
993
+ #
994
+ # If the row size is large (e.g. a row has many columns), Timestream may
995
+ # return fewer rows to keep the response size from exceeding the 1 MB
996
+ # limit. If `MaxRows` is not provided, Timestream will send the
997
+ # necessary number of rows to meet the 1 MB limit.
451
998
  #
452
999
  # @return [Types::QueryResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
453
1000
  #
@@ -464,7 +1011,7 @@ module Aws::TimestreamQuery
464
1011
  # resp = client.query({
465
1012
  # query_string: "QueryString", # required
466
1013
  # client_token: "ClientRequestToken",
467
- # next_token: "String",
1014
+ # next_token: "PaginationToken",
468
1015
  # max_rows: 1,
469
1016
  # })
470
1017
  #
@@ -500,6 +1047,94 @@ module Aws::TimestreamQuery
500
1047
  req.send_request(options)
501
1048
  end
502
1049
 
1050
+ # Associate a set of tags with a Timestream resource. You can then
1051
+ # activate these user-defined tags so that they appear on the Billing
1052
+ # and Cost Management console for cost allocation tracking.
1053
+ #
1054
+ # @option params [required, String] :resource_arn
1055
+ # Identifies the Timestream resource to which tags should be added. This
1056
+ # value is an Amazon Resource Name (ARN).
1057
+ #
1058
+ # @option params [required, Array<Types::Tag>] :tags
1059
+ # The tags to be assigned to the Timestream resource.
1060
+ #
1061
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1062
+ #
1063
+ # @example Request syntax with placeholder values
1064
+ #
1065
+ # resp = client.tag_resource({
1066
+ # resource_arn: "AmazonResourceName", # required
1067
+ # tags: [ # required
1068
+ # {
1069
+ # key: "TagKey", # required
1070
+ # value: "TagValue", # required
1071
+ # },
1072
+ # ],
1073
+ # })
1074
+ #
1075
+ # @see http://docs.aws.amazon.com/goto/WebAPI/timestream-query-2018-11-01/TagResource AWS API Documentation
1076
+ #
1077
+ # @overload tag_resource(params = {})
1078
+ # @param [Hash] params ({})
1079
+ def tag_resource(params = {}, options = {})
1080
+ req = build_request(:tag_resource, params)
1081
+ req.send_request(options)
1082
+ end
1083
+
1084
+ # Removes the association of tags from a Timestream query resource.
1085
+ #
1086
+ # @option params [required, String] :resource_arn
1087
+ # The Timestream resource that the tags will be removed from. This value
1088
+ # is an Amazon Resource Name (ARN).
1089
+ #
1090
+ # @option params [required, Array<String>] :tag_keys
1091
+ # A list of tags keys. Existing tags of the resource whose keys are
1092
+ # members of this list will be removed from the Timestream resource.
1093
+ #
1094
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1095
+ #
1096
+ # @example Request syntax with placeholder values
1097
+ #
1098
+ # resp = client.untag_resource({
1099
+ # resource_arn: "AmazonResourceName", # required
1100
+ # tag_keys: ["TagKey"], # required
1101
+ # })
1102
+ #
1103
+ # @see http://docs.aws.amazon.com/goto/WebAPI/timestream-query-2018-11-01/UntagResource AWS API Documentation
1104
+ #
1105
+ # @overload untag_resource(params = {})
1106
+ # @param [Hash] params ({})
1107
+ def untag_resource(params = {}, options = {})
1108
+ req = build_request(:untag_resource, params)
1109
+ req.send_request(options)
1110
+ end
1111
+
1112
+ # Update a scheduled query.
1113
+ #
1114
+ # @option params [required, String] :scheduled_query_arn
1115
+ # ARN of the scheuled query.
1116
+ #
1117
+ # @option params [required, String] :state
1118
+ # State of the scheduled query.
1119
+ #
1120
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1121
+ #
1122
+ # @example Request syntax with placeholder values
1123
+ #
1124
+ # resp = client.update_scheduled_query({
1125
+ # scheduled_query_arn: "AmazonResourceName", # required
1126
+ # state: "ENABLED", # required, accepts ENABLED, DISABLED
1127
+ # })
1128
+ #
1129
+ # @see http://docs.aws.amazon.com/goto/WebAPI/timestream-query-2018-11-01/UpdateScheduledQuery AWS API Documentation
1130
+ #
1131
+ # @overload update_scheduled_query(params = {})
1132
+ # @param [Hash] params ({})
1133
+ def update_scheduled_query(params = {}, options = {})
1134
+ req = build_request(:update_scheduled_query, params)
1135
+ req.send_request(options)
1136
+ end
1137
+
503
1138
  # @!endgroup
504
1139
 
505
1140
  # @param params ({})
@@ -513,7 +1148,7 @@ module Aws::TimestreamQuery
513
1148
  params: params,
514
1149
  config: config)
515
1150
  context[:gem_name] = 'aws-sdk-timestreamquery'
516
- context[:gem_version] = '1.7.0'
1151
+ context[:gem_version] = '1.11.0'
517
1152
  Seahorse::Client::Request.new(handlers, context)
518
1153
  end
519
1154