aws-sdk-athena 1.46.0 → 1.80.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.
@@ -31,6 +31,7 @@ module Aws::Athena
31
31
  # * {InvalidRequestException}
32
32
  # * {MetadataException}
33
33
  # * {ResourceNotFoundException}
34
+ # * {SessionAlreadyExistsException}
34
35
  # * {TooManyRequestsException}
35
36
  #
36
37
  # Additionally, error classes are dynamically generated for service errors based on the error code
@@ -109,6 +110,21 @@ module Aws::Athena
109
110
  end
110
111
  end
111
112
 
113
+ class SessionAlreadyExistsException < ServiceError
114
+
115
+ # @param [Seahorse::Client::RequestContext] context
116
+ # @param [String] message
117
+ # @param [Aws::Athena::Types::SessionAlreadyExistsException] data
118
+ def initialize(context, message, data = Aws::EmptyStructure.new)
119
+ super(context, message, data)
120
+ end
121
+
122
+ # @return [String]
123
+ def message
124
+ @message || @data[:message]
125
+ end
126
+ end
127
+
112
128
  class TooManyRequestsException < ServiceError
113
129
 
114
130
  # @param [Seahorse::Client::RequestContext] context
@@ -0,0 +1,205 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+
11
+ module Aws::Athena
12
+ module Plugins
13
+ class Endpoints < Seahorse::Client::Plugin
14
+ option(
15
+ :endpoint_provider,
16
+ doc_type: 'Aws::Athena::EndpointProvider',
17
+ docstring: 'The endpoint provider used to resolve endpoints. Any '\
18
+ 'object that responds to `#resolve_endpoint(parameters)` '\
19
+ 'where `parameters` is a Struct similar to '\
20
+ '`Aws::Athena::EndpointParameters`'
21
+ ) do |cfg|
22
+ Aws::Athena::EndpointProvider.new
23
+ end
24
+
25
+ # @api private
26
+ class Handler < Seahorse::Client::Handler
27
+ def call(context)
28
+ unless context[:discovered_endpoint]
29
+ params = parameters_for_operation(context)
30
+ endpoint = context.config.endpoint_provider.resolve_endpoint(params)
31
+
32
+ context.http_request.endpoint = endpoint.url
33
+ apply_endpoint_headers(context, endpoint.headers)
34
+
35
+ context[:endpoint_params] = params
36
+ context[:endpoint_properties] = endpoint.properties
37
+ end
38
+
39
+ context[:auth_scheme] =
40
+ Aws::Endpoints.resolve_auth_scheme(context, endpoint)
41
+
42
+ @handler.call(context)
43
+ end
44
+
45
+ private
46
+
47
+ def apply_endpoint_headers(context, headers)
48
+ headers.each do |key, values|
49
+ value = values
50
+ .compact
51
+ .map { |s| Seahorse::Util.escape_header_list_string(s.to_s) }
52
+ .join(',')
53
+
54
+ context.http_request.headers[key] = value
55
+ end
56
+ end
57
+
58
+ def parameters_for_operation(context)
59
+ case context.operation_name
60
+ when :batch_get_named_query
61
+ Aws::Athena::Endpoints::BatchGetNamedQuery.build(context)
62
+ when :batch_get_prepared_statement
63
+ Aws::Athena::Endpoints::BatchGetPreparedStatement.build(context)
64
+ when :batch_get_query_execution
65
+ Aws::Athena::Endpoints::BatchGetQueryExecution.build(context)
66
+ when :cancel_capacity_reservation
67
+ Aws::Athena::Endpoints::CancelCapacityReservation.build(context)
68
+ when :create_capacity_reservation
69
+ Aws::Athena::Endpoints::CreateCapacityReservation.build(context)
70
+ when :create_data_catalog
71
+ Aws::Athena::Endpoints::CreateDataCatalog.build(context)
72
+ when :create_named_query
73
+ Aws::Athena::Endpoints::CreateNamedQuery.build(context)
74
+ when :create_notebook
75
+ Aws::Athena::Endpoints::CreateNotebook.build(context)
76
+ when :create_prepared_statement
77
+ Aws::Athena::Endpoints::CreatePreparedStatement.build(context)
78
+ when :create_presigned_notebook_url
79
+ Aws::Athena::Endpoints::CreatePresignedNotebookUrl.build(context)
80
+ when :create_work_group
81
+ Aws::Athena::Endpoints::CreateWorkGroup.build(context)
82
+ when :delete_capacity_reservation
83
+ Aws::Athena::Endpoints::DeleteCapacityReservation.build(context)
84
+ when :delete_data_catalog
85
+ Aws::Athena::Endpoints::DeleteDataCatalog.build(context)
86
+ when :delete_named_query
87
+ Aws::Athena::Endpoints::DeleteNamedQuery.build(context)
88
+ when :delete_notebook
89
+ Aws::Athena::Endpoints::DeleteNotebook.build(context)
90
+ when :delete_prepared_statement
91
+ Aws::Athena::Endpoints::DeletePreparedStatement.build(context)
92
+ when :delete_work_group
93
+ Aws::Athena::Endpoints::DeleteWorkGroup.build(context)
94
+ when :export_notebook
95
+ Aws::Athena::Endpoints::ExportNotebook.build(context)
96
+ when :get_calculation_execution
97
+ Aws::Athena::Endpoints::GetCalculationExecution.build(context)
98
+ when :get_calculation_execution_code
99
+ Aws::Athena::Endpoints::GetCalculationExecutionCode.build(context)
100
+ when :get_calculation_execution_status
101
+ Aws::Athena::Endpoints::GetCalculationExecutionStatus.build(context)
102
+ when :get_capacity_assignment_configuration
103
+ Aws::Athena::Endpoints::GetCapacityAssignmentConfiguration.build(context)
104
+ when :get_capacity_reservation
105
+ Aws::Athena::Endpoints::GetCapacityReservation.build(context)
106
+ when :get_data_catalog
107
+ Aws::Athena::Endpoints::GetDataCatalog.build(context)
108
+ when :get_database
109
+ Aws::Athena::Endpoints::GetDatabase.build(context)
110
+ when :get_named_query
111
+ Aws::Athena::Endpoints::GetNamedQuery.build(context)
112
+ when :get_notebook_metadata
113
+ Aws::Athena::Endpoints::GetNotebookMetadata.build(context)
114
+ when :get_prepared_statement
115
+ Aws::Athena::Endpoints::GetPreparedStatement.build(context)
116
+ when :get_query_execution
117
+ Aws::Athena::Endpoints::GetQueryExecution.build(context)
118
+ when :get_query_results
119
+ Aws::Athena::Endpoints::GetQueryResults.build(context)
120
+ when :get_query_runtime_statistics
121
+ Aws::Athena::Endpoints::GetQueryRuntimeStatistics.build(context)
122
+ when :get_session
123
+ Aws::Athena::Endpoints::GetSession.build(context)
124
+ when :get_session_status
125
+ Aws::Athena::Endpoints::GetSessionStatus.build(context)
126
+ when :get_table_metadata
127
+ Aws::Athena::Endpoints::GetTableMetadata.build(context)
128
+ when :get_work_group
129
+ Aws::Athena::Endpoints::GetWorkGroup.build(context)
130
+ when :import_notebook
131
+ Aws::Athena::Endpoints::ImportNotebook.build(context)
132
+ when :list_application_dpu_sizes
133
+ Aws::Athena::Endpoints::ListApplicationDPUSizes.build(context)
134
+ when :list_calculation_executions
135
+ Aws::Athena::Endpoints::ListCalculationExecutions.build(context)
136
+ when :list_capacity_reservations
137
+ Aws::Athena::Endpoints::ListCapacityReservations.build(context)
138
+ when :list_data_catalogs
139
+ Aws::Athena::Endpoints::ListDataCatalogs.build(context)
140
+ when :list_databases
141
+ Aws::Athena::Endpoints::ListDatabases.build(context)
142
+ when :list_engine_versions
143
+ Aws::Athena::Endpoints::ListEngineVersions.build(context)
144
+ when :list_executors
145
+ Aws::Athena::Endpoints::ListExecutors.build(context)
146
+ when :list_named_queries
147
+ Aws::Athena::Endpoints::ListNamedQueries.build(context)
148
+ when :list_notebook_metadata
149
+ Aws::Athena::Endpoints::ListNotebookMetadata.build(context)
150
+ when :list_notebook_sessions
151
+ Aws::Athena::Endpoints::ListNotebookSessions.build(context)
152
+ when :list_prepared_statements
153
+ Aws::Athena::Endpoints::ListPreparedStatements.build(context)
154
+ when :list_query_executions
155
+ Aws::Athena::Endpoints::ListQueryExecutions.build(context)
156
+ when :list_sessions
157
+ Aws::Athena::Endpoints::ListSessions.build(context)
158
+ when :list_table_metadata
159
+ Aws::Athena::Endpoints::ListTableMetadata.build(context)
160
+ when :list_tags_for_resource
161
+ Aws::Athena::Endpoints::ListTagsForResource.build(context)
162
+ when :list_work_groups
163
+ Aws::Athena::Endpoints::ListWorkGroups.build(context)
164
+ when :put_capacity_assignment_configuration
165
+ Aws::Athena::Endpoints::PutCapacityAssignmentConfiguration.build(context)
166
+ when :start_calculation_execution
167
+ Aws::Athena::Endpoints::StartCalculationExecution.build(context)
168
+ when :start_query_execution
169
+ Aws::Athena::Endpoints::StartQueryExecution.build(context)
170
+ when :start_session
171
+ Aws::Athena::Endpoints::StartSession.build(context)
172
+ when :stop_calculation_execution
173
+ Aws::Athena::Endpoints::StopCalculationExecution.build(context)
174
+ when :stop_query_execution
175
+ Aws::Athena::Endpoints::StopQueryExecution.build(context)
176
+ when :tag_resource
177
+ Aws::Athena::Endpoints::TagResource.build(context)
178
+ when :terminate_session
179
+ Aws::Athena::Endpoints::TerminateSession.build(context)
180
+ when :untag_resource
181
+ Aws::Athena::Endpoints::UntagResource.build(context)
182
+ when :update_capacity_reservation
183
+ Aws::Athena::Endpoints::UpdateCapacityReservation.build(context)
184
+ when :update_data_catalog
185
+ Aws::Athena::Endpoints::UpdateDataCatalog.build(context)
186
+ when :update_named_query
187
+ Aws::Athena::Endpoints::UpdateNamedQuery.build(context)
188
+ when :update_notebook
189
+ Aws::Athena::Endpoints::UpdateNotebook.build(context)
190
+ when :update_notebook_metadata
191
+ Aws::Athena::Endpoints::UpdateNotebookMetadata.build(context)
192
+ when :update_prepared_statement
193
+ Aws::Athena::Endpoints::UpdatePreparedStatement.build(context)
194
+ when :update_work_group
195
+ Aws::Athena::Endpoints::UpdateWorkGroup.build(context)
196
+ end
197
+ end
198
+ end
199
+
200
+ def add_handlers(handlers, _config)
201
+ handlers.add(Handler, step: :build, priority: 75)
202
+ end
203
+ end
204
+ end
205
+ end