aws-sdk-timestreamquery 1.6.0 → 1.10.0

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