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
2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 | |