Class: Aws::EMR::Client

Inherits:
Seahorse::Client::Base show all
Includes:
ClientStubs
Defined in:
gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb

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.

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from ClientStubs

#api_requests, #stub_data, #stub_responses

Methods inherited from Seahorse::Client::Base

add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(options) ⇒ Client

Returns a new instance of Client.

Parameters:

  • options (Hash)

Options Hash (options):

  • :plugins (Array<Seahorse::Client::Plugin>) — default: []]

    A list of plugins to apply to the client. Each plugin is either a class name or an instance of a plugin class.

  • :credentials (required, Aws::CredentialProvider)

    Your AWS credentials. This can be an instance of any one of the following classes:

    • Aws::Credentials - Used for configuring static, non-refreshing credentials.

    • Aws::SharedCredentials - Used for loading static credentials from a shared file, such as ~/.aws/config.

    • Aws::AssumeRoleCredentials - Used when you need to assume a role.

    • Aws::AssumeRoleWebIdentityCredentials - Used when you need to assume a role after providing credentials via the web.

    • Aws::SSOCredentials - Used for loading credentials from AWS SSO using an access token generated from aws login.

    • Aws::ProcessCredentials - Used for loading credentials from a process that outputs to stdout.

    • Aws::InstanceProfileCredentials - Used for loading credentials from an EC2 IMDS on an EC2 instance.

    • Aws::ECSCredentials - Used for loading credentials from instances running in ECS.

    • Aws::CognitoIdentityCredentials - Used for loading credentials from the Cognito Identity service.

    When :credentials are not configured directly, the following locations will be searched for credentials:

    • Aws.config[:credentials]
    • The :access_key_id, :secret_access_key, :session_token, and :account_id options.
    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY'], ENV['AWS_SESSION_TOKEN'], and ENV['AWS_ACCOUNT_ID']
    • ~/.aws/credentials
    • ~/.aws/config
    • EC2/ECS IMDS instance profile - When used by default, the timeouts are very aggressive. Construct and pass an instance of Aws::InstanceProfileCredentials or Aws::ECSCredentials to enable retries and extended timeouts. Instance profile credential fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED'] to true.
  • :region (required, String)

    The AWS region to connect to. The configured :region is used to determine the service :endpoint. When not passed, a default :region is searched for in the following locations:

    • Aws.config[:region]
    • ENV['AWS_REGION']
    • ENV['AMAZON_REGION']
    • ENV['AWS_DEFAULT_REGION']
    • ~/.aws/credentials
    • ~/.aws/config
  • :access_key_id (String)
  • :account_id (String)
  • :active_endpoint_cache (Boolean) — default: false

    When set to true, a thread polling for endpoints will be running in the background every 60 secs (default). Defaults to false.

  • :adaptive_retry_wait_to_fill (Boolean) — default: true

    Used only in adaptive retry mode. When true, the request will sleep until there is sufficent client side capacity to retry the request. When false, the request will raise a RetryCapacityNotAvailableError and will not retry instead of sleeping.

  • :client_side_monitoring (Boolean) — default: false

    When true, client-side metrics will be collected for all API requests from this client.

  • :client_side_monitoring_client_id (String) — default: ""

    Allows you to provide an identifier for this client which will be attached to all generated client side metrics. Defaults to an empty string.

  • :client_side_monitoring_host (String) — default: "127.0.0.1"

    Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_port (Integer) — default: 31000

    Required for publishing client metrics. The port that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher) — default: Aws::ClientSideMonitoring::Publisher

    Allows you to provide a custom client-side monitoring publisher class. By default, will use the Client Side Monitoring Agent Publisher.

  • :convert_params (Boolean) — default: true

    When true, an attempt is made to coerce request parameters into the required types.

  • :correct_clock_skew (Boolean) — default: true

    Used only in standard and adaptive retry modes. Specifies whether to apply a clock skew correction and retry requests with skewed client clocks.

  • :defaults_mode (String) — default: "legacy"

    See DefaultsModeConfiguration for a list of the accepted modes and the configuration defaults that are included.

  • :disable_host_prefix_injection (Boolean) — default: false

    Set to true to disable SDK automatically adding host prefix to default service endpoint when available.

  • :disable_request_compression (Boolean) — default: false

    When set to 'true' the request body will not be compressed for supported operations.

  • :endpoint (String, URI::HTTPS, URI::HTTP)

    Normally you should not configure the :endpoint option directly. This is normally constructed from the :region option. Configuring :endpoint is normally reserved for connecting to test or custom endpoints. The endpoint should be a URI formatted like:

    'http://example.com'
    'https://example.com'
    'http://example.com:123'
    
  • :endpoint_cache_max_entries (Integer) — default: 1000

    Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000.

  • :endpoint_cache_max_threads (Integer) — default: 10

    Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.

  • :endpoint_cache_poll_interval (Integer) — default: 60

    When :endpoint_discovery and :active_endpoint_cache is enabled, Use this option to config the time interval in seconds for making requests fetching endpoints information. Defaults to 60 sec.

  • :endpoint_discovery (Boolean) — default: false

    When set to true, endpoint discovery will be enabled for operations when available.

  • :ignore_configured_endpoint_urls (Boolean)

    Setting to true disables use of endpoint URLs provided via environment variables and the shared configuration file.

  • :log_formatter (Aws::Log::Formatter) — default: Aws::Log::Formatter.default

    The log formatter.

  • :log_level (Symbol) — default: :info

    The log level to send messages to the :logger at.

  • :logger (Logger)

    The Logger instance to send log messages to. If this option is not set, logging will be disabled.

  • :max_attempts (Integer) — default: 3

    An integer representing the maximum number attempts that will be made for a single request, including the initial attempt. For example, setting this value to 5 will result in a request being retried up to 4 times. Used in standard and adaptive retry modes.

  • :profile (String) — default: "default"

    Used when loading credentials from the shared credentials file at HOME/.aws/credentials. When not specified, 'default' is used.

  • :request_min_compression_size_bytes (Integer) — default: 10240

    The minimum size in bytes that triggers compression for request bodies. The value must be non-negative integer value between 0 and 10485780 bytes inclusive.

  • :retry_backoff (Proc)

    A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay. This option is only used in the legacy retry mode.

  • :retry_base_delay (Float) — default: 0.3

    The base delay in seconds used by the default backoff function. This option is only used in the legacy retry mode.

  • :retry_jitter (Symbol) — default: :none

    A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number. This option is only used in the legacy retry mode.

    @see https://www.awsarchitectureblog.com/2015/03/backoff.html

  • :retry_limit (Integer) — default: 3

    The maximum number of times to retry failed requests. Only ~ 500 level server errors and certain ~ 400 level client errors are retried. Generally, these are throttling errors, data checksum errors, networking errors, timeout errors, auth errors, endpoint discovery, and errors from expired credentials. This option is only used in the legacy retry mode.

  • :retry_max_delay (Integer) — default: 0

    The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function. This option is only used in the legacy retry mode.

  • :retry_mode (String) — default: "legacy"

    Specifies which retry algorithm to use. Values are:

    • legacy - The pre-existing retry behavior. This is default value if no retry mode is provided.

    • standard - A standardized set of retry rules across the AWS SDKs. This includes support for retry quotas, which limit the number of unsuccessful retries a client can make.

    • adaptive - An experimental retry mode that includes all the functionality of standard mode along with automatic client side throttling. This is a provisional mode that may change behavior in the future.

  • :sdk_ua_app_id (String)

    A unique and opaque application ID that is appended to the User-Agent header as app/sdk_ua_app_id. It should have a maximum length of 50. This variable is sourced from environment variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.

  • :secret_access_key (String)
  • :session_token (String)
  • :sigv4a_signing_region_set (Array)

    A list of regions that should be signed with SigV4a signing. When not passed, a default :sigv4a_signing_region_set is searched for in the following locations:

    • Aws.config[:sigv4a_signing_region_set]
    • ENV['AWS_SIGV4A_SIGNING_REGION_SET']
    • ~/.aws/config
  • :simple_json (Boolean) — default: false

    Disables request parameter conversion, validation, and formatting. Also disables response data type conversions. The request parameters hash must be formatted exactly as the API expects.This option is useful when you want to ensure the highest level of performance by avoiding overhead of walking request parameters and response data structures.

  • :stub_responses (Boolean) — default: false

    Causes the client to return stubbed responses. By default fake responses are generated and returned. You can specify the response data to return or errors to raise by calling ClientStubs#stub_responses. See ClientStubs for more information.

    Please note When response stubbing is enabled, no HTTP requests are made, and retries are disabled.

  • :telemetry_provider (Aws::Telemetry::TelemetryProviderBase) — default: Aws::Telemetry::NoOpTelemetryProvider

    Allows you to provide a telemetry provider, which is used to emit telemetry data. By default, uses NoOpTelemetryProvider which will not record or emit any telemetry data. The SDK supports the following telemetry providers:

    • OpenTelemetry (OTel) - To use the OTel provider, install and require the opentelemetry-sdk gem and then, pass in an instance of a Aws::Telemetry::OTelProvider for telemetry provider.
  • :token_provider (Aws::TokenProvider)

    A Bearer Token Provider. This can be an instance of any one of the following classes:

    • Aws::StaticTokenProvider - Used for configuring static, non-refreshing tokens.

    • Aws::SSOTokenProvider - Used for loading tokens from AWS SSO using an access token generated from aws login.

    When :token_provider is not configured directly, the Aws::TokenProviderChain will be used to search for tokens configured for your profile in shared configuration files.

  • :use_dualstack_endpoint (Boolean)

    When set to true, dualstack enabled endpoints (with .aws TLD) will be used if available.

  • :use_fips_endpoint (Boolean)

    When set to true, fips compatible endpoints will be used if available. When a fips region is used, the region is normalized and this config is set to true.

  • :validate_params (Boolean) — default: true

    When true, request parameters are validated before sending the request.

  • :endpoint_provider (Aws::EMR::EndpointProvider)

    The endpoint provider used to resolve endpoints. Any object that responds to #resolve_endpoint(parameters) where parameters is a Struct similar to Aws::EMR::EndpointParameters.

  • :http_continue_timeout (Float) — default: 1

    The number of seconds to wait for a 100-continue response before sending the request body. This option has no effect unless the request has "Expect" header set to "100-continue". Defaults to nil which disables this behaviour. This value can safely be set per request on the session.

  • :http_idle_timeout (Float) — default: 5

    The number of seconds a connection is allowed to sit idle before it is considered stale. Stale connections are closed and removed from the pool before making a request.

  • :http_open_timeout (Float) — default: 15

    The default number of seconds to wait for response data. This value can safely be set per-request on the session.

  • :http_proxy (URI::HTTP, String)

    A proxy to send requests through. Formatted like 'http://proxy.com:123'.

  • :http_read_timeout (Float) — default: 60

    The default number of seconds to wait for response data. This value can safely be set per-request on the session.

  • :http_wire_trace (Boolean) — default: false

    When true, HTTP debug output will be sent to the :logger.

  • :on_chunk_received (Proc)

    When a Proc object is provided, it will be used as callback when each chunk of the response body is received. It provides three arguments: the chunk, the number of bytes received, and the total number of bytes in the response (or nil if the server did not send a content-length).

  • :on_chunk_sent (Proc)

    When a Proc object is provided, it will be used as callback when each chunk of the request body is sent. It provides three arguments: the chunk, the number of bytes read from the body, and the total number of bytes in the body.

  • :raise_response_errors (Boolean) — default: true

    When true, response errors are raised.

  • :ssl_ca_bundle (String)

    Full path to the SSL certificate authority bundle file that should be used when verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.

  • :ssl_ca_directory (String)

    Full path of the directory that contains the unbundled SSL certificate authority files for verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.

  • :ssl_ca_store (String)

    Sets the X509::Store to verify peer certificate.

  • :ssl_cert (OpenSSL::X509::Certificate)

    Sets a client certificate when creating http connections.

  • :ssl_key (OpenSSL::PKey)

    Sets a client key when creating http connections.

  • :ssl_timeout (Float)

    Sets the SSL timeout in seconds

  • :ssl_verify_peer (Boolean) — default: true

    When true, SSL peer certificates are verified when establishing a connection.



451
452
453
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 451

def initialize(*args)
  super
end

Instance Method Details

#add_instance_fleet(params = {}) ⇒ Types::AddInstanceFleetOutput

Adds an instance fleet to a running cluster.

The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x.

Examples:

Request syntax with placeholder values


resp = client.add_instance_fleet({
  cluster_id: "XmlStringMaxLen256", # required
  instance_fleet: { # required
    name: "XmlStringMaxLen256",
    instance_fleet_type: "MASTER", # required, accepts MASTER, CORE, TASK
    target_on_demand_capacity: 1,
    target_spot_capacity: 1,
    instance_type_configs: [
      {
        instance_type: "InstanceType", # required
        weighted_capacity: 1,
        bid_price: "XmlStringMaxLen256",
        bid_price_as_percentage_of_on_demand_price: 1.0,
        ebs_configuration: {
          ebs_block_device_configs: [
            {
              volume_specification: { # required
                volume_type: "String", # required
                iops: 1,
                size_in_gb: 1, # required
                throughput: 1,
              },
              volumes_per_instance: 1,
            },
          ],
          ebs_optimized: false,
        },
        configurations: [
          {
            classification: "String",
            configurations: {
              # recursive ConfigurationList
            },
            properties: {
              "String" => "String",
            },
          },
        ],
        custom_ami_id: "XmlStringMaxLen256",
        priority: 1.0,
      },
    ],
    launch_specifications: {
      spot_specification: {
        timeout_duration_minutes: 1, # required
        timeout_action: "SWITCH_TO_ON_DEMAND", # required, accepts SWITCH_TO_ON_DEMAND, TERMINATE_CLUSTER
        block_duration_minutes: 1,
        allocation_strategy: "capacity-optimized", # accepts capacity-optimized, price-capacity-optimized, lowest-price, diversified, capacity-optimized-prioritized
      },
      on_demand_specification: {
        allocation_strategy: "lowest-price", # required, accepts lowest-price, prioritized
        capacity_reservation_options: {
          usage_strategy: "use-capacity-reservations-first", # accepts use-capacity-reservations-first
          capacity_reservation_preference: "open", # accepts open, none
          capacity_reservation_resource_group_arn: "XmlStringMaxLen256",
        },
      },
    },
    resize_specifications: {
      spot_resize_specification: {
        timeout_duration_minutes: 1,
        allocation_strategy: "capacity-optimized", # accepts capacity-optimized, price-capacity-optimized, lowest-price, diversified, capacity-optimized-prioritized
      },
      on_demand_resize_specification: {
        timeout_duration_minutes: 1,
        allocation_strategy: "lowest-price", # accepts lowest-price, prioritized
        capacity_reservation_options: {
          usage_strategy: "use-capacity-reservations-first", # accepts use-capacity-reservations-first
          capacity_reservation_preference: "open", # accepts open, none
          capacity_reservation_resource_group_arn: "XmlStringMaxLen256",
        },
      },
    },
    context: "XmlStringMaxLen256",
  },
})

Response structure


resp.cluster_id #=> String
resp.instance_fleet_id #=> String
resp.cluster_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :cluster_id (required, String)

    The unique identifier of the cluster.

  • :instance_fleet (required, Types::InstanceFleetConfig)

    Specifies the configuration of the instance fleet.

Returns:

See Also:



565
566
567
568
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 565

def add_instance_fleet(params = {}, options = {})
  req = build_request(:add_instance_fleet, params)
  req.send_request(options)
end

#add_instance_groups(params = {}) ⇒ Types::AddInstanceGroupsOutput

Adds one or more instance groups to a running cluster.

Examples:

Request syntax with placeholder values


resp = client.add_instance_groups({
  instance_groups: [ # required
    {
      name: "XmlStringMaxLen256",
      market: "ON_DEMAND", # accepts ON_DEMAND, SPOT
      instance_role: "MASTER", # required, accepts MASTER, CORE, TASK
      bid_price: "XmlStringMaxLen256",
      instance_type: "InstanceType", # required
      instance_count: 1, # required
      configurations: [
        {
          classification: "String",
          configurations: {
            # recursive ConfigurationList
          },
          properties: {
            "String" => "String",
          },
        },
      ],
      ebs_configuration: {
        ebs_block_device_configs: [
          {
            volume_specification: { # required
              volume_type: "String", # required
              iops: 1,
              size_in_gb: 1, # required
              throughput: 1,
            },
            volumes_per_instance: 1,
          },
        ],
        ebs_optimized: false,
      },
      auto_scaling_policy: {
        constraints: { # required
          min_capacity: 1, # required
          max_capacity: 1, # required
        },
        rules: [ # required
          {
            name: "String", # required
            description: "String",
            action: { # required
              market: "ON_DEMAND", # accepts ON_DEMAND, SPOT
              simple_scaling_policy_configuration: { # required
                adjustment_type: "CHANGE_IN_CAPACITY", # accepts CHANGE_IN_CAPACITY, PERCENT_CHANGE_IN_CAPACITY, EXACT_CAPACITY
                scaling_adjustment: 1, # required
                cool_down: 1,
              },
            },
            trigger: { # required
              cloud_watch_alarm_definition: { # required
                comparison_operator: "GREATER_THAN_OR_EQUAL", # required, accepts GREATER_THAN_OR_EQUAL, GREATER_THAN, LESS_THAN, LESS_THAN_OR_EQUAL
                evaluation_periods: 1,
                metric_name: "String", # required
                namespace: "String",
                period: 1, # required
                statistic: "SAMPLE_COUNT", # accepts SAMPLE_COUNT, AVERAGE, SUM, MINIMUM, MAXIMUM
                threshold: 1.0, # required
                unit: "NONE", # accepts NONE, SECONDS, MICRO_SECONDS, MILLI_SECONDS, BYTES, KILO_BYTES, MEGA_BYTES, GIGA_BYTES, TERA_BYTES, BITS, KILO_BITS, MEGA_BITS, GIGA_BITS, TERA_BITS, PERCENT, COUNT, BYTES_PER_SECOND, KILO_BYTES_PER_SECOND, MEGA_BYTES_PER_SECOND, GIGA_BYTES_PER_SECOND, TERA_BYTES_PER_SECOND, BITS_PER_SECOND, KILO_BITS_PER_SECOND, MEGA_BITS_PER_SECOND, GIGA_BITS_PER_SECOND, TERA_BITS_PER_SECOND, COUNT_PER_SECOND
                dimensions: [
                  {
                    key: "String",
                    value: "String",
                  },
                ],
              },
            },
          },
        ],
      },
      custom_ami_id: "XmlStringMaxLen256",
    },
  ],
  job_flow_id: "XmlStringMaxLen256", # required
})

Response structure


resp.job_flow_id #=> String
resp.instance_group_ids #=> Array
resp.instance_group_ids[0] #=> String
resp.cluster_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :instance_groups (required, Array<Types::InstanceGroupConfig>)

    Instance groups to add.

  • :job_flow_id (required, String)

    Job flow in which to add the instance groups.

Returns:

See Also:



675
676
677
678
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 675

def add_instance_groups(params = {}, options = {})
  req = build_request(:add_instance_groups, params)
  req.send_request(options)
end

#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.

The string values passed into HadoopJarStep object cannot exceed a total of 10240 characters.

Examples:

Request syntax with placeholder values


resp = client.add_job_flow_steps({
  job_flow_id: "XmlStringMaxLen256", # required
  steps: [ # required
    {
      name: "XmlStringMaxLen256", # required
      action_on_failure: "TERMINATE_JOB_FLOW", # accepts TERMINATE_JOB_FLOW, TERMINATE_CLUSTER, CANCEL_AND_WAIT, CONTINUE
      hadoop_jar_step: { # required
        properties: [
          {
            key: "XmlString",
            value: "XmlString",
          },
        ],
        jar: "XmlString", # required
        main_class: "XmlString",
        args: ["XmlString"],
      },
    },
  ],
  execution_role_arn: "ArnType",
})

Response structure


resp.step_ids #=> Array
resp.step_ids[0] #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :job_flow_id (required, String)

    A string that uniquely identifies the job flow. This identifier is returned by RunJobFlow and can also be obtained from ListClusters.

  • :steps (required, Array<Types::StepConfig>)

    A list of StepConfig to be executed by the job flow.

  • :execution_role_arn (String)

    The Amazon Resource Name (ARN) of the runtime role for a step on the cluster. The runtime role can be a cross-account IAM role. The runtime role ARN is a combination of account ID, role name, and role type using the following format: arn:partition:service:region:account:resource.

    For example, arn:aws:IAM::1234567890:role/ReadOnly is a correctly formatted runtime role ARN.

Returns:

See Also:



762
763
764
765
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 762

def add_job_flow_steps(params = {}, options = {})
  req = build_request(:add_job_flow_steps, params)
  req.send_request(options)
end

#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.

Examples:

Request syntax with placeholder values


resp = client.add_tags({
  resource_id: "ResourceId", # required
  tags: [ # required
    {
      key: "String",
      value: "String",
    },
  ],
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_id (required, String)

    The Amazon EMR resource identifier to which tags will be added. For example, a cluster identifier or an Amazon EMR Studio ID.

  • :tags (required, Array<Types::Tag>)

    A list of tags to associate with a resource. 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.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



804
805
806
807
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 804

def add_tags(params = {}, options = {})
  req = build_request(:add_tags, params)
  req.send_request(options)
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.

Examples:

Request syntax with placeholder values


resp = client.cancel_steps({
  cluster_id: "XmlStringMaxLen256", # required
  step_ids: ["XmlStringMaxLen256"], # required
  step_cancellation_option: "SEND_INTERRUPT", # accepts SEND_INTERRUPT, TERMINATE_PROCESS
})

Response structure


resp.cancel_steps_info_list #=> Array
resp.cancel_steps_info_list[0].step_id #=> String
resp.cancel_steps_info_list[0].status #=> String, one of "SUBMITTED", "FAILED"
resp.cancel_steps_info_list[0].reason #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :cluster_id (required, String)

    The ClusterID for the specified steps that will be canceled. Use RunJobFlow and ListClusters to get ClusterIDs.

  • :step_ids (required, Array<String>)

    The list of StepIDs to cancel. Use ListSteps to get steps and their states for the specified cluster.

  • :step_cancellation_option (String)

    The option to choose to cancel RUNNING steps. By default, the value is SEND_INTERRUPT.

Returns:

See Also:



854
855
856
857
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 854

def cancel_steps(params = {}, options = {})
  req = build_request(:cancel_steps, params)
  req.send_request(options)
end

#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.

Examples:

Request syntax with placeholder values


resp = client.create_security_configuration({
  name: "XmlString", # required
  security_configuration: "String", # required
})

Response structure


resp.name #=> String
resp.creation_date_time #=> Time

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :name (required, String)

    The name of the security configuration.

  • :security_configuration (required, String)

    The security configuration details in JSON format. For JSON parameters and examples, see Use Security Configurations to Set Up Cluster Security in the Amazon EMR Management Guide.

Returns:

See Also:



895
896
897
898
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 895

def create_security_configuration(params = {}, options = {})
  req = build_request(:create_security_configuration, params)
  req.send_request(options)
end

#create_studio(params = {}) ⇒ Types::CreateStudioOutput

Creates a new Amazon EMR Studio.

Examples:

Request syntax with placeholder values


resp = client.create_studio({
  name: "XmlStringMaxLen256", # required
  description: "XmlStringMaxLen256",
  auth_mode: "SSO", # required, accepts SSO, IAM
  vpc_id: "XmlStringMaxLen256", # required
  subnet_ids: ["String"], # required
  service_role: "XmlString", # required
  user_role: "XmlString",
  workspace_security_group_id: "XmlStringMaxLen256", # required
  engine_security_group_id: "XmlStringMaxLen256", # required
  default_s3_location: "XmlString", # required
  idp_auth_url: "XmlString",
  idp_relay_state_parameter_name: "XmlStringMaxLen256",
  tags: [
    {
      key: "String",
      value: "String",
    },
  ],
  trusted_identity_propagation_enabled: false,
  idc_user_assignment: "REQUIRED", # accepts REQUIRED, OPTIONAL
  idc_instance_arn: "ArnType",
  encryption_key_arn: "XmlString",
})

Response structure


resp.studio_id #=> String
resp.url #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :name (required, String)

    A descriptive name for the Amazon EMR Studio.

  • :description (String)

    A detailed description of the Amazon EMR Studio.

  • :auth_mode (required, String)

    Specifies whether the Studio authenticates users using IAM or IAM Identity Center.

  • :vpc_id (required, String)

    The ID of the Amazon Virtual Private Cloud (Amazon VPC) to associate with the Studio.

  • :subnet_ids (required, Array<String>)

    A list of subnet IDs to associate with the Amazon EMR Studio. A Studio can have a maximum of 5 subnets. The subnets must belong to the VPC specified by VpcId. Studio users can create a Workspace in any of the specified subnets.

  • :service_role (required, String)

    The IAM role that the Amazon EMR Studio assumes. The service role provides a way for Amazon EMR Studio to interoperate with other Amazon Web Services services.

  • :user_role (String)

    The IAM user role that users and groups assume when logged in to an Amazon EMR Studio. Only specify a UserRole when you use IAM Identity Center authentication. The permissions attached to the UserRole can be scoped down for each user or group using session policies.

  • :workspace_security_group_id (required, String)

    The ID of the Amazon EMR Studio Workspace security group. The Workspace security group allows outbound network traffic to resources in the Engine security group, and it must be in the same VPC specified by VpcId.

  • :engine_security_group_id (required, String)

    The ID of the Amazon EMR Studio Engine security group. The Engine security group allows inbound network traffic from the Workspace security group, and it must be in the same VPC specified by VpcId.

  • :default_s3_location (required, String)

    The Amazon S3 location to back up Amazon EMR Studio Workspaces and notebook files.

  • :idp_auth_url (String)

    The authentication endpoint of your identity provider (IdP). Specify this value when you use IAM authentication and want to let federated users log in to a Studio with the Studio URL and credentials from your IdP. Amazon EMR Studio redirects users to this endpoint to enter credentials.

  • :idp_relay_state_parameter_name (String)

    The name that your identity provider (IdP) uses for its RelayState parameter. For example, RelayState or TargetSource. Specify this value when you use IAM authentication and want to let federated users log in to a Studio using the Studio URL. The RelayState parameter differs by IdP.

  • :tags (Array<Types::Tag>)

    A list of tags to associate with the Amazon EMR Studio. 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.

  • :trusted_identity_propagation_enabled (Boolean)

    A Boolean indicating whether to enable Trusted identity propagation for the Studio. The default value is false.

  • :idc_user_assignment (String)

    Specifies whether IAM Identity Center user assignment is REQUIRED or OPTIONAL. If the value is set to REQUIRED, users must be explicitly assigned to the Studio application to access the Studio.

  • :idc_instance_arn (String)

    The ARN of the IAM Identity Center instance to create the Studio application.

  • :encryption_key_arn (String)

    The KMS key identifier (ARN) used to encrypt Amazon EMR Studio workspace and notebook files when backed up to Amazon S3.

Returns:

See Also:



1026
1027
1028
1029
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 1026

def create_studio(params = {}, options = {})
  req = build_request(:create_studio, params)
  req.send_request(options)
end

#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.

Examples:

Request syntax with placeholder values


resp = client.create_studio_session_mapping({
  studio_id: "XmlStringMaxLen256", # required
  identity_id: "XmlStringMaxLen256",
  identity_name: "XmlStringMaxLen256",
  identity_type: "USER", # required, accepts USER, GROUP
  session_policy_arn: "XmlStringMaxLen256", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :studio_id (required, String)

    The ID of the Amazon EMR Studio to which the user or group will be mapped.

  • :identity_id (String)

    The globally unique identifier (GUID) of the user or group from the IAM Identity Center Identity Store. For more information, see UserId and GroupId in the IAM Identity Center Identity Store API Reference. Either IdentityName or IdentityId must be specified, but not both.

  • :identity_name (String)

    The name of the user or group. For more information, see UserName and DisplayName in the IAM Identity Center Identity Store API Reference. Either IdentityName or IdentityId must be specified, but not both.

  • :identity_type (required, String)

    Specifies whether the identity to map to the Amazon EMR Studio is a user or a group.

  • :session_policy_arn (required, String)

    The Amazon Resource Name (ARN) for the session policy that will be applied to the user or group. You should specify the ARN for the session policy that you want to apply, not the ARN of your user role. For more information, see Create an Amazon EMR Studio User Role with Session Policies.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1100
1101
1102
1103
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 1100

def create_studio_session_mapping(params = {}, options = {})
  req = build_request(:create_studio_session_mapping, params)
  req.send_request(options)
end

#delete_security_configuration(params = {}) ⇒ Struct

Deletes a security configuration.

Examples:

Request syntax with placeholder values


resp = client.delete_security_configuration({
  name: "XmlString", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :name (required, String)

    The name of the security configuration.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1122
1123
1124
1125
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 1122

def delete_security_configuration(params = {}, options = {})
  req = build_request(:delete_security_configuration, params)
  req.send_request(options)
end

#delete_studio(params = {}) ⇒ Struct

Removes an Amazon EMR Studio from the Studio metadata store.

Examples:

Request syntax with placeholder values


resp = client.delete_studio({
  studio_id: "XmlStringMaxLen256", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :studio_id (required, String)

    The ID of the Amazon EMR Studio.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1144
1145
1146
1147
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 1144

def delete_studio(params = {}, options = {})
  req = build_request(:delete_studio, params)
  req.send_request(options)
end

#delete_studio_session_mapping(params = {}) ⇒ Struct

Removes a user or group from an Amazon EMR Studio.

Examples:

Request syntax with placeholder values


resp = client.delete_studio_session_mapping({
  studio_id: "XmlStringMaxLen256", # required
  identity_id: "XmlStringMaxLen256",
  identity_name: "XmlStringMaxLen256",
  identity_type: "USER", # required, accepts USER, GROUP
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :studio_id (required, String)

    The ID of the Amazon EMR Studio.

  • :identity_id (String)

    The globally unique identifier (GUID) of the user or group to remove from the Amazon EMR Studio. For more information, see UserId and GroupId in the IAM Identity Center Identity Store API Reference. Either IdentityName or IdentityId must be specified.

  • :identity_name (String)

    The name of the user name or group to remove from the Amazon EMR Studio. For more information, see UserName and DisplayName in the IAM Identity Center Store API Reference. Either IdentityName or IdentityId must be specified.

  • :identity_type (required, String)

    Specifies whether the identity to delete from the Amazon EMR Studio is a user or a group.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1195
1196
1197
1198
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 1195

def delete_studio_session_mapping(params = {}, options = {})
  req = build_request(:delete_studio_session_mapping, params)
  req.send_request(options)
end

#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

Examples:

Request syntax with placeholder values


resp = client.describe_cluster({
  cluster_id: "ClusterId", # required
})

Response structure


resp.cluster.id #=> String
resp.cluster.name #=> String
resp.cluster.status.state #=> String, one of "STARTING", "BOOTSTRAPPING", "RUNNING", "WAITING", "TERMINATING", "TERMINATED", "TERMINATED_WITH_ERRORS"
resp.cluster.status.state_change_reason.code #=> String, one of "INTERNAL_ERROR", "VALIDATION_ERROR", "INSTANCE_FAILURE", "INSTANCE_FLEET_TIMEOUT", "BOOTSTRAP_FAILURE", "USER_REQUEST", "STEP_FAILURE", "ALL_STEPS_COMPLETED"
resp.cluster.status.state_change_reason.message #=> String
resp.cluster.status.timeline.creation_date_time #=> Time
resp.cluster.status.timeline.ready_date_time #=> Time
resp.cluster.status.timeline.end_date_time #=> Time
resp.cluster.status.error_details #=> Array
resp.cluster.status.error_details[0].error_code #=> String
resp.cluster.status.error_details[0].error_data #=> Array
resp.cluster.status.error_details[0].error_data[0] #=> Hash
resp.cluster.status.error_details[0].error_data[0]["String"] #=> String
resp.cluster.status.error_details[0].error_message #=> String
resp.cluster.ec2_instance_attributes.ec2_key_name #=> String
resp.cluster.ec2_instance_attributes.ec2_subnet_id #=> String
resp.cluster.ec2_instance_attributes.requested_ec2_subnet_ids #=> Array
resp.cluster.ec2_instance_attributes.requested_ec2_subnet_ids[0] #=> String
resp.cluster.ec2_instance_attributes.ec2_availability_zone #=> String
resp.cluster.ec2_instance_attributes.requested_ec2_availability_zones #=> Array
resp.cluster.ec2_instance_attributes.requested_ec2_availability_zones[0] #=> String
resp.cluster.ec2_instance_attributes.iam_instance_profile #=> String
resp.cluster.ec2_instance_attributes.emr_managed_master_security_group #=> String
resp.cluster.ec2_instance_attributes.emr_managed_slave_security_group #=> String
resp.cluster.ec2_instance_attributes.service_access_security_group #=> String
resp.cluster.ec2_instance_attributes.additional_master_security_groups #=> Array
resp.cluster.ec2_instance_attributes.additional_master_security_groups[0] #=> String
resp.cluster.ec2_instance_attributes.additional_slave_security_groups #=> Array
resp.cluster.ec2_instance_attributes.additional_slave_security_groups[0] #=> String
resp.cluster.instance_collection_type #=> String, one of "INSTANCE_FLEET", "INSTANCE_GROUP"
resp.cluster.log_uri #=> String
resp.cluster.log_encryption_kms_key_id #=> String
resp.cluster.requested_ami_version #=> String
resp.cluster.running_ami_version #=> String
resp.cluster.release_label #=> String
resp.cluster.auto_terminate #=> Boolean
resp.cluster.termination_protected #=> Boolean
resp.cluster.unhealthy_node_replacement #=> Boolean
resp.cluster.visible_to_all_users #=> Boolean
resp.cluster.applications #=> Array
resp.cluster.applications[0].name #=> String
resp.cluster.applications[0].version #=> String
resp.cluster.applications[0].args #=> Array
resp.cluster.applications[0].args[0] #=> String
resp.cluster.applications[0].additional_info #=> Hash
resp.cluster.applications[0].additional_info["String"] #=> String
resp.cluster.tags #=> Array
resp.cluster.tags[0].key #=> String
resp.cluster.tags[0].value #=> String
resp.cluster.service_role #=> String
resp.cluster.normalized_instance_hours #=> Integer
resp.cluster.master_public_dns_name #=> String
resp.cluster.configurations #=> Array
resp.cluster.configurations[0].classification #=> String
resp.cluster.configurations[0].configurations #=> Types::ConfigurationList
resp.cluster.configurations[0].properties #=> Hash
resp.cluster.configurations[0].properties["String"] #=> String
resp.cluster.security_configuration #=> String
resp.cluster.auto_scaling_role #=> String
resp.cluster.scale_down_behavior #=> String, one of "TERMINATE_AT_INSTANCE_HOUR", "TERMINATE_AT_TASK_COMPLETION"
resp.cluster.custom_ami_id #=> String
resp.cluster.ebs_root_volume_size #=> Integer
resp.cluster.repo_upgrade_on_boot #=> String, one of "SECURITY", "NONE"
resp.cluster.kerberos_attributes.realm #=> String
resp.cluster.kerberos_attributes.kdc_admin_password #=> String
resp.cluster.kerberos_attributes.cross_realm_trust_principal_password #=> String
resp.cluster.kerberos_attributes.ad_domain_join_user #=> String
resp.cluster.kerberos_attributes.ad_domain_join_password #=> String
resp.cluster.cluster_arn #=> String
resp.cluster.outpost_arn #=> String
resp.cluster.step_concurrency_level #=> Integer
resp.cluster.placement_groups #=> Array
resp.cluster.placement_groups[0].instance_role #=> String, one of "MASTER", "CORE", "TASK"
resp.cluster.placement_groups[0].placement_strategy #=> String, one of "SPREAD", "PARTITION", "CLUSTER", "NONE"
resp.cluster.os_release_label #=> String
resp.cluster.ebs_root_volume_iops #=> Integer
resp.cluster.ebs_root_volume_throughput #=> Integer

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :cluster_id (required, String)

    The identifier of the cluster to describe.

Returns:

See Also:



1306
1307
1308
1309
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 1306

def describe_cluster(params = {}, options = {})
  req = build_request(:describe_cluster, params)
  req.send_request(options)
end

#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.

Examples:

Request syntax with placeholder values


resp = client.describe_job_flows({
  created_after: Time.now,
  created_before: Time.now,
  job_flow_ids: ["XmlString"],
  job_flow_states: ["STARTING"], # accepts STARTING, BOOTSTRAPPING, RUNNING, WAITING, SHUTTING_DOWN, TERMINATED, COMPLETED, FAILED
})

Response structure


resp.job_flows #=> Array
resp.job_flows[0].job_flow_id #=> String
resp.job_flows[0].name #=> String
resp.job_flows[0].log_uri #=> String
resp.job_flows[0].log_encryption_kms_key_id #=> String
resp.job_flows[0].ami_version #=> String
resp.job_flows[0].execution_status_detail.state #=> String, one of "STARTING", "BOOTSTRAPPING", "RUNNING", "WAITING", "SHUTTING_DOWN", "TERMINATED", "COMPLETED", "FAILED"
resp.job_flows[0].execution_status_detail.creation_date_time #=> Time
resp.job_flows[0].execution_status_detail.start_date_time #=> Time
resp.job_flows[0].execution_status_detail.ready_date_time #=> Time
resp.job_flows[0].execution_status_detail.end_date_time #=> Time
resp.job_flows[0].execution_status_detail.last_state_change_reason #=> String
resp.job_flows[0].instances.master_instance_type #=> String
resp.job_flows[0].instances.master_public_dns_name #=> String
resp.job_flows[0].instances.master_instance_id #=> String
resp.job_flows[0].instances.slave_instance_type #=> String
resp.job_flows[0].instances.instance_count #=> Integer
resp.job_flows[0].instances.instance_groups #=> Array
resp.job_flows[0].instances.instance_groups[0].instance_group_id #=> String
resp.job_flows[0].instances.instance_groups[0].name #=> String
resp.job_flows[0].instances.instance_groups[0].market #=> String, one of "ON_DEMAND", "SPOT"
resp.job_flows[0].instances.instance_groups[0].instance_role #=> String, one of "MASTER", "CORE", "TASK"
resp.job_flows[0].instances.instance_groups[0].bid_price #=> String
resp.job_flows[0].instances.instance_groups[0].instance_type #=> String
resp.job_flows[0].instances.instance_groups[0].instance_request_count #=> Integer
resp.job_flows[0].instances.instance_groups[0].instance_running_count #=> Integer
resp.job_flows[0].instances.instance_groups[0].state #=> String, one of "PROVISIONING", "BOOTSTRAPPING", "RUNNING", "RECONFIGURING", "RESIZING", "SUSPENDED", "TERMINATING", "TERMINATED", "ARRESTED", "SHUTTING_DOWN", "ENDED"
resp.job_flows[0].instances.instance_groups[0].last_state_change_reason #=> String
resp.job_flows[0].instances.instance_groups[0].creation_date_time #=> Time
resp.job_flows[0].instances.instance_groups[0].start_date_time #=> Time
resp.job_flows[0].instances.instance_groups[0].ready_date_time #=> Time
resp.job_flows[0].instances.instance_groups[0].end_date_time #=> Time
resp.job_flows[0].instances.instance_groups[0].custom_ami_id #=> String
resp.job_flows[0].instances.normalized_instance_hours #=> Integer
resp.job_flows[0].instances.ec2_key_name #=> String
resp.job_flows[0].instances.ec2_subnet_id #=> String
resp.job_flows[0].instances.placement.availability_zone #=> String
resp.job_flows[0].instances.placement.availability_zones #=> Array
resp.job_flows[0].instances.placement.availability_zones[0] #=> String
resp.job_flows[0].instances.keep_job_flow_alive_when_no_steps #=> Boolean
resp.job_flows[0].instances.termination_protected #=> Boolean
resp.job_flows[0].instances.unhealthy_node_replacement #=> Boolean
resp.job_flows[0].instances.hadoop_version #=> String
resp.job_flows[0].steps #=> Array
resp.job_flows[0].steps[0].step_config.name #=> String
resp.job_flows[0].steps[0].step_config.action_on_failure #=> String, one of "TERMINATE_JOB_FLOW", "TERMINATE_CLUSTER", "CANCEL_AND_WAIT", "CONTINUE"
resp.job_flows[0].steps[0].step_config.hadoop_jar_step.properties #=> Array
resp.job_flows[0].steps[0].step_config.hadoop_jar_step.properties[0].key #=> String
resp.job_flows[0].steps[0].step_config.hadoop_jar_step.properties[0].value #=> String
resp.job_flows[0].steps[0].step_config.hadoop_jar_step.jar #=> String
resp.job_flows[0].steps[0].step_config.hadoop_jar_step.main_class #=> String
resp.job_flows[0].steps[0].step_config.hadoop_jar_step.args #=> Array
resp.job_flows[0].steps[0].step_config.hadoop_jar_step.args[0] #=> String
resp.job_flows[0].steps[0].execution_status_detail.state #=> String, one of "PENDING", "RUNNING", "CONTINUE", "COMPLETED", "CANCELLED", "FAILED", "INTERRUPTED"
resp.job_flows[0].steps[0].execution_status_detail.creation_date_time #=> Time
resp.job_flows[0].steps[0].execution_status_detail.start_date_time #=> Time
resp.job_flows[0].steps[0].execution_status_detail.end_date_time #=> Time
resp.job_flows[0].steps[0].execution_status_detail.last_state_change_reason #=> String
resp.job_flows[0].bootstrap_actions #=> Array
resp.job_flows[0].bootstrap_actions[0].bootstrap_action_config.name #=> String
resp.job_flows[0].bootstrap_actions[0].bootstrap_action_config.script_bootstrap_action.path #=> String
resp.job_flows[0].bootstrap_actions[0].bootstrap_action_config.script_bootstrap_action.args #=> Array
resp.job_flows[0].bootstrap_actions[0].bootstrap_action_config.script_bootstrap_action.args[0] #=> String
resp.job_flows[0].supported_products #=> Array
resp.job_flows[0].supported_products[0] #=> String
resp.job_flows[0].visible_to_all_users #=> Boolean
resp.job_flows[0].job_flow_role #=> String
resp.job_flows[0].service_role #=> String
resp.job_flows[0].auto_scaling_role #=> String
resp.job_flows[0].scale_down_behavior #=> String, one of "TERMINATE_AT_INSTANCE_HOUR", "TERMINATE_AT_TASK_COMPLETION"

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :created_after (Time, DateTime, Date, Integer, String)

    Return only job flows created after this date and time.

  • :created_before (Time, DateTime, Date, Integer, String)

    Return only job flows created before this date and time.

  • :job_flow_ids (Array<String>)

    Return only job flows whose job flow ID is contained in this list.

  • :job_flow_states (Array<String>)

    Return only job flows whose state is contained in this list.

Returns:

See Also:



1435
1436
1437
1438
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 1435

def describe_job_flows(params = {}, options = {})
  req = build_request(:describe_job_flows, params)
  req.send_request(options)
end

#describe_notebook_execution(params = {}) ⇒ Types::DescribeNotebookExecutionOutput

Provides details of a notebook execution.

Examples:

Request syntax with placeholder values


resp = client.describe_notebook_execution({
  notebook_execution_id: "XmlStringMaxLen256", # required
})

Response structure


resp.notebook_execution.notebook_execution_id #=> String
resp.notebook_execution.editor_id #=> String
resp.notebook_execution.execution_engine.id #=> String
resp.notebook_execution.execution_engine.type #=> String, one of "EMR"
resp.notebook_execution.execution_engine.master_instance_security_group_id #=> String
resp.notebook_execution.execution_engine.execution_role_arn #=> String
resp.notebook_execution.notebook_execution_name #=> String
resp.notebook_execution.notebook_params #=> String
resp.notebook_execution.status #=> String, one of "START_PENDING", "STARTING", "RUNNING", "FINISHING", "FINISHED", "FAILING", "FAILED", "STOP_PENDING", "STOPPING", "STOPPED"
resp.notebook_execution.start_time #=> Time
resp.notebook_execution.end_time #=> Time
resp.notebook_execution.arn #=> String
resp.notebook_execution.output_notebook_uri #=> String
resp.notebook_execution.last_state_change_reason #=> String
resp.notebook_execution.notebook_instance_security_group_id #=> String
resp.notebook_execution.tags #=> Array
resp.notebook_execution.tags[0].key #=> String
resp.notebook_execution.tags[0].value #=> String
resp.notebook_execution.notebook_s3_location.bucket #=> String
resp.notebook_execution.notebook_s3_location.key #=> String
resp.notebook_execution.output_notebook_s3_location.bucket #=> String
resp.notebook_execution.output_notebook_s3_location.key #=> String
resp.notebook_execution.output_notebook_format #=> String, one of "HTML"
resp.notebook_execution.environment_variables #=> Hash
resp.notebook_execution.environment_variables["XmlStringMaxLen256"] #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :notebook_execution_id (required, String)

    The unique identifier of the notebook execution.

Returns:

See Also:



1487
1488
1489
1490
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 1487

def describe_notebook_execution(params = {}, options = {})
  req = build_request(:describe_notebook_execution, params)
  req.send_request(options)
end

#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.

Examples:

Request syntax with placeholder values


resp = client.describe_release_label({
  release_label: "String",
  next_token: "String",
  max_results: 1,
})

Response structure


resp.release_label #=> String
resp.applications #=> Array
resp.applications[0].name #=> String
resp.applications[0].version #=> String
resp.next_token #=> String
resp.available_os_releases #=> Array
resp.available_os_releases[0].label #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :release_label (String)

    The target release label to be described.

  • :next_token (String)

    The pagination token. Reserved for future use. Currently set to null.

  • :max_results (Integer)

    Reserved for future use. Currently set to null.

Returns:

See Also:



1535
1536
1537
1538
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 1535

def describe_release_label(params = {}, options = {})
  req = build_request(:describe_release_label, params)
  req.send_request(options)
end

#describe_security_configuration(params = {}) ⇒ Types::DescribeSecurityConfigurationOutput

Provides the details of a security configuration by returning the configuration JSON.

Examples:

Request syntax with placeholder values


resp = client.describe_security_configuration({
  name: "XmlString", # required
})

Response structure


resp.name #=> String
resp.security_configuration #=> String
resp.creation_date_time #=> Time

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :name (required, String)

    The name of the security configuration.

Returns:

See Also:



1568
1569
1570
1571
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 1568

def describe_security_configuration(params = {}, options = {})
  req = build_request(:describe_security_configuration, params)
  req.send_request(options)
end

#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

Examples:

Request syntax with placeholder values


resp = client.describe_step({
  cluster_id: "ClusterId", # required
  step_id: "StepId", # required
})

Response structure


resp.step.id #=> String
resp.step.name #=> String
resp.step.config.jar #=> String
resp.step.config.properties #=> Hash
resp.step.config.properties["String"] #=> String
resp.step.config.main_class #=> String
resp.step.config.args #=> Array
resp.step.config.args[0] #=> String
resp.step.action_on_failure #=> String, one of "TERMINATE_JOB_FLOW", "TERMINATE_CLUSTER", "CANCEL_AND_WAIT", "CONTINUE"
resp.step.status.state #=> String, one of "PENDING", "CANCEL_PENDING", "RUNNING", "COMPLETED", "CANCELLED", "FAILED", "INTERRUPTED"
resp.step.status.state_change_reason.code #=> String, one of "NONE"
resp.step.status.state_change_reason.message #=> String
resp.step.status.failure_details.reason #=> String
resp.step.status.failure_details.message #=> String
resp.step.status.failure_details.log_file #=> String
resp.step.status.timeline.creation_date_time #=> Time
resp.step.status.timeline.start_date_time #=> Time
resp.step.status.timeline.end_date_time #=> Time
resp.step.execution_role_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :cluster_id (required, String)

    The identifier of the cluster with steps to describe.

  • :step_id (required, String)

    The identifier of the step to describe.

Returns:

See Also:



1623
1624
1625
1626
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 1623

def describe_step(params = {}, options = {})
  req = build_request(:describe_step, params)
  req.send_request(options)
end

#describe_studio(params = {}) ⇒ Types::DescribeStudioOutput

Returns details for the specified Amazon EMR Studio including ID, Name, VPC, Studio access URL, and so on.

Examples:

Request syntax with placeholder values


resp = client.describe_studio({
  studio_id: "XmlStringMaxLen256", # required
})

Response structure


resp.studio.studio_id #=> String
resp.studio.studio_arn #=> String
resp.studio.name #=> String
resp.studio.description #=> String
resp.studio.auth_mode #=> String, one of "SSO", "IAM"
resp.studio.vpc_id #=> String
resp.studio.subnet_ids #=> Array
resp.studio.subnet_ids[0] #=> String
resp.studio.service_role #=> String
resp.studio.user_role #=> String
resp.studio.workspace_security_group_id #=> String
resp.studio.engine_security_group_id #=> String
resp.studio.url #=> String
resp.studio.creation_time #=> Time
resp.studio.default_s3_location #=> String
resp.studio.idp_auth_url #=> String
resp.studio.idp_relay_state_parameter_name #=> String
resp.studio.tags #=> Array
resp.studio.tags[0].key #=> String
resp.studio.tags[0].value #=> String
resp.studio.idc_instance_arn #=> String
resp.studio.trusted_identity_propagation_enabled #=> Boolean
resp.studio.idc_user_assignment #=> String, one of "REQUIRED", "OPTIONAL"
resp.studio.encryption_key_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :studio_id (required, String)

    The Amazon EMR Studio ID.

Returns:

See Also:



1675
1676
1677
1678
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 1675

def describe_studio(params = {}, options = {})
  req = build_request(:describe_studio, params)
  req.send_request(options)
end

#get_auto_termination_policy(params = {}) ⇒ Types::GetAutoTerminationPolicyOutput

Returns the auto-termination policy for an Amazon EMR cluster.

Examples:

Request syntax with placeholder values


resp = client.get_auto_termination_policy({
  cluster_id: "ClusterId", # required
})

Response structure


resp.auto_termination_policy.idle_timeout #=> Integer

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :cluster_id (required, String)

    Specifies the ID of the Amazon EMR cluster for which the auto-termination policy will be fetched.

Returns:

See Also:



1704
1705
1706
1707
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 1704

def get_auto_termination_policy(params = {}, options = {})
  req = build_request(:get_auto_termination_policy, params)
  req.send_request(options)
end

#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.

Examples:

Response structure


resp.block_public_access_configuration.block_public_security_group_rules #=> Boolean
resp.block_public_access_configuration.permitted_public_security_group_rule_ranges #=> Array
resp.block_public_access_configuration.permitted_public_security_group_rule_ranges[0].min_range #=> Integer
resp.block_public_access_configuration.permitted_public_security_group_rule_ranges[0].max_range #=> Integer
resp..creation_date_time #=> Time
resp..created_by_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Returns:

See Also:



1736
1737
1738
1739
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 1736

def get_block_public_access_configuration(params = {}, options = {})
  req = build_request(:get_block_public_access_configuration, params)
  req.send_request(options)
end

#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.

Examples:

Request syntax with placeholder values


resp = client.get_cluster_session_credentials({
  cluster_id: "XmlStringMaxLen256", # required
  execution_role_arn: "ArnType",
})

Response structure


resp.credentials.username_password.username #=> String
resp.credentials.username_password.password #=> String
resp.expires_at #=> Time

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :cluster_id (required, String)

    The unique identifier of the cluster.

  • :execution_role_arn (String)

    The Amazon Resource Name (ARN) of the runtime role for interactive workload submission on the cluster. The runtime role can be a cross-account IAM role. The runtime role ARN is a combination of account ID, role name, and role type using the following format: arn:partition:service:region:account:resource.

Returns:

See Also:



1778
1779
1780
1781
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 1778

def get_cluster_session_credentials(params = {}, options = {})
  req = build_request(:get_cluster_session_credentials, params)
  req.send_request(options)
end

#get_managed_scaling_policy(params = {}) ⇒ Types::GetManagedScalingPolicyOutput

Fetches the attached managed scaling policy for an Amazon EMR cluster.

Examples:

Request syntax with placeholder values


resp = client.get_managed_scaling_policy({
  cluster_id: "ClusterId", # required
})

Response structure


resp.managed_scaling_policy.compute_limits.unit_type #=> String, one of "InstanceFleetUnits", "Instances", "VCPU"
resp.managed_scaling_policy.compute_limits.minimum_capacity_units #=> Integer
resp.managed_scaling_policy.compute_limits.maximum_capacity_units #=> Integer
resp.managed_scaling_policy.compute_limits.maximum_on_demand_capacity_units #=> Integer
resp.managed_scaling_policy.compute_limits.maximum_core_capacity_units #=> Integer

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :cluster_id (required, String)

    Specifies the ID of the cluster for which the managed scaling policy will be fetched.

Returns:

See Also:



1811
1812
1813
1814
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 1811

def get_managed_scaling_policy(params = {}, options = {})
  req = build_request(:get_managed_scaling_policy, params)
  req.send_request(options)
end

#get_studio_session_mapping(params = {}) ⇒ Types::GetStudioSessionMappingOutput

Fetches mapping details for the specified Amazon EMR Studio and identity (user or group).

Examples:

Request syntax with placeholder values


resp = client.get_studio_session_mapping({
  studio_id: "XmlStringMaxLen256", # required
  identity_id: "XmlStringMaxLen256",
  identity_name: "XmlStringMaxLen256",
  identity_type: "USER", # required, accepts USER, GROUP
})

Response structure


resp.session_mapping.studio_id #=> String
resp.session_mapping.identity_id #=> String
resp.session_mapping.identity_name #=> String
resp.session_mapping.identity_type #=> String, one of "USER", "GROUP"
resp.session_mapping.session_policy_arn #=> String
resp.session_mapping.creation_time #=> Time
resp.session_mapping.last_modified_time #=> Time

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :studio_id (required, String)

    The ID of the Amazon EMR Studio.

  • :identity_id (String)

    The globally unique identifier (GUID) of the user or group. For more information, see UserId and GroupId in the IAM Identity Center Identity Store API Reference. Either IdentityName or IdentityId must be specified.

  • :identity_name (String)

    The name of the user or group to fetch. For more information, see UserName and DisplayName in the IAM Identity Center Identity Store API Reference. Either IdentityName or IdentityId must be specified.

  • :identity_type (required, String)

    Specifies whether the identity to fetch is a user or a group.

Returns:

See Also:



1874
1875
1876
1877
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 1874

def get_studio_session_mapping(params = {}, options = {})
  req = build_request(:get_studio_session_mapping, params)
  req.send_request(options)
end

#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.

Examples:

Request syntax with placeholder values


resp = client.list_bootstrap_actions({
  cluster_id: "ClusterId", # required
  marker: "Marker",
})

Response structure


resp.bootstrap_actions #=> Array
resp.bootstrap_actions[0].name #=> String
resp.bootstrap_actions[0].script_path #=> String
resp.bootstrap_actions[0].args #=> Array
resp.bootstrap_actions[0].args[0] #=> String
resp.marker #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :cluster_id (required, String)

    The cluster identifier for the bootstrap actions to list.

  • :marker (String)

    The pagination token that indicates the next set of results to retrieve.

Returns:

See Also:



1916
1917
1918
1919
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 1916

def list_bootstrap_actions(params = {}, options = {})
  req = build_request(:list_bootstrap_actions, params)
  req.send_request(options)
end

#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.

Examples:

Request syntax with placeholder values


resp = client.list_clusters({
  created_after: Time.now,
  created_before: Time.now,
  cluster_states: ["STARTING"], # accepts STARTING, BOOTSTRAPPING, RUNNING, WAITING, TERMINATING, TERMINATED, TERMINATED_WITH_ERRORS
  marker: "Marker",
})

Response structure


resp.clusters #=> Array
resp.clusters[0].id #=> String
resp.clusters[0].name #=> String
resp.clusters[0].status.state #=> String, one of "STARTING", "BOOTSTRAPPING", "RUNNING", "WAITING", "TERMINATING", "TERMINATED", "TERMINATED_WITH_ERRORS"
resp.clusters[0].status.state_change_reason.code #=> String, one of "INTERNAL_ERROR", "VALIDATION_ERROR", "INSTANCE_FAILURE", "INSTANCE_FLEET_TIMEOUT", "BOOTSTRAP_FAILURE", "USER_REQUEST", "STEP_FAILURE", "ALL_STEPS_COMPLETED"
resp.clusters[0].status.state_change_reason.message #=> String
resp.clusters[0].status.timeline.creation_date_time #=> Time
resp.clusters[0].status.timeline.ready_date_time #=> Time
resp.clusters[0].status.timeline.end_date_time #=> Time
resp.clusters[0].status.error_details #=> Array
resp.clusters[0].status.error_details[0].error_code #=> String
resp.clusters[0].status.error_details[0].error_data #=> Array
resp.clusters[0].status.error_details[0].error_data[0] #=> Hash
resp.clusters[0].status.error_details[0].error_data[0]["String"] #=> String
resp.clusters[0].status.error_details[0].error_message #=> String
resp.clusters[0].normalized_instance_hours #=> Integer
resp.clusters[0].cluster_arn #=> String
resp.clusters[0].outpost_arn #=> String
resp.marker #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :created_after (Time, DateTime, Date, Integer, String)

    The creation date and time beginning value filter for listing clusters.

  • :created_before (Time, DateTime, Date, Integer, String)

    The creation date and time end value filter for listing clusters.

  • :cluster_states (Array<String>)

    The cluster state filters to apply when listing clusters. Clusters that change state while this action runs may be not be returned as expected in the list of clusters.

  • :marker (String)

    The pagination token that indicates the next set of results to retrieve.

Returns:

See Also:



1986
1987
1988
1989
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 1986

def list_clusters(params = {}, options = {})
  req = build_request(:list_clusters, params)
  req.send_request(options)
end

#list_instance_fleets(params = {}) ⇒ Types::ListInstanceFleetsOutput

Lists all available details about the instance fleets in a cluster.

The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x versions.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_instance_fleets({
  cluster_id: "ClusterId", # required
  marker: "Marker",
})

Response structure


resp.instance_fleets #=> Array
resp.instance_fleets[0].id #=> String
resp.instance_fleets[0].name #=> String
resp.instance_fleets[0].status.state #=> String, one of "PROVISIONING", "BOOTSTRAPPING", "RUNNING", "RESIZING", "SUSPENDED", "TERMINATING", "TERMINATED"
resp.instance_fleets[0].status.state_change_reason.code #=> String, one of "INTERNAL_ERROR", "VALIDATION_ERROR", "INSTANCE_FAILURE", "CLUSTER_TERMINATED"
resp.instance_fleets[0].status.state_change_reason.message #=> String
resp.instance_fleets[0].status.timeline.creation_date_time #=> Time
resp.instance_fleets[0].status.timeline.ready_date_time #=> Time
resp.instance_fleets[0].status.timeline.end_date_time #=> Time
resp.instance_fleets[0].instance_fleet_type #=> String, one of "MASTER", "CORE", "TASK"
resp.instance_fleets[0].target_on_demand_capacity #=> Integer
resp.instance_fleets[0].target_spot_capacity #=> Integer
resp.instance_fleets[0].provisioned_on_demand_capacity #=> Integer
resp.instance_fleets[0].provisioned_spot_capacity #=> Integer
resp.instance_fleets[0].instance_type_specifications #=> Array
resp.instance_fleets[0].instance_type_specifications[0].instance_type #=> String
resp.instance_fleets[0].instance_type_specifications[0].weighted_capacity #=> Integer
resp.instance_fleets[0].instance_type_specifications[0].bid_price #=> String
resp.instance_fleets[0].instance_type_specifications[0].bid_price_as_percentage_of_on_demand_price #=> Float
resp.instance_fleets[0].instance_type_specifications[0].configurations #=> Array
resp.instance_fleets[0].instance_type_specifications[0].configurations[0].classification #=> String
resp.instance_fleets[0].instance_type_specifications[0].configurations[0].configurations #=> Types::ConfigurationList
resp.instance_fleets[0].instance_type_specifications[0].configurations[0].properties #=> Hash
resp.instance_fleets[0].instance_type_specifications[0].configurations[0].properties["String"] #=> String
resp.instance_fleets[0].instance_type_specifications[0].ebs_block_devices #=> Array
resp.instance_fleets[0].instance_type_specifications[0].ebs_block_devices[0].volume_specification.volume_type #=> String
resp.instance_fleets[0].instance_type_specifications[0].ebs_block_devices[0].volume_specification.iops #=> Integer
resp.instance_fleets[0].instance_type_specifications[0].ebs_block_devices[0].volume_specification.size_in_gb #=> Integer
resp.instance_fleets[0].instance_type_specifications[0].ebs_block_devices[0].volume_specification.throughput #=> Integer
resp.instance_fleets[0].instance_type_specifications[0].ebs_block_devices[0].device #=> String
resp.instance_fleets[0].instance_type_specifications[0].ebs_optimized #=> Boolean
resp.instance_fleets[0].instance_type_specifications[0].custom_ami_id #=> String
resp.instance_fleets[0].instance_type_specifications[0].priority #=> Float
resp.instance_fleets[0].launch_specifications.spot_specification.timeout_duration_minutes #=> Integer
resp.instance_fleets[0].launch_specifications.spot_specification.timeout_action #=> String, one of "SWITCH_TO_ON_DEMAND", "TERMINATE_CLUSTER"
resp.instance_fleets[0].launch_specifications.spot_specification.block_duration_minutes #=> Integer
resp.instance_fleets[0].launch_specifications.spot_specification.allocation_strategy #=> String, one of "capacity-optimized", "price-capacity-optimized", "lowest-price", "diversified", "capacity-optimized-prioritized"
resp.instance_fleets[0].launch_specifications.on_demand_specification.allocation_strategy #=> String, one of "lowest-price", "prioritized"
resp.instance_fleets[0].launch_specifications.on_demand_specification.capacity_reservation_options.usage_strategy #=> String, one of "use-capacity-reservations-first"
resp.instance_fleets[0].launch_specifications.on_demand_specification.capacity_reservation_options.capacity_reservation_preference #=> String, one of "open", "none"
resp.instance_fleets[0].launch_specifications.on_demand_specification.capacity_reservation_options.capacity_reservation_resource_group_arn #=> String
resp.instance_fleets[0].resize_specifications.spot_resize_specification.timeout_duration_minutes #=> Integer
resp.instance_fleets[0].resize_specifications.spot_resize_specification.allocation_strategy #=> String, one of "capacity-optimized", "price-capacity-optimized", "lowest-price", "diversified", "capacity-optimized-prioritized"
resp.instance_fleets[0].resize_specifications.on_demand_resize_specification.timeout_duration_minutes #=> Integer
resp.instance_fleets[0].resize_specifications.on_demand_resize_specification.allocation_strategy #=> String, one of "lowest-price", "prioritized"
resp.instance_fleets[0].resize_specifications.on_demand_resize_specification.capacity_reservation_options.usage_strategy #=> String, one of "use-capacity-reservations-first"
resp.instance_fleets[0].resize_specifications.on_demand_resize_specification.capacity_reservation_options.capacity_reservation_preference #=> String, one of "open", "none"
resp.instance_fleets[0].resize_specifications.on_demand_resize_specification.capacity_reservation_options.capacity_reservation_resource_group_arn #=> String
resp.instance_fleets[0].context #=> String
resp.marker #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :cluster_id (required, String)

    The unique identifier of the cluster.

  • :marker (String)

    The pagination token that indicates the next set of results to retrieve.

Returns:

See Also:



2076
2077
2078
2079
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 2076

def list_instance_fleets(params = {}, options = {})
  req = build_request(:list_instance_fleets, params)
  req.send_request(options)
end

#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.

Examples:

Request syntax with placeholder values


resp = client.list_instance_groups({
  cluster_id: "ClusterId", # required
  marker: "Marker",
})

Response structure


resp.instance_groups #=> Array
resp.instance_groups[0].id #=> String
resp.instance_groups[0].name #=> String
resp.instance_groups[0].market #=> String, one of "ON_DEMAND", "SPOT"
resp.instance_groups[0].instance_group_type #=> String, one of "MASTER", "CORE", "TASK"
resp.instance_groups[0].bid_price #=> String
resp.instance_groups[0].instance_type #=> String
resp.instance_groups[0].requested_instance_count #=> Integer
resp.instance_groups[0].running_instance_count #=> Integer
resp.instance_groups[0].status.state #=> String, one of "PROVISIONING", "BOOTSTRAPPING", "RUNNING", "RECONFIGURING", "RESIZING", "SUSPENDED", "TERMINATING", "TERMINATED", "ARRESTED", "SHUTTING_DOWN", "ENDED"
resp.instance_groups[0].status.state_change_reason.code #=> String, one of "INTERNAL_ERROR", "VALIDATION_ERROR", "INSTANCE_FAILURE", "CLUSTER_TERMINATED"
resp.instance_groups[0].status.state_change_reason.message #=> String
resp.instance_groups[0].status.timeline.creation_date_time #=> Time
resp.instance_groups[0].status.timeline.ready_date_time #=> Time
resp.instance_groups[0].status.timeline.end_date_time #=> Time
resp.instance_groups[0].configurations #=> Array
resp.instance_groups[0].configurations[0].classification #=> String
resp.instance_groups[0].configurations[0].configurations #=> Types::ConfigurationList
resp.instance_groups[0].configurations[0].properties #=> Hash
resp.instance_groups[0].configurations[0].properties["String"] #=> String
resp.instance_groups[0].configurations_version #=> Integer
resp.instance_groups[0].last_successfully_applied_configurations #=> Array
resp.instance_groups[0].last_successfully_applied_configurations[0].classification #=> String
resp.instance_groups[0].last_successfully_applied_configurations[0].configurations #=> Types::ConfigurationList
resp.instance_groups[0].last_successfully_applied_configurations[0].properties #=> Hash
resp.instance_groups[0].last_successfully_applied_configurations[0].properties["String"] #=> String
resp.instance_groups[0].last_successfully_applied_configurations_version #=> Integer
resp.instance_groups[0].ebs_block_devices #=> Array
resp.instance_groups[0].ebs_block_devices[0].volume_specification.volume_type #=> String
resp.instance_groups[0].ebs_block_devices[0].volume_specification.iops #=> Integer
resp.instance_groups[0].ebs_block_devices[0].volume_specification.size_in_gb #=> Integer
resp.instance_groups[0].ebs_block_devices[0].volume_specification.throughput #=> Integer
resp.instance_groups[0].ebs_block_devices[0].device #=> String
resp.instance_groups[0].ebs_optimized #=> Boolean
resp.instance_groups[0].shrink_policy.decommission_timeout #=> Integer
resp.instance_groups[0].shrink_policy.instance_resize_policy.instances_to_terminate #=> Array
resp.instance_groups[0].shrink_policy.instance_resize_policy.instances_to_terminate[0] #=> String
resp.instance_groups[0].shrink_policy.instance_resize_policy.instances_to_protect #=> Array
resp.instance_groups[0].shrink_policy.instance_resize_policy.instances_to_protect[0] #=> String
resp.instance_groups[0].shrink_policy.instance_resize_policy.instance_termination_timeout #=> Integer
resp.instance_groups[0].auto_scaling_policy.status.state #=> String, one of "PENDING", "ATTACHING", "ATTACHED", "DETACHING", "DETACHED", "FAILED"
resp.instance_groups[0].auto_scaling_policy.status.state_change_reason.code #=> String, one of "USER_REQUEST", "PROVISION_FAILURE", "CLEANUP_FAILURE"
resp.instance_groups[0].auto_scaling_policy.status.state_change_reason.message #=> String
resp.instance_groups[0].auto_scaling_policy.constraints.min_capacity #=> Integer
resp.instance_groups[0].auto_scaling_policy.constraints.max_capacity #=> Integer
resp.instance_groups[0].auto_scaling_policy.rules #=> Array
resp.instance_groups[0].auto_scaling_policy.rules[0].name #=> String
resp.instance_groups[0].auto_scaling_policy.rules[0].description #=> String
resp.instance_groups[0].auto_scaling_policy.rules[0].action.market #=> String, one of "ON_DEMAND", "SPOT"
resp.instance_groups[0].auto_scaling_policy.rules[0].action.simple_scaling_policy_configuration.adjustment_type #=> String, one of "CHANGE_IN_CAPACITY", "PERCENT_CHANGE_IN_CAPACITY", "EXACT_CAPACITY"
resp.instance_groups[0].auto_scaling_policy.rules[0].action.simple_scaling_policy_configuration.scaling_adjustment #=> Integer
resp.instance_groups[0].auto_scaling_policy.rules[0].action.simple_scaling_policy_configuration.cool_down #=> Integer
resp.instance_groups[0].auto_scaling_policy.rules[0].trigger.cloud_watch_alarm_definition.comparison_operator #=> String, one of "GREATER_THAN_OR_EQUAL", "GREATER_THAN", "LESS_THAN", "LESS_THAN_OR_EQUAL"
resp.instance_groups[0].auto_scaling_policy.rules[0].trigger.cloud_watch_alarm_definition.evaluation_periods #=> Integer
resp.instance_groups[0].auto_scaling_policy.rules[0].trigger.cloud_watch_alarm_definition.metric_name #=> String
resp.instance_groups[0].auto_scaling_policy.rules[0].trigger.cloud_watch_alarm_definition.namespace #=> String
resp.instance_groups[0].auto_scaling_policy.rules[0].trigger.cloud_watch_alarm_definition.period #=> Integer
resp.instance_groups[0].auto_scaling_policy.rules[0].trigger.cloud_watch_alarm_definition.statistic #=> String, one of "SAMPLE_COUNT", "AVERAGE", "SUM", "MINIMUM", "MAXIMUM"
resp.instance_groups[0].auto_scaling_policy.rules[0].trigger.cloud_watch_alarm_definition.threshold #=> Float
resp.instance_groups[0].auto_scaling_policy.rules[0].trigger.cloud_watch_alarm_definition.unit #=> String, one of "NONE", "SECONDS", "MICRO_SECONDS", "MILLI_SECONDS", "BYTES", "KILO_BYTES", "MEGA_BYTES", "GIGA_BYTES", "TERA_BYTES", "BITS", "KILO_BITS", "MEGA_BITS", "GIGA_BITS", "TERA_BITS", "PERCENT", "COUNT", "BYTES_PER_SECOND", "KILO_BYTES_PER_SECOND", "MEGA_BYTES_PER_SECOND", "GIGA_BYTES_PER_SECOND", "TERA_BYTES_PER_SECOND", "BITS_PER_SECOND", "KILO_BITS_PER_SECOND", "MEGA_BITS_PER_SECOND", "GIGA_BITS_PER_SECOND", "TERA_BITS_PER_SECOND", "COUNT_PER_SECOND"
resp.instance_groups[0].auto_scaling_policy.rules[0].trigger.cloud_watch_alarm_definition.dimensions #=> Array
resp.instance_groups[0].auto_scaling_policy.rules[0].trigger.cloud_watch_alarm_definition.dimensions[0].key #=> String
resp.instance_groups[0].auto_scaling_policy.rules[0].trigger.cloud_watch_alarm_definition.dimensions[0].value #=> String
resp.instance_groups[0].custom_ami_id #=> String
resp.marker #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :cluster_id (required, String)

    The identifier of the cluster for which to list the instance groups.

  • :marker (String)

    The pagination token that indicates the next set of results to retrieve.

Returns:

See Also:



2176
2177
2178
2179
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 2176

def list_instance_groups(params = {}, options = {})
  req = build_request(:list_instance_groups, params)
  req.send_request(options)
end

#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.

Examples:

Request syntax with placeholder values


resp = client.list_instances({
  cluster_id: "ClusterId", # required
  instance_group_id: "InstanceGroupId",
  instance_group_types: ["MASTER"], # accepts MASTER, CORE, TASK
  instance_fleet_id: "InstanceFleetId",
  instance_fleet_type: "MASTER", # accepts MASTER, CORE, TASK
  instance_states: ["AWAITING_FULFILLMENT"], # accepts AWAITING_FULFILLMENT, PROVISIONING, BOOTSTRAPPING, RUNNING, TERMINATED
  marker: "Marker",
})

Response structure


resp.instances #=> Array
resp.instances[0].id #=> String
resp.instances[0].ec2_instance_id #=> String
resp.instances[0].public_dns_name #=> String
resp.instances[0].public_ip_address #=> String
resp.instances[0].private_dns_name #=> String
resp.instances[0].private_ip_address #=> String
resp.instances[0].status.state #=> String, one of "AWAITING_FULFILLMENT", "PROVISIONING", "BOOTSTRAPPING", "RUNNING", "TERMINATED"
resp.instances[0].status.state_change_reason.code #=> String, one of "INTERNAL_ERROR", "VALIDATION_ERROR", "INSTANCE_FAILURE", "BOOTSTRAP_FAILURE", "CLUSTER_TERMINATED"
resp.instances[0].status.state_change_reason.message #=> String
resp.instances[0].status.timeline.creation_date_time #=> Time
resp.instances[0].status.timeline.ready_date_time #=> Time
resp.instances[0].status.timeline.end_date_time #=> Time
resp.instances[0].instance_group_id #=> String
resp.instances[0].instance_fleet_id #=> String
resp.instances[0].market #=> String, one of "ON_DEMAND", "SPOT"
resp.instances[0].instance_type #=> String
resp.instances[0].ebs_volumes #=> Array
resp.instances[0].ebs_volumes[0].device #=> String
resp.instances[0].ebs_volumes[0].volume_id #=> String
resp.marker #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :cluster_id (required, String)

    The identifier of the cluster for which to list the instances.

  • :instance_group_id (String)

    The identifier of the instance group for which to list the instances.

  • :instance_group_types (Array<String>)

    The type of instance group for which to list the instances.

  • :instance_fleet_id (String)

    The unique identifier of the instance fleet.

  • :instance_fleet_type (String)

    The node type of the instance fleet. For example MASTER, CORE, or TASK.

  • :instance_states (Array<String>)

    A list of instance states that will filter the instances returned with this request.

  • :marker (String)

    The pagination token that indicates the next set of results to retrieve.

Returns:

See Also:



2258
2259
2260
2261
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 2258

def list_instances(params = {}, options = {})
  req = build_request(:list_instances, params)
  req.send_request(options)
end

#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.

Examples:

Request syntax with placeholder values


resp = client.list_notebook_executions({
  editor_id: "XmlStringMaxLen256",
  status: "START_PENDING", # accepts START_PENDING, STARTING, RUNNING, FINISHING, FINISHED, FAILING, FAILED, STOP_PENDING, STOPPING, STOPPED
  from: Time.now,
  to: Time.now,
  marker: "Marker",
  execution_engine_id: "XmlString",
})

Response structure


resp.notebook_executions #=> Array
resp.notebook_executions[0].notebook_execution_id #=> String
resp.notebook_executions[0].editor_id #=> String
resp.notebook_executions[0].notebook_execution_name #=> String
resp.notebook_executions[0].status #=> String, one of "START_PENDING", "STARTING", "RUNNING", "FINISHING", "FINISHED", "FAILING", "FAILED", "STOP_PENDING", "STOPPING", "STOPPED"
resp.notebook_executions[0].start_time #=> Time
resp.notebook_executions[0].end_time #=> Time
resp.notebook_executions[0].notebook_s3_location.bucket #=> String
resp.notebook_executions[0].notebook_s3_location.key #=> String
resp.notebook_executions[0].execution_engine_id #=> String
resp.marker #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :editor_id (String)

    The unique ID of the editor associated with the notebook execution.

  • :status (String)

    The status filter for listing notebook executions.

    • START_PENDING indicates that the cluster has received the execution request but execution has not begun.

    • STARTING indicates that the execution is starting on the cluster.

    • RUNNING indicates that the execution is being processed by the cluster.

    • FINISHING indicates that execution processing is in the final stages.

    • FINISHED indicates that the execution has completed without error.

    • FAILING indicates that the execution is failing and will not finish successfully.

    • FAILED indicates that the execution failed.

    • STOP_PENDING indicates that the cluster has received a StopNotebookExecution request and the stop is pending.

    • STOPPING indicates that the cluster is in the process of stopping the execution as a result of a StopNotebookExecution request.

    • STOPPED indicates that the execution stopped because of a StopNotebookExecution request.

  • :from (Time, DateTime, Date, Integer, String)

    The beginning of time range filter for listing notebook executions. The default is the timestamp of 30 days ago.

  • :to (Time, DateTime, Date, Integer, String)

    The end of time range filter for listing notebook executions. The default is the current timestamp.

  • :marker (String)

    The pagination token, returned by a previous ListNotebookExecutions call, that indicates the start of the list for this ListNotebookExecutions call.

  • :execution_engine_id (String)

    The unique ID of the execution engine.

Returns:

See Also:



2354
2355
2356
2357
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 2354

def list_notebook_executions(params = {}, options = {})
  req = build_request(:list_notebook_executions, params)
  req.send_request(options)
end

#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.

Examples:

Request syntax with placeholder values


resp = client.list_release_labels({
  filters: {
    prefix: "String",
    application: "String",
  },
  next_token: "String",
  max_results: 1,
})

Response structure


resp.release_labels #=> Array
resp.release_labels[0] #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :filters (Types::ReleaseLabelFilter)

    Filters the results of the request. Prefix specifies the prefix of release labels to return. Application specifies the application (with/without version) of release labels to return.

  • :next_token (String)

    Specifies the next page of results. If NextToken is not specified, which is usually the case for the first request of ListReleaseLabels, the first page of results are determined by other filtering parameters or by the latest version. The ListReleaseLabels request fails if the identity (Amazon Web Services account ID) and all filtering parameters are different from the original request, or if the NextToken is expired or tampered with.

  • :max_results (Integer)

    Defines the maximum number of release labels to return in a single response. The default is 100.

Returns:

See Also:



2408
2409
2410
2411
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 2408

def list_release_labels(params = {}, options = {})
  req = build_request(:list_release_labels, params)
  req.send_request(options)
end

#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.

Examples:

Request syntax with placeholder values


resp = client.list_security_configurations({
  marker: "Marker",
})

Response structure


resp.security_configurations #=> Array
resp.security_configurations[0].name #=> String
resp.security_configurations[0].creation_date_time #=> Time
resp.marker #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :marker (String)

    The pagination token that indicates the set of results to retrieve.

Returns:

See Also:



2446
2447
2448
2449
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 2446

def list_security_configurations(params = {}, options = {})
  req = build_request(:list_security_configurations, params)
  req.send_request(options)
end

#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.

Examples:

Request syntax with placeholder values


resp = client.list_steps({
  cluster_id: "ClusterId", # required
  step_states: ["PENDING"], # accepts PENDING, CANCEL_PENDING, RUNNING, COMPLETED, CANCELLED, FAILED, INTERRUPTED
  step_ids: ["XmlString"],
  marker: "Marker",
})

Response structure


resp.steps #=> Array
resp.steps[0].id #=> String
resp.steps[0].name #=> String
resp.steps[0].config.jar #=> String
resp.steps[0].config.properties #=> Hash
resp.steps[0].config.properties["String"] #=> String
resp.steps[0].config.main_class #=> String
resp.steps[0].config.args #=> Array
resp.steps[0].config.args[0] #=> String
resp.steps[0].action_on_failure #=> String, one of "TERMINATE_JOB_FLOW", "TERMINATE_CLUSTER", "CANCEL_AND_WAIT", "CONTINUE"
resp.steps[0].status.state #=> String, one of "PENDING", "CANCEL_PENDING", "RUNNING", "COMPLETED", "CANCELLED", "FAILED", "INTERRUPTED"
resp.steps[0].status.state_change_reason.code #=> String, one of "NONE"
resp.steps[0].status.state_change_reason.message #=> String
resp.steps[0].status.failure_details.reason #=> String
resp.steps[0].status.failure_details.message #=> String
resp.steps[0].status.failure_details.log_file #=> String
resp.steps[0].status.timeline.creation_date_time #=> Time
resp.steps[0].status.timeline.start_date_time #=> Time
resp.steps[0].status.timeline.end_date_time #=> Time
resp.marker #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :cluster_id (required, String)

    The identifier of the cluster for which to list the steps.

  • :step_states (Array<String>)

    The filter to limit the step list based on certain states.

  • :step_ids (Array<String>)

    The filter to limit the step list based on the identifier of the steps. You can specify a maximum of ten Step IDs. The character constraint applies to the overall length of the array.

  • :marker (String)

    The maximum number of steps that a single ListSteps action returns is 50. To return a longer list of steps, use multiple ListSteps actions along with the Marker parameter, which is a pagination token that indicates the next set of results to retrieve.

Returns:

See Also:



2518
2519
2520
2521
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 2518

def list_steps(params = {}, options = {})
  req = build_request(:list_steps, params)
  req.send_request(options)
end

#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.

Examples:

Request syntax with placeholder values


resp = client.list_studio_session_mappings({
  studio_id: "XmlStringMaxLen256",
  identity_type: "USER", # accepts USER, GROUP
  marker: "Marker",
})

Response structure


resp.session_mappings #=> Array
resp.session_mappings[0].studio_id #=> String
resp.session_mappings[0].identity_id #=> String
resp.session_mappings[0].identity_name #=> String
resp.session_mappings[0].identity_type #=> String, one of "USER", "GROUP"
resp.session_mappings[0].session_policy_arn #=> String
resp.session_mappings[0].creation_time #=> Time
resp.marker #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :studio_id (String)

    The ID of the Amazon EMR Studio.

  • :identity_type (String)

    Specifies whether to return session mappings for users or groups. If not specified, the results include session mapping details for both users and groups.

  • :marker (String)

    The pagination token that indicates the set of results to retrieve.

Returns:

See Also:



2567
2568
2569
2570
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 2567

def list_studio_session_mappings(params = {}, options = {})
  req = build_request(:list_studio_session_mappings, params)
  req.send_request(options)
end

#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.

Examples:

Request syntax with placeholder values


resp = client.list_studios({
  marker: "Marker",
})

Response structure


resp.studios #=> Array
resp.studios[0].studio_id #=> String
resp.studios[0].name #=> String
resp.studios[0].vpc_id #=> String
resp.studios[0].description #=> String
resp.studios[0].url #=> String
resp.studios[0].auth_mode #=> String, one of "SSO", "IAM"
resp.studios[0].creation_time #=> Time
resp.marker #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :marker (String)

    The pagination token that indicates the set of results to retrieve.

Returns:

See Also:



2608
2609
2610
2611
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 2608

def list_studios(params = {}, options = {})
  req = build_request(:list_studios, params)
  req.send_request(options)
end

#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.

Examples:

Request syntax with placeholder values


resp = client.list_supported_instance_types({
  release_label: "String", # required
  marker: "String",
})

Response structure


resp.supported_instance_types #=> Array
resp.supported_instance_types[0].type #=> String
resp.supported_instance_types[0].memory_gb #=> Float
resp.supported_instance_types[0].storage_gb #=> Integer
resp.supported_instance_types[0].vcpu #=> Integer
resp.supported_instance_types[0].is_64_bits_only #=> Boolean
resp.supported_instance_types[0].instance_family_id #=> String
resp.supported_instance_types[0].ebs_optimized_available #=> Boolean
resp.supported_instance_types[0].ebs_optimized_by_default #=> Boolean
resp.supported_instance_types[0].number_of_disks #=> Integer
resp.supported_instance_types[0].ebs_storage_only #=> Boolean
resp.supported_instance_types[0].architecture #=> String
resp.marker #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :release_label (required, String)

    The Amazon EMR release label determines the versions of open-source application packages that Amazon EMR has installed on the cluster. Release labels are in the format emr-x.x.x, where x.x.x is an Amazon EMR release number such as emr-6.10.0. For more information about Amazon EMR releases and their included application versions and features, see the Amazon EMR Release Guide .

  • :marker (String)

    The pagination token that marks the next set of results to retrieve.

Returns:

See Also:



2667
2668
2669
2670
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 2667

def list_supported_instance_types(params = {}, options = {})
  req = build_request(:list_supported_instance_types, params)
  req.send_request(options)
end

#modify_cluster(params = {}) ⇒ Types::ModifyClusterOutput

Modifies the number of steps that can be executed concurrently for the cluster specified using ClusterID.

Examples:

Request syntax with placeholder values


resp = client.modify_cluster({
  cluster_id: "String", # required
  step_concurrency_level: 1,
})

Response structure


resp.step_concurrency_level #=> Integer

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :cluster_id (required, String)

    The unique identifier of the cluster.

  • :step_concurrency_level (Integer)

    The number of steps that can be executed concurrently. You can specify a minimum of 1 step and a maximum of 256 steps. We recommend that you do not change this parameter while steps are running or the ActionOnFailure setting may not behave as expected. For more information see Step$ActionOnFailure.

Returns:

See Also:



2704
2705
2706
2707
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 2704

def modify_cluster(params = {}, options = {})
  req = build_request(:modify_cluster, params)
  req.send_request(options)
end

#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.

The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x versions.

Examples:

Request syntax with placeholder values


resp = client.modify_instance_fleet({
  cluster_id: "ClusterId", # required
  instance_fleet: { # required
    instance_fleet_id: "InstanceFleetId", # required
    target_on_demand_capacity: 1,
    target_spot_capacity: 1,
    resize_specifications: {
      spot_resize_specification: {
        timeout_duration_minutes: 1,
        allocation_strategy: "capacity-optimized", # accepts capacity-optimized, price-capacity-optimized, lowest-price, diversified, capacity-optimized-prioritized
      },
      on_demand_resize_specification: {
        timeout_duration_minutes: 1,
        allocation_strategy: "lowest-price", # accepts lowest-price, prioritized
        capacity_reservation_options: {
          usage_strategy: "use-capacity-reservations-first", # accepts use-capacity-reservations-first
          capacity_reservation_preference: "open", # accepts open, none
          capacity_reservation_resource_group_arn: "XmlStringMaxLen256",
        },
      },
    },
    instance_type_configs: [
      {
        instance_type: "InstanceType", # required
        weighted_capacity: 1,
        bid_price: "XmlStringMaxLen256",
        bid_price_as_percentage_of_on_demand_price: 1.0,
        ebs_configuration: {
          ebs_block_device_configs: [
            {
              volume_specification: { # required
                volume_type: "String", # required
                iops: 1,
                size_in_gb: 1, # required
                throughput: 1,
              },
              volumes_per_instance: 1,
            },
          ],
          ebs_optimized: false,
        },
        configurations: [
          {
            classification: "String",
            configurations: {
              # recursive ConfigurationList
            },
            properties: {
              "String" => "String",
            },
          },
        ],
        custom_ami_id: "XmlStringMaxLen256",
        priority: 1.0,
      },
    ],
    context: "XmlStringMaxLen256",
  },
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :cluster_id (required, String)

    The unique identifier of the cluster.

  • :instance_fleet (required, Types::InstanceFleetModifyConfig)

    The configuration parameters of the instance fleet.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2793
2794
2795
2796
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 2793

def modify_instance_fleet(params = {}, options = {})
  req = build_request(:modify_instance_fleet, params)
  req.send_request(options)
end

#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.

Examples:

Request syntax with placeholder values


resp = client.modify_instance_groups({
  cluster_id: "ClusterId",
  instance_groups: [
    {
      instance_group_id: "XmlStringMaxLen256", # required
      instance_count: 1,
      ec2_instance_ids_to_terminate: ["InstanceId"],
      shrink_policy: {
        decommission_timeout: 1,
        instance_resize_policy: {
          instances_to_terminate: ["InstanceId"],
          instances_to_protect: ["InstanceId"],
          instance_termination_timeout: 1,
        },
      },
      reconfiguration_type: "OVERWRITE", # accepts OVERWRITE, MERGE
      configurations: [
        {
          classification: "String",
          configurations: {
            # recursive ConfigurationList
          },
          properties: {
            "String" => "String",
          },
        },
      ],
    },
  ],
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :cluster_id (String)

    The ID of the cluster to which the instance group belongs.

  • :instance_groups (Array<Types::InstanceGroupModifyConfig>)

    Instance groups to change.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2848
2849
2850
2851
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 2848

def modify_instance_groups(params = {}, options = {})
  req = build_request(:modify_instance_groups, params)
  req.send_request(options)
end

#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.

Examples:

Request syntax with placeholder values


resp = client.put_auto_scaling_policy({
  cluster_id: "ClusterId", # required
  instance_group_id: "InstanceGroupId", # required
  auto_scaling_policy: { # required
    constraints: { # required
      min_capacity: 1, # required
      max_capacity: 1, # required
    },
    rules: [ # required
      {
        name: "String", # required
        description: "String",
        action: { # required
          market: "ON_DEMAND", # accepts ON_DEMAND, SPOT
          simple_scaling_policy_configuration: { # required
            adjustment_type: "CHANGE_IN_CAPACITY", # accepts CHANGE_IN_CAPACITY, PERCENT_CHANGE_IN_CAPACITY, EXACT_CAPACITY
            scaling_adjustment: 1, # required
            cool_down: 1,
          },
        },
        trigger: { # required
          cloud_watch_alarm_definition: { # required
            comparison_operator: "GREATER_THAN_OR_EQUAL", # required, accepts GREATER_THAN_OR_EQUAL, GREATER_THAN, LESS_THAN, LESS_THAN_OR_EQUAL
            evaluation_periods: 1,
            metric_name: "String", # required
            namespace: "String",
            period: 1, # required
            statistic: "SAMPLE_COUNT", # accepts SAMPLE_COUNT, AVERAGE, SUM, MINIMUM, MAXIMUM
            threshold: 1.0, # required
            unit: "NONE", # accepts NONE, SECONDS, MICRO_SECONDS, MILLI_SECONDS, BYTES, KILO_BYTES, MEGA_BYTES, GIGA_BYTES, TERA_BYTES, BITS, KILO_BITS, MEGA_BITS, GIGA_BITS, TERA_BITS, PERCENT, COUNT, BYTES_PER_SECOND, KILO_BYTES_PER_SECOND, MEGA_BYTES_PER_SECOND, GIGA_BYTES_PER_SECOND, TERA_BYTES_PER_SECOND, BITS_PER_SECOND, KILO_BITS_PER_SECOND, MEGA_BITS_PER_SECOND, GIGA_BITS_PER_SECOND, TERA_BITS_PER_SECOND, COUNT_PER_SECOND
            dimensions: [
              {
                key: "String",
                value: "String",
              },
            ],
          },
        },
      },
    ],
  },
})

Response structure


resp.cluster_id #=> String
resp.instance_group_id #=> String
resp.auto_scaling_policy.status.state #=> String, one of "PENDING", "ATTACHING", "ATTACHED", "DETACHING", "DETACHED", "FAILED"
resp.auto_scaling_policy.status.state_change_reason.code #=> String, one of "USER_REQUEST", "PROVISION_FAILURE", "CLEANUP_FAILURE"
resp.auto_scaling_policy.status.state_change_reason.message #=> String
resp.auto_scaling_policy.constraints.min_capacity #=> Integer
resp.auto_scaling_policy.constraints.max_capacity #=> Integer
resp.auto_scaling_policy.rules #=> Array
resp.auto_scaling_policy.rules[0].name #=> String
resp.auto_scaling_policy.rules[0].description #=> String
resp.auto_scaling_policy.rules[0].action.market #=> String, one of "ON_DEMAND", "SPOT"
resp.auto_scaling_policy.rules[0].action.simple_scaling_policy_configuration.adjustment_type #=> String, one of "CHANGE_IN_CAPACITY", "PERCENT_CHANGE_IN_CAPACITY", "EXACT_CAPACITY"
resp.auto_scaling_policy.rules[0].action.simple_scaling_policy_configuration.scaling_adjustment #=> Integer
resp.auto_scaling_policy.rules[0].action.simple_scaling_policy_configuration.cool_down #=> Integer
resp.auto_scaling_policy.rules[0].trigger.cloud_watch_alarm_definition.comparison_operator #=> String, one of "GREATER_THAN_OR_EQUAL", "GREATER_THAN", "LESS_THAN", "LESS_THAN_OR_EQUAL"
resp.auto_scaling_policy.rules[0].trigger.cloud_watch_alarm_definition.evaluation_periods #=> Integer
resp.auto_scaling_policy.rules[0].trigger.cloud_watch_alarm_definition.metric_name #=> String
resp.auto_scaling_policy.rules[0].trigger.cloud_watch_alarm_definition.namespace #=> String
resp.auto_scaling_policy.rules[0].trigger.cloud_watch_alarm_definition.period #=> Integer
resp.auto_scaling_policy.rules[0].trigger.cloud_watch_alarm_definition.statistic #=> String, one of "SAMPLE_COUNT", "AVERAGE", "SUM", "MINIMUM", "MAXIMUM"
resp.auto_scaling_policy.rules[0].trigger.cloud_watch_alarm_definition.threshold #=> Float
resp.auto_scaling_policy.rules[0].trigger.cloud_watch_alarm_definition.unit #=> String, one of "NONE", "SECONDS", "MICRO_SECONDS", "MILLI_SECONDS", "BYTES", "KILO_BYTES", "MEGA_BYTES", "GIGA_BYTES", "TERA_BYTES", "BITS", "KILO_BITS", "MEGA_BITS", "GIGA_BITS", "TERA_BITS", "PERCENT", "COUNT", "BYTES_PER_SECOND", "KILO_BYTES_PER_SECOND", "MEGA_BYTES_PER_SECOND", "GIGA_BYTES_PER_SECOND", "TERA_BYTES_PER_SECOND", "BITS_PER_SECOND", "KILO_BITS_PER_SECOND", "MEGA_BITS_PER_SECOND", "GIGA_BITS_PER_SECOND", "TERA_BITS_PER_SECOND", "COUNT_PER_SECOND"
resp.auto_scaling_policy.rules[0].trigger.cloud_watch_alarm_definition.dimensions #=> Array
resp.auto_scaling_policy.rules[0].trigger.cloud_watch_alarm_definition.dimensions[0].key #=> String
resp.auto_scaling_policy.rules[0].trigger.cloud_watch_alarm_definition.dimensions[0].value #=> String
resp.cluster_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :cluster_id (required, String)

    Specifies the ID of a cluster. The instance group to which the automatic scaling policy is applied is within this cluster.

  • :instance_group_id (required, String)

    Specifies the ID of the instance group to which the automatic scaling policy is applied.

  • :auto_scaling_policy (required, Types::AutoScalingPolicy)

    Specifies the definition of the automatic scaling policy.

Returns:

See Also:



2955
2956
2957
2958
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 2955

def put_auto_scaling_policy(params = {}, options = {})
  req = build_request(:put_auto_scaling_policy, params)
  req.send_request(options)
end

#put_auto_termination_policy(params = {}) ⇒ Struct

Auto-termination is supported in Amazon EMR releases 5.30.0 and 6.1.0 and later. For more information, see Using an auto-termination policy.

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.

Examples:

Request syntax with placeholder values


resp = client.put_auto_termination_policy({
  cluster_id: "ClusterId", # required
  auto_termination_policy: {
    idle_timeout: 1,
  },
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :cluster_id (required, String)

    Specifies the ID of the Amazon EMR cluster to which the auto-termination policy will be attached.

  • :auto_termination_policy (Types::AutoTerminationPolicy)

    Specifies the auto-termination policy to attach to the cluster.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



2999
3000
3001
3002
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 2999

def put_auto_termination_policy(params = {}, options = {})
  req = build_request(:put_auto_termination_policy, params)
  req.send_request(options)
end

#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.

Examples:

Request syntax with placeholder values


resp = client.put_block_public_access_configuration({
  block_public_access_configuration: { # required
    block_public_security_group_rules: false, # required
    permitted_public_security_group_rule_ranges: [
      {
        min_range: 1, # required
        max_range: 1,
      },
    ],
  },
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :block_public_access_configuration (required, Types::BlockPublicAccessConfiguration)

    A configuration for Amazon EMR block public access. The configuration applies to all clusters created in your account for the current Region. The configuration specifies whether block public access is enabled. If block public access is enabled, security groups associated with the cluster cannot have rules that allow inbound traffic from 0.0.0.0/0 or ::/0 on a port, unless the port is specified as an exception using PermittedPublicSecurityGroupRuleRanges in the BlockPublicAccessConfiguration. By default, Port 22 (SSH) is an exception, and public access is allowed on this port. You can change this by updating BlockPublicSecurityGroupRules to remove the exception.

    For accounts that created clusters in a Region before November 25, 2019, block public access is disabled by default in that Region. To use this feature, you must manually enable and configure it. For accounts that did not create an Amazon EMR cluster in a Region before this date, block public access is enabled by default in that Region.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



3054
3055
3056
3057
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 3054

def put_block_public_access_configuration(params = {}, options = {})
  req = build_request(:put_block_public_access_configuration, params)
  req.send_request(options)
end

#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.

Examples:

Request syntax with placeholder values


resp = client.put_managed_scaling_policy({
  cluster_id: "ClusterId", # required
  managed_scaling_policy: { # required
    compute_limits: {
      unit_type: "InstanceFleetUnits", # required, accepts InstanceFleetUnits, Instances, VCPU
      minimum_capacity_units: 1, # required
      maximum_capacity_units: 1, # required
      maximum_on_demand_capacity_units: 1,
      maximum_core_capacity_units: 1,
    },
  },
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :cluster_id (required, String)

    Specifies the ID of an Amazon EMR cluster where the managed scaling policy is attached.

  • :managed_scaling_policy (required, Types::ManagedScalingPolicy)

    Specifies the constraints for the managed scaling policy.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



3093
3094
3095
3096
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 3093

def put_managed_scaling_policy(params = {}, options = {})
  req = build_request(:put_managed_scaling_policy, params)
  req.send_request(options)
end

#remove_auto_scaling_policy(params = {}) ⇒ Struct

Removes an automatic scaling policy from a specified instance group within an Amazon EMR cluster.

Examples:

Request syntax with placeholder values


resp = client.remove_auto_scaling_policy({
  cluster_id: "ClusterId", # required
  instance_group_id: "InstanceGroupId", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :cluster_id (required, String)

    Specifies the ID of a cluster. The instance group to which the automatic scaling policy is applied is within this cluster.

  • :instance_group_id (required, String)

    Specifies the ID of the instance group to which the scaling policy is applied.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



3122
3123
3124
3125
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 3122

def remove_auto_scaling_policy(params = {}, options = {})
  req = build_request(:remove_auto_scaling_policy, params)
  req.send_request(options)
end

#remove_auto_termination_policy(params = {}) ⇒ Struct

Removes an auto-termination policy from an Amazon EMR cluster.

Examples:

Request syntax with placeholder values


resp = client.remove_auto_termination_policy({
  cluster_id: "ClusterId", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :cluster_id (required, String)

    Specifies the ID of the Amazon EMR cluster from which the auto-termination policy will be removed.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



3145
3146
3147
3148
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 3145

def remove_auto_termination_policy(params = {}, options = {})
  req = build_request(:remove_auto_termination_policy, params)
  req.send_request(options)
end

#remove_managed_scaling_policy(params = {}) ⇒ Struct

Removes a managed scaling policy from a specified Amazon EMR cluster.

Examples:

Request syntax with placeholder values


resp = client.remove_managed_scaling_policy({
  cluster_id: "ClusterId", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :cluster_id (required, String)

    Specifies the ID of the cluster from which the managed scaling policy will be removed.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



3168
3169
3170
3171
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 3168

def remove_managed_scaling_policy(params = {}, options = {})
  req = build_request(:remove_managed_scaling_policy, params)
  req.send_request(options)
end

#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:

Examples:

Request syntax with placeholder values


resp = client.remove_tags({
  resource_id: "ResourceId", # required
  tag_keys: ["String"], # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_id (required, String)

    The Amazon EMR resource identifier from which tags will be removed. For example, a cluster identifier or an Amazon EMR Studio ID.

  • :tag_keys (required, Array<String>)

    A list of tag keys to remove from the resource.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



3205
3206
3207
3208
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 3205

def remove_tags(params = {}, options = {})
  req = build_request(:remove_tags, params)
  req.send_request(options)
end

#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.

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.

Examples:

Request syntax with placeholder values


resp = client.run_job_flow({
  name: "XmlStringMaxLen256", # required
  log_uri: "XmlString",
  log_encryption_kms_key_id: "XmlString",
  additional_info: "XmlString",
  ami_version: "XmlStringMaxLen256",
  release_label: "XmlStringMaxLen256",
  instances: { # required
    master_instance_type: "InstanceType",
    slave_instance_type: "InstanceType",
    instance_count: 1,
    instance_groups: [
      {
        name: "XmlStringMaxLen256",
        market: "ON_DEMAND", # accepts ON_DEMAND, SPOT
        instance_role: "MASTER", # required, accepts MASTER, CORE, TASK
        bid_price: "XmlStringMaxLen256",
        instance_type: "InstanceType", # required
        instance_count: 1, # required
        configurations: [
          {
            classification: "String",
            configurations: {
              # recursive ConfigurationList
            },
            properties: {
              "String" => "String",
            },
          },
        ],
        ebs_configuration: {
          ebs_block_device_configs: [
            {
              volume_specification: { # required
                volume_type: "String", # required
                iops: 1,
                size_in_gb: 1, # required
                throughput: 1,
              },
              volumes_per_instance: 1,
            },
          ],
          ebs_optimized: false,
        },
        auto_scaling_policy: {
          constraints: { # required
            min_capacity: 1, # required
            max_capacity: 1, # required
          },
          rules: [ # required
            {
              name: "String", # required
              description: "String",
              action: { # required
                market: "ON_DEMAND", # accepts ON_DEMAND, SPOT
                simple_scaling_policy_configuration: { # required
                  adjustment_type: "CHANGE_IN_CAPACITY", # accepts CHANGE_IN_CAPACITY, PERCENT_CHANGE_IN_CAPACITY, EXACT_CAPACITY
                  scaling_adjustment: 1, # required
                  cool_down: 1,
                },
              },
              trigger: { # required
                cloud_watch_alarm_definition: { # required
                  comparison_operator: "GREATER_THAN_OR_EQUAL", # required, accepts GREATER_THAN_OR_EQUAL, GREATER_THAN, LESS_THAN, LESS_THAN_OR_EQUAL
                  evaluation_periods: 1,
                  metric_name: "String", # required
                  namespace: "String",
                  period: 1, # required
                  statistic: "SAMPLE_COUNT", # accepts SAMPLE_COUNT, AVERAGE, SUM, MINIMUM, MAXIMUM
                  threshold: 1.0, # required
                  unit: "NONE", # accepts NONE, SECONDS, MICRO_SECONDS, MILLI_SECONDS, BYTES, KILO_BYTES, MEGA_BYTES, GIGA_BYTES, TERA_BYTES, BITS, KILO_BITS, MEGA_BITS, GIGA_BITS, TERA_BITS, PERCENT, COUNT, BYTES_PER_SECOND, KILO_BYTES_PER_SECOND, MEGA_BYTES_PER_SECOND, GIGA_BYTES_PER_SECOND, TERA_BYTES_PER_SECOND, BITS_PER_SECOND, KILO_BITS_PER_SECOND, MEGA_BITS_PER_SECOND, GIGA_BITS_PER_SECOND, TERA_BITS_PER_SECOND, COUNT_PER_SECOND
                  dimensions: [
                    {
                      key: "String",
                      value: "String",
                    },
                  ],
                },
              },
            },
          ],
        },
        custom_ami_id: "XmlStringMaxLen256",
      },
    ],
    instance_fleets: [
      {
        name: "XmlStringMaxLen256",
        instance_fleet_type: "MASTER", # required, accepts MASTER, CORE, TASK
        target_on_demand_capacity: 1,
        target_spot_capacity: 1,
        instance_type_configs: [
          {
            instance_type: "InstanceType", # required
            weighted_capacity: 1,
            bid_price: "XmlStringMaxLen256",
            bid_price_as_percentage_of_on_demand_price: 1.0,
            ebs_configuration: {
              ebs_block_device_configs: [
                {
                  volume_specification: { # required
                    volume_type: "String", # required
                    iops: 1,
                    size_in_gb: 1, # required
                    throughput: 1,
                  },
                  volumes_per_instance: 1,
                },
              ],
              ebs_optimized: false,
            },
            configurations: [
              {
                classification: "String",
                configurations: {
                  # recursive ConfigurationList
                },
                properties: {
                  "String" => "String",
                },
              },
            ],
            custom_ami_id: "XmlStringMaxLen256",
            priority: 1.0,
          },
        ],
        launch_specifications: {
          spot_specification: {
            timeout_duration_minutes: 1, # required
            timeout_action: "SWITCH_TO_ON_DEMAND", # required, accepts SWITCH_TO_ON_DEMAND, TERMINATE_CLUSTER
            block_duration_minutes: 1,
            allocation_strategy: "capacity-optimized", # accepts capacity-optimized, price-capacity-optimized, lowest-price, diversified, capacity-optimized-prioritized
          },
          on_demand_specification: {
            allocation_strategy: "lowest-price", # required, accepts lowest-price, prioritized
            capacity_reservation_options: {
              usage_strategy: "use-capacity-reservations-first", # accepts use-capacity-reservations-first
              capacity_reservation_preference: "open", # accepts open, none
              capacity_reservation_resource_group_arn: "XmlStringMaxLen256",
            },
          },
        },
        resize_specifications: {
          spot_resize_specification: {
            timeout_duration_minutes: 1,
            allocation_strategy: "capacity-optimized", # accepts capacity-optimized, price-capacity-optimized, lowest-price, diversified, capacity-optimized-prioritized
          },
          on_demand_resize_specification: {
            timeout_duration_minutes: 1,
            allocation_strategy: "lowest-price", # accepts lowest-price, prioritized
            capacity_reservation_options: {
              usage_strategy: "use-capacity-reservations-first", # accepts use-capacity-reservations-first
              capacity_reservation_preference: "open", # accepts open, none
              capacity_reservation_resource_group_arn: "XmlStringMaxLen256",
            },
          },
        },
        context: "XmlStringMaxLen256",
      },
    ],
    ec2_key_name: "XmlStringMaxLen256",
    placement: {
      availability_zone: "XmlString",
      availability_zones: ["XmlStringMaxLen256"],
    },
    keep_job_flow_alive_when_no_steps: false,
    termination_protected: false,
    unhealthy_node_replacement: false,
    hadoop_version: "XmlStringMaxLen256",
    ec2_subnet_id: "XmlStringMaxLen256",
    ec2_subnet_ids: ["XmlStringMaxLen256"],
    emr_managed_master_security_group: "XmlStringMaxLen256",
    emr_managed_slave_security_group: "XmlStringMaxLen256",
    service_access_security_group: "XmlStringMaxLen256",
    additional_master_security_groups: ["XmlStringMaxLen256"],
    additional_slave_security_groups: ["XmlStringMaxLen256"],
  },
  steps: [
    {
      name: "XmlStringMaxLen256", # required
      action_on_failure: "TERMINATE_JOB_FLOW", # accepts TERMINATE_JOB_FLOW, TERMINATE_CLUSTER, CANCEL_AND_WAIT, CONTINUE
      hadoop_jar_step: { # required
        properties: [
          {
            key: "XmlString",
            value: "XmlString",
          },
        ],
        jar: "XmlString", # required
        main_class: "XmlString",
        args: ["XmlString"],
      },
    },
  ],
  bootstrap_actions: [
    {
      name: "XmlStringMaxLen256", # required
      script_bootstrap_action: { # required
        path: "XmlString", # required
        args: ["XmlString"],
      },
    },
  ],
  supported_products: ["XmlStringMaxLen256"],
  new_supported_products: [
    {
      name: "XmlStringMaxLen256",
      args: ["XmlString"],
    },
  ],
  applications: [
    {
      name: "String",
      version: "String",
      args: ["String"],
      additional_info: {
        "String" => "String",
      },
    },
  ],
  configurations: [
    {
      classification: "String",
      configurations: {
        # recursive ConfigurationList
      },
      properties: {
        "String" => "String",
      },
    },
  ],
  visible_to_all_users: false,
  job_flow_role: "XmlString",
  service_role: "XmlString",
  tags: [
    {
      key: "String",
      value: "String",
    },
  ],
  security_configuration: "XmlString",
  auto_scaling_role: "XmlString",
  scale_down_behavior: "TERMINATE_AT_INSTANCE_HOUR", # accepts TERMINATE_AT_INSTANCE_HOUR, TERMINATE_AT_TASK_COMPLETION
  custom_ami_id: "XmlStringMaxLen256",
  ebs_root_volume_size: 1,
  repo_upgrade_on_boot: "SECURITY", # accepts SECURITY, NONE
  kerberos_attributes: {
    realm: "XmlStringMaxLen256", # required
    kdc_admin_password: "XmlStringMaxLen256", # required
    cross_realm_trust_principal_password: "XmlStringMaxLen256",
    ad_domain_join_user: "XmlStringMaxLen256",
    ad_domain_join_password: "XmlStringMaxLen256",
  },
  step_concurrency_level: 1,
  managed_scaling_policy: {
    compute_limits: {
      unit_type: "InstanceFleetUnits", # required, accepts InstanceFleetUnits, Instances, VCPU
      minimum_capacity_units: 1, # required
      maximum_capacity_units: 1, # required
      maximum_on_demand_capacity_units: 1,
      maximum_core_capacity_units: 1,
    },
  },
  placement_group_configs: [
    {
      instance_role: "MASTER", # required, accepts MASTER, CORE, TASK
      placement_strategy: "SPREAD", # accepts SPREAD, PARTITION, CLUSTER, NONE
    },
  ],
  auto_termination_policy: {
    idle_timeout: 1,
  },
  os_release_label: "XmlStringMaxLen256",
  ebs_root_volume_iops: 1,
  ebs_root_volume_throughput: 1,
})

Response structure


resp.job_flow_id #=> String
resp.cluster_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :name (required, String)

    The name of the job flow.

  • :log_uri (String)

    The location in Amazon S3 to write the log files of the job flow. If a value is not provided, logs are not created.

  • :log_encryption_kms_key_id (String)

    The KMS key used for encrypting log files. If a value is not provided, the logs remain encrypted by AES-256. This attribute is only available with Amazon EMR releases 5.30.0 and later, excluding Amazon EMR 6.0.0.

  • :additional_info (String)

    A JSON string for selecting additional features.

  • :ami_version (String)

    Applies only to Amazon EMR AMI versions 3.x and 2.x. For Amazon EMR releases 4.0 and later, ReleaseLabel is used. To specify a custom AMI, use CustomAmiID.

  • :release_label (String)

    The Amazon EMR release label, which determines the version of open-source application packages installed on the cluster. Release labels are in the form emr-x.x.x, where x.x.x is an Amazon EMR release version such as emr-5.14.0. For more information about Amazon EMR release versions and included application versions and features, see https://docs.aws.amazon.com/emr/latest/ReleaseGuide/. The release label applies only to Amazon EMR releases version 4.0 and later. Earlier versions use AmiVersion.

  • :instances (required, Types::JobFlowInstancesConfig)

    A specification of the number and type of Amazon EC2 instances.

  • :steps (Array<Types::StepConfig>)

    A list of steps to run.

  • :bootstrap_actions (Array<Types::BootstrapActionConfig>)

    A list of bootstrap actions to run before Hadoop starts on the cluster nodes.

  • :supported_products (Array<String>)

    For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and later, use Applications.

    A list of strings that indicates third-party software to use. For more information, see the Amazon EMR Developer Guide. Currently supported values are:

    • "mapr-m3" - launch the job flow using MapR M3 Edition.

    • "mapr-m5" - launch the job flow using MapR M5 Edition.

  • :new_supported_products (Array<Types::SupportedProductConfig>)

    For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and later, use Applications.

    A list of strings that indicates third-party software to use with the job flow that accepts a user argument list. Amazon EMR accepts and forwards the argument list to the corresponding installation script as bootstrap action arguments. For more information, see "Launch a Job Flow on the MapR Distribution for Hadoop" in the Amazon EMR Developer Guide. Supported values are:

    • "mapr-m3" - launch the cluster using MapR M3 Edition.

    • "mapr-m5" - launch the cluster using MapR M5 Edition.

    • "mapr" with the user arguments specifying "--edition,m3" or "--edition,m5" - launch the job flow using MapR M3 or M5 Edition respectively.

    • "mapr-m7" - launch the cluster using MapR M7 Edition.

    • "hunk" - launch the cluster with the Hunk Big Data Analytics Platform.

    • "hue"- launch the cluster with Hue installed.

    • "spark" - launch the cluster with Apache Spark installed.

    • "ganglia" - launch the cluster with the Ganglia Monitoring System installed.

  • :applications (Array<Types::Application>)

    Applies to Amazon EMR releases 4.0 and later. A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster. For a list of applications available for each Amazon EMR release version, see the Amazon EMRRelease Guide.

  • :configurations (Array<Types::Configuration>)

    For Amazon EMR releases 4.0 and later. The list of configurations supplied for the Amazon EMR cluster that you are creating.

  • :visible_to_all_users (Boolean)

    The VisibleToAllUsers parameter is no longer supported. By default, the value is set to true. Setting it to false now has no effect.

    Set this value to true so that IAM principals in the Amazon Web Services account associated with the cluster can perform Amazon EMR actions on the cluster that their IAM policies allow. This value defaults to true for clusters created using the Amazon EMR API or the CLI create-cluster command.

    When set to false, only the IAM principal that created the cluster and the Amazon Web Services account root user can perform Amazon EMR actions for the cluster, regardless of the IAM permissions policies attached to other IAM principals. For more information, see Understanding the Amazon EMR cluster VisibleToAllUsers setting in the Amazon EMR Management Guide.

  • :job_flow_role (String)

    Also called instance profile and Amazon EC2 role. An IAM role for an Amazon EMR cluster. The Amazon EC2 instances of the cluster assume this role. The default role is EMR_EC2_DefaultRole. In order to use the default role, you must have already created it using the CLI or console.

  • :service_role (String)

    The IAM role that Amazon EMR assumes in order to access Amazon Web Services resources on your behalf. If you've created a custom service role path, you must specify it for the service role when you launch your cluster.

  • :tags (Array<Types::Tag>)

    A list of tags to associate with a cluster and propagate to Amazon EC2 instances.

  • :security_configuration (String)

    The name of a security configuration to apply to the cluster.

  • :auto_scaling_role (String)

    An IAM role for automatic scaling policies. The default role is EMR_AutoScaling_DefaultRole. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate Amazon EC2 instances in an instance group.

  • :scale_down_behavior (String)

    Specifies the way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized. TERMINATE_AT_INSTANCE_HOUR indicates that Amazon EMR terminates nodes at the instance-hour boundary, regardless of when the request to terminate the instance was submitted. This option is only available with Amazon EMR 5.1.0 and later and is the default for clusters created using that version. TERMINATE_AT_TASK_COMPLETION indicates that Amazon EMR adds nodes to a deny list and drains tasks from nodes before terminating the Amazon EC2 instances, regardless of the instance-hour boundary. With either behavior, Amazon EMR removes the least active nodes first and blocks instance termination if it could lead to HDFS corruption. TERMINATE_AT_TASK_COMPLETION available only in Amazon EMR releases 4.1.0 and later, and is the default for releases of Amazon EMR earlier than 5.1.0.

  • :custom_ami_id (String)

    Available only in Amazon EMR releases 5.7.0 and later. The ID of a custom Amazon EBS-backed Linux AMI. If specified, Amazon EMR uses this AMI when it launches cluster Amazon EC2 instances. For more information about custom AMIs in Amazon EMR, see Using a Custom AMI in the Amazon EMR Management Guide. If omitted, the cluster uses the base Linux AMI for the ReleaseLabel specified. For Amazon EMR releases 2.x and 3.x, use AmiVersion instead.

    For information about creating a custom AMI, see Creating an Amazon EBS-Backed Linux AMI in the Amazon Elastic Compute Cloud User Guide for Linux Instances. For information about finding an AMI ID, see Finding a Linux AMI.

  • :ebs_root_volume_size (Integer)

    The size, in GiB, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. Available in Amazon EMR releases 4.x and later.

  • :repo_upgrade_on_boot (String)

    Applies only when CustomAmiID is used. Specifies which updates from the Amazon Linux AMI package repositories to apply automatically when the instance boots using the AMI. If omitted, the default is SECURITY, which indicates that only security updates are applied. If NONE is specified, no updates are applied, and all updates must be applied manually.

  • :kerberos_attributes (Types::KerberosAttributes)

    Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration. For more information see Use Kerberos Authentication in the Amazon EMR Management Guide.

  • :step_concurrency_level (Integer)

    Specifies the number of steps that can be executed concurrently. The default value is 1. The maximum value is 256.

  • :managed_scaling_policy (Types::ManagedScalingPolicy)

    The specified managed scaling policy for an Amazon EMR cluster.

  • :placement_group_configs (Array<Types::PlacementGroupConfig>)

    The specified placement group configuration for an Amazon EMR cluster.

  • :auto_termination_policy (Types::AutoTerminationPolicy)

    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.

  • :os_release_label (String)

    Specifies a particular Amazon Linux release for all nodes in a cluster launch RunJobFlow request. If a release is not specified, Amazon EMR uses the latest validated Amazon Linux release for cluster launch.

  • :ebs_root_volume_iops (Integer)

    The IOPS, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. Available in Amazon EMR releases 6.15.0 and later.

  • :ebs_root_volume_throughput (Integer)

    The throughput, in MiB/s, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. Available in Amazon EMR releases 6.15.0 and later.

Returns:

See Also:



3790
3791
3792
3793
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 3790

def run_job_flow(params = {}, options = {})
  req = build_request(:run_job_flow, params)
  req.send_request(options)
end

#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.

Examples:

Request syntax with placeholder values


resp = client.set_keep_job_flow_alive_when_no_steps({
  job_flow_ids: ["XmlString"], # required
  keep_job_flow_alive_when_no_steps: false, # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :job_flow_ids (required, Array<String>)

    A list of strings that uniquely identify the clusters to protect. This identifier is returned by RunJobFlow and can also be obtained from DescribeJobFlows.

  • :keep_job_flow_alive_when_no_steps (required, Boolean)

    A Boolean that indicates whether to terminate the cluster after all steps are executed.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



3837
3838
3839
3840
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 3837

def set_keep_job_flow_alive_when_no_steps(params = {}, options = {})
  req = build_request(:set_keep_job_flow_alive_when_no_steps, params)
  req.send_request(options)
end

#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.

Examples:

Request syntax with placeholder values


resp = client.set_termination_protection({
  job_flow_ids: ["XmlString"], # required
  termination_protected: false, # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :job_flow_ids (required, Array<String>)

    A list of strings that uniquely identify the clusters to protect. This identifier is returned by RunJobFlow and can also be obtained from DescribeJobFlows .

  • :termination_protected (required, Boolean)

    A Boolean that indicates whether to protect the cluster and prevent the Amazon EC2 instances in the cluster from shutting down due to API calls, user intervention, or job-flow error.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



3890
3891
3892
3893
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 3890

def set_termination_protection(params = {}, options = {})
  req = build_request(:set_termination_protection, params)
  req.send_request(options)
end

#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.

Examples:

Request syntax with placeholder values


resp = client.set_unhealthy_node_replacement({
  job_flow_ids: ["XmlString"], # required
  unhealthy_node_replacement: false, # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :job_flow_ids (required, Array<String>)

    The list of strings that uniquely identify the clusters for which to turn on unhealthy node replacement. You can get these identifiers by running the RunJobFlow or the DescribeJobFlows operations.

  • :unhealthy_node_replacement (required, Boolean)

    Indicates whether to turn on or turn off graceful unhealthy node replacement.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



3938
3939
3940
3941
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 3938

def set_unhealthy_node_replacement(params = {}, options = {})
  req = build_request(:set_unhealthy_node_replacement, params)
  req.send_request(options)
end

#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.

Examples:

Request syntax with placeholder values


resp = client.set_visible_to_all_users({
  job_flow_ids: ["XmlString"], # required
  visible_to_all_users: false, # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :job_flow_ids (required, Array<String>)

    The unique identifier of the job flow (cluster).

  • :visible_to_all_users (required, Boolean)

    A value of true indicates that an IAM principal in the Amazon Web Services account can perform Amazon EMR actions on the cluster that the IAM policies attached to the principal allow. A value of false indicates that only the IAM principal that created the cluster and the Amazon Web Services root user can perform Amazon EMR actions on the cluster.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



3991
3992
3993
3994
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 3991

def set_visible_to_all_users(params = {}, options = {})
  req = build_request(:set_visible_to_all_users, params)
  req.send_request(options)
end

#start_notebook_execution(params = {}) ⇒ Types::StartNotebookExecutionOutput

Starts a notebook execution.

Examples:

Request syntax with placeholder values


resp = client.start_notebook_execution({
  editor_id: "XmlStringMaxLen256",
  relative_path: "XmlString",
  notebook_execution_name: "XmlStringMaxLen256",
  notebook_params: "XmlString",
  execution_engine: { # required
    id: "XmlStringMaxLen256", # required
    type: "EMR", # accepts EMR
    master_instance_security_group_id: "XmlStringMaxLen256",
    execution_role_arn: "IAMRoleArn",
  },
  service_role: "XmlString", # required
  notebook_instance_security_group_id: "XmlStringMaxLen256",
  tags: [
    {
      key: "String",
      value: "String",
    },
  ],
  notebook_s3_location: {
    bucket: "XmlStringMaxLen256",
    key: "UriString",
  },
  output_notebook_s3_location: {
    bucket: "XmlStringMaxLen256",
    key: "UriString",
  },
  output_notebook_format: "HTML", # accepts HTML
  environment_variables: {
    "XmlStringMaxLen256" => "XmlString",
  },
})

Response structure


resp.notebook_execution_id #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :editor_id (String)

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

  • :relative_path (String)

    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.

  • :notebook_execution_name (String)

    An optional name for the notebook execution.

  • :notebook_params (String)

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

  • :execution_engine (required, Types::ExecutionEngineConfig)

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

  • :service_role (required, String)

    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.

  • :notebook_instance_security_group_id (String)

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

  • :tags (Array<Types::Tag>)

    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.

  • :notebook_s3_location (Types::NotebookS3LocationFromInput)

    The Amazon S3 location for the notebook execution input.

  • :output_notebook_s3_location (Types::OutputNotebookS3LocationFromInput)

    The Amazon S3 location for the notebook execution output.

  • :output_notebook_format (String)

    The output format for the notebook execution.

  • :environment_variables (Hash<String,String>)

    The environment variables associated with the notebook execution.

Returns:

See Also:



4097
4098
4099
4100
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 4097

def start_notebook_execution(params = {}, options = {})
  req = build_request(:start_notebook_execution, params)
  req.send_request(options)
end

#stop_notebook_execution(params = {}) ⇒ Struct

Stops a notebook execution.

Examples:

Request syntax with placeholder values


resp = client.stop_notebook_execution({
  notebook_execution_id: "XmlStringMaxLen256", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :notebook_execution_id (required, String)

    The unique identifier of the notebook execution.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4119
4120
4121
4122
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 4119

def stop_notebook_execution(params = {}, options = {})
  req = build_request(:stop_notebook_execution, params)
  req.send_request(options)
end

#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.

Examples:

Request syntax with placeholder values


resp = client.terminate_job_flows({
  job_flow_ids: ["XmlString"], # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :job_flow_ids (required, Array<String>)

    A list of job flows to be shut down.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4151
4152
4153
4154
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 4151

def terminate_job_flows(params = {}, options = {})
  req = build_request(:terminate_job_flows, params)
  req.send_request(options)
end

#update_studio(params = {}) ⇒ Struct

Updates an Amazon EMR Studio configuration, including attributes such as name, description, and subnets.

Examples:

Request syntax with placeholder values


resp = client.update_studio({
  studio_id: "XmlStringMaxLen256", # required
  name: "XmlStringMaxLen256",
  description: "XmlStringMaxLen256",
  subnet_ids: ["String"],
  default_s3_location: "XmlString",
  encryption_key_arn: "XmlString",
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :studio_id (required, String)

    The ID of the Amazon EMR Studio to update.

  • :name (String)

    A descriptive name for the Amazon EMR Studio.

  • :description (String)

    A detailed description to assign to the Amazon EMR Studio.

  • :subnet_ids (Array<String>)

    A list of subnet IDs to associate with the Amazon EMR Studio. The list can include new subnet IDs, but must also include all of the subnet IDs previously associated with the Studio. The list order does not matter. A Studio can have a maximum of 5 subnets. The subnets must belong to the same VPC as the Studio.

  • :default_s3_location (String)

    The Amazon S3 location to back up Workspaces and notebook files for the Amazon EMR Studio.

  • :encryption_key_arn (String)

    The KMS key identifier (ARN) used to encrypt Amazon EMR Studio workspace and notebook files when backed up to Amazon S3.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4200
4201
4202
4203
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 4200

def update_studio(params = {}, options = {})
  req = build_request(:update_studio, params)
  req.send_request(options)
end

#update_studio_session_mapping(params = {}) ⇒ Struct

Updates the session policy attached to the user or group for the specified Amazon EMR Studio.

Examples:

Request syntax with placeholder values


resp = client.update_studio_session_mapping({
  studio_id: "XmlStringMaxLen256", # required
  identity_id: "XmlStringMaxLen256",
  identity_name: "XmlStringMaxLen256",
  identity_type: "USER", # required, accepts USER, GROUP
  session_policy_arn: "XmlStringMaxLen256", # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :studio_id (required, String)

    The ID of the Amazon EMR Studio.

  • :identity_id (String)

    The globally unique identifier (GUID) of the user or group. For more information, see UserId and GroupId in the IAM Identity Center Identity Store API Reference. Either IdentityName or IdentityId must be specified.

  • :identity_name (String)

    The name of the user or group to update. For more information, see UserName and DisplayName in the IAM Identity Center Identity Store API Reference. Either IdentityName or IdentityId must be specified.

  • :identity_type (required, String)

    Specifies whether the identity to update is a user or a group.

  • :session_policy_arn (required, String)

    The Amazon Resource Name (ARN) of the session policy to associate with the specified user or group.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4256
4257
4258
4259
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 4256

def update_studio_session_mapping(params = {}, options = {})
  req = build_request(:update_studio_session_mapping, params)
  req.send_request(options)
end

#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

Parameters:

  • waiter_name (Symbol)
  • params (Hash) (defaults to: {})

    ({})

  • options (Hash) (defaults to: {})

    ({})

Options Hash (options):

  • :max_attempts (Integer)
  • :delay (Integer)
  • :before_attempt (Proc)
  • :before_wait (Proc)

Yields:

  • (w.waiter)

Returns:

  • (Boolean)

    Returns true if the waiter was successful.

Raises:

  • (Errors::FailureStateError)

    Raised when the waiter terminates because the waiter has entered a state that it will not transition out of, preventing success.

  • (Errors::TooManyAttemptsError)

    Raised when the configured maximum number of attempts have been made, and the waiter is not yet successful.

  • (Errors::UnexpectedError)

    Raised when an error is encounted while polling for a resource that is not expected.

  • (Errors::NoSuchWaiterError)

    Raised when you request to wait for an unknown state.



4373
4374
4375
4376
4377
# File 'gems/aws-sdk-emr/lib/aws-sdk-emr/client.rb', line 4373

def wait_until(waiter_name, params = {}, options = {})
  w = waiter(waiter_name, options)
  yield(w.waiter) if block_given? # deprecated
  w.wait(params)
end