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