Skip to content

Commit

Permalink
feat(client-emr): EMR Studio now supports programmatically executing …
Browse files Browse the repository at this point in the history
…a Notebooks on an EMR on EKS cluster. In addition, notebooks can now be executed by specifying its location in S3.
  • Loading branch information
awstools committed May 10, 2023
1 parent 5a9149b commit 6be4ce4
Show file tree
Hide file tree
Showing 23 changed files with 938 additions and 530 deletions.
2 changes: 1 addition & 1 deletion clients/client-emr/src/commands/AddInstanceFleetCommand.ts
Expand Up @@ -34,7 +34,7 @@ export interface AddInstanceFleetCommandOutput extends AddInstanceFleetOutput, _
* @public
* <p>Adds an instance fleet to a running cluster.</p>
* <note>
* <p>The instance fleet configuration is available only in Amazon EMR versions
* <p>The instance fleet configuration is available only in Amazon EMR releases
* 4.8.0 and later, excluding 5.0.x.</p>
* </note>
* @example
Expand Down
2 changes: 1 addition & 1 deletion clients/client-emr/src/commands/CancelStepsCommand.ts
Expand Up @@ -35,7 +35,7 @@ export interface CancelStepsCommandOutput extends CancelStepsOutput, __MetadataB
* <p>Cancels a pending step or steps in a running cluster. Available only in Amazon EMR versions 4.8.0 and later, excluding version 5.0.0. A maximum of 256 steps are allowed in
* each CancelSteps request. CancelSteps is idempotent but asynchronous; it does not guarantee
* that a step will be canceled, even if the request is successfully submitted. When you use
* Amazon EMR versions 5.28.0 and later, you can cancel steps that are in a
* Amazon EMR releases 5.28.0 and later, you can cancel steps that are in a
* <code>PENDING</code> or <code>RUNNING</code> state. In earlier versions of Amazon EMR, you can only cancel steps that are in a <code>PENDING</code> state. </p>
* @example
* Use a bare-bones client and the command you need to make an API call.
Expand Down
Expand Up @@ -52,6 +52,7 @@ export interface DescribeNotebookExecutionCommandOutput extends DescribeNotebook
* // Id: "STRING_VALUE", // required
* // Type: "EMR",
* // MasterInstanceSecurityGroupId: "STRING_VALUE",
* // ExecutionRoleArn: "STRING_VALUE",
* // },
* // NotebookExecutionName: "STRING_VALUE",
* // NotebookParams: "STRING_VALUE",
Expand All @@ -68,6 +69,18 @@ export interface DescribeNotebookExecutionCommandOutput extends DescribeNotebook
* // Value: "STRING_VALUE",
* // },
* // ],
* // NotebookS3Location: { // NotebookS3LocationForOutput
* // Bucket: "STRING_VALUE",
* // Key: "STRING_VALUE",
* // },
* // OutputNotebookS3Location: { // OutputNotebookS3LocationForOutput
* // Bucket: "STRING_VALUE",
* // Key: "STRING_VALUE",
* // },
* // OutputNotebookFormat: "HTML",
* // EnvironmentVariables: { // EnvironmentVariablesMap
* // "<keys>": "STRING_VALUE",
* // },
* // },
* // };
*
Expand Down
Expand Up @@ -32,9 +32,9 @@ export interface DescribeReleaseLabelCommandOutput extends DescribeReleaseLabelO

/**
* @public
* <p>Provides EMR release label details, such as releases available the region where the API
* request is run, and the available applications for a specific EMR release label. Can also
* list EMR release versions that support a specified version of Spark.</p>
* <p>Provides Amazon EMR release label details, such as the releases available the
* Region where the API request is run, and the available applications for a specific Amazon EMR release label. Can also list Amazon EMR releases that support a
* specified version of Spark.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Expand Up @@ -41,8 +41,10 @@ export interface GetClusterSessionCredentialsCommandOutput

/**
* @public
* <p>Provides temporary, HTTP basic credentials that are associated with a given runtime IAM role
* and used by a cluster with fine-grained access control activated. You can use these credentials to connect to cluster endpoints that support username and password authentication.</p>
* <p>Provides temporary, HTTP basic credentials that are associated with a given runtime
* IAM role and used by a cluster with fine-grained access control
* activated. You can use these credentials to connect to cluster endpoints that support
* username and password authentication.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Expand Up @@ -34,7 +34,7 @@ export interface ListInstanceFleetsCommandOutput extends ListInstanceFleetsOutpu
* @public
* <p>Lists all available details about the instance fleets in a cluster.</p>
* <note>
* <p>The instance fleet configuration is available only in Amazon EMR versions
* <p>The instance fleet configuration is available only in Amazon EMR releases
* 4.8.0 and later, excluding 5.0.x versions.</p>
* </note>
* @example
Expand Down
7 changes: 4 additions & 3 deletions clients/client-emr/src/commands/ListInstancesCommand.ts
Expand Up @@ -32,9 +32,10 @@ export interface ListInstancesCommandOutput extends ListInstancesOutput, __Metad

/**
* @public
* <p>Provides information for all active EC2 instances and EC2 instances terminated in the
* last 30 days, up to a maximum of 2,000. EC2 instances in any of the following states are
* considered active: AWAITING_FULFILLMENT, PROVISIONING, BOOTSTRAPPING, RUNNING.</p>
* <p>Provides information for all active Amazon EC2 instances and Amazon EC2
* instances terminated in the last 30 days, up to a maximum of 2,000. Amazon EC2
* instances in any of the following states are considered active: AWAITING_FULFILLMENT,
* PROVISIONING, BOOTSTRAPPING, RUNNING.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Expand Up @@ -35,7 +35,7 @@ export interface ListNotebookExecutionsCommandOutput extends ListNotebookExecuti
* <p>Provides summaries of all notebook executions. You can filter the list based on multiple
* criteria such as status, time range, and editor id. Returns a maximum of 50 notebook
* executions and a marker to track the paging of a longer notebook execution list across
* multiple <code>ListNotebookExecution</code> calls.</p>
* multiple <code>ListNotebookExecutions</code> calls.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand All @@ -48,6 +48,7 @@ export interface ListNotebookExecutionsCommandOutput extends ListNotebookExecuti
* From: new Date("TIMESTAMP"),
* To: new Date("TIMESTAMP"),
* Marker: "STRING_VALUE",
* ExecutionEngineId: "STRING_VALUE",
* };
* const command = new ListNotebookExecutionsCommand(input);
* const response = await client.send(command);
Expand All @@ -60,6 +61,11 @@ export interface ListNotebookExecutionsCommandOutput extends ListNotebookExecuti
* // Status: "START_PENDING" || "STARTING" || "RUNNING" || "FINISHING" || "FINISHED" || "FAILING" || "FAILED" || "STOP_PENDING" || "STOPPING" || "STOPPED",
* // StartTime: new Date("TIMESTAMP"),
* // EndTime: new Date("TIMESTAMP"),
* // NotebookS3Location: { // NotebookS3LocationForOutput
* // Bucket: "STRING_VALUE",
* // Key: "STRING_VALUE",
* // },
* // ExecutionEngineId: "STRING_VALUE",
* // },
* // ],
* // Marker: "STRING_VALUE",
Expand Down
3 changes: 2 additions & 1 deletion clients/client-emr/src/commands/ListReleaseLabelsCommand.ts
Expand Up @@ -32,7 +32,8 @@ export interface ListReleaseLabelsCommandOutput extends ListReleaseLabelsOutput,

/**
* @public
* <p>Retrieves release labels of EMR services in the region where the API is called.</p>
* <p>Retrieves release labels of Amazon EMR services in the Region where the API is
* called.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Expand Up @@ -36,7 +36,7 @@ export interface ModifyInstanceFleetCommandOutput extends __MetadataBearer {}
* specified InstanceFleetID within the cluster specified using ClusterID. The call either
* succeeds or fails atomically.</p>
* <note>
* <p>The instance fleet configuration is available only in Amazon EMR versions
* <p>The instance fleet configuration is available only in Amazon EMR releases
* 4.8.0 and later, excluding 5.0.x versions.</p>
* </note>
* @example
Expand Down
Expand Up @@ -34,8 +34,8 @@ export interface PutAutoScalingPolicyCommandOutput extends PutAutoScalingPolicyO
* @public
* <p>Creates or updates an automatic scaling policy for a core instance group or task
* instance group in an Amazon EMR cluster. The automatic scaling policy defines how
* an instance group dynamically adds and terminates EC2 instances in response to the value of
* a CloudWatch metric.</p>
* an instance group dynamically adds and terminates Amazon EC2 instances in response
* to the value of a CloudWatch metric.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Expand Up @@ -33,7 +33,7 @@ export interface PutAutoTerminationPolicyCommandOutput extends PutAutoTerminatio
/**
* @public
* <note>
* <p>Auto-termination is supported in Amazon EMR versions 5.30.0 and 6.1.0 and
* <p>Auto-termination is supported in Amazon EMR releases 5.30.0 and 6.1.0 and
* later. For more information, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-auto-termination-policy.html">Using an
* auto-termination policy</a>.</p>
* </note>
Expand Down
Expand Up @@ -33,9 +33,9 @@ export interface PutManagedScalingPolicyCommandOutput extends PutManagedScalingP
/**
* @public
* <p>Creates or updates a managed scaling policy for an Amazon EMR cluster. The
* managed scaling policy defines the limits for resources, such as EC2 instances that can be
* added or terminated from a cluster. The policy only applies to the core and task nodes. The
* master node cannot be scaled after initial configuration. </p>
* managed scaling policy defines the limits for resources, such as Amazon EC2
* instances that can be added or terminated from a cluster. The policy only applies to the
* core and task nodes. The master node cannot be scaled after initial configuration. </p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Expand Up @@ -32,8 +32,7 @@ export interface RemoveAutoScalingPolicyCommandOutput extends RemoveAutoScalingP

/**
* @public
* <p>Removes an automatic scaling policy from a specified instance group within an EMR
* cluster.</p>
* <p>Removes an automatic scaling policy from a specified instance group within an Amazon EMR cluster.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Expand Up @@ -32,7 +32,7 @@ export interface RemoveManagedScalingPolicyCommandOutput extends RemoveManagedSc

/**
* @public
* <p> Removes a managed scaling policy from a specified EMR cluster. </p>
* <p> Removes a managed scaling policy from a specified Amazon EMR cluster. </p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
2 changes: 1 addition & 1 deletion clients/client-emr/src/commands/RunJobFlowCommand.ts
Expand Up @@ -50,7 +50,7 @@ export interface RunJobFlowCommandOutput extends RunJobFlowOutput, __MetadataBea
* Hadoop.</p>
* <p>For long-running clusters, we recommend that you periodically store your results.</p>
* <note>
* <p>The instance fleets configuration is available only in Amazon EMR versions
* <p>The instance fleets configuration is available only in Amazon EMR releases
* 4.8.0 and later, excluding 5.0.x versions. The RunJobFlow request can contain
* InstanceFleets parameters or InstanceGroups parameters, but not both.</p>
* </note>
Expand Down
Expand Up @@ -32,11 +32,13 @@ export interface SetTerminationProtectionCommandOutput extends __MetadataBearer

/**
* @public
* <p>SetTerminationProtection locks a cluster (job flow) so the EC2 instances in the cluster
* cannot be terminated by user intervention, an API call, or in the event of a job-flow
* error. The cluster still terminates upon successful completion of the job flow. Calling
* <code>SetTerminationProtection</code> on a cluster is similar to calling the Amazon EC2
* <code>DisableAPITermination</code> API on all EC2 instances in a cluster.</p>
* <p>SetTerminationProtection locks a cluster (job flow) so the Amazon EC2 instances
* in the cluster cannot be terminated by user intervention, an API call, or in the event of a
* job-flow error. The cluster still terminates upon successful completion of the job flow.
* Calling <code>SetTerminationProtection</code> on a cluster is similar to calling the
* Amazon EC2
* <code>DisableAPITermination</code> API on all Amazon EC2 instances in a
* cluster.</p>
* <p>
* <code>SetTerminationProtection</code> is used to prevent accidental termination of a
* cluster and to ensure that in the event of an error, the instances persist so that you can
Expand Down
19 changes: 9 additions & 10 deletions clients/client-emr/src/commands/SetVisibleToAllUsersCommand.ts
Expand Up @@ -34,18 +34,17 @@ export interface SetVisibleToAllUsersCommandOutput extends __MetadataBearer {}
* @public
* <important>
* <p>The SetVisibleToAllUsers parameter is no longer supported. Your cluster may be
* visible to all users in your account. To restrict cluster access using an IAM policy, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-access-iam.html">Identity and Access
* Management for EMR</a>. </p>
* visible to all users in your account. To restrict cluster access using an IAM policy, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-access-IAM.html">Identity and Access
* Management for Amazon EMR</a>. </p>
* </important>
* <p>Sets the <a>Cluster$VisibleToAllUsers</a> value for an EMR cluster. When
* <code>true</code>, IAM principals in the Amazon Web Services account can perform EMR
* cluster actions that their IAM policies allow. When <code>false</code>, only
* the IAM principal that created the cluster and the Amazon Web Services account root user can
* perform EMR actions on the cluster, regardless of IAM permissions policies attached to
* other IAM principals.</p>
* <p>Sets the <a>Cluster$VisibleToAllUsers</a> value for an Amazon EMR
* cluster. When <code>true</code>, IAM principals in the Amazon Web Services account can perform Amazon EMR cluster actions that their IAM policies allow. When <code>false</code>, only the IAM
* principal that created the cluster and the Amazon Web Services account root user can perform
* Amazon EMR actions on the cluster, regardless of IAM permissions
* policies attached to other IAM principals.</p>
* <p>This action works on running clusters. When you create a cluster, use the <a>RunJobFlowInput$VisibleToAllUsers</a> parameter.</p>
* <p>For more information, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/security_iam_emr-with-iam.html#security_set_visible_to_all_users">Understanding the EMR Cluster VisibleToAllUsers Setting</a> in the
* <i>Amazon EMRManagement Guide</i>.</p>
* <p>For more information, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/security_IAM_emr-with-IAM.html#security_set_visible_to_all_users">Understanding the Amazon EMR Cluster VisibleToAllUsers Setting</a> in the
* <i>Amazon EMR Management Guide</i>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
17 changes: 15 additions & 2 deletions clients/client-emr/src/commands/StartNotebookExecutionCommand.ts
Expand Up @@ -40,14 +40,15 @@ export interface StartNotebookExecutionCommandOutput extends StartNotebookExecut
* // const { EMRClient, StartNotebookExecutionCommand } = require("@aws-sdk/client-emr"); // CommonJS import
* const client = new EMRClient(config);
* const input = { // StartNotebookExecutionInput
* EditorId: "STRING_VALUE", // required
* RelativePath: "STRING_VALUE", // required
* 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",
Expand All @@ -57,6 +58,18 @@ export interface StartNotebookExecutionCommandOutput extends StartNotebookExecut
* 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);
Expand Down
5 changes: 2 additions & 3 deletions clients/client-emr/src/commands/TerminateJobFlowsCommand.ts
Expand Up @@ -33,9 +33,8 @@ export interface TerminateJobFlowsCommandOutput extends __MetadataBearer {}
/**
* @public
* <p>TerminateJobFlows shuts a list of clusters (job flows) down. When a job flow is shut
* down, any step not yet completed is canceled and the EC2 instances on which the cluster is
* running are stopped. Any log files not already saved are uploaded to Amazon S3 if a
* LogUri was specified when the cluster was created.</p>
* down, any step not yet completed is canceled and the Amazon EC2 instances on which
* the cluster is running are stopped. Any log files not already saved are uploaded to Amazon S3 if a LogUri was specified when the cluster was created.</p>
* <p>The maximum number of clusters allowed is 10. The call to <code>TerminateJobFlows</code>
* is asynchronous. Depending on the configuration of the cluster, it may take up to 1-5
* minutes for the cluster to completely terminate and release allocated resources, such as
Expand Down

0 comments on commit 6be4ce4

Please sign in to comment.