import_notebook
async
¶
import_notebook(
work_group: WorkGroupName,
name: NotebookName,
type: NotebookType,
*,
config_overrides: Optional[AsyncAthenaClientConfig] = None,
payload: Optional[Payload] = None,
notebook_s3_location_uri: Optional[S3Uri] = None,
client_request_token: Optional[ClientRequestToken] = None,
) -> ImportNotebookOutput
Imports a single ipynb file to a Spark enabled workgroup. To import the notebook, the request must specify a value for either Payload or NoteBookS3LocationUri. If neither is specified or both are specified, an InvalidRequestException occurs. The maximum file size that can be imported is 10 megabytes. If an ipynb file with the same name already exists in the workgroup, throws an error.
Parameters:
-
work_group(WorkGroupName) –The name of the Spark enabled workgroup to import the notebook to.
-
name(NotebookName) –The name of the notebook to import.
-
payload(Optional[Payload], default:None) –The notebook content to be imported. The payload must be in
ipynbformat. -
type(NotebookType) –The notebook content type. Currently, the only valid type is
IPYNB. -
notebook_s3_location_uri(Optional[S3Uri], default:None) –A URI that specifies the Amazon S3 location of a notebook file in
ipynbformat. -
client_request_token(Optional[ClientRequestToken], default:None) –A unique case-sensitive string used to ensure the request to import the notebook is idempotent (executes only once).
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 you. 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.
Raises:
-
InternalServerException–Indicates a platform issue, which may be due to a transient condition or outage.
-
InvalidRequestException–Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.
-
TooManyRequestsException–Indicates that the request was throttled.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_athena/_services/async_athena.py
2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 | |