import_notebook
¶
import_notebook(
work_group: WorkGroupName,
name: NotebookName,
type: NotebookType,
*,
config_overrides: Optional[AthenaClientConfig] = 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/athena.py
2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 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 | |