- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
StartNotebookExecutionCommand
Starts a notebook execution.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { EMRClient, StartNotebookExecutionCommand } from "@aws-sdk/client-emr"; // ES Modules import
// const { EMRClient, StartNotebookExecutionCommand } = require("@aws-sdk/client-emr"); // CommonJS import
const client = new EMRClient(config);
const input = { // StartNotebookExecutionInput
EditorId: "STRING_VALUE",
RelativePath: "STRING_VALUE",
NotebookExecutionName: "STRING_VALUE",
NotebookParams: "STRING_VALUE",
ExecutionEngine: { // ExecutionEngineConfig
Id: "STRING_VALUE", // required
Type: "EMR",
MasterInstanceSecurityGroupId: "STRING_VALUE",
ExecutionRoleArn: "STRING_VALUE",
},
ServiceRole: "STRING_VALUE", // required
NotebookInstanceSecurityGroupId: "STRING_VALUE",
Tags: [ // TagList
{ // Tag
Key: "STRING_VALUE",
Value: "STRING_VALUE",
},
],
NotebookS3Location: { // NotebookS3LocationFromInput
Bucket: "STRING_VALUE",
Key: "STRING_VALUE",
},
OutputNotebookS3Location: { // OutputNotebookS3LocationFromInput
Bucket: "STRING_VALUE",
Key: "STRING_VALUE",
},
OutputNotebookFormat: "HTML",
EnvironmentVariables: { // EnvironmentVariablesMap
"<keys>": "STRING_VALUE",
},
};
const command = new StartNotebookExecutionCommand(input);
const response = await client.send(command);
// { // StartNotebookExecutionOutput
// NotebookExecutionId: "STRING_VALUE",
// };
StartNotebookExecutionCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
ExecutionEngine Required | ExecutionEngineConfig | undefined | Specifies the execution engine (cluster) that runs the notebook execution. |
ServiceRole Required | string | undefined | 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. |
EditorId | string | undefined | The unique identifier of the Amazon EMR Notebook to use for notebook execution. |
EnvironmentVariables | Record<string, string> | undefined | The environment variables associated with the notebook execution. |
NotebookExecutionName | string | undefined | An optional name for the notebook execution. |
NotebookInstanceSecurityGroupId | string | undefined | The unique identifier of the Amazon EC2 security group to associate with the Amazon EMR Notebook for this notebook execution. |
NotebookParams | string | undefined | Input parameters in JSON format passed to the Amazon EMR Notebook at runtime for execution. |
NotebookS3Location | NotebookS3LocationFromInput | undefined | The Amazon S3 location for the notebook execution input. |
OutputNotebookFormat | OutputNotebookFormat | undefined | The output format for the notebook execution. |
OutputNotebookS3Location | OutputNotebookS3LocationFromInput | undefined | The Amazon S3 location for the notebook execution output. |
RelativePath | string | undefined | 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 |
Tags | Tag[] | undefined | 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. |
StartNotebookExecutionCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
NotebookExecutionId | string | undefined | The unique identifier of the notebook execution. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InternalServerException | server | This exception occurs when there is an internal failure in the Amazon EMR service. |
InvalidRequestException | client | This exception occurs when there is something wrong with user input. |
EMRServiceException | Base exception class for all service exceptions from EMR service. |