StartNotebookExecution - Amazon EMR

StartNotebookExecution

Starts a notebook execution.

Request Syntax

{ "EditorId": "string", "EnvironmentVariables": { "string" : "string" }, "ExecutionEngine": { "ExecutionRoleArn": "string", "Id": "string", "MasterInstanceSecurityGroupId": "string", "Type": "string" }, "NotebookExecutionName": "string", "NotebookInstanceSecurityGroupId": "string", "NotebookParams": "string", "NotebookS3Location": { "Bucket": "string", "Key": "string" }, "OutputNotebookFormat": "string", "OutputNotebookS3Location": { "Bucket": "string", "Key": "string" }, "RelativePath": "string", "ServiceRole": "string", "Tags": [ { "Key": "string", "Value": "string" } ] }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

EditorId

The unique identifier of the Amazon EMR Notebook to use for notebook execution.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 256.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

EnvironmentVariables

The environment variables associated with the notebook execution.

Type: String to string map

Key Length Constraints: Minimum length of 0. Maximum length of 256.

Key Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Value Length Constraints: Minimum length of 0. Maximum length of 10280.

Value Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

ExecutionEngine

Specifies the execution engine (cluster) that runs the notebook execution.

Type: ExecutionEngineConfig object

Required: Yes

NotebookExecutionName

An optional name for the notebook execution.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 256.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

NotebookInstanceSecurityGroupId

The unique identifier of the Amazon EC2 security group to associate with the Amazon EMR Notebook for this notebook execution.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 256.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

NotebookParams

Input parameters in JSON format passed to the Amazon EMR Notebook at runtime for execution.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 10280.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

NotebookS3Location

The Amazon S3 location for the notebook execution input.

Type: NotebookS3LocationFromInput object

Required: No

OutputNotebookFormat

The output format for the notebook execution.

Type: String

Valid Values: HTML

Required: No

OutputNotebookS3Location

The Amazon S3 location for the notebook execution output.

Type: OutputNotebookS3LocationFromInput object

Required: No

RelativePath

The path and file name of the notebook file for this execution, relative to the path specified for the Amazon EMR Notebook. For example, if you specify a path of s3://MyBucket/MyNotebooks when you create an Amazon EMR Notebook for a notebook with an ID of e-ABCDEFGHIJK1234567890ABCD (the EditorID of this request), and you specify a RelativePath of my_notebook_executions/notebook_execution.ipynb, the location of the file for the notebook execution is s3://MyBucket/MyNotebooks/e-ABCDEFGHIJK1234567890ABCD/my_notebook_executions/notebook_execution.ipynb.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 10280.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

ServiceRole

The name or ARN of the IAM role that is used as the service role for Amazon EMR (the Amazon EMR role) for the notebook execution.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 10280.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes

Tags

A list of tags associated with a notebook execution. Tags are user-defined key-value pairs that consist of a required key string with a maximum of 128 characters and an optional value string with a maximum of 256 characters.

Type: Array of Tag objects

Required: No

Response Syntax

{ "NotebookExecutionId": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

NotebookExecutionId

The unique identifier of the notebook execution.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 256.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Errors

For information about the errors that are common to all actions, see Common Errors.

InternalServerException

This exception occurs when there is an internal failure in the Amazon EMR service.

HTTP Status Code: 500

InvalidRequestException

This exception occurs when there is something wrong with user input.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: