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
2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 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 | |