@@ -114,6 +114,17 @@ defmodule AWS.Athena do
114114 Request . request_post ( client , meta , "CreateNamedQuery" , input , options )
115115 end
116116
117+ @ doc """
118+ Creates an empty `ipynb` file in the specified Apache Spark enabled workgroup.
119+
120+ Throws an error if a file in the workgroup with the same name already exists.
121+ """
122+ def create_notebook ( % Client { } = client , input , options \\ [ ] ) do
123+ meta = metadata ( )
124+
125+ Request . request_post ( client , meta , "CreateNotebook" , input , options )
126+ end
127+
117128 @ doc """
118129 Creates a prepared statement for use with SQL queries in Athena.
119130 """
@@ -123,8 +134,24 @@ defmodule AWS.Athena do
123134 Request . request_post ( client , meta , "CreatePreparedStatement" , input , options )
124135 end
125136
137+ @ doc """
138+ Gets an authentication token and the URL at which the notebook can be accessed.
139+
140+ During programmatic access, `CreatePresignedNotebookUrl` must be called every 10
141+ minutes to refresh the authentication token.
142+ """
143+ def create_presigned_notebook_url ( % Client { } = client , input , options \\ [ ] ) do
144+ meta = metadata ( )
145+
146+ Request . request_post ( client , meta , "CreatePresignedNotebookUrl" , input , options )
147+ end
148+
126149 @ doc """
127150 Creates a workgroup with the specified name.
151+
152+ Only one of `Configurations` or `Configuration` can be specified;
153+ `Configurations` for a workgroup with multi engine support (for example, an
154+ Apache Spark enabled workgroup) or `Configuration` for an Athena SQL workgroup.
128155 """
129156 def create_work_group ( % Client { } = client , input , options \\ [ ] ) do
130157 meta = metadata ( )
@@ -154,6 +181,15 @@ defmodule AWS.Athena do
154181 Request . request_post ( client , meta , "DeleteNamedQuery" , input , options )
155182 end
156183
184+ @ doc """
185+ Deletes the specified notebook.
186+ """
187+ def delete_notebook ( % Client { } = client , input , options \\ [ ] ) do
188+ meta = metadata ( )
189+
190+ Request . request_post ( client , meta , "DeleteNotebook" , input , options )
191+ end
192+
157193 @ doc """
158194 Deletes the prepared statement with the specified name from the specified
159195 workgroup.
@@ -175,6 +211,43 @@ defmodule AWS.Athena do
175211 Request . request_post ( client , meta , "DeleteWorkGroup" , input , options )
176212 end
177213
214+ @ doc """
215+ Exports the specified notebook and its metadata.
216+ """
217+ def export_notebook ( % Client { } = client , input , options \\ [ ] ) do
218+ meta = metadata ( )
219+
220+ Request . request_post ( client , meta , "ExportNotebook" , input , options )
221+ end
222+
223+ @ doc """
224+ Describes a previously submitted calculation execution.
225+ """
226+ def get_calculation_execution ( % Client { } = client , input , options \\ [ ] ) do
227+ meta = metadata ( )
228+
229+ Request . request_post ( client , meta , "GetCalculationExecution" , input , options )
230+ end
231+
232+ @ doc """
233+ Retrieves a pre-signed URL to a copy of the code that was executed for the
234+ calculation.
235+ """
236+ def get_calculation_execution_code ( % Client { } = client , input , options \\ [ ] ) do
237+ meta = metadata ( )
238+
239+ Request . request_post ( client , meta , "GetCalculationExecutionCode" , input , options )
240+ end
241+
242+ @ doc """
243+ Gets the status of a current calculation.
244+ """
245+ def get_calculation_execution_status ( % Client { } = client , input , options \\ [ ] ) do
246+ meta = metadata ( )
247+
248+ Request . request_post ( client , meta , "GetCalculationExecutionStatus" , input , options )
249+ end
250+
178251 @ doc """
179252 Returns the specified data catalog.
180253 """
@@ -204,6 +277,15 @@ defmodule AWS.Athena do
204277 Request . request_post ( client , meta , "GetNamedQuery" , input , options )
205278 end
206279
280+ @ doc """
281+ Retrieves notebook metadata for the specified notebook ID.
282+ """
283+ def get_notebook_metadata ( % Client { } = client , input , options \\ [ ] ) do
284+ meta = metadata ( )
285+
286+ Request . request_post ( client , meta , "GetNotebookMetadata" , input , options )
287+ end
288+
207289 @ doc """
208290 Retrieves the prepared statement with the specified name from the specified
209291 workgroup.
@@ -264,6 +346,25 @@ defmodule AWS.Athena do
264346 Request . request_post ( client , meta , "GetQueryRuntimeStatistics" , input , options )
265347 end
266348
349+ @ doc """
350+ Gets the full details of a previously created session, including the session
351+ status and configuration.
352+ """
353+ def get_session ( % Client { } = client , input , options \\ [ ] ) do
354+ meta = metadata ( )
355+
356+ Request . request_post ( client , meta , "GetSession" , input , options )
357+ end
358+
359+ @ doc """
360+ Gets the current status of a session.
361+ """
362+ def get_session_status ( % Client { } = client , input , options \\ [ ] ) do
363+ meta = metadata ( )
364+
365+ Request . request_post ( client , meta , "GetSessionStatus" , input , options )
366+ end
367+
267368 @ doc """
268369 Returns table metadata for the specified catalog, database, and table.
269370 """
@@ -282,6 +383,40 @@ defmodule AWS.Athena do
282383 Request . request_post ( client , meta , "GetWorkGroup" , input , options )
283384 end
284385
386+ @ doc """
387+ Imports a single `ipynb` file to a Spark enabled workgroup.
388+
389+ The maximum file size that can be imported is 10 megabytes. If an `ipynb` file
390+ with the same name already exists in the workgroup, throws an error.
391+ """
392+ def import_notebook ( % Client { } = client , input , options \\ [ ] ) do
393+ meta = metadata ( )
394+
395+ Request . request_post ( client , meta , "ImportNotebook" , input , options )
396+ end
397+
398+ @ doc """
399+ Returns the supported DPU sizes for the supported application runtimes (for
400+ example, `Jupyter 1.0`).
401+ """
402+ def list_application_d_p_u_sizes ( % Client { } = client , input , options \\ [ ] ) do
403+ meta = metadata ( )
404+
405+ Request . request_post ( client , meta , "ListApplicationDPUSizes" , input , options )
406+ end
407+
408+ @ doc """
409+ Lists the calculations that have been submitted to a session in descending
410+ order.
411+
412+ Newer calculations are listed first; older calculations are listed later.
413+ """
414+ def list_calculation_executions ( % Client { } = client , input , options \\ [ ] ) do
415+ meta = metadata ( )
416+
417+ Request . request_post ( client , meta , "ListCalculationExecutions" , input , options )
418+ end
419+
285420 @ doc """
286421 Lists the data catalogs in the current Amazon Web Services account.
287422 """
@@ -310,6 +445,18 @@ defmodule AWS.Athena do
310445 Request . request_post ( client , meta , "ListEngineVersions" , input , options )
311446 end
312447
448+ @ doc """
449+ Lists, in descending order, the executors that have been submitted to a session.
450+
451+ Newer executors are listed first; older executors are listed later. The result
452+ can be optionally filtered by state.
453+ """
454+ def list_executors ( % Client { } = client , input , options \\ [ ] ) do
455+ meta = metadata ( )
456+
457+ Request . request_post ( client , meta , "ListExecutors" , input , options )
458+ end
459+
313460 @ doc """
314461 Provides a list of available query IDs only for queries saved in the specified
315462 workgroup.
@@ -326,6 +473,27 @@ defmodule AWS.Athena do
326473 Request . request_post ( client , meta , "ListNamedQueries" , input , options )
327474 end
328475
476+ @ doc """
477+ Displays the notebook files for the specified workgroup in paginated format.
478+ """
479+ def list_notebook_metadata ( % Client { } = client , input , options \\ [ ] ) do
480+ meta = metadata ( )
481+
482+ Request . request_post ( client , meta , "ListNotebookMetadata" , input , options )
483+ end
484+
485+ @ doc """
486+ Lists, in descending order, the sessions that have been created in a notebook
487+ that are in an active state like `CREATING`, `CREATED`, `IDLE` or `BUSY`.
488+
489+ Newer sessions are listed first; older sessions are listed later.
490+ """
491+ def list_notebook_sessions ( % Client { } = client , input , options \\ [ ] ) do
492+ meta = metadata ( )
493+
494+ Request . request_post ( client , meta , "ListNotebookSessions" , input , options )
495+ end
496+
329497 @ doc """
330498 Lists the prepared statements in the specified workgroup.
331499 """
@@ -352,6 +520,18 @@ defmodule AWS.Athena do
352520 Request . request_post ( client , meta , "ListQueryExecutions" , input , options )
353521 end
354522
523+ @ doc """
524+ Lists the sessions in a workgroup that are in an active state like `CREATING`,
525+ `CREATED`, `IDLE`, or `BUSY`.
526+
527+ Newer sessions are listed first; older sessions are listed later.
528+ """
529+ def list_sessions ( % Client { } = client , input , options \\ [ ] ) do
530+ meta = metadata ( )
531+
532+ Request . request_post ( client , meta , "ListSessions" , input , options )
533+ end
534+
355535 @ doc """
356536 Lists the metadata for the tables in the specified data catalog database.
357537 """
@@ -379,6 +559,18 @@ defmodule AWS.Athena do
379559 Request . request_post ( client , meta , "ListWorkGroups" , input , options )
380560 end
381561
562+ @ doc """
563+ Submits calculations for execution within a session.
564+
565+ You can supply the code to run as an inline code block within the request or as
566+ an Amazon S3 URL.
567+ """
568+ def start_calculation_execution ( % Client { } = client , input , options \\ [ ] ) do
569+ meta = metadata ( )
570+
571+ Request . request_post ( client , meta , "StartCalculationExecution" , input , options )
572+ end
573+
382574 @ doc """
383575 Runs the SQL query statements contained in the `Query`.
384576
@@ -394,6 +586,35 @@ defmodule AWS.Athena do
394586 Request . request_post ( client , meta , "StartQueryExecution" , input , options )
395587 end
396588
589+ @ doc """
590+ Creates a session for running calculations within a workgroup.
591+
592+ The session is ready when it reaches an `IDLE` state.
593+ """
594+ def start_session ( % Client { } = client , input , options \\ [ ] ) do
595+ meta = metadata ( )
596+
597+ Request . request_post ( client , meta , "StartSession" , input , options )
598+ end
599+
600+ @ doc """
601+ Requests the cancellation of a calculation.
602+
603+ A `StopCalculationExecution` call on a calculation that is already in a terminal
604+ state (for example, `STOPPED`, `FAILED`, or `COMPLETED`) succeeds but has no
605+ effect.
606+
607+ Cancelling a calculation is done on a best effort basis. If a calculation cannot
608+ be cancelled, you can be charged for its completion. If you are concerned about
609+ being charged for a calculation that cannot be cancelled, consider terminating
610+ the session in which the calculation is running.
611+ """
612+ def stop_calculation_execution ( % Client { } = client , input , options \\ [ ] ) do
613+ meta = metadata ( )
614+
615+ Request . request_post ( client , meta , "StopCalculationExecution" , input , options )
616+ end
617+
397618 @ doc """
398619 Stops a query execution.
399620
@@ -429,6 +650,20 @@ defmodule AWS.Athena do
429650 Request . request_post ( client , meta , "TagResource" , input , options )
430651 end
431652
653+ @ doc """
654+ Terminates an active session.
655+
656+ A `TerminateSession` call on a session that is already inactive (for example, in
657+ a `FAILED`, `TERMINATED` or `TERMINATING` state) succeeds but has no effect.
658+ Calculations running in the session when `TerminateSession` is called are
659+ forcefully stopped, but may display as `FAILED` instead of `STOPPED`.
660+ """
661+ def terminate_session ( % Client { } = client , input , options \\ [ ] ) do
662+ meta = metadata ( )
663+
664+ Request . request_post ( client , meta , "TerminateSession" , input , options )
665+ end
666+
432667 @ doc """
433668 Removes one or more tags from a data catalog or workgroup resource.
434669 """
@@ -458,6 +693,24 @@ defmodule AWS.Athena do
458693 Request . request_post ( client , meta , "UpdateNamedQuery" , input , options )
459694 end
460695
696+ @ doc """
697+ Updates the contents of a Spark notebook.
698+ """
699+ def update_notebook ( % Client { } = client , input , options \\ [ ] ) do
700+ meta = metadata ( )
701+
702+ Request . request_post ( client , meta , "UpdateNotebook" , input , options )
703+ end
704+
705+ @ doc """
706+ Updates the metadata for a notebook.
707+ """
708+ def update_notebook_metadata ( % Client { } = client , input , options \\ [ ] ) do
709+ meta = metadata ( )
710+
711+ Request . request_post ( client , meta , "UpdateNotebookMetadata" , input , options )
712+ end
713+
461714 @ doc """
462715 Updates a prepared statement.
463716 """
@@ -470,7 +723,10 @@ defmodule AWS.Athena do
470723 @ doc """
471724 Updates the workgroup with the specified name.
472725
473- The workgroup's name cannot be changed.
726+ The workgroup's name cannot be changed. Only one of `ConfigurationsUpdates` or
727+ `ConfigurationUpdates` can be specified; `ConfigurationsUpdates` for a workgroup
728+ with multi engine support (for example, an Apache Spark enabled workgroup) or
729+ `ConfigurationUpdates` for an Athena SQL workgroup.
474730 """
475731 def update_work_group ( % Client { } = client , input , options \\ [ ] ) do
476732 meta = metadata ( )
0 commit comments