-
Notifications
You must be signed in to change notification settings - Fork 248
/
client.rs
3286 lines (3227 loc) · 198 KB
/
client.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[derive(Debug)]
pub(crate) struct Handle {
pub(crate) client: aws_smithy_client::Client<
aws_smithy_client::erase::DynConnector,
aws_smithy_client::erase::DynMiddleware<aws_smithy_client::erase::DynConnector>,
>,
pub(crate) conf: crate::Config,
}
/// Client for Amazon Athena
///
/// Client for invoking operations on Amazon Athena. Each operation on Amazon Athena is a method on this
/// this struct. `.send()` MUST be invoked on the generated operations to dispatch the request to the service.
///
/// # Examples
/// **Constructing a client and invoking an operation**
/// ```rust,no_run
/// # async fn docs() {
/// // create a shared configuration. This can be used & shared between multiple service clients.
/// let shared_config = aws_config::load_from_env().await;
/// let client = aws_sdk_athena::Client::new(&shared_config);
/// // invoke an operation
/// /* let rsp = client
/// .<operation_name>().
/// .<param>("some value")
/// .send().await; */
/// # }
/// ```
/// **Constructing a client with custom configuration**
/// ```rust,no_run
/// use aws_config::RetryConfig;
/// # async fn docs() {
/// let shared_config = aws_config::load_from_env().await;
/// let config = aws_sdk_athena::config::Builder::from(&shared_config)
/// .retry_config(RetryConfig::disabled())
/// .build();
/// let client = aws_sdk_athena::Client::from_conf(config);
/// # }
#[derive(std::fmt::Debug)]
pub struct Client {
handle: std::sync::Arc<Handle>,
}
impl std::clone::Clone for Client {
fn clone(&self) -> Self {
Self {
handle: self.handle.clone(),
}
}
}
#[doc(inline)]
pub use aws_smithy_client::Builder;
impl
From<
aws_smithy_client::Client<
aws_smithy_client::erase::DynConnector,
aws_smithy_client::erase::DynMiddleware<aws_smithy_client::erase::DynConnector>,
>,
> for Client
{
fn from(
client: aws_smithy_client::Client<
aws_smithy_client::erase::DynConnector,
aws_smithy_client::erase::DynMiddleware<aws_smithy_client::erase::DynConnector>,
>,
) -> Self {
Self::with_config(client, crate::Config::builder().build())
}
}
impl Client {
/// Creates a client with the given service configuration.
pub fn with_config(
client: aws_smithy_client::Client<
aws_smithy_client::erase::DynConnector,
aws_smithy_client::erase::DynMiddleware<aws_smithy_client::erase::DynConnector>,
>,
conf: crate::Config,
) -> Self {
Self {
handle: std::sync::Arc::new(Handle { client, conf }),
}
}
/// Returns the client's configuration.
pub fn conf(&self) -> &crate::Config {
&self.handle.conf
}
}
impl Client {
/// Constructs a fluent builder for the [`BatchGetNamedQuery`](crate::client::fluent_builders::BatchGetNamedQuery) operation.
///
/// - The fluent builder is configurable:
/// - [`named_query_ids(Vec<String>)`](crate::client::fluent_builders::BatchGetNamedQuery::named_query_ids) / [`set_named_query_ids(Option<Vec<String>>)`](crate::client::fluent_builders::BatchGetNamedQuery::set_named_query_ids): <p>An array of query IDs.</p>
/// - On success, responds with [`BatchGetNamedQueryOutput`](crate::output::BatchGetNamedQueryOutput) with field(s):
/// - [`named_queries(Option<Vec<NamedQuery>>)`](crate::output::BatchGetNamedQueryOutput::named_queries): <p>Information about the named query IDs submitted.</p>
/// - [`unprocessed_named_query_ids(Option<Vec<UnprocessedNamedQueryId>>)`](crate::output::BatchGetNamedQueryOutput::unprocessed_named_query_ids): <p>Information about provided query IDs.</p>
/// - On failure, responds with [`SdkError<BatchGetNamedQueryError>`](crate::error::BatchGetNamedQueryError)
pub fn batch_get_named_query(&self) -> fluent_builders::BatchGetNamedQuery {
fluent_builders::BatchGetNamedQuery::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`BatchGetQueryExecution`](crate::client::fluent_builders::BatchGetQueryExecution) operation.
///
/// - The fluent builder is configurable:
/// - [`query_execution_ids(Vec<String>)`](crate::client::fluent_builders::BatchGetQueryExecution::query_execution_ids) / [`set_query_execution_ids(Option<Vec<String>>)`](crate::client::fluent_builders::BatchGetQueryExecution::set_query_execution_ids): <p>An array of query execution IDs.</p>
/// - On success, responds with [`BatchGetQueryExecutionOutput`](crate::output::BatchGetQueryExecutionOutput) with field(s):
/// - [`query_executions(Option<Vec<QueryExecution>>)`](crate::output::BatchGetQueryExecutionOutput::query_executions): <p>Information about a query execution.</p>
/// - [`unprocessed_query_execution_ids(Option<Vec<UnprocessedQueryExecutionId>>)`](crate::output::BatchGetQueryExecutionOutput::unprocessed_query_execution_ids): <p>Information about the query executions that failed to run.</p>
/// - On failure, responds with [`SdkError<BatchGetQueryExecutionError>`](crate::error::BatchGetQueryExecutionError)
pub fn batch_get_query_execution(&self) -> fluent_builders::BatchGetQueryExecution {
fluent_builders::BatchGetQueryExecution::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`CreateDataCatalog`](crate::client::fluent_builders::CreateDataCatalog) operation.
///
/// - The fluent builder is configurable:
/// - [`name(impl Into<String>)`](crate::client::fluent_builders::CreateDataCatalog::name) / [`set_name(Option<String>)`](crate::client::fluent_builders::CreateDataCatalog::set_name): <p>The name of the data catalog to create. The catalog name must be unique for the Amazon Web Services account and can use a maximum of 127 alphanumeric, underscore, at sign, or hyphen characters. The remainder of the length constraint of 256 is reserved for use by Athena.</p>
/// - [`r#type(DataCatalogType)`](crate::client::fluent_builders::CreateDataCatalog::type) / [`set_type(Option<DataCatalogType>)`](crate::client::fluent_builders::CreateDataCatalog::set_type): <p>The type of data catalog to create: <code>LAMBDA</code> for a federated catalog, <code>HIVE</code> for an external hive metastore, or <code>GLUE</code> for an Glue Data Catalog.</p>
/// - [`description(impl Into<String>)`](crate::client::fluent_builders::CreateDataCatalog::description) / [`set_description(Option<String>)`](crate::client::fluent_builders::CreateDataCatalog::set_description): <p>A description of the data catalog to be created.</p>
/// - [`parameters(HashMap<String, String>)`](crate::client::fluent_builders::CreateDataCatalog::parameters) / [`set_parameters(Option<HashMap<String, String>>)`](crate::client::fluent_builders::CreateDataCatalog::set_parameters): <p>Specifies the Lambda function or functions to use for creating the data catalog. This is a mapping whose values depend on the catalog type. </p> <ul> <li> <p>For the <code>HIVE</code> data catalog type, use the following syntax. The <code>metadata-function</code> parameter is required. <code>The sdk-version</code> parameter is optional and defaults to the currently supported version.</p> <p> <code>metadata-function=<i>lambda_arn</i>, sdk-version=<i>version_number</i> </code> </p> </li> <li> <p>For the <code>LAMBDA</code> data catalog type, use one of the following sets of required parameters, but not both.</p> <ul> <li> <p>If you have one Lambda function that processes metadata and another for reading the actual data, use the following syntax. Both parameters are required.</p> <p> <code>metadata-function=<i>lambda_arn</i>, record-function=<i>lambda_arn</i> </code> </p> </li> <li> <p> If you have a composite Lambda function that processes both metadata and data, use the following syntax to specify your Lambda function.</p> <p> <code>function=<i>lambda_arn</i> </code> </p> </li> </ul> </li> <li> <p>The <code>GLUE</code> type takes a catalog ID parameter and is required. The <code> <i>catalog_id</i> </code> is the account ID of the Amazon Web Services account to which the Glue Data Catalog belongs.</p> <p> <code>catalog-id=<i>catalog_id</i> </code> </p> <ul> <li> <p>The <code>GLUE</code> data catalog type also applies to the default <code>AwsDataCatalog</code> that already exists in your account, of which you can have only one and cannot modify.</p> </li> <li> <p>Queries that specify a Glue Data Catalog other than the default <code>AwsDataCatalog</code> must be run on Athena engine version 2.</p> </li> <li> <p>In Regions where Athena engine version 2 is not available, creating new Glue data catalogs results in an <code>INVALID_INPUT</code> error.</p> </li> </ul> </li> </ul>
/// - [`tags(Vec<Tag>)`](crate::client::fluent_builders::CreateDataCatalog::tags) / [`set_tags(Option<Vec<Tag>>)`](crate::client::fluent_builders::CreateDataCatalog::set_tags): <p>A list of comma separated tags to add to the data catalog that is created.</p>
/// - On success, responds with [`CreateDataCatalogOutput`](crate::output::CreateDataCatalogOutput)
/// - On failure, responds with [`SdkError<CreateDataCatalogError>`](crate::error::CreateDataCatalogError)
pub fn create_data_catalog(&self) -> fluent_builders::CreateDataCatalog {
fluent_builders::CreateDataCatalog::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`CreateNamedQuery`](crate::client::fluent_builders::CreateNamedQuery) operation.
///
/// - The fluent builder is configurable:
/// - [`name(impl Into<String>)`](crate::client::fluent_builders::CreateNamedQuery::name) / [`set_name(Option<String>)`](crate::client::fluent_builders::CreateNamedQuery::set_name): <p>The query name.</p>
/// - [`description(impl Into<String>)`](crate::client::fluent_builders::CreateNamedQuery::description) / [`set_description(Option<String>)`](crate::client::fluent_builders::CreateNamedQuery::set_description): <p>The query description.</p>
/// - [`database(impl Into<String>)`](crate::client::fluent_builders::CreateNamedQuery::database) / [`set_database(Option<String>)`](crate::client::fluent_builders::CreateNamedQuery::set_database): <p>The database to which the query belongs.</p>
/// - [`query_string(impl Into<String>)`](crate::client::fluent_builders::CreateNamedQuery::query_string) / [`set_query_string(Option<String>)`](crate::client::fluent_builders::CreateNamedQuery::set_query_string): <p>The contents of the query with all query statements.</p>
/// - [`client_request_token(impl Into<String>)`](crate::client::fluent_builders::CreateNamedQuery::client_request_token) / [`set_client_request_token(Option<String>)`](crate::client::fluent_builders::CreateNamedQuery::set_client_request_token): <p>A unique case-sensitive string used to ensure the request to create the query is idempotent (executes only once). If another <code>CreateNamedQuery</code> request is received, the same response is returned and another query is not created. If a parameter has changed, for example, the <code>QueryString</code>, an error is returned.</p> <important> <p>This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web Services SDK for Java) auto-generate the token for users. If you are not using the Amazon Web Services SDK or the Amazon Web Services CLI, you must provide this token or the action will fail.</p> </important>
/// - [`work_group(impl Into<String>)`](crate::client::fluent_builders::CreateNamedQuery::work_group) / [`set_work_group(Option<String>)`](crate::client::fluent_builders::CreateNamedQuery::set_work_group): <p>The name of the workgroup in which the named query is being created.</p>
/// - On success, responds with [`CreateNamedQueryOutput`](crate::output::CreateNamedQueryOutput) with field(s):
/// - [`named_query_id(Option<String>)`](crate::output::CreateNamedQueryOutput::named_query_id): <p>The unique ID of the query.</p>
/// - On failure, responds with [`SdkError<CreateNamedQueryError>`](crate::error::CreateNamedQueryError)
pub fn create_named_query(&self) -> fluent_builders::CreateNamedQuery {
fluent_builders::CreateNamedQuery::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`CreatePreparedStatement`](crate::client::fluent_builders::CreatePreparedStatement) operation.
///
/// - The fluent builder is configurable:
/// - [`statement_name(impl Into<String>)`](crate::client::fluent_builders::CreatePreparedStatement::statement_name) / [`set_statement_name(Option<String>)`](crate::client::fluent_builders::CreatePreparedStatement::set_statement_name): <p>The name of the prepared statement.</p>
/// - [`work_group(impl Into<String>)`](crate::client::fluent_builders::CreatePreparedStatement::work_group) / [`set_work_group(Option<String>)`](crate::client::fluent_builders::CreatePreparedStatement::set_work_group): <p>The name of the workgroup to which the prepared statement belongs.</p>
/// - [`query_statement(impl Into<String>)`](crate::client::fluent_builders::CreatePreparedStatement::query_statement) / [`set_query_statement(Option<String>)`](crate::client::fluent_builders::CreatePreparedStatement::set_query_statement): <p>The query string for the prepared statement.</p>
/// - [`description(impl Into<String>)`](crate::client::fluent_builders::CreatePreparedStatement::description) / [`set_description(Option<String>)`](crate::client::fluent_builders::CreatePreparedStatement::set_description): <p>The description of the prepared statement.</p>
/// - On success, responds with [`CreatePreparedStatementOutput`](crate::output::CreatePreparedStatementOutput)
/// - On failure, responds with [`SdkError<CreatePreparedStatementError>`](crate::error::CreatePreparedStatementError)
pub fn create_prepared_statement(&self) -> fluent_builders::CreatePreparedStatement {
fluent_builders::CreatePreparedStatement::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`CreateWorkGroup`](crate::client::fluent_builders::CreateWorkGroup) operation.
///
/// - The fluent builder is configurable:
/// - [`name(impl Into<String>)`](crate::client::fluent_builders::CreateWorkGroup::name) / [`set_name(Option<String>)`](crate::client::fluent_builders::CreateWorkGroup::set_name): <p>The workgroup name.</p>
/// - [`configuration(WorkGroupConfiguration)`](crate::client::fluent_builders::CreateWorkGroup::configuration) / [`set_configuration(Option<WorkGroupConfiguration>)`](crate::client::fluent_builders::CreateWorkGroup::set_configuration): <p>The configuration for the workgroup, which includes the location in Amazon S3 where query results are stored, the encryption configuration, if any, used for encrypting query results, whether the Amazon CloudWatch Metrics are enabled for the workgroup, the limit for the amount of bytes scanned (cutoff) per query, if it is specified, and whether workgroup's settings (specified with <code>EnforceWorkGroupConfiguration</code>) in the <code>WorkGroupConfiguration</code> override client-side settings. See <code>WorkGroupConfiguration$EnforceWorkGroupConfiguration</code>.</p>
/// - [`description(impl Into<String>)`](crate::client::fluent_builders::CreateWorkGroup::description) / [`set_description(Option<String>)`](crate::client::fluent_builders::CreateWorkGroup::set_description): <p>The workgroup description.</p>
/// - [`tags(Vec<Tag>)`](crate::client::fluent_builders::CreateWorkGroup::tags) / [`set_tags(Option<Vec<Tag>>)`](crate::client::fluent_builders::CreateWorkGroup::set_tags): <p>A list of comma separated tags to add to the workgroup that is created.</p>
/// - On success, responds with [`CreateWorkGroupOutput`](crate::output::CreateWorkGroupOutput)
/// - On failure, responds with [`SdkError<CreateWorkGroupError>`](crate::error::CreateWorkGroupError)
pub fn create_work_group(&self) -> fluent_builders::CreateWorkGroup {
fluent_builders::CreateWorkGroup::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`DeleteDataCatalog`](crate::client::fluent_builders::DeleteDataCatalog) operation.
///
/// - The fluent builder is configurable:
/// - [`name(impl Into<String>)`](crate::client::fluent_builders::DeleteDataCatalog::name) / [`set_name(Option<String>)`](crate::client::fluent_builders::DeleteDataCatalog::set_name): <p>The name of the data catalog to delete.</p>
/// - On success, responds with [`DeleteDataCatalogOutput`](crate::output::DeleteDataCatalogOutput)
/// - On failure, responds with [`SdkError<DeleteDataCatalogError>`](crate::error::DeleteDataCatalogError)
pub fn delete_data_catalog(&self) -> fluent_builders::DeleteDataCatalog {
fluent_builders::DeleteDataCatalog::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`DeleteNamedQuery`](crate::client::fluent_builders::DeleteNamedQuery) operation.
///
/// - The fluent builder is configurable:
/// - [`named_query_id(impl Into<String>)`](crate::client::fluent_builders::DeleteNamedQuery::named_query_id) / [`set_named_query_id(Option<String>)`](crate::client::fluent_builders::DeleteNamedQuery::set_named_query_id): <p>The unique ID of the query to delete.</p>
/// - On success, responds with [`DeleteNamedQueryOutput`](crate::output::DeleteNamedQueryOutput)
/// - On failure, responds with [`SdkError<DeleteNamedQueryError>`](crate::error::DeleteNamedQueryError)
pub fn delete_named_query(&self) -> fluent_builders::DeleteNamedQuery {
fluent_builders::DeleteNamedQuery::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`DeletePreparedStatement`](crate::client::fluent_builders::DeletePreparedStatement) operation.
///
/// - The fluent builder is configurable:
/// - [`statement_name(impl Into<String>)`](crate::client::fluent_builders::DeletePreparedStatement::statement_name) / [`set_statement_name(Option<String>)`](crate::client::fluent_builders::DeletePreparedStatement::set_statement_name): <p>The name of the prepared statement to delete.</p>
/// - [`work_group(impl Into<String>)`](crate::client::fluent_builders::DeletePreparedStatement::work_group) / [`set_work_group(Option<String>)`](crate::client::fluent_builders::DeletePreparedStatement::set_work_group): <p>The workgroup to which the statement to be deleted belongs.</p>
/// - On success, responds with [`DeletePreparedStatementOutput`](crate::output::DeletePreparedStatementOutput)
/// - On failure, responds with [`SdkError<DeletePreparedStatementError>`](crate::error::DeletePreparedStatementError)
pub fn delete_prepared_statement(&self) -> fluent_builders::DeletePreparedStatement {
fluent_builders::DeletePreparedStatement::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`DeleteWorkGroup`](crate::client::fluent_builders::DeleteWorkGroup) operation.
///
/// - The fluent builder is configurable:
/// - [`work_group(impl Into<String>)`](crate::client::fluent_builders::DeleteWorkGroup::work_group) / [`set_work_group(Option<String>)`](crate::client::fluent_builders::DeleteWorkGroup::set_work_group): <p>The unique name of the workgroup to delete.</p>
/// - [`recursive_delete_option(bool)`](crate::client::fluent_builders::DeleteWorkGroup::recursive_delete_option) / [`set_recursive_delete_option(Option<bool>)`](crate::client::fluent_builders::DeleteWorkGroup::set_recursive_delete_option): <p>The option to delete the workgroup and its contents even if the workgroup contains any named queries or query executions.</p>
/// - On success, responds with [`DeleteWorkGroupOutput`](crate::output::DeleteWorkGroupOutput)
/// - On failure, responds with [`SdkError<DeleteWorkGroupError>`](crate::error::DeleteWorkGroupError)
pub fn delete_work_group(&self) -> fluent_builders::DeleteWorkGroup {
fluent_builders::DeleteWorkGroup::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`GetDatabase`](crate::client::fluent_builders::GetDatabase) operation.
///
/// - The fluent builder is configurable:
/// - [`catalog_name(impl Into<String>)`](crate::client::fluent_builders::GetDatabase::catalog_name) / [`set_catalog_name(Option<String>)`](crate::client::fluent_builders::GetDatabase::set_catalog_name): <p>The name of the data catalog that contains the database to return.</p>
/// - [`database_name(impl Into<String>)`](crate::client::fluent_builders::GetDatabase::database_name) / [`set_database_name(Option<String>)`](crate::client::fluent_builders::GetDatabase::set_database_name): <p>The name of the database to return.</p>
/// - On success, responds with [`GetDatabaseOutput`](crate::output::GetDatabaseOutput) with field(s):
/// - [`database(Option<Database>)`](crate::output::GetDatabaseOutput::database): <p>The database returned.</p>
/// - On failure, responds with [`SdkError<GetDatabaseError>`](crate::error::GetDatabaseError)
pub fn get_database(&self) -> fluent_builders::GetDatabase {
fluent_builders::GetDatabase::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`GetDataCatalog`](crate::client::fluent_builders::GetDataCatalog) operation.
///
/// - The fluent builder is configurable:
/// - [`name(impl Into<String>)`](crate::client::fluent_builders::GetDataCatalog::name) / [`set_name(Option<String>)`](crate::client::fluent_builders::GetDataCatalog::set_name): <p>The name of the data catalog to return.</p>
/// - On success, responds with [`GetDataCatalogOutput`](crate::output::GetDataCatalogOutput) with field(s):
/// - [`data_catalog(Option<DataCatalog>)`](crate::output::GetDataCatalogOutput::data_catalog): <p>The data catalog returned.</p>
/// - On failure, responds with [`SdkError<GetDataCatalogError>`](crate::error::GetDataCatalogError)
pub fn get_data_catalog(&self) -> fluent_builders::GetDataCatalog {
fluent_builders::GetDataCatalog::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`GetNamedQuery`](crate::client::fluent_builders::GetNamedQuery) operation.
///
/// - The fluent builder is configurable:
/// - [`named_query_id(impl Into<String>)`](crate::client::fluent_builders::GetNamedQuery::named_query_id) / [`set_named_query_id(Option<String>)`](crate::client::fluent_builders::GetNamedQuery::set_named_query_id): <p>The unique ID of the query. Use <code>ListNamedQueries</code> to get query IDs.</p>
/// - On success, responds with [`GetNamedQueryOutput`](crate::output::GetNamedQueryOutput) with field(s):
/// - [`named_query(Option<NamedQuery>)`](crate::output::GetNamedQueryOutput::named_query): <p>Information about the query.</p>
/// - On failure, responds with [`SdkError<GetNamedQueryError>`](crate::error::GetNamedQueryError)
pub fn get_named_query(&self) -> fluent_builders::GetNamedQuery {
fluent_builders::GetNamedQuery::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`GetPreparedStatement`](crate::client::fluent_builders::GetPreparedStatement) operation.
///
/// - The fluent builder is configurable:
/// - [`statement_name(impl Into<String>)`](crate::client::fluent_builders::GetPreparedStatement::statement_name) / [`set_statement_name(Option<String>)`](crate::client::fluent_builders::GetPreparedStatement::set_statement_name): <p>The name of the prepared statement to retrieve.</p>
/// - [`work_group(impl Into<String>)`](crate::client::fluent_builders::GetPreparedStatement::work_group) / [`set_work_group(Option<String>)`](crate::client::fluent_builders::GetPreparedStatement::set_work_group): <p>The workgroup to which the statement to be retrieved belongs.</p>
/// - On success, responds with [`GetPreparedStatementOutput`](crate::output::GetPreparedStatementOutput) with field(s):
/// - [`prepared_statement(Option<PreparedStatement>)`](crate::output::GetPreparedStatementOutput::prepared_statement): <p>The name of the prepared statement that was retrieved.</p>
/// - On failure, responds with [`SdkError<GetPreparedStatementError>`](crate::error::GetPreparedStatementError)
pub fn get_prepared_statement(&self) -> fluent_builders::GetPreparedStatement {
fluent_builders::GetPreparedStatement::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`GetQueryExecution`](crate::client::fluent_builders::GetQueryExecution) operation.
///
/// - The fluent builder is configurable:
/// - [`query_execution_id(impl Into<String>)`](crate::client::fluent_builders::GetQueryExecution::query_execution_id) / [`set_query_execution_id(Option<String>)`](crate::client::fluent_builders::GetQueryExecution::set_query_execution_id): <p>The unique ID of the query execution.</p>
/// - On success, responds with [`GetQueryExecutionOutput`](crate::output::GetQueryExecutionOutput) with field(s):
/// - [`query_execution(Option<QueryExecution>)`](crate::output::GetQueryExecutionOutput::query_execution): <p>Information about the query execution.</p>
/// - On failure, responds with [`SdkError<GetQueryExecutionError>`](crate::error::GetQueryExecutionError)
pub fn get_query_execution(&self) -> fluent_builders::GetQueryExecution {
fluent_builders::GetQueryExecution::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`GetQueryResults`](crate::client::fluent_builders::GetQueryResults) operation.
/// This operation supports pagination; See [`into_paginator()`](crate::client::fluent_builders::GetQueryResults::into_paginator).
///
/// - The fluent builder is configurable:
/// - [`query_execution_id(impl Into<String>)`](crate::client::fluent_builders::GetQueryResults::query_execution_id) / [`set_query_execution_id(Option<String>)`](crate::client::fluent_builders::GetQueryResults::set_query_execution_id): <p>The unique ID of the query execution.</p>
/// - [`next_token(impl Into<String>)`](crate::client::fluent_builders::GetQueryResults::next_token) / [`set_next_token(Option<String>)`](crate::client::fluent_builders::GetQueryResults::set_next_token): <p>A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the <code>NextToken</code> from the response object of the previous page call.</p>
/// - [`max_results(i32)`](crate::client::fluent_builders::GetQueryResults::max_results) / [`set_max_results(Option<i32>)`](crate::client::fluent_builders::GetQueryResults::set_max_results): <p>The maximum number of results (rows) to return in this request.</p>
/// - On success, responds with [`GetQueryResultsOutput`](crate::output::GetQueryResultsOutput) with field(s):
/// - [`update_count(Option<i64>)`](crate::output::GetQueryResultsOutput::update_count): <p>The number of rows inserted with a <code>CREATE TABLE AS SELECT</code> statement. </p>
/// - [`result_set(Option<ResultSet>)`](crate::output::GetQueryResultsOutput::result_set): <p>The results of the query execution.</p>
/// - [`next_token(Option<String>)`](crate::output::GetQueryResultsOutput::next_token): <p>A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the <code>NextToken</code> from the response object of the previous page call.</p>
/// - On failure, responds with [`SdkError<GetQueryResultsError>`](crate::error::GetQueryResultsError)
pub fn get_query_results(&self) -> fluent_builders::GetQueryResults {
fluent_builders::GetQueryResults::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`GetTableMetadata`](crate::client::fluent_builders::GetTableMetadata) operation.
///
/// - The fluent builder is configurable:
/// - [`catalog_name(impl Into<String>)`](crate::client::fluent_builders::GetTableMetadata::catalog_name) / [`set_catalog_name(Option<String>)`](crate::client::fluent_builders::GetTableMetadata::set_catalog_name): <p>The name of the data catalog that contains the database and table metadata to return.</p>
/// - [`database_name(impl Into<String>)`](crate::client::fluent_builders::GetTableMetadata::database_name) / [`set_database_name(Option<String>)`](crate::client::fluent_builders::GetTableMetadata::set_database_name): <p>The name of the database that contains the table metadata to return.</p>
/// - [`table_name(impl Into<String>)`](crate::client::fluent_builders::GetTableMetadata::table_name) / [`set_table_name(Option<String>)`](crate::client::fluent_builders::GetTableMetadata::set_table_name): <p>The name of the table for which metadata is returned.</p>
/// - On success, responds with [`GetTableMetadataOutput`](crate::output::GetTableMetadataOutput) with field(s):
/// - [`table_metadata(Option<TableMetadata>)`](crate::output::GetTableMetadataOutput::table_metadata): <p>An object that contains table metadata.</p>
/// - On failure, responds with [`SdkError<GetTableMetadataError>`](crate::error::GetTableMetadataError)
pub fn get_table_metadata(&self) -> fluent_builders::GetTableMetadata {
fluent_builders::GetTableMetadata::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`GetWorkGroup`](crate::client::fluent_builders::GetWorkGroup) operation.
///
/// - The fluent builder is configurable:
/// - [`work_group(impl Into<String>)`](crate::client::fluent_builders::GetWorkGroup::work_group) / [`set_work_group(Option<String>)`](crate::client::fluent_builders::GetWorkGroup::set_work_group): <p>The name of the workgroup.</p>
/// - On success, responds with [`GetWorkGroupOutput`](crate::output::GetWorkGroupOutput) with field(s):
/// - [`work_group(Option<WorkGroup>)`](crate::output::GetWorkGroupOutput::work_group): <p>Information about the workgroup.</p>
/// - On failure, responds with [`SdkError<GetWorkGroupError>`](crate::error::GetWorkGroupError)
pub fn get_work_group(&self) -> fluent_builders::GetWorkGroup {
fluent_builders::GetWorkGroup::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ListDatabases`](crate::client::fluent_builders::ListDatabases) operation.
/// This operation supports pagination; See [`into_paginator()`](crate::client::fluent_builders::ListDatabases::into_paginator).
///
/// - The fluent builder is configurable:
/// - [`catalog_name(impl Into<String>)`](crate::client::fluent_builders::ListDatabases::catalog_name) / [`set_catalog_name(Option<String>)`](crate::client::fluent_builders::ListDatabases::set_catalog_name): <p>The name of the data catalog that contains the databases to return.</p>
/// - [`next_token(impl Into<String>)`](crate::client::fluent_builders::ListDatabases::next_token) / [`set_next_token(Option<String>)`](crate::client::fluent_builders::ListDatabases::set_next_token): <p>A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the <code>NextToken</code> from the response object of the previous page call.</p>
/// - [`max_results(i32)`](crate::client::fluent_builders::ListDatabases::max_results) / [`set_max_results(Option<i32>)`](crate::client::fluent_builders::ListDatabases::set_max_results): <p>Specifies the maximum number of results to return.</p>
/// - On success, responds with [`ListDatabasesOutput`](crate::output::ListDatabasesOutput) with field(s):
/// - [`database_list(Option<Vec<Database>>)`](crate::output::ListDatabasesOutput::database_list): <p>A list of databases from a data catalog.</p>
/// - [`next_token(Option<String>)`](crate::output::ListDatabasesOutput::next_token): <p>A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.</p>
/// - On failure, responds with [`SdkError<ListDatabasesError>`](crate::error::ListDatabasesError)
pub fn list_databases(&self) -> fluent_builders::ListDatabases {
fluent_builders::ListDatabases::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ListDataCatalogs`](crate::client::fluent_builders::ListDataCatalogs) operation.
/// This operation supports pagination; See [`into_paginator()`](crate::client::fluent_builders::ListDataCatalogs::into_paginator).
///
/// - The fluent builder is configurable:
/// - [`next_token(impl Into<String>)`](crate::client::fluent_builders::ListDataCatalogs::next_token) / [`set_next_token(Option<String>)`](crate::client::fluent_builders::ListDataCatalogs::set_next_token): <p>A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.</p>
/// - [`max_results(i32)`](crate::client::fluent_builders::ListDataCatalogs::max_results) / [`set_max_results(Option<i32>)`](crate::client::fluent_builders::ListDataCatalogs::set_max_results): <p>Specifies the maximum number of data catalogs to return.</p>
/// - On success, responds with [`ListDataCatalogsOutput`](crate::output::ListDataCatalogsOutput) with field(s):
/// - [`data_catalogs_summary(Option<Vec<DataCatalogSummary>>)`](crate::output::ListDataCatalogsOutput::data_catalogs_summary): <p>A summary list of data catalogs.</p>
/// - [`next_token(Option<String>)`](crate::output::ListDataCatalogsOutput::next_token): <p>A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.</p>
/// - On failure, responds with [`SdkError<ListDataCatalogsError>`](crate::error::ListDataCatalogsError)
pub fn list_data_catalogs(&self) -> fluent_builders::ListDataCatalogs {
fluent_builders::ListDataCatalogs::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ListEngineVersions`](crate::client::fluent_builders::ListEngineVersions) operation.
///
/// - The fluent builder is configurable:
/// - [`next_token(impl Into<String>)`](crate::client::fluent_builders::ListEngineVersions::next_token) / [`set_next_token(Option<String>)`](crate::client::fluent_builders::ListEngineVersions::set_next_token): <p>A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the <code>NextToken</code> from the response object of the previous page call.</p>
/// - [`max_results(i32)`](crate::client::fluent_builders::ListEngineVersions::max_results) / [`set_max_results(Option<i32>)`](crate::client::fluent_builders::ListEngineVersions::set_max_results): <p>The maximum number of engine versions to return in this request.</p>
/// - On success, responds with [`ListEngineVersionsOutput`](crate::output::ListEngineVersionsOutput) with field(s):
/// - [`engine_versions(Option<Vec<EngineVersion>>)`](crate::output::ListEngineVersionsOutput::engine_versions): <p>A list of engine versions that are available to choose from.</p>
/// - [`next_token(Option<String>)`](crate::output::ListEngineVersionsOutput::next_token): <p>A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the <code>NextToken</code> from the response object of the previous page call.</p>
/// - On failure, responds with [`SdkError<ListEngineVersionsError>`](crate::error::ListEngineVersionsError)
pub fn list_engine_versions(&self) -> fluent_builders::ListEngineVersions {
fluent_builders::ListEngineVersions::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ListNamedQueries`](crate::client::fluent_builders::ListNamedQueries) operation.
/// This operation supports pagination; See [`into_paginator()`](crate::client::fluent_builders::ListNamedQueries::into_paginator).
///
/// - The fluent builder is configurable:
/// - [`next_token(impl Into<String>)`](crate::client::fluent_builders::ListNamedQueries::next_token) / [`set_next_token(Option<String>)`](crate::client::fluent_builders::ListNamedQueries::set_next_token): <p>A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the <code>NextToken</code> from the response object of the previous page call.</p>
/// - [`max_results(i32)`](crate::client::fluent_builders::ListNamedQueries::max_results) / [`set_max_results(Option<i32>)`](crate::client::fluent_builders::ListNamedQueries::set_max_results): <p>The maximum number of queries to return in this request.</p>
/// - [`work_group(impl Into<String>)`](crate::client::fluent_builders::ListNamedQueries::work_group) / [`set_work_group(Option<String>)`](crate::client::fluent_builders::ListNamedQueries::set_work_group): <p>The name of the workgroup from which the named queries are being returned. If a workgroup is not specified, the saved queries for the primary workgroup are returned.</p>
/// - On success, responds with [`ListNamedQueriesOutput`](crate::output::ListNamedQueriesOutput) with field(s):
/// - [`named_query_ids(Option<Vec<String>>)`](crate::output::ListNamedQueriesOutput::named_query_ids): <p>The list of unique query IDs.</p>
/// - [`next_token(Option<String>)`](crate::output::ListNamedQueriesOutput::next_token): <p>A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the <code>NextToken</code> from the response object of the previous page call.</p>
/// - On failure, responds with [`SdkError<ListNamedQueriesError>`](crate::error::ListNamedQueriesError)
pub fn list_named_queries(&self) -> fluent_builders::ListNamedQueries {
fluent_builders::ListNamedQueries::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ListPreparedStatements`](crate::client::fluent_builders::ListPreparedStatements) operation.
/// This operation supports pagination; See [`into_paginator()`](crate::client::fluent_builders::ListPreparedStatements::into_paginator).
///
/// - The fluent builder is configurable:
/// - [`work_group(impl Into<String>)`](crate::client::fluent_builders::ListPreparedStatements::work_group) / [`set_work_group(Option<String>)`](crate::client::fluent_builders::ListPreparedStatements::set_work_group): <p>The workgroup to list the prepared statements for.</p>
/// - [`next_token(impl Into<String>)`](crate::client::fluent_builders::ListPreparedStatements::next_token) / [`set_next_token(Option<String>)`](crate::client::fluent_builders::ListPreparedStatements::set_next_token): <p>A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the <code>NextToken</code> from the response object of the previous page call.</p>
/// - [`max_results(i32)`](crate::client::fluent_builders::ListPreparedStatements::max_results) / [`set_max_results(Option<i32>)`](crate::client::fluent_builders::ListPreparedStatements::set_max_results): <p>The maximum number of results to return in this request.</p>
/// - On success, responds with [`ListPreparedStatementsOutput`](crate::output::ListPreparedStatementsOutput) with field(s):
/// - [`prepared_statements(Option<Vec<PreparedStatementSummary>>)`](crate::output::ListPreparedStatementsOutput::prepared_statements): <p>The list of prepared statements for the workgroup.</p>
/// - [`next_token(Option<String>)`](crate::output::ListPreparedStatementsOutput::next_token): <p>A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the <code>NextToken</code> from the response object of the previous page call.</p>
/// - On failure, responds with [`SdkError<ListPreparedStatementsError>`](crate::error::ListPreparedStatementsError)
pub fn list_prepared_statements(&self) -> fluent_builders::ListPreparedStatements {
fluent_builders::ListPreparedStatements::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ListQueryExecutions`](crate::client::fluent_builders::ListQueryExecutions) operation.
/// This operation supports pagination; See [`into_paginator()`](crate::client::fluent_builders::ListQueryExecutions::into_paginator).
///
/// - The fluent builder is configurable:
/// - [`next_token(impl Into<String>)`](crate::client::fluent_builders::ListQueryExecutions::next_token) / [`set_next_token(Option<String>)`](crate::client::fluent_builders::ListQueryExecutions::set_next_token): <p>A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the <code>NextToken</code> from the response object of the previous page call.</p>
/// - [`max_results(i32)`](crate::client::fluent_builders::ListQueryExecutions::max_results) / [`set_max_results(Option<i32>)`](crate::client::fluent_builders::ListQueryExecutions::set_max_results): <p>The maximum number of query executions to return in this request.</p>
/// - [`work_group(impl Into<String>)`](crate::client::fluent_builders::ListQueryExecutions::work_group) / [`set_work_group(Option<String>)`](crate::client::fluent_builders::ListQueryExecutions::set_work_group): <p>The name of the workgroup from which queries are being returned. If a workgroup is not specified, a list of available query execution IDs for the queries in the primary workgroup is returned.</p>
/// - On success, responds with [`ListQueryExecutionsOutput`](crate::output::ListQueryExecutionsOutput) with field(s):
/// - [`query_execution_ids(Option<Vec<String>>)`](crate::output::ListQueryExecutionsOutput::query_execution_ids): <p>The unique IDs of each query execution as an array of strings.</p>
/// - [`next_token(Option<String>)`](crate::output::ListQueryExecutionsOutput::next_token): <p>A token to be used by the next request if this request is truncated.</p>
/// - On failure, responds with [`SdkError<ListQueryExecutionsError>`](crate::error::ListQueryExecutionsError)
pub fn list_query_executions(&self) -> fluent_builders::ListQueryExecutions {
fluent_builders::ListQueryExecutions::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ListTableMetadata`](crate::client::fluent_builders::ListTableMetadata) operation.
/// This operation supports pagination; See [`into_paginator()`](crate::client::fluent_builders::ListTableMetadata::into_paginator).
///
/// - The fluent builder is configurable:
/// - [`catalog_name(impl Into<String>)`](crate::client::fluent_builders::ListTableMetadata::catalog_name) / [`set_catalog_name(Option<String>)`](crate::client::fluent_builders::ListTableMetadata::set_catalog_name): <p>The name of the data catalog for which table metadata should be returned.</p>
/// - [`database_name(impl Into<String>)`](crate::client::fluent_builders::ListTableMetadata::database_name) / [`set_database_name(Option<String>)`](crate::client::fluent_builders::ListTableMetadata::set_database_name): <p>The name of the database for which table metadata should be returned.</p>
/// - [`expression(impl Into<String>)`](crate::client::fluent_builders::ListTableMetadata::expression) / [`set_expression(Option<String>)`](crate::client::fluent_builders::ListTableMetadata::set_expression): <p>A regex filter that pattern-matches table names. If no expression is supplied, metadata for all tables are listed.</p>
/// - [`next_token(impl Into<String>)`](crate::client::fluent_builders::ListTableMetadata::next_token) / [`set_next_token(Option<String>)`](crate::client::fluent_builders::ListTableMetadata::set_next_token): <p>A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.</p>
/// - [`max_results(i32)`](crate::client::fluent_builders::ListTableMetadata::max_results) / [`set_max_results(Option<i32>)`](crate::client::fluent_builders::ListTableMetadata::set_max_results): <p>Specifies the maximum number of results to return.</p>
/// - On success, responds with [`ListTableMetadataOutput`](crate::output::ListTableMetadataOutput) with field(s):
/// - [`table_metadata_list(Option<Vec<TableMetadata>>)`](crate::output::ListTableMetadataOutput::table_metadata_list): <p>A list of table metadata.</p>
/// - [`next_token(Option<String>)`](crate::output::ListTableMetadataOutput::next_token): <p>A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.</p>
/// - On failure, responds with [`SdkError<ListTableMetadataError>`](crate::error::ListTableMetadataError)
pub fn list_table_metadata(&self) -> fluent_builders::ListTableMetadata {
fluent_builders::ListTableMetadata::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ListTagsForResource`](crate::client::fluent_builders::ListTagsForResource) operation.
/// This operation supports pagination; See [`into_paginator()`](crate::client::fluent_builders::ListTagsForResource::into_paginator).
///
/// - The fluent builder is configurable:
/// - [`resource_arn(impl Into<String>)`](crate::client::fluent_builders::ListTagsForResource::resource_arn) / [`set_resource_arn(Option<String>)`](crate::client::fluent_builders::ListTagsForResource::set_resource_arn): <p>Lists the tags for the resource with the specified ARN.</p>
/// - [`next_token(impl Into<String>)`](crate::client::fluent_builders::ListTagsForResource::next_token) / [`set_next_token(Option<String>)`](crate::client::fluent_builders::ListTagsForResource::set_next_token): <p>The token for the next set of results, or null if there are no additional results for this request, where the request lists the tags for the resource with the specified ARN.</p>
/// - [`max_results(i32)`](crate::client::fluent_builders::ListTagsForResource::max_results) / [`set_max_results(Option<i32>)`](crate::client::fluent_builders::ListTagsForResource::set_max_results): <p>The maximum number of results to be returned per request that lists the tags for the resource.</p>
/// - On success, responds with [`ListTagsForResourceOutput`](crate::output::ListTagsForResourceOutput) with field(s):
/// - [`tags(Option<Vec<Tag>>)`](crate::output::ListTagsForResourceOutput::tags): <p>The list of tags associated with the specified resource.</p>
/// - [`next_token(Option<String>)`](crate::output::ListTagsForResourceOutput::next_token): <p>A token to be used by the next request if this request is truncated.</p>
/// - On failure, responds with [`SdkError<ListTagsForResourceError>`](crate::error::ListTagsForResourceError)
pub fn list_tags_for_resource(&self) -> fluent_builders::ListTagsForResource {
fluent_builders::ListTagsForResource::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`ListWorkGroups`](crate::client::fluent_builders::ListWorkGroups) operation.
/// This operation supports pagination; See [`into_paginator()`](crate::client::fluent_builders::ListWorkGroups::into_paginator).
///
/// - The fluent builder is configurable:
/// - [`next_token(impl Into<String>)`](crate::client::fluent_builders::ListWorkGroups::next_token) / [`set_next_token(Option<String>)`](crate::client::fluent_builders::ListWorkGroups::set_next_token): <p>A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the <code>NextToken</code> from the response object of the previous page call.</p>
/// - [`max_results(i32)`](crate::client::fluent_builders::ListWorkGroups::max_results) / [`set_max_results(Option<i32>)`](crate::client::fluent_builders::ListWorkGroups::set_max_results): <p>The maximum number of workgroups to return in this request.</p>
/// - On success, responds with [`ListWorkGroupsOutput`](crate::output::ListWorkGroupsOutput) with field(s):
/// - [`work_groups(Option<Vec<WorkGroupSummary>>)`](crate::output::ListWorkGroupsOutput::work_groups): <p>A list of <code>WorkGroupSummary</code> objects that include the names, descriptions, creation times, and states for each workgroup.</p>
/// - [`next_token(Option<String>)`](crate::output::ListWorkGroupsOutput::next_token): <p>A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the <code>NextToken</code> from the response object of the previous page call.</p>
/// - On failure, responds with [`SdkError<ListWorkGroupsError>`](crate::error::ListWorkGroupsError)
pub fn list_work_groups(&self) -> fluent_builders::ListWorkGroups {
fluent_builders::ListWorkGroups::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`StartQueryExecution`](crate::client::fluent_builders::StartQueryExecution) operation.
///
/// - The fluent builder is configurable:
/// - [`query_string(impl Into<String>)`](crate::client::fluent_builders::StartQueryExecution::query_string) / [`set_query_string(Option<String>)`](crate::client::fluent_builders::StartQueryExecution::set_query_string): <p>The SQL query statements to be executed.</p>
/// - [`client_request_token(impl Into<String>)`](crate::client::fluent_builders::StartQueryExecution::client_request_token) / [`set_client_request_token(Option<String>)`](crate::client::fluent_builders::StartQueryExecution::set_client_request_token): <p>A unique case-sensitive string used to ensure the request to create the query is idempotent (executes only once). If another <code>StartQueryExecution</code> request is received, the same response is returned and another query is not created. If a parameter has changed, for example, the <code>QueryString</code>, an error is returned.</p> <important> <p>This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web Services SDK for Java) auto-generate the token for users. If you are not using the Amazon Web Services SDK or the Amazon Web Services CLI, you must provide this token or the action will fail.</p> </important>
/// - [`query_execution_context(QueryExecutionContext)`](crate::client::fluent_builders::StartQueryExecution::query_execution_context) / [`set_query_execution_context(Option<QueryExecutionContext>)`](crate::client::fluent_builders::StartQueryExecution::set_query_execution_context): <p>The database within which the query executes.</p>
/// - [`result_configuration(ResultConfiguration)`](crate::client::fluent_builders::StartQueryExecution::result_configuration) / [`set_result_configuration(Option<ResultConfiguration>)`](crate::client::fluent_builders::StartQueryExecution::set_result_configuration): <p>Specifies information about where and how to save the results of the query execution. If the query runs in a workgroup, then workgroup's settings may override query settings. This affects the query results location. The workgroup settings override is specified in EnforceWorkGroupConfiguration (true/false) in the WorkGroupConfiguration. See <code>WorkGroupConfiguration$EnforceWorkGroupConfiguration</code>.</p>
/// - [`work_group(impl Into<String>)`](crate::client::fluent_builders::StartQueryExecution::work_group) / [`set_work_group(Option<String>)`](crate::client::fluent_builders::StartQueryExecution::set_work_group): <p>The name of the workgroup in which the query is being started.</p>
/// - On success, responds with [`StartQueryExecutionOutput`](crate::output::StartQueryExecutionOutput) with field(s):
/// - [`query_execution_id(Option<String>)`](crate::output::StartQueryExecutionOutput::query_execution_id): <p>The unique ID of the query that ran as a result of this request.</p>
/// - On failure, responds with [`SdkError<StartQueryExecutionError>`](crate::error::StartQueryExecutionError)
pub fn start_query_execution(&self) -> fluent_builders::StartQueryExecution {
fluent_builders::StartQueryExecution::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`StopQueryExecution`](crate::client::fluent_builders::StopQueryExecution) operation.
///
/// - The fluent builder is configurable:
/// - [`query_execution_id(impl Into<String>)`](crate::client::fluent_builders::StopQueryExecution::query_execution_id) / [`set_query_execution_id(Option<String>)`](crate::client::fluent_builders::StopQueryExecution::set_query_execution_id): <p>The unique ID of the query execution to stop.</p>
/// - On success, responds with [`StopQueryExecutionOutput`](crate::output::StopQueryExecutionOutput)
/// - On failure, responds with [`SdkError<StopQueryExecutionError>`](crate::error::StopQueryExecutionError)
pub fn stop_query_execution(&self) -> fluent_builders::StopQueryExecution {
fluent_builders::StopQueryExecution::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`TagResource`](crate::client::fluent_builders::TagResource) operation.
///
/// - The fluent builder is configurable:
/// - [`resource_arn(impl Into<String>)`](crate::client::fluent_builders::TagResource::resource_arn) / [`set_resource_arn(Option<String>)`](crate::client::fluent_builders::TagResource::set_resource_arn): <p>Specifies the ARN of the Athena resource (workgroup or data catalog) to which tags are to be added.</p>
/// - [`tags(Vec<Tag>)`](crate::client::fluent_builders::TagResource::tags) / [`set_tags(Option<Vec<Tag>>)`](crate::client::fluent_builders::TagResource::set_tags): <p>A collection of one or more tags, separated by commas, to be added to an Athena workgroup or data catalog resource.</p>
/// - On success, responds with [`TagResourceOutput`](crate::output::TagResourceOutput)
/// - On failure, responds with [`SdkError<TagResourceError>`](crate::error::TagResourceError)
pub fn tag_resource(&self) -> fluent_builders::TagResource {
fluent_builders::TagResource::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`UntagResource`](crate::client::fluent_builders::UntagResource) operation.
///
/// - The fluent builder is configurable:
/// - [`resource_arn(impl Into<String>)`](crate::client::fluent_builders::UntagResource::resource_arn) / [`set_resource_arn(Option<String>)`](crate::client::fluent_builders::UntagResource::set_resource_arn): <p>Specifies the ARN of the resource from which tags are to be removed.</p>
/// - [`tag_keys(Vec<String>)`](crate::client::fluent_builders::UntagResource::tag_keys) / [`set_tag_keys(Option<Vec<String>>)`](crate::client::fluent_builders::UntagResource::set_tag_keys): <p>A comma-separated list of one or more tag keys whose tags are to be removed from the specified resource.</p>
/// - On success, responds with [`UntagResourceOutput`](crate::output::UntagResourceOutput)
/// - On failure, responds with [`SdkError<UntagResourceError>`](crate::error::UntagResourceError)
pub fn untag_resource(&self) -> fluent_builders::UntagResource {
fluent_builders::UntagResource::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`UpdateDataCatalog`](crate::client::fluent_builders::UpdateDataCatalog) operation.
///
/// - The fluent builder is configurable:
/// - [`name(impl Into<String>)`](crate::client::fluent_builders::UpdateDataCatalog::name) / [`set_name(Option<String>)`](crate::client::fluent_builders::UpdateDataCatalog::set_name): <p>The name of the data catalog to update. The catalog name must be unique for the Amazon Web Services account and can use a maximum of 127 alphanumeric, underscore, at sign, or hyphen characters. The remainder of the length constraint of 256 is reserved for use by Athena.</p>
/// - [`r#type(DataCatalogType)`](crate::client::fluent_builders::UpdateDataCatalog::type) / [`set_type(Option<DataCatalogType>)`](crate::client::fluent_builders::UpdateDataCatalog::set_type): <p>Specifies the type of data catalog to update. Specify <code>LAMBDA</code> for a federated catalog, <code>HIVE</code> for an external hive metastore, or <code>GLUE</code> for an Glue Data Catalog.</p>
/// - [`description(impl Into<String>)`](crate::client::fluent_builders::UpdateDataCatalog::description) / [`set_description(Option<String>)`](crate::client::fluent_builders::UpdateDataCatalog::set_description): <p>New or modified text that describes the data catalog.</p>
/// - [`parameters(HashMap<String, String>)`](crate::client::fluent_builders::UpdateDataCatalog::parameters) / [`set_parameters(Option<HashMap<String, String>>)`](crate::client::fluent_builders::UpdateDataCatalog::set_parameters): <p>Specifies the Lambda function or functions to use for updating the data catalog. This is a mapping whose values depend on the catalog type. </p> <ul> <li> <p>For the <code>HIVE</code> data catalog type, use the following syntax. The <code>metadata-function</code> parameter is required. <code>The sdk-version</code> parameter is optional and defaults to the currently supported version.</p> <p> <code>metadata-function=<i>lambda_arn</i>, sdk-version=<i>version_number</i> </code> </p> </li> <li> <p>For the <code>LAMBDA</code> data catalog type, use one of the following sets of required parameters, but not both.</p> <ul> <li> <p>If you have one Lambda function that processes metadata and another for reading the actual data, use the following syntax. Both parameters are required.</p> <p> <code>metadata-function=<i>lambda_arn</i>, record-function=<i>lambda_arn</i> </code> </p> </li> <li> <p> If you have a composite Lambda function that processes both metadata and data, use the following syntax to specify your Lambda function.</p> <p> <code>function=<i>lambda_arn</i> </code> </p> </li> </ul> </li> </ul>
/// - On success, responds with [`UpdateDataCatalogOutput`](crate::output::UpdateDataCatalogOutput)
/// - On failure, responds with [`SdkError<UpdateDataCatalogError>`](crate::error::UpdateDataCatalogError)
pub fn update_data_catalog(&self) -> fluent_builders::UpdateDataCatalog {
fluent_builders::UpdateDataCatalog::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`UpdateNamedQuery`](crate::client::fluent_builders::UpdateNamedQuery) operation.
///
/// - The fluent builder is configurable:
/// - [`named_query_id(impl Into<String>)`](crate::client::fluent_builders::UpdateNamedQuery::named_query_id) / [`set_named_query_id(Option<String>)`](crate::client::fluent_builders::UpdateNamedQuery::set_named_query_id): <p>The unique identifier (UUID) of the query.</p>
/// - [`name(impl Into<String>)`](crate::client::fluent_builders::UpdateNamedQuery::name) / [`set_name(Option<String>)`](crate::client::fluent_builders::UpdateNamedQuery::set_name): <p>The name of the query.</p>
/// - [`description(impl Into<String>)`](crate::client::fluent_builders::UpdateNamedQuery::description) / [`set_description(Option<String>)`](crate::client::fluent_builders::UpdateNamedQuery::set_description): <p>The query description.</p>
/// - [`query_string(impl Into<String>)`](crate::client::fluent_builders::UpdateNamedQuery::query_string) / [`set_query_string(Option<String>)`](crate::client::fluent_builders::UpdateNamedQuery::set_query_string): <p>The contents of the query with all query statements.</p>
/// - On success, responds with [`UpdateNamedQueryOutput`](crate::output::UpdateNamedQueryOutput)
/// - On failure, responds with [`SdkError<UpdateNamedQueryError>`](crate::error::UpdateNamedQueryError)
pub fn update_named_query(&self) -> fluent_builders::UpdateNamedQuery {
fluent_builders::UpdateNamedQuery::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`UpdatePreparedStatement`](crate::client::fluent_builders::UpdatePreparedStatement) operation.
///
/// - The fluent builder is configurable:
/// - [`statement_name(impl Into<String>)`](crate::client::fluent_builders::UpdatePreparedStatement::statement_name) / [`set_statement_name(Option<String>)`](crate::client::fluent_builders::UpdatePreparedStatement::set_statement_name): <p>The name of the prepared statement.</p>
/// - [`work_group(impl Into<String>)`](crate::client::fluent_builders::UpdatePreparedStatement::work_group) / [`set_work_group(Option<String>)`](crate::client::fluent_builders::UpdatePreparedStatement::set_work_group): <p>The workgroup for the prepared statement.</p>
/// - [`query_statement(impl Into<String>)`](crate::client::fluent_builders::UpdatePreparedStatement::query_statement) / [`set_query_statement(Option<String>)`](crate::client::fluent_builders::UpdatePreparedStatement::set_query_statement): <p>The query string for the prepared statement.</p>
/// - [`description(impl Into<String>)`](crate::client::fluent_builders::UpdatePreparedStatement::description) / [`set_description(Option<String>)`](crate::client::fluent_builders::UpdatePreparedStatement::set_description): <p>The description of the prepared statement.</p>
/// - On success, responds with [`UpdatePreparedStatementOutput`](crate::output::UpdatePreparedStatementOutput)
/// - On failure, responds with [`SdkError<UpdatePreparedStatementError>`](crate::error::UpdatePreparedStatementError)
pub fn update_prepared_statement(&self) -> fluent_builders::UpdatePreparedStatement {
fluent_builders::UpdatePreparedStatement::new(self.handle.clone())
}
/// Constructs a fluent builder for the [`UpdateWorkGroup`](crate::client::fluent_builders::UpdateWorkGroup) operation.
///
/// - The fluent builder is configurable:
/// - [`work_group(impl Into<String>)`](crate::client::fluent_builders::UpdateWorkGroup::work_group) / [`set_work_group(Option<String>)`](crate::client::fluent_builders::UpdateWorkGroup::set_work_group): <p>The specified workgroup that will be updated.</p>
/// - [`description(impl Into<String>)`](crate::client::fluent_builders::UpdateWorkGroup::description) / [`set_description(Option<String>)`](crate::client::fluent_builders::UpdateWorkGroup::set_description): <p>The workgroup description.</p>
/// - [`configuration_updates(WorkGroupConfigurationUpdates)`](crate::client::fluent_builders::UpdateWorkGroup::configuration_updates) / [`set_configuration_updates(Option<WorkGroupConfigurationUpdates>)`](crate::client::fluent_builders::UpdateWorkGroup::set_configuration_updates): <p>The workgroup configuration that will be updated for the given workgroup.</p>
/// - [`state(WorkGroupState)`](crate::client::fluent_builders::UpdateWorkGroup::state) / [`set_state(Option<WorkGroupState>)`](crate::client::fluent_builders::UpdateWorkGroup::set_state): <p>The workgroup state that will be updated for the given workgroup.</p>
/// - On success, responds with [`UpdateWorkGroupOutput`](crate::output::UpdateWorkGroupOutput)
/// - On failure, responds with [`SdkError<UpdateWorkGroupError>`](crate::error::UpdateWorkGroupError)
pub fn update_work_group(&self) -> fluent_builders::UpdateWorkGroup {
fluent_builders::UpdateWorkGroup::new(self.handle.clone())
}
}
pub mod fluent_builders {
//!
//! Utilities to ergonomically construct a request to the service.
//!
//! Fluent builders are created through the [`Client`](crate::client::Client) by calling
//! one if its operation methods. After parameters are set using the builder methods,
//! the `send` method can be called to initiate the request.
//!
/// Fluent builder constructing a request to `BatchGetNamedQuery`.
///
/// <p>Returns the details of a single named query or a list of up to 50 queries, which you provide as an array of query ID strings. Requires you to have access to the workgroup in which the queries were saved. Use <code>ListNamedQueriesInput</code> to get the list of named query IDs in the specified workgroup. If information could not be retrieved for a submitted query ID, information about the query ID submitted is listed under <code>UnprocessedNamedQueryId</code>. Named queries differ from executed queries. Use <code>BatchGetQueryExecutionInput</code> to get details about each unique query execution, and <code>ListQueryExecutionsInput</code> to get a list of query execution IDs.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct BatchGetNamedQuery {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::batch_get_named_query_input::Builder,
}
impl BatchGetNamedQuery {
/// Creates a new `BatchGetNamedQuery`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::BatchGetNamedQueryOutput,
aws_smithy_http::result::SdkError<crate::error::BatchGetNamedQueryError>,
> {
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `NamedQueryIds`.
///
/// To override the contents of this collection use [`set_named_query_ids`](Self::set_named_query_ids).
///
/// <p>An array of query IDs.</p>
pub fn named_query_ids(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.named_query_ids(input.into());
self
}
/// <p>An array of query IDs.</p>
pub fn set_named_query_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_named_query_ids(input);
self
}
}
/// Fluent builder constructing a request to `BatchGetQueryExecution`.
///
/// <p>Returns the details of a single query execution or a list of up to 50 query executions, which you provide as an array of query execution ID strings. Requires you to have access to the workgroup in which the queries ran. To get a list of query execution IDs, use <code>ListQueryExecutionsInput$WorkGroup</code>. Query executions differ from named (saved) queries. Use <code>BatchGetNamedQueryInput</code> to get details about named queries.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct BatchGetQueryExecution {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::batch_get_query_execution_input::Builder,
}
impl BatchGetQueryExecution {
/// Creates a new `BatchGetQueryExecution`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::BatchGetQueryExecutionOutput,
aws_smithy_http::result::SdkError<crate::error::BatchGetQueryExecutionError>,
> {
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// Appends an item to `QueryExecutionIds`.
///
/// To override the contents of this collection use [`set_query_execution_ids`](Self::set_query_execution_ids).
///
/// <p>An array of query execution IDs.</p>
pub fn query_execution_ids(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.query_execution_ids(input.into());
self
}
/// <p>An array of query execution IDs.</p>
pub fn set_query_execution_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.inner = self.inner.set_query_execution_ids(input);
self
}
}
/// Fluent builder constructing a request to `CreateDataCatalog`.
///
/// <p>Creates (registers) a data catalog with the specified name and properties. Catalogs created are visible to all users of the same Amazon Web Services account.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct CreateDataCatalog {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::create_data_catalog_input::Builder,
}
impl CreateDataCatalog {
/// Creates a new `CreateDataCatalog`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateDataCatalogOutput,
aws_smithy_http::result::SdkError<crate::error::CreateDataCatalogError>,
> {
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The name of the data catalog to create. The catalog name must be unique for the Amazon Web Services account and can use a maximum of 127 alphanumeric, underscore, at sign, or hyphen characters. The remainder of the length constraint of 256 is reserved for use by Athena.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.name(input.into());
self
}
/// <p>The name of the data catalog to create. The catalog name must be unique for the Amazon Web Services account and can use a maximum of 127 alphanumeric, underscore, at sign, or hyphen characters. The remainder of the length constraint of 256 is reserved for use by Athena.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_name(input);
self
}
/// <p>The type of data catalog to create: <code>LAMBDA</code> for a federated catalog, <code>HIVE</code> for an external hive metastore, or <code>GLUE</code> for an Glue Data Catalog.</p>
pub fn r#type(mut self, input: crate::model::DataCatalogType) -> Self {
self.inner = self.inner.r#type(input);
self
}
/// <p>The type of data catalog to create: <code>LAMBDA</code> for a federated catalog, <code>HIVE</code> for an external hive metastore, or <code>GLUE</code> for an Glue Data Catalog.</p>
pub fn set_type(
mut self,
input: std::option::Option<crate::model::DataCatalogType>,
) -> Self {
self.inner = self.inner.set_type(input);
self
}
/// <p>A description of the data catalog to be created.</p>
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.description(input.into());
self
}
/// <p>A description of the data catalog to be created.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_description(input);
self
}
/// Adds a key-value pair to `Parameters`.
///
/// To override the contents of this collection use [`set_parameters`](Self::set_parameters).
///
/// <p>Specifies the Lambda function or functions to use for creating the data catalog. This is a mapping whose values depend on the catalog type. </p>
/// <ul>
/// <li> <p>For the <code>HIVE</code> data catalog type, use the following syntax. The <code>metadata-function</code> parameter is required. <code>The sdk-version</code> parameter is optional and defaults to the currently supported version.</p> <p> <code>metadata-function=<i>lambda_arn</i>, sdk-version=<i>version_number</i> </code> </p> </li>
/// <li> <p>For the <code>LAMBDA</code> data catalog type, use one of the following sets of required parameters, but not both.</p>
/// <ul>
/// <li> <p>If you have one Lambda function that processes metadata and another for reading the actual data, use the following syntax. Both parameters are required.</p> <p> <code>metadata-function=<i>lambda_arn</i>, record-function=<i>lambda_arn</i> </code> </p> </li>
/// <li> <p> If you have a composite Lambda function that processes both metadata and data, use the following syntax to specify your Lambda function.</p> <p> <code>function=<i>lambda_arn</i> </code> </p> </li>
/// </ul> </li>
/// <li> <p>The <code>GLUE</code> type takes a catalog ID parameter and is required. The <code> <i>catalog_id</i> </code> is the account ID of the Amazon Web Services account to which the Glue Data Catalog belongs.</p> <p> <code>catalog-id=<i>catalog_id</i> </code> </p>
/// <ul>
/// <li> <p>The <code>GLUE</code> data catalog type also applies to the default <code>AwsDataCatalog</code> that already exists in your account, of which you can have only one and cannot modify.</p> </li>
/// <li> <p>Queries that specify a Glue Data Catalog other than the default <code>AwsDataCatalog</code> must be run on Athena engine version 2.</p> </li>
/// <li> <p>In Regions where Athena engine version 2 is not available, creating new Glue data catalogs results in an <code>INVALID_INPUT</code> error.</p> </li>
/// </ul> </li>
/// </ul>
pub fn parameters(
mut self,
k: impl Into<std::string::String>,
v: impl Into<std::string::String>,
) -> Self {
self.inner = self.inner.parameters(k.into(), v.into());
self
}
/// <p>Specifies the Lambda function or functions to use for creating the data catalog. This is a mapping whose values depend on the catalog type. </p>
/// <ul>
/// <li> <p>For the <code>HIVE</code> data catalog type, use the following syntax. The <code>metadata-function</code> parameter is required. <code>The sdk-version</code> parameter is optional and defaults to the currently supported version.</p> <p> <code>metadata-function=<i>lambda_arn</i>, sdk-version=<i>version_number</i> </code> </p> </li>
/// <li> <p>For the <code>LAMBDA</code> data catalog type, use one of the following sets of required parameters, but not both.</p>
/// <ul>
/// <li> <p>If you have one Lambda function that processes metadata and another for reading the actual data, use the following syntax. Both parameters are required.</p> <p> <code>metadata-function=<i>lambda_arn</i>, record-function=<i>lambda_arn</i> </code> </p> </li>
/// <li> <p> If you have a composite Lambda function that processes both metadata and data, use the following syntax to specify your Lambda function.</p> <p> <code>function=<i>lambda_arn</i> </code> </p> </li>
/// </ul> </li>
/// <li> <p>The <code>GLUE</code> type takes a catalog ID parameter and is required. The <code> <i>catalog_id</i> </code> is the account ID of the Amazon Web Services account to which the Glue Data Catalog belongs.</p> <p> <code>catalog-id=<i>catalog_id</i> </code> </p>
/// <ul>
/// <li> <p>The <code>GLUE</code> data catalog type also applies to the default <code>AwsDataCatalog</code> that already exists in your account, of which you can have only one and cannot modify.</p> </li>
/// <li> <p>Queries that specify a Glue Data Catalog other than the default <code>AwsDataCatalog</code> must be run on Athena engine version 2.</p> </li>
/// <li> <p>In Regions where Athena engine version 2 is not available, creating new Glue data catalogs results in an <code>INVALID_INPUT</code> error.</p> </li>
/// </ul> </li>
/// </ul>
pub fn set_parameters(
mut self,
input: std::option::Option<
std::collections::HashMap<std::string::String, std::string::String>,
>,
) -> Self {
self.inner = self.inner.set_parameters(input);
self
}
/// Appends an item to `Tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>A list of comma separated tags to add to the data catalog that is created.</p>
pub fn tags(mut self, input: crate::model::Tag) -> Self {
self.inner = self.inner.tags(input);
self
}
/// <p>A list of comma separated tags to add to the data catalog that is created.</p>
pub fn set_tags(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Tag>>,
) -> Self {
self.inner = self.inner.set_tags(input);
self
}
}
/// Fluent builder constructing a request to `CreateNamedQuery`.
///
/// <p>Creates a named query in the specified workgroup. Requires that you have access to the workgroup.</p>
/// <p>For code samples using the Amazon Web Services SDK for Java, see <a href="http://docs.aws.amazon.com/athena/latest/ug/code-samples.html">Examples and Code Samples</a> in the <i>Amazon Athena User Guide</i>.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct CreateNamedQuery {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::create_named_query_input::Builder,
}
impl CreateNamedQuery {
/// Creates a new `CreateNamedQuery`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateNamedQueryOutput,
aws_smithy_http::result::SdkError<crate::error::CreateNamedQueryError>,
> {
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The query name.</p>
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.name(input.into());
self
}
/// <p>The query name.</p>
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_name(input);
self
}
/// <p>The query description.</p>
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.description(input.into());
self
}
/// <p>The query description.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_description(input);
self
}
/// <p>The database to which the query belongs.</p>
pub fn database(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.database(input.into());
self
}
/// <p>The database to which the query belongs.</p>
pub fn set_database(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_database(input);
self
}
/// <p>The contents of the query with all query statements.</p>
pub fn query_string(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.query_string(input.into());
self
}
/// <p>The contents of the query with all query statements.</p>
pub fn set_query_string(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_query_string(input);
self
}
/// <p>A unique case-sensitive string used to ensure the request to create the query is idempotent (executes only once). If another <code>CreateNamedQuery</code> request is received, the same response is returned and another query is not created. If a parameter has changed, for example, the <code>QueryString</code>, an error is returned.</p> <important>
/// <p>This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web Services SDK for Java) auto-generate the token for users. If you are not using the Amazon Web Services SDK or the Amazon Web Services CLI, you must provide this token or the action will fail.</p>
/// </important>
pub fn client_request_token(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.client_request_token(input.into());
self
}
/// <p>A unique case-sensitive string used to ensure the request to create the query is idempotent (executes only once). If another <code>CreateNamedQuery</code> request is received, the same response is returned and another query is not created. If a parameter has changed, for example, the <code>QueryString</code>, an error is returned.</p> <important>
/// <p>This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web Services SDK for Java) auto-generate the token for users. If you are not using the Amazon Web Services SDK or the Amazon Web Services CLI, you must provide this token or the action will fail.</p>
/// </important>
pub fn set_client_request_token(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_client_request_token(input);
self
}
/// <p>The name of the workgroup in which the named query is being created.</p>
pub fn work_group(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.work_group(input.into());
self
}
/// <p>The name of the workgroup in which the named query is being created.</p>
pub fn set_work_group(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_work_group(input);
self
}
}
/// Fluent builder constructing a request to `CreatePreparedStatement`.
///
/// <p>Creates a prepared statement for use with SQL queries in Athena.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]
pub struct CreatePreparedStatement {
handle: std::sync::Arc<super::Handle>,
inner: crate::input::create_prepared_statement_input::Builder,
}
impl CreatePreparedStatement {
/// Creates a new `CreatePreparedStatement`.
pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
Self {
handle,
inner: Default::default(),
}
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreatePreparedStatementOutput,
aws_smithy_http::result::SdkError<crate::error::CreatePreparedStatementError>,
> {
let op = self
.inner
.build()
.map_err(|err| aws_smithy_http::result::SdkError::ConstructionFailure(err.into()))?
.make_operation(&self.handle.conf)
.await
.map_err(|err| {
aws_smithy_http::result::SdkError::ConstructionFailure(err.into())
})?;
self.handle.client.call(op).await
}
/// <p>The name of the prepared statement.</p>
pub fn statement_name(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.statement_name(input.into());
self
}
/// <p>The name of the prepared statement.</p>
pub fn set_statement_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_statement_name(input);
self
}
/// <p>The name of the workgroup to which the prepared statement belongs.</p>
pub fn work_group(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.work_group(input.into());
self
}
/// <p>The name of the workgroup to which the prepared statement belongs.</p>
pub fn set_work_group(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_work_group(input);
self
}
/// <p>The query string for the prepared statement.</p>
pub fn query_statement(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.query_statement(input.into());
self
}
/// <p>The query string for the prepared statement.</p>
pub fn set_query_statement(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.inner = self.inner.set_query_statement(input);
self
}
/// <p>The description of the prepared statement.</p>
pub fn description(mut self, input: impl Into<std::string::String>) -> Self {
self.inner = self.inner.description(input.into());
self
}
/// <p>The description of the prepared statement.</p>
pub fn set_description(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_description(input);
self
}
}
/// Fluent builder constructing a request to `CreateWorkGroup`.
///
/// <p>Creates a workgroup with the specified name.</p>
#[derive(std::clone::Clone, std::fmt::Debug)]