Class: Aws::EMR::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::EMR::Client
- Includes:
- ClientStubs
- Defined in:
- lib/aws-sdk-emr/client.rb,
sig/client.rbs
Overview
An API client for EMR. To construct a client, you need to configure a :region and :credentials.
client = Aws::EMR::Client.new(
region: region_name,
credentials: credentials,
# ...
)
For details on configuring region and credentials see the developer guide.
See #initialize for a full list of supported configuration options.
Defined Under Namespace
Modules: _AddInstanceFleetResponseSuccess, _AddInstanceGroupsResponseSuccess, _AddJobFlowStepsResponseSuccess, _AddTagsResponseSuccess, _CancelStepsResponseSuccess, _CreatePersistentAppUIResponseSuccess, _CreateSecurityConfigurationResponseSuccess, _CreateStudioResponseSuccess, _DeleteSecurityConfigurationResponseSuccess, _DescribeClusterResponseSuccess, _DescribeJobFlowsResponseSuccess, _DescribeNotebookExecutionResponseSuccess, _DescribePersistentAppUIResponseSuccess, _DescribeReleaseLabelResponseSuccess, _DescribeSecurityConfigurationResponseSuccess, _DescribeStepResponseSuccess, _DescribeStudioResponseSuccess, _GetAutoTerminationPolicyResponseSuccess, _GetBlockPublicAccessConfigurationResponseSuccess, _GetClusterSessionCredentialsResponseSuccess, _GetManagedScalingPolicyResponseSuccess, _GetOnClusterAppUIPresignedURLResponseSuccess, _GetPersistentAppUIPresignedURLResponseSuccess, _GetSessionEndpointResponseSuccess, _GetSessionResponseSuccess, _GetStudioSessionMappingResponseSuccess, _ListBootstrapActionsResponseSuccess, _ListClustersResponseSuccess, _ListInstanceFleetsResponseSuccess, _ListInstanceGroupsResponseSuccess, _ListInstancesResponseSuccess, _ListNotebookExecutionsResponseSuccess, _ListReleaseLabelsResponseSuccess, _ListSecurityConfigurationsResponseSuccess, _ListSessionsResponseSuccess, _ListStepsResponseSuccess, _ListStudioSessionMappingsResponseSuccess, _ListStudiosResponseSuccess, _ListSupportedInstanceTypesResponseSuccess, _ModifyClusterResponseSuccess, _PutAutoScalingPolicyResponseSuccess, _PutAutoTerminationPolicyResponseSuccess, _PutBlockPublicAccessConfigurationResponseSuccess, _PutManagedScalingPolicyResponseSuccess, _RemoveAutoScalingPolicyResponseSuccess, _RemoveAutoTerminationPolicyResponseSuccess, _RemoveManagedScalingPolicyResponseSuccess, _RemoveTagsResponseSuccess, _RunJobFlowResponseSuccess, _StartNotebookExecutionResponseSuccess, _StartSessionResponseSuccess, _TerminateSessionResponseSuccess
Constant Summary collapse
- Params =
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
API Operations collapse
-
#add_instance_fleet(params = {}) ⇒ Types::AddInstanceFleetOutput
Adds an instance fleet to a running cluster.
-
#add_instance_groups(params = {}) ⇒ Types::AddInstanceGroupsOutput
Adds one or more instance groups to a running cluster.
-
#add_job_flow_steps(params = {}) ⇒ Types::AddJobFlowStepsOutput
AddJobFlowSteps adds new steps to a running cluster.
-
#add_tags(params = {}) ⇒ Struct
Adds tags to an Amazon EMR resource, such as a cluster or an Amazon EMR Studio.
-
#cancel_steps(params = {}) ⇒ Types::CancelStepsOutput
Cancels a pending step or steps in a running cluster.
-
#create_persistent_app_ui(params = {}) ⇒ Types::CreatePersistentAppUIOutput
Creates a persistent application user interface.
-
#create_security_configuration(params = {}) ⇒ Types::CreateSecurityConfigurationOutput
Creates a security configuration, which is stored in the service and can be specified when a cluster is created.
-
#create_studio(params = {}) ⇒ Types::CreateStudioOutput
Creates a new Amazon EMR Studio.
-
#create_studio_session_mapping(params = {}) ⇒ Struct
Maps a user or group to the Amazon EMR Studio specified by
StudioId, and applies a session policy to refine Studio permissions for that user or group. -
#delete_security_configuration(params = {}) ⇒ Struct
Deletes a security configuration.
-
#delete_studio(params = {}) ⇒ Struct
Removes an Amazon EMR Studio from the Studio metadata store.
-
#delete_studio_session_mapping(params = {}) ⇒ Struct
Removes a user or group from an Amazon EMR Studio.
-
#describe_cluster(params = {}) ⇒ Types::DescribeClusterOutput
Provides cluster-level details including status, hardware and software configuration, VPC settings, and so on.
-
#describe_job_flows(params = {}) ⇒ Types::DescribeJobFlowsOutput
This API is no longer supported and will eventually be removed.
-
#describe_notebook_execution(params = {}) ⇒ Types::DescribeNotebookExecutionOutput
Provides details of a notebook execution.
-
#describe_persistent_app_ui(params = {}) ⇒ Types::DescribePersistentAppUIOutput
Describes a persistent application user interface.
-
#describe_release_label(params = {}) ⇒ Types::DescribeReleaseLabelOutput
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.
-
#describe_security_configuration(params = {}) ⇒ Types::DescribeSecurityConfigurationOutput
Provides the details of a security configuration by returning the configuration JSON.
-
#describe_step(params = {}) ⇒ Types::DescribeStepOutput
Provides more detail about the cluster step.
-
#describe_studio(params = {}) ⇒ Types::DescribeStudioOutput
Returns details for the specified Amazon EMR Studio including ID, Name, VPC, Studio access URL, and so on.
-
#get_auto_termination_policy(params = {}) ⇒ Types::GetAutoTerminationPolicyOutput
Returns the auto-termination policy for an Amazon EMR cluster.
-
#get_block_public_access_configuration(params = {}) ⇒ Types::GetBlockPublicAccessConfigurationOutput
Returns the Amazon EMR block public access configuration for your Amazon Web Services account in the current Region.
-
#get_cluster_session_credentials(params = {}) ⇒ Types::GetClusterSessionCredentialsOutput
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.
-
#get_managed_scaling_policy(params = {}) ⇒ Types::GetManagedScalingPolicyOutput
Fetches the attached managed scaling policy for an Amazon EMR cluster.
-
#get_on_cluster_app_ui_presigned_url(params = {}) ⇒ Types::GetOnClusterAppUIPresignedURLOutput
The presigned URL properties for the cluster's application user interface.
-
#get_persistent_app_ui_presigned_url(params = {}) ⇒ Types::GetPersistentAppUIPresignedURLOutput
The presigned URL properties for the cluster's application user interface.
-
#get_session(params = {}) ⇒ Types::GetSessionOutput
Returns detailed information about a session.
-
#get_session_endpoint(params = {}) ⇒ Types::GetSessionEndpointOutput
Returns the Spark Connect endpoint URL and a time-limited authentication token for the specified session.
-
#get_studio_session_mapping(params = {}) ⇒ Types::GetStudioSessionMappingOutput
Fetches mapping details for the specified Amazon EMR Studio and identity (user or group).
-
#list_bootstrap_actions(params = {}) ⇒ Types::ListBootstrapActionsOutput
Provides information about the bootstrap actions associated with a cluster.
-
#list_clusters(params = {}) ⇒ Types::ListClustersOutput
Provides the status of all clusters visible to this Amazon Web Services account.
-
#list_instance_fleets(params = {}) ⇒ Types::ListInstanceFleetsOutput
Lists all available details about the instance fleets in a cluster.
-
#list_instance_groups(params = {}) ⇒ Types::ListInstanceGroupsOutput
Provides all available details about the instance groups in a cluster.
-
#list_instances(params = {}) ⇒ Types::ListInstancesOutput
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.
-
#list_notebook_executions(params = {}) ⇒ Types::ListNotebookExecutionsOutput
Provides summaries of all notebook executions.
-
#list_release_labels(params = {}) ⇒ Types::ListReleaseLabelsOutput
Retrieves release labels of Amazon EMR services in the Region where the API is called.
-
#list_security_configurations(params = {}) ⇒ Types::ListSecurityConfigurationsOutput
Lists all the security configurations visible to this account, providing their creation dates and times, and their names.
-
#list_sessions(params = {}) ⇒ Types::ListSessionsOutput
Lists the sessions on a cluster.
-
#list_steps(params = {}) ⇒ Types::ListStepsOutput
Provides a list of steps for the cluster in reverse order unless you specify
stepIdswith the request or filter byStepStates. -
#list_studio_session_mappings(params = {}) ⇒ Types::ListStudioSessionMappingsOutput
Returns a list of all user or group session mappings for the Amazon EMR Studio specified by
StudioId. -
#list_studios(params = {}) ⇒ Types::ListStudiosOutput
Returns a list of all Amazon EMR Studios associated with the Amazon Web Services account.
-
#list_supported_instance_types(params = {}) ⇒ Types::ListSupportedInstanceTypesOutput
A list of the instance types that Amazon EMR supports.
-
#modify_cluster(params = {}) ⇒ Types::ModifyClusterOutput
Modifies the number of steps that can be executed concurrently for the cluster specified using ClusterID.
-
#modify_instance_fleet(params = {}) ⇒ Struct
Modifies the target On-Demand and target Spot capacities for the instance fleet with the specified InstanceFleetID within the cluster specified using ClusterID.
-
#modify_instance_groups(params = {}) ⇒ Struct
ModifyInstanceGroups modifies the number of nodes and configuration settings of an instance group.
-
#put_auto_scaling_policy(params = {}) ⇒ Types::PutAutoScalingPolicyOutput
Creates or updates an automatic scaling policy for a core instance group or task instance group in an Amazon EMR cluster.
-
#put_auto_termination_policy(params = {}) ⇒ Struct
Auto-termination is supported in Amazon EMR releases 5.30.0 and 6.1.0 and later. -
#put_block_public_access_configuration(params = {}) ⇒ Struct
Creates or updates an Amazon EMR block public access configuration for your Amazon Web Services account in the current Region.
-
#put_managed_scaling_policy(params = {}) ⇒ Struct
Creates or updates a managed scaling policy for an Amazon EMR cluster.
-
#remove_auto_scaling_policy(params = {}) ⇒ Struct
Removes an automatic scaling policy from a specified instance group within an Amazon EMR cluster.
-
#remove_auto_termination_policy(params = {}) ⇒ Struct
Removes an auto-termination policy from an Amazon EMR cluster.
-
#remove_managed_scaling_policy(params = {}) ⇒ Struct
Removes a managed scaling policy from a specified Amazon EMR cluster.
-
#remove_tags(params = {}) ⇒ Struct
Removes tags from an Amazon EMR resource, such as a cluster or Amazon EMR Studio.
-
#run_job_flow(params = {}) ⇒ Types::RunJobFlowOutput
RunJobFlow creates and starts running a new cluster (job flow).
-
#set_keep_job_flow_alive_when_no_steps(params = {}) ⇒ Struct
You can use the
SetKeepJobFlowAliveWhenNoStepsto configure a cluster (job flow) to terminate after the step execution, i.e., all your steps are executed. -
#set_termination_protection(params = {}) ⇒ Struct
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.
-
#set_unhealthy_node_replacement(params = {}) ⇒ Struct
Specify whether to enable unhealthy node replacement, which lets Amazon EMR gracefully replace core nodes on a cluster if any nodes become unhealthy.
-
#set_visible_to_all_users(params = {}) ⇒ Struct
The SetVisibleToAllUsers parameter is no longer supported.
-
#start_notebook_execution(params = {}) ⇒ Types::StartNotebookExecutionOutput
Starts a notebook execution.
-
#start_session(params = {}) ⇒ Types::StartSessionOutput
Creates and starts a new Spark Connect session on the specified cluster.
-
#stop_notebook_execution(params = {}) ⇒ Struct
Stops a notebook execution.
-
#terminate_job_flows(params = {}) ⇒ Struct
TerminateJobFlows shuts a list of clusters (job flows) down.
-
#terminate_session(params = {}) ⇒ Types::TerminateSessionOutput
Terminates an active session.
-
#update_studio(params = {}) ⇒ Struct
Updates an Amazon EMR Studio configuration, including attributes such as name, description, and subnets.
-
#update_studio_session_mapping(params = {}) ⇒ Struct
Updates the session policy attached to the user or group for the specified Amazon EMR Studio.
Class Method Summary collapse
- .errors_module ⇒ Object private
- .new ⇒ Object
Instance Method Summary collapse
- #build_request(operation_name, params = {}) ⇒ Object private
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
-
#wait_until(waiter_name, params = {}, options = {}) {|w.waiter| ... } ⇒ Boolean
Polls an API operation until a resource enters a desired state.
- #waiter_names ⇒ Object deprecated private Deprecated.
Constructor Details
#initialize(options) ⇒ Client
Returns a new instance of Client.
478 479 480 |
# File 'lib/aws-sdk-emr/client.rb', line 478 def initialize(*args) super end |
Class Attribute Details
.identifier ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
5071 5072 5073 |
# File 'lib/aws-sdk-emr/client.rb', line 5071 def identifier @identifier end |
Class Method Details
.errors_module ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
5074 5075 5076 |
# File 'lib/aws-sdk-emr/client.rb', line 5074 def errors_module Errors end |
.new ⇒ Object
14 |
# File 'sig/client.rbs', line 14
def self.new: (
|
Instance Method Details
#add_instance_fleet(params = {}) ⇒ Types::AddInstanceFleetOutput
Adds an instance fleet to a running cluster.
89 |
# File 'sig/client.rbs', line 89
def add_instance_fleet: (
|
#add_instance_groups(params = {}) ⇒ Types::AddInstanceGroupsOutput
Adds one or more instance groups to a running cluster.
102 |
# File 'sig/client.rbs', line 102
def add_instance_groups: (
|
#add_job_flow_steps(params = {}) ⇒ Types::AddJobFlowStepsOutput
AddJobFlowSteps adds new steps to a running cluster. A maximum of 256 steps are allowed in each job flow.
If your cluster is long-running (such as a Hive data warehouse) or complex, you may require more than 256 steps to process your data. You can bypass the 256-step limitation in various ways, including using SSH to connect to the master node and submitting queries directly to the software running on the master node, such as Hive and Hadoop.
A step specifies the location of a JAR file stored either on the master node of the cluster or in Amazon S3. Each step is performed by the main function of the main class of the JAR file. The main class can be specified either in the manifest of the JAR or by using the MainFunction parameter of the step.
Amazon EMR executes each step in the order listed. For a step to be considered complete, the main function must exit with a zero exit code and all Hadoop jobs started while the step was running must have completed and run successfully.
You can only add steps to a cluster that is in one of the following states: STARTING, BOOTSTRAPPING, RUNNING, or WAITING.
HadoopJarStep object cannot exceed a
total of 10240 characters.
115 |
# File 'sig/client.rbs', line 115
def add_job_flow_steps: (
|
#add_tags(params = {}) ⇒ Struct
Adds tags to an Amazon EMR resource, such as a cluster or an Amazon EMR Studio. Tags make it easier to associate resources in various ways, such as grouping clusters to track your Amazon EMR resource allocation costs. For more information, see Tag Clusters.
128 |
# File 'sig/client.rbs', line 128
def add_tags: (
|
#build_request(operation_name, params = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 |
# File 'lib/aws-sdk-emr/client.rb', line 4927 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) tracer = config.telemetry_provider.tracer_provider.tracer( Aws::Telemetry.module_to_tracer_name('Aws::EMR') ) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config, tracer: tracer ) context[:gem_name] = 'aws-sdk-emr' context[:gem_version] = '1.137.0' Seahorse::Client::Request.new(handlers, context) end |
#cancel_steps(params = {}) ⇒ Types::CancelStepsOutput
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 releases 5.28.0 and later, you can
cancel steps that are in a PENDING or RUNNING state. In earlier
versions of Amazon EMR, you can only cancel steps that are in a
PENDING state.
145 |
# File 'sig/client.rbs', line 145
def cancel_steps: (
|
#create_persistent_app_ui(params = {}) ⇒ Types::CreatePersistentAppUIOutput
Creates a persistent application user interface.
158 |
# File 'sig/client.rbs', line 158
def create_persistent_app_ui: (
|
#create_security_configuration(params = {}) ⇒ Types::CreateSecurityConfigurationOutput
Creates a security configuration, which is stored in the service and can be specified when a cluster is created.
180 |
# File 'sig/client.rbs', line 180
def create_security_configuration: (
|
#create_studio(params = {}) ⇒ Types::CreateStudioOutput
Creates a new Amazon EMR Studio.
192 |
# File 'sig/client.rbs', line 192
def create_studio: (
|
#create_studio_session_mapping(params = {}) ⇒ Struct
Maps a user or group to the Amazon EMR Studio specified by StudioId,
and applies a session policy to refine Studio permissions for that
user or group. Use CreateStudioSessionMapping to assign users to a
Studio when you use IAM Identity Center authentication. For
instructions on how to assign users to a Studio when you use IAM
authentication, see Assign a user or group to your EMR Studio.
219 |
# File 'sig/client.rbs', line 219
def create_studio_session_mapping: (
|
#delete_security_configuration(params = {}) ⇒ Struct
Deletes a security configuration.
232 |
# File 'sig/client.rbs', line 232
def delete_security_configuration: (
|
#delete_studio(params = {}) ⇒ Struct
Removes an Amazon EMR Studio from the Studio metadata store.
238 |
# File 'sig/client.rbs', line 238
def delete_studio: (
|
#delete_studio_session_mapping(params = {}) ⇒ Struct
Removes a user or group from an Amazon EMR Studio.
244 |
# File 'sig/client.rbs', line 244
def delete_studio_session_mapping: (
|
#describe_cluster(params = {}) ⇒ Types::DescribeClusterOutput
Provides cluster-level details including status, hardware and software configuration, VPC settings, and so on.
The following waiters are defined for this operation (see #wait_until for detailed usage):
* cluster_running
* cluster_terminated
257 |
# File 'sig/client.rbs', line 257
def describe_cluster: (
|
#describe_job_flows(params = {}) ⇒ Types::DescribeJobFlowsOutput
This API is no longer supported and will eventually be removed. We recommend you use ListClusters, DescribeCluster, ListSteps, ListInstanceGroups and ListBootstrapActions instead.
DescribeJobFlows returns a list of job flows that match all of the supplied parameters. The parameters can include a list of job flow IDs, job flow states, and restrictions on job flow creation date and time.
Regardless of supplied parameters, only job flows created within the last two months are returned.
If no parameters are supplied, then job flows matching either of the following criteria are returned:
-
Job flows created and completed in the last two weeks
-
Job flows created within the last two months that are in one of the following states:
RUNNING,WAITING,SHUTTING_DOWN,STARTING
Amazon EMR can return a maximum of 512 job flow descriptions.
267 |
# File 'sig/client.rbs', line 267
def describe_job_flows: (
|
#describe_notebook_execution(params = {}) ⇒ Types::DescribeNotebookExecutionOutput
Provides details of a notebook execution.
280 |
# File 'sig/client.rbs', line 280
def describe_notebook_execution: (
|
#describe_persistent_app_ui(params = {}) ⇒ Types::DescribePersistentAppUIOutput
Describes a persistent application user interface.
290 |
# File 'sig/client.rbs', line 290
def describe_persistent_app_ui: (
|
#describe_release_label(params = {}) ⇒ Types::DescribeReleaseLabelOutput
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.
303 |
# File 'sig/client.rbs', line 303
def describe_release_label: (
|
#describe_security_configuration(params = {}) ⇒ Types::DescribeSecurityConfigurationOutput
Provides the details of a security configuration by returning the configuration JSON.
317 |
# File 'sig/client.rbs', line 317
def describe_security_configuration: (
|
#describe_step(params = {}) ⇒ Types::DescribeStepOutput
Provides more detail about the cluster step.
The following waiters are defined for this operation (see #wait_until for detailed usage):
* step_complete
327 |
# File 'sig/client.rbs', line 327
def describe_step: (
|
#describe_studio(params = {}) ⇒ Types::DescribeStudioOutput
Returns details for the specified Amazon EMR Studio including ID, Name, VPC, Studio access URL, and so on.
338 |
# File 'sig/client.rbs', line 338
def describe_studio: (
|
#get_auto_termination_policy(params = {}) ⇒ Types::GetAutoTerminationPolicyOutput
Returns the auto-termination policy for an Amazon EMR cluster.
348 |
# File 'sig/client.rbs', line 348
def get_auto_termination_policy: (
|
#get_block_public_access_configuration(params = {}) ⇒ Types::GetBlockPublicAccessConfigurationOutput
Returns the Amazon EMR block public access configuration for your Amazon Web Services account in the current Region. For more information see Configure Block Public Access for Amazon EMR in the Amazon EMR Management Guide.
359 |
# File 'sig/client.rbs', line 359
def get_block_public_access_configuration: (
|
#get_cluster_session_credentials(params = {}) ⇒ Types::GetClusterSessionCredentialsOutput
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.
369 |
# File 'sig/client.rbs', line 369
def get_cluster_session_credentials: (
|
#get_managed_scaling_policy(params = {}) ⇒ Types::GetManagedScalingPolicyOutput
Fetches the attached managed scaling policy for an Amazon EMR cluster.
380 |
# File 'sig/client.rbs', line 380
def get_managed_scaling_policy: (
|
#get_on_cluster_app_ui_presigned_url(params = {}) ⇒ Types::GetOnClusterAppUIPresignedURLOutput
The presigned URL properties for the cluster's application user interface.
391 |
# File 'sig/client.rbs', line 391
def get_on_cluster_app_ui_presigned_url: (
|
#get_persistent_app_ui_presigned_url(params = {}) ⇒ Types::GetPersistentAppUIPresignedURLOutput
The presigned URL properties for the cluster's application user interface.
406 |
# File 'sig/client.rbs', line 406
def get_persistent_app_ui_presigned_url: (
|
#get_session(params = {}) ⇒ Types::GetSessionOutput
Returns detailed information about a session.
420 |
# File 'sig/client.rbs', line 420
def get_session: (
|
#get_session_endpoint(params = {}) ⇒ Types::GetSessionEndpointOutput
Returns the Spark Connect endpoint URL and a time-limited authentication token for the specified session. Use the endpoint and token to connect a PySpark client to the session. Call this operation again when the token expires to obtain a new one.
434 |
# File 'sig/client.rbs', line 434
def get_session_endpoint: (
|
#get_studio_session_mapping(params = {}) ⇒ Types::GetStudioSessionMappingOutput
Fetches mapping details for the specified Amazon EMR Studio and identity (user or group).
445 |
# File 'sig/client.rbs', line 445
def get_studio_session_mapping: (
|
#list_bootstrap_actions(params = {}) ⇒ Types::ListBootstrapActionsOutput
Provides information about the bootstrap actions associated with a cluster.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
459 |
# File 'sig/client.rbs', line 459
def list_bootstrap_actions: (
|
#list_clusters(params = {}) ⇒ Types::ListClustersOutput
Provides the status of all clusters visible to this Amazon Web Services account. Allows you to filter the list of clusters based on certain criteria; for example, filtering by cluster creation date and time or by status. This call returns a maximum of 50 clusters in unsorted order per call, but returns a marker to track the paging of the cluster list across multiple ListClusters calls.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
471 |
# File 'sig/client.rbs', line 471
def list_clusters: (
|
#list_instance_fleets(params = {}) ⇒ Types::ListInstanceFleetsOutput
Lists all available details about the instance fleets in a cluster.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
485 |
# File 'sig/client.rbs', line 485
def list_instance_fleets: (
|
#list_instance_groups(params = {}) ⇒ Types::ListInstanceGroupsOutput
Provides all available details about the instance groups in a cluster.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
497 |
# File 'sig/client.rbs', line 497
def list_instance_groups: (
|
#list_instances(params = {}) ⇒ Types::ListInstancesOutput
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.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
509 |
# File 'sig/client.rbs', line 509
def list_instances: (
|
#list_notebook_executions(params = {}) ⇒ Types::ListNotebookExecutionsOutput
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
ListNotebookExecutions calls.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
526 |
# File 'sig/client.rbs', line 526
def list_notebook_executions: (
|
#list_release_labels(params = {}) ⇒ Types::ListReleaseLabelsOutput
Retrieves release labels of Amazon EMR services in the Region where the API is called.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
542 |
# File 'sig/client.rbs', line 542
def list_release_labels: (
|
#list_security_configurations(params = {}) ⇒ Types::ListSecurityConfigurationsOutput
Lists all the security configurations visible to this account, providing their creation dates and times, and their names. This call returns a maximum of 50 clusters per call, but returns a marker to track the paging of the cluster list across multiple ListSecurityConfigurations calls.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
558 |
# File 'sig/client.rbs', line 558
def list_security_configurations: (
|
#list_sessions(params = {}) ⇒ Types::ListSessionsOutput
Lists the sessions on a cluster. You can filter the results by session state. Newer sessions are returned first.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
569 |
# File 'sig/client.rbs', line 569
def list_sessions: (
|
#list_steps(params = {}) ⇒ Types::ListStepsOutput
Provides a list of steps for the cluster in reverse order unless you
specify stepIds with the request or filter by StepStates. You can
specify a maximum of 10 stepIDs. The CLI automatically paginates
results to return a list greater than 50 steps. To return more than 50
steps using the CLI, specify a Marker, which is a pagination token
that indicates the next set of steps to retrieve.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
583 |
# File 'sig/client.rbs', line 583
def list_steps: (
|
#list_studio_session_mappings(params = {}) ⇒ Types::ListStudioSessionMappingsOutput
Returns a list of all user or group session mappings for the Amazon
EMR Studio specified by StudioId.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
597 |
# File 'sig/client.rbs', line 597
def list_studio_session_mappings: (
|
#list_studios(params = {}) ⇒ Types::ListStudiosOutput
Returns a list of all Amazon EMR Studios associated with the Amazon Web Services account. The list includes details such as ID, Studio Access URL, and creation time for each Studio.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
610 |
# File 'sig/client.rbs', line 610
def list_studios: (
|
#list_supported_instance_types(params = {}) ⇒ Types::ListSupportedInstanceTypesOutput
A list of the instance types that Amazon EMR supports. You can filter the list by Amazon Web Services Region and Amazon EMR release.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
621 |
# File 'sig/client.rbs', line 621
def list_supported_instance_types: (
|
#modify_cluster(params = {}) ⇒ Types::ModifyClusterOutput
Modifies the number of steps that can be executed concurrently for the cluster specified using ClusterID.
633 |
# File 'sig/client.rbs', line 633
def modify_cluster: (
|
#modify_instance_fleet(params = {}) ⇒ Struct
Modifies the target On-Demand and target Spot capacities for the instance fleet with the specified InstanceFleetID within the cluster specified using ClusterID. The call either succeeds or fails atomically.
641 |
# File 'sig/client.rbs', line 641
def modify_instance_fleet: (
|
#modify_instance_groups(params = {}) ⇒ Struct
ModifyInstanceGroups modifies the number of nodes and configuration settings of an instance group. The input parameters include the new target instance count for the group and the instance group ID. The call will either succeed or fail atomically.
657 |
# File 'sig/client.rbs', line 657
def modify_instance_groups: (
|
#put_auto_scaling_policy(params = {}) ⇒ Types::PutAutoScalingPolicyOutput
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 Amazon EC2 instances in response to the value of a CloudWatch metric.
693 |
# File 'sig/client.rbs', line 693
def put_auto_scaling_policy: (
|
#put_auto_termination_policy(params = {}) ⇒ Struct
Creates or updates an auto-termination policy for an Amazon EMR cluster. An auto-termination policy defines the amount of idle time in seconds after which a cluster automatically terminates. For alternative cluster termination options, see Control cluster termination.
704 |
# File 'sig/client.rbs', line 704
def put_auto_termination_policy: (
|
#put_block_public_access_configuration(params = {}) ⇒ Struct
Creates or updates an Amazon EMR block public access configuration for your Amazon Web Services account in the current Region. For more information see Configure Block Public Access for Amazon EMR in the Amazon EMR Management Guide.
716 |
# File 'sig/client.rbs', line 716
def put_block_public_access_configuration: (
|
#put_managed_scaling_policy(params = {}) ⇒ Struct
Creates or updates a managed scaling policy for an Amazon EMR cluster. The 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.
733 |
# File 'sig/client.rbs', line 733
def put_managed_scaling_policy: (
|
#remove_auto_scaling_policy(params = {}) ⇒ Struct
Removes an automatic scaling policy from a specified instance group within an Amazon EMR cluster.
743 |
# File 'sig/client.rbs', line 743
def remove_auto_scaling_policy: (
|
#remove_auto_termination_policy(params = {}) ⇒ Struct
Removes an auto-termination policy from an Amazon EMR cluster.
753 |
# File 'sig/client.rbs', line 753
def remove_auto_termination_policy: (
|
#remove_managed_scaling_policy(params = {}) ⇒ Struct
Removes a managed scaling policy from a specified Amazon EMR cluster.
762 |
# File 'sig/client.rbs', line 762
def remove_managed_scaling_policy: (
|
#remove_tags(params = {}) ⇒ Struct
Removes tags from an Amazon EMR resource, such as a cluster or Amazon EMR Studio. Tags make it easier to associate resources in various ways, such as grouping clusters to track your Amazon EMR resource allocation costs. For more information, see Tag Clusters.
The following example removes the stack tag with value Prod from a cluster:
771 |
# File 'sig/client.rbs', line 771
def remove_tags: (
|
#run_job_flow(params = {}) ⇒ Types::RunJobFlowOutput
RunJobFlow creates and starts running a new cluster (job flow). The
cluster runs the steps specified. After the steps complete, the
cluster stops and the HDFS partition is lost. To prevent loss of data,
configure the last step of the job flow to store results in Amazon S3.
If the JobFlowInstancesConfig KeepJobFlowAliveWhenNoSteps parameter
is set to TRUE, the cluster transitions to the WAITING state rather
than shutting down after the steps have completed.
For additional protection, you can set the JobFlowInstancesConfig
TerminationProtected parameter to TRUE to lock the cluster and
prevent it from being terminated by API call, user intervention, or in
the event of a job flow error.
A maximum of 256 steps are allowed in each job flow.
If your cluster is long-running (such as a Hive data warehouse) or complex, you may require more than 256 steps to process your data. You can bypass the 256-step limitation in various ways, including using the SSH shell to connect to the master node and submitting queries directly to the software running on the master node, such as Hive and Hadoop.
For long-running clusters, we recommend that you periodically store your results.
784 |
# File 'sig/client.rbs', line 784
def run_job_flow: (
|
#set_keep_job_flow_alive_when_no_steps(params = {}) ⇒ Struct
You can use the SetKeepJobFlowAliveWhenNoSteps to configure a
cluster (job flow) to terminate after the step execution, i.e., all
your steps are executed. If you want a transient cluster that shuts
down after the last of the current executing steps are completed, you
can configure SetKeepJobFlowAliveWhenNoSteps to false. If you want a
long running cluster, configure SetKeepJobFlowAliveWhenNoSteps to
true.
For more information, see Managing Cluster Termination in the Amazon EMR Management Guide.
907 |
# File 'sig/client.rbs', line 907
def set_keep_job_flow_alive_when_no_steps: (
|
#set_termination_protection(params = {}) ⇒ Struct
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
SetTerminationProtection on a cluster is similar to calling the
Amazon EC2 DisableAPITermination API on all Amazon EC2 instances in
a cluster.
SetTerminationProtection 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 recover any data stored in their
ephemeral instance storage.
To terminate a cluster that has been locked by setting
SetTerminationProtection to true, you must first unlock the job
flow by a subsequent call to SetTerminationProtection in which you
set the value to false.
For more information, see Managing Cluster Termination in the Amazon EMR Management Guide.
914 |
# File 'sig/client.rbs', line 914
def set_termination_protection: (
|
#set_unhealthy_node_replacement(params = {}) ⇒ Struct
Specify whether to enable unhealthy node replacement, which lets
Amazon EMR gracefully replace core nodes on a cluster if any nodes
become unhealthy. For example, a node becomes unhealthy if disk usage
is above 90%. If unhealthy node replacement is on and
TerminationProtected are off, Amazon EMR immediately terminates the
unhealthy core nodes. To use unhealthy node replacement and retain
unhealthy core nodes, use to turn on termination protection. In such
cases, Amazon EMR adds the unhealthy nodes to a denylist, reducing job
interruptions and failures.
If unhealthy node replacement is on, Amazon EMR notifies YARN and other applications on the cluster to stop scheduling tasks with these nodes, moves the data, and then terminates the nodes.
For more information, see graceful node replacement in the Amazon EMR Management Guide.
921 |
# File 'sig/client.rbs', line 921
def set_unhealthy_node_replacement: (
|
#set_visible_to_all_users(params = {}) ⇒ Struct
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 Identity and Access Management for Amazon EMR.
Sets the Cluster$VisibleToAllUsers value for an Amazon EMR cluster.
When true, IAM principals in the Amazon Web Services account can
perform Amazon EMR cluster actions that their IAM policies allow. When
false, 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.
This action works on running clusters. When you create a cluster, use the RunJobFlowInput$VisibleToAllUsers parameter.
For more information, see Understanding the Amazon EMR Cluster VisibleToAllUsers Setting in the Amazon EMR Management Guide.
928 |
# File 'sig/client.rbs', line 928
def set_visible_to_all_users: (
|
#start_notebook_execution(params = {}) ⇒ Types::StartNotebookExecutionOutput
Starts a notebook execution.
939 |
# File 'sig/client.rbs', line 939
def start_notebook_execution: (
|
#start_session(params = {}) ⇒ Types::StartSessionOutput
Creates and starts a new Spark Connect session on the specified
cluster. The cluster must be in the RUNNING or WAITING state and
have sessions enabled. This operation is supported in Amazon EMR Spark
8.0.0 and later.
980 |
# File 'sig/client.rbs', line 980
def start_session: (
|
#stop_notebook_execution(params = {}) ⇒ Struct
Stops a notebook execution.
1022 |
# File 'sig/client.rbs', line 1022
def stop_notebook_execution: (
|
#terminate_job_flows(params = {}) ⇒ Struct
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 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.
The maximum number of clusters allowed is 10. The call to
TerminateJobFlows 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 Amazon
EC2 instances.
1028 |
# File 'sig/client.rbs', line 1028
def terminate_job_flows: (
|
#terminate_session(params = {}) ⇒ Types::TerminateSessionOutput
Terminates an active session. After you call this operation, the
session enters the TERMINATING state and then transitions to
TERMINATED.
1040 |
# File 'sig/client.rbs', line 1040
def terminate_session: (
|
#update_studio(params = {}) ⇒ Struct
Updates an Amazon EMR Studio configuration, including attributes such as name, description, and subnets.
1047 |
# File 'sig/client.rbs', line 1047
def update_studio: (
|
#update_studio_session_mapping(params = {}) ⇒ Struct
Updates the session policy attached to the user or group for the specified Amazon EMR Studio.
1058 |
# File 'sig/client.rbs', line 1058
def update_studio_session_mapping: (
|
#wait_until(waiter_name, params = {}, options = {}) {|w.waiter| ... } ⇒ Boolean
Polls an API operation until a resource enters a desired state.
Basic Usage
A waiter will call an API operation until:
- It is successful
- It enters a terminal state
- It makes the maximum number of attempts
In between attempts, the waiter will sleep.
# polls in a loop, sleeping between attempts
client.wait_until(waiter_name, params)
Configuration
You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You can pass configuration as the final arguments hash.
# poll for ~25 seconds
client.wait_until(waiter_name, params, {
max_attempts: 5,
delay: 5,
})
Callbacks
You can be notified before each polling attempt and before each
delay. If you throw :success or :failure from these callbacks,
it will terminate the waiter.
started_at = Time.now
client.wait_until(waiter_name, params, {
# disable max attempts
max_attempts: nil,
# poll for 1 hour, instead of a number of attempts
before_wait: -> (attempts, response) do
throw :failure if Time.now - started_at > 3600
end
})
Handling Errors
When a waiter is unsuccessful, it will raise an error. All of the failure errors extend from Waiters::Errors::WaiterFailed.
begin
client.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
# resource did not enter the desired state in time
end
Valid Waiters
The following table lists the valid waiter names, the operations they call,
and the default :delay and :max_attempts values.
| waiter_name | params | :delay | :max_attempts |
|---|---|---|---|
| cluster_running | #describe_cluster | 30 | 60 |
| cluster_terminated | #describe_cluster | 30 | 60 |
| step_complete | #describe_step | 30 | 60 |
1068 |
# File 'sig/client.rbs', line 1068
def wait_until: (:cluster_running waiter_name,
|
#waiter_names ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
5043 5044 5045 |
# File 'lib/aws-sdk-emr/client.rb', line 5043 def waiter_names waiters.keys end |