Icon

AWS Elastic MapReduce for SFTP (version v1.*.*)

add_instance_fleet

Adds an instance fleet to a running cluster.
The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x.

Parameters

$body

Type: object

{
"ClusterId" : "The unique identifier of the cluster.",
"InstanceFleet" : {
"InstanceFleetType" : "The node type that the instance fleet hosts. Valid values are MASTER,CORE,and TASK.",
"TargetOnDemandCapacity" : "The target capacity of On-Demand units for the instance fleet, which determines how many On-Demand instances to provision. When the instance fleet launches, Amazon EMR tries to provision On-Demand instances as specified by InstanceTypeConfig. Each instance configuration has a specified WeightedCapacity. When an On-Demand instance is provisioned, the WeightedCapacity units count toward the target capacity. Amazon EMR provisions instances until the target capacity is totally fulfilled, even if this results in an overage. For example, if there are 2 units remaining to fulfill capacity, and Amazon EMR can only provision an instance with a WeightedCapacity of 5 units, the instance is provisioned, and the target capacity is exceeded by 3 units. \nIf not specified or set to 0, only Spot instances are provisioned for the instance fleet using TargetSpotCapacity. At least one of TargetSpotCapacity and TargetOnDemandCapacity should be greater than 0. For a master instance fleet, only one of TargetSpotCapacity and TargetOnDemandCapacity can be specified, and its value must be 1.",
"TargetSpotCapacity" : "The target capacity of Spot units for the instance fleet, which determines how many Spot instances to provision. When the instance fleet launches, Amazon EMR tries to provision Spot instances as specified by InstanceTypeConfig. Each instance configuration has a specified WeightedCapacity. When a Spot instance is provisioned, the WeightedCapacity units count toward the target capacity. Amazon EMR provisions instances until the target capacity is totally fulfilled, even if this results in an overage. For example, if there are 2 units remaining to fulfill capacity, and Amazon EMR can only provision an instance with a WeightedCapacity of 5 units, the instance is provisioned, and the target capacity is exceeded by 3 units. \nIf not specified or set to 0, only On-Demand instances are provisioned for the instance fleet. At least one of TargetSpotCapacity and TargetOnDemandCapacity should be greater than 0. For a master instance fleet, only one of TargetSpotCapacity and TargetOnDemandCapacity can be specified, and its value must be 1.",
"LaunchSpecifications" : {
"SpotSpecification" : {
"TimeoutDurationMinutes" : "The spot provisioning timeout period in minutes. If Spot instances are not provisioned within this time period, the TimeOutAction is taken. Minimum value is 5 and maximum value is 1440. The timeout applies only during initial provisioning, when the cluster is first created.",
"TimeoutAction" : "The action to take when TargetSpotCapacity has not been fulfilled when the TimeoutDurationMinutes has expired; that is, when all Spot instances could not be provisioned within the Spot provisioning timeout. Valid values are TERMINATE_CLUSTER and SWITCH_TO_ON_DEMAND. SWITCH_TO_ON_DEMAND specifies that if no Spot instances are available, On-Demand Instances should be provisioned to fulfill any remaining Spot capacity.",
"BlockDurationMinutes" : "The defined duration for Spot instances (also known as Spot blocks) in minutes. When specified, the Spot instance does not terminate before the defined duration expires, and defined duration pricing for Spot instances applies. Valid values are 60, 120, 180, 240, 300, or 360. The duration period starts as soon as a Spot instance receives its instance ID. At the end of the duration, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates. "
}
},
"InstanceTypeConfigs" : [ {
"BidPrice" : "The bid price for each EC2 Spot instance type as defined by InstanceType. Expressed in USD. If neither BidPrice nor BidPriceAsPercentageOfOnDemandPrice is provided, BidPriceAsPercentageOfOnDemandPrice defaults to 100%. ",
"WeightedCapacity" : "The number of units that a provisioned instance of this type provides toward fulfilling the target capacities defined in InstanceFleetConfig. This value is 1 for a master instance fleet, and must be 1 or greater for core and task instance fleets. Defaults to 1 if not specified. ",
"EbsConfiguration" : {
"EbsBlockDeviceConfigs" : [ {
"VolumeSpecification" : {
"SizeInGB" : "The volume size, in gibibytes (GiB). This can be a number from 1 - 1024. If the volume type is EBS-optimized, the minimum value is 10.",
"VolumeType" : "The volume type. Volume types supported are gp2, io1, standard.",
"Iops" : "The number of I/O operations per second (IOPS) that the volume supports."
},
"VolumesPerInstance" : "Number of EBS volumes with a specific volume configuration that will be associated with every instance in the instance group"
} ],
"EbsOptimized" : "Indicates whether an Amazon EBS volume is EBS-optimized."
},
"BidPriceAsPercentageOfOnDemandPrice" : "The bid price, as a percentage of On-Demand price, for each EC2 Spot instance as defined by InstanceType. Expressed as a number (for example, 20 specifies 20%). If neither BidPrice nor BidPriceAsPercentageOfOnDemandPrice is provided, BidPriceAsPercentageOfOnDemandPrice defaults to 100%.",
"InstanceType" : "An EC2 instance type, such as m3.xlarge. ",
"Configurations" : [ {
"Classification" : "The classification within a configuration.",
"Configurations" : "ConfigurationList",
"Properties" : "A set of properties specified within a configuration classification."
} ]
} ],
"Name" : "The friendly name of the instance fleet."
}
}

add_instance_groups

Adds one or more instance groups to a running cluster.

Parameters

$body

Input to an AddInstanceGroups call.

Type: object

{
"JobFlowId" : "Job flow in which to add the instance groups.",
"InstanceGroups" : [ {
"BidPrice" : "The maximum Spot price your are willing to pay for EC2 instances. \nAn optional, nullable field that applies if the MarketType for the instance group is specified as SPOT. Specify the maximum spot price in USD. If the value is NULL and SPOT is specified, the maximum Spot price is set equal to the On-Demand price.",
"InstanceCount" : "Target number of instances for the instance group.",
"AutoScalingPolicy" : {
"Constraints" : {
"MinCapacity" : "The lower boundary of EC2 instances in an instance group below which scaling activities are not allowed to shrink. Scale-in activities will not terminate instances below this boundary.",
"MaxCapacity" : "The upper boundary of EC2 instances in an instance group beyond which scaling activities are not allowed to grow. Scale-out activities will not add instances beyond this boundary."
},
"Rules" : [ {
"Action" : {
"SimpleScalingPolicyConfiguration" : {
"ScalingAdjustment" : "The amount by which to scale in or scale out, based on the specified AdjustmentType. A positive value adds to the instance group's EC2 instance count while a negative number removes instances. If AdjustmentType is set to EXACT_CAPACITY, the number should only be a positive integer. If AdjustmentType is set to PERCENT_CHANGE_IN_CAPACITY, the value should express the percentage as an integer. For example, -20 indicates a decrease in 20% increments of cluster capacity.",
"CoolDown" : "The amount of time, in seconds, after a scaling activity completes before any further trigger-related scaling activities can start. The default value is 0.",
"AdjustmentType" : "The way in which EC2 instances are added (if ScalingAdjustment is a positive number) or terminated (if ScalingAdjustment is a negative number) each time the scaling activity is triggered. CHANGE_IN_CAPACITY is the default. CHANGE_IN_CAPACITY indicates that the EC2 instance count increments or decrements by ScalingAdjustment, which should be expressed as an integer. PERCENT_CHANGE_IN_CAPACITY indicates the instance count increments or decrements by the percentage specified by ScalingAdjustment, which should be expressed as an integer. For example, 20 indicates an increase in 20% increments of cluster capacity. EXACT_CAPACITY indicates the scaling activity results in an instance group with the number of EC2 instances specified by ScalingAdjustment, which should be expressed as a positive integer."
},
"Market" : "Not available for instance groups. Instance groups use the market type specified for the group."
},
"Description" : "A friendly, more verbose description of the automatic scaling rule.",
"Trigger" : {
"CloudWatchAlarmDefinition" : {
"MetricName" : "The name of the CloudWatch metric that is watched to determine an alarm condition.",
"ComparisonOperator" : "Determines how the metric specified by MetricName is compared to the value specified by Threshold.",
"Statistic" : "The statistic to apply to the metric associated with the alarm. The default is AVERAGE.",
"Period" : "The period, in seconds, over which the statistic is applied. EMR CloudWatch metrics are emitted every five minutes (300 seconds), so if an EMR CloudWatch metric is specified, specify 300.",
"Dimensions" : [ {
"Value" : "The dimension value.",
"Key" : "The dimension name."
} ],
"EvaluationPeriods" : "The number of periods, expressed in seconds using Period, during which the alarm condition must exist before the alarm triggers automatic scaling activity. The default value is 1.",
"Unit" : "The unit of measure associated with the CloudWatch metric being watched. The value specified for Unit must correspond to the units specified in the CloudWatch metric.",
"Namespace" : "The namespace for the CloudWatch metric. The default is AWS/ElasticMapReduce.",
"Threshold" : "The value against which the specified statistic is compared."
}
},
"Name" : "The name used to identify an automatic scaling rule. Rule names must be unique within a scaling policy."
} ]
},
"EbsConfiguration" : {
"EbsBlockDeviceConfigs" : [ {
"VolumeSpecification" : {
"SizeInGB" : "The volume size, in gibibytes (GiB). This can be a number from 1 - 1024. If the volume type is EBS-optimized, the minimum value is 10.",
"VolumeType" : "The volume type. Volume types supported are gp2, io1, standard.",
"Iops" : "The number of I/O operations per second (IOPS) that the volume supports."
},
"VolumesPerInstance" : "Number of EBS volumes with a specific volume configuration that will be associated with every instance in the instance group"
} ],
"EbsOptimized" : "Indicates whether an Amazon EBS volume is EBS-optimized."
},
"InstanceRole" : "The role of the instance group in the cluster.",
"InstanceType" : "The EC2 instance type for all instances in the instance group.",
"Configurations" : [ {
"Classification" : "The classification within a configuration.",
"Configurations" : "ConfigurationList",
"Properties" : "A set of properties specified within a configuration classification."
} ],
"Market" : "Market type of the EC2 instances used to create a cluster node.",
"Name" : "Friendly name given to the instance group."
} ]
}

add_job_flow_steps

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. For more information on how to do this, see Add More than 256 Steps to a Cluster in the Amazon EMR Management Guide.
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.

Parameters

$body

The input argument to the AddJobFlowSteps operation.

Type: object

{
"JobFlowId" : "A string that uniquely identifies the job flow. This identifier is returned by RunJobFlow and can also be obtained from ListClusters. ",
"Steps" : [ {
"ActionOnFailure" : "The action to take when the cluster step fails. Possible values are TERMINATE_CLUSTER, CANCEL_AND_WAIT, and CONTINUE. TERMINATE_JOB_FLOW is provided for backward compatibility. We recommend using TERMINATE_CLUSTER instead.",
"HadoopJarStep" : {
"MainClass" : "The name of the main class in the specified Java file. If not specified, the JAR file should specify a Main-Class in its manifest file.",
"Args" : [ "string" ],
"Jar" : "A path to a JAR file run during the step.",
"Properties" : [ {
"Value" : "The value part of the identified key.",
"Key" : "The unique identifier of a key value pair."
} ]
},
"Name" : "The name of the step."
} ]
}

add_tags

Adds tags to an Amazon EMR resource. Tags make it easier to associate clusters in various ways, such as grouping clusters to track your Amazon EMR resource allocation costs. For more information, see Tag Clusters.

Parameters

$body

This input identifies a cluster and a list of tags to attach.

Type: object

{
"ResourceId" : "The Amazon EMR resource identifier to which tags will be added. This value must be a cluster identifier.",
"Tags" : [ {
"Value" : "A user-defined value, which is optional in a tag. For more information, see Tag Clusters. ",
"Key" : "A user-defined key, which is the minimum required information for a valid tag. For more information, see Tag . "
} ]
}

cancel_steps

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 a step will be canceled, even if the request is successfully submitted. You can only cancel steps that are in a PENDING state.

Parameters

$body

The input argument to the CancelSteps operation.

Type: object

{
"ClusterId" : "The ClusterID for which specified steps will be canceled. Use RunJobFlow and ListClusters to get ClusterIDs. ",
"StepIds" : [ "string" ]
}

create_security_configuration

Creates a security configuration, which is stored in the service and can be specified when a cluster is created.

Parameters

$body

Type: object

{
"SecurityConfiguration" : "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.",
"Name" : "The name of the security configuration."
}

delete_security_configuration

Deletes a security configuration.

Parameters

$body

Type: object

{
"Name" : "The name of the security configuration."
}

describe_cluster

Provides cluster-level details including status, hardware and software configuration, VPC settings, and so on.

Parameters

$body

This input determines which cluster to describe.

Type: object

{
"ClusterId" : "The identifier of the cluster to describe."
}

describe_job_flows

This API is deprecated 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.

Parameters

$body

The input for the DescribeJobFlows operation.

Type: object

{
"JobFlowIds" : [ "string" ],
"CreatedAfter" : "Return only job flows created after this date and time.",
"CreatedBefore" : "Return only job flows created before this date and time.",
"JobFlowStates" : [ "string. Possible values: STARTING | BOOTSTRAPPING | RUNNING | WAITING | SHUTTING_DOWN | TERMINATED | COMPLETED | FAILED" ]
}

describe_security_configuration

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

Parameters

$body

Type: object

{
"Name" : "The name of the security configuration."
}

describe_step

Provides more detail about the cluster step.

Parameters

$body

This input determines which step to describe.

Type: object

{
"StepId" : "The identifier of the step to describe.",
"ClusterId" : "The identifier of the cluster with steps to describe."
}

get_block_public_access_configuration

Returns the Amazon EMR block public access configuration for your AWS account in the current Region. For more information see Configure Block Public Access for Amazon EMR in the Amazon EMR Management Guide.

Parameters

$body

Type: object

{ }

list_bootstrap_actions

Provides information about the bootstrap actions associated with a cluster.

Parameters

$body

This input determines which bootstrap actions to retrieve.

Type: object

{
"ClusterId" : "The cluster identifier for the bootstrap actions to list."
}

list_clusters

Provides the status of all clusters visible to this AWS 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 per call, but returns a marker to track the paging of the cluster list across multiple ListClusters calls.

Parameters

$body

This input determines how the ListClusters action filters the list of clusters that it returns.

Type: object

{
"CreatedAfter" : "The creation date and time beginning value filter for listing clusters.",
"CreatedBefore" : "The creation date and time end value filter for listing clusters.",
"ClusterStates" : [ "string. Possible values: STARTING | BOOTSTRAPPING | RUNNING | WAITING | TERMINATING | TERMINATED | TERMINATED_WITH_ERRORS" ]
}

list_instance_fleets

Lists all available details about the instance fleets in a cluster.
The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.

Parameters

$body

Type: object

{
"ClusterId" : "The unique identifier of the cluster."
}

list_instance_groups

Provides all available details about the instance groups in a cluster.

Parameters

$body

This input determines which instance groups to retrieve.

Type: object

{
"ClusterId" : "The identifier of the cluster for which to list the instance groups."
}

list_instances

Provides information for all active EC2 instances and EC2 instances terminated in the last 30 days, up to a maximum of 2,000. EC2 instances in any of the following states are considered active: AWAITING_FULFILLMENT, PROVISIONING, BOOTSTRAPPING, RUNNING.

Parameters

$body

This input determines which instances to list.

Type: object

{
"InstanceFleetType" : "The node type of the instance fleet. For example MASTER, CORE, or TASK.",
"ClusterId" : "The identifier of the cluster for which to list the instances.",
"InstanceStates" : [ "string. Possible values: AWAITING_FULFILLMENT | PROVISIONING | BOOTSTRAPPING | RUNNING | TERMINATED" ],
"InstanceGroupId" : "The identifier of the instance group for which to list the instances.",
"InstanceGroupTypes" : [ "string. Possible values: MASTER | CORE | TASK" ],
"InstanceFleetId" : "The unique identifier of the instance fleet."
}

list_security_configurations

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.

This operation has no parameters

list_steps

Provides a list of steps for the cluster in reverse order unless you specify stepIds with the request.

Parameters

$body

This input determines which steps to list.

Type: object

{
"ClusterId" : "The identifier of the cluster for which to list the steps.",
"StepIds" : [ "string" ],
"StepStates" : [ "string. Possible values: PENDING | CANCEL_PENDING | RUNNING | COMPLETED | CANCELLED | FAILED | INTERRUPTED" ]
}

modify_instance_fleet

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 versions 4.8.0 and later, excluding 5.0.x versions.

Parameters

$body

Type: object

{
"ClusterId" : "The unique identifier of the cluster.",
"InstanceFleet" : {
"TargetOnDemandCapacity" : "The target capacity of On-Demand units for the instance fleet. For more information see InstanceFleetConfig$TargetOnDemandCapacity.",
"TargetSpotCapacity" : "The target capacity of Spot units for the instance fleet. For more information, see InstanceFleetConfig$TargetSpotCapacity.",
"InstanceFleetId" : "A unique identifier for the instance fleet."
}
}

modify_instance_groups

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.

Parameters

$body

Change the size of some instance groups.

Type: object

{
"ClusterId" : "The ID of the cluster to which the instance group belongs.",
"InstanceGroups" : [ {
"InstanceCount" : "Target size for the instance group.",
"InstanceGroupId" : "Unique ID of the instance group to expand or shrink.",
"Configurations" : [ {
"Classification" : "The classification within a configuration.",
"Configurations" : "ConfigurationList",
"Properties" : "A set of properties specified within a configuration classification."
} ],
"ShrinkPolicy" : {
"DecommissionTimeout" : "The desired timeout for decommissioning an instance. Overrides the default YARN decommissioning timeout.",
"InstanceResizePolicy" : {
"InstancesToTerminate" : [ "string" ],
"InstanceTerminationTimeout" : "Decommissioning timeout override for the specific list of instances to be terminated.",
"InstancesToProtect" : [ "string" ]
}
},
"EC2InstanceIdsToTerminate" : [ "string" ]
} ]
}

put_auto_scaling_policy

Creates or updates an automatic scaling policy for a core instance group or task instance group in an Amazon EMR cluster. The automatic scaling policy defines how an instance group dynamically adds and terminates EC2 instances in response to the value of a CloudWatch metric.

Parameters

$body

Type: object

{
"AutoScalingPolicy" : {
"Constraints" : {
"MinCapacity" : "The lower boundary of EC2 instances in an instance group below which scaling activities are not allowed to shrink. Scale-in activities will not terminate instances below this boundary.",
"MaxCapacity" : "The upper boundary of EC2 instances in an instance group beyond which scaling activities are not allowed to grow. Scale-out activities will not add instances beyond this boundary."
},
"Rules" : [ {
"Action" : {
"SimpleScalingPolicyConfiguration" : {
"ScalingAdjustment" : "The amount by which to scale in or scale out, based on the specified AdjustmentType. A positive value adds to the instance group's EC2 instance count while a negative number removes instances. If AdjustmentType is set to EXACT_CAPACITY, the number should only be a positive integer. If AdjustmentType is set to PERCENT_CHANGE_IN_CAPACITY, the value should express the percentage as an integer. For example, -20 indicates a decrease in 20% increments of cluster capacity.",
"CoolDown" : "The amount of time, in seconds, after a scaling activity completes before any further trigger-related scaling activities can start. The default value is 0.",
"AdjustmentType" : "The way in which EC2 instances are added (if ScalingAdjustment is a positive number) or terminated (if ScalingAdjustment is a negative number) each time the scaling activity is triggered. CHANGE_IN_CAPACITY is the default. CHANGE_IN_CAPACITY indicates that the EC2 instance count increments or decrements by ScalingAdjustment, which should be expressed as an integer. PERCENT_CHANGE_IN_CAPACITY indicates the instance count increments or decrements by the percentage specified by ScalingAdjustment, which should be expressed as an integer. For example, 20 indicates an increase in 20% increments of cluster capacity. EXACT_CAPACITY indicates the scaling activity results in an instance group with the number of EC2 instances specified by ScalingAdjustment, which should be expressed as a positive integer."
},
"Market" : "Not available for instance groups. Instance groups use the market type specified for the group."
},
"Description" : "A friendly, more verbose description of the automatic scaling rule.",
"Trigger" : {
"CloudWatchAlarmDefinition" : {
"MetricName" : "The name of the CloudWatch metric that is watched to determine an alarm condition.",
"ComparisonOperator" : "Determines how the metric specified by MetricName is compared to the value specified by Threshold.",
"Statistic" : "The statistic to apply to the metric associated with the alarm. The default is AVERAGE.",
"Period" : "The period, in seconds, over which the statistic is applied. EMR CloudWatch metrics are emitted every five minutes (300 seconds), so if an EMR CloudWatch metric is specified, specify 300.",
"Dimensions" : [ {
"Value" : "The dimension value.",
"Key" : "The dimension name."
} ],
"EvaluationPeriods" : "The number of periods, expressed in seconds using Period, during which the alarm condition must exist before the alarm triggers automatic scaling activity. The default value is 1.",
"Unit" : "The unit of measure associated with the CloudWatch metric being watched. The value specified for Unit must correspond to the units specified in the CloudWatch metric.",
"Namespace" : "The namespace for the CloudWatch metric. The default is AWS/ElasticMapReduce.",
"Threshold" : "The value against which the specified statistic is compared."
}
},
"Name" : "The name used to identify an automatic scaling rule. Rule names must be unique within a scaling policy."
} ]
},
"ClusterId" : "Specifies the ID of a cluster. The instance group to which the automatic scaling policy is applied is within this cluster.",
"InstanceGroupId" : "Specifies the ID of the instance group to which the automatic scaling policy is applied."
}

put_block_public_access_configuration

Creates or updates an Amazon EMR block public access configuration for your AWS account in the current Region. For more information see Configure Block Public Access for Amazon EMR in the Amazon EMR Management Guide.

Parameters

$body

Type: object

{
"BlockPublicAccessConfiguration" : {
"PermittedPublicSecurityGroupRuleRanges" : [ {
"MinRange" : "The smallest port number in a specified range of port numbers.",
"MaxRange" : "The smallest port number in a specified range of port numbers."
} ],
"BlockPublicSecurityGroupRules" : "Indicates whether EMR block public access is enabled (true) or disabled (false). By default, the value is false for accounts that have created EMR clusters before July 2019. For accounts created after this, the default is true."
}
}

remove_auto_scaling_policy

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

Parameters

$body

Type: object

{
"ClusterId" : "Specifies the ID of a cluster. The instance group to which the automatic scaling policy is applied is within this cluster.",
"InstanceGroupId" : "Specifies the ID of the instance group to which the scaling policy is applied."
}

remove_tags

Removes tags from an Amazon EMR resource. Tags make it easier to associate clusters 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:

Parameters

$body

This input identifies a cluster and a list of tags to remove.

Type: object

{
"ResourceId" : "The Amazon EMR resource identifier from which tags will be removed. This value must be a cluster identifier.",
"TagKeys" : [ "string" ]
}

run_job_flow

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 more information on how to do this, see Add More than 256 Steps to a Cluster in the Amazon EMR Management Guide.
For long running clusters, we recommend that you periodically store your results.
The instance fleets configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions. The RunJobFlow request can contain InstanceFleets parameters or InstanceGroups parameters, but not both.

Parameters

$body

Input to the RunJobFlow operation.

Type: object

{
"Steps" : [ {
"ActionOnFailure" : "The action to take when the cluster step fails. Possible values are TERMINATE_CLUSTER, CANCEL_AND_WAIT, and CONTINUE. TERMINATE_JOB_FLOW is provided for backward compatibility. We recommend using TERMINATE_CLUSTER instead.",
"HadoopJarStep" : {
"MainClass" : "The name of the main class in the specified Java file. If not specified, the JAR file should specify a Main-Class in its manifest file.",
"Args" : [ "string" ],
"Jar" : "A path to a JAR file run during the step.",
"Properties" : [ {
"Value" : "The value part of the identified key.",
"Key" : "The unique identifier of a key value pair."
} ]
},
"Name" : "The name of the step."
} ],
"AdditionalInfo" : "A JSON string for selecting additional features.",
"KerberosAttributes" : {
"CrossRealmTrustPrincipalPassword" : "Required only when establishing a cross-realm trust with a KDC in a different realm. The cross-realm principal password, which must be identical across realms.",
"ADDomainJoinUser" : "Required only when establishing a cross-realm trust with an Active Directory domain. A user with sufficient privileges to join resources to the domain.",
"KdcAdminPassword" : "The password used within the cluster for the kadmin service on the cluster-dedicated KDC, which maintains Kerberos principals, password policies, and keytabs for the cluster.",
"Realm" : "The name of the Kerberos realm to which all nodes in a cluster belong. For example, EC2.INTERNAL. ",
"ADDomainJoinPassword" : "The Active Directory password for ADDomainJoinUser."
},
"Applications" : [ {
"AdditionalInfo" : "This option is for advanced users only. This is meta information about third-party applications that third-party vendors use for testing purposes.",
"Args" : [ "string" ],
"Version" : "The version of the application.",
"Name" : "The name of the application."
} ],
"AutoScalingRole" : "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 EC2 instances in an instance group.",
"AmiVersion" : "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.",
"EbsRootVolumeSize" : "The size, in GiB, of the EBS root device volume of the Linux AMI that is used for each EC2 instance. Available in Amazon EMR version 4.x and later.",
"CustomAmiId" : "Available only in Amazon EMR version 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 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 versions 2.x and 3.x, use AmiVersion instead. \nFor 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. ",
"Name" : "The name of the job flow.",
"Instances" : {
"AdditionalSlaveSecurityGroups" : [ "string" ],
"Ec2SubnetIds" : [ "string" ],
"HadoopVersion" : "Applies only to Amazon EMR release versions earlier than 4.0. The Hadoop version for the cluster. Valid inputs are \"0.18\" (deprecated), \"0.20\" (deprecated), \"0.20.205\" (deprecated), \"1.0.3\", \"2.2.0\", or \"2.4.0\". If you do not set this value, the default of 0.18 is used, unless the AmiVersion parameter is set in the RunJobFlow call, in which case the default version of Hadoop for that AMI version is used.",
"InstanceGroups" : [ {
"BidPrice" : "The maximum Spot price your are willing to pay for EC2 instances. \nAn optional, nullable field that applies if the MarketType for the instance group is specified as SPOT. Specify the maximum spot price in USD. If the value is NULL and SPOT is specified, the maximum Spot price is set equal to the On-Demand price.",
"InstanceCount" : "Target number of instances for the instance group.",
"AutoScalingPolicy" : {
"Constraints" : {
"MinCapacity" : "The lower boundary of EC2 instances in an instance group below which scaling activities are not allowed to shrink. Scale-in activities will not terminate instances below this boundary.",
"MaxCapacity" : "The upper boundary of EC2 instances in an instance group beyond which scaling activities are not allowed to grow. Scale-out activities will not add instances beyond this boundary."
},
"Rules" : [ {
"Action" : {
"SimpleScalingPolicyConfiguration" : {
"ScalingAdjustment" : "The amount by which to scale in or scale out, based on the specified AdjustmentType. A positive value adds to the instance group's EC2 instance count while a negative number removes instances. If AdjustmentType is set to EXACT_CAPACITY, the number should only be a positive integer. If AdjustmentType is set to PERCENT_CHANGE_IN_CAPACITY, the value should express the percentage as an integer. For example, -20 indicates a decrease in 20% increments of cluster capacity.",
"CoolDown" : "The amount of time, in seconds, after a scaling activity completes before any further trigger-related scaling activities can start. The default value is 0.",
"AdjustmentType" : "The way in which EC2 instances are added (if ScalingAdjustment is a positive number) or terminated (if ScalingAdjustment is a negative number) each time the scaling activity is triggered. CHANGE_IN_CAPACITY is the default. CHANGE_IN_CAPACITY indicates that the EC2 instance count increments or decrements by ScalingAdjustment, which should be expressed as an integer. PERCENT_CHANGE_IN_CAPACITY indicates the instance count increments or decrements by the percentage specified by ScalingAdjustment, which should be expressed as an integer. For example, 20 indicates an increase in 20% increments of cluster capacity. EXACT_CAPACITY indicates the scaling activity results in an instance group with the number of EC2 instances specified by ScalingAdjustment, which should be expressed as a positive integer."
},
"Market" : "Not available for instance groups. Instance groups use the market type specified for the group."
},
"Description" : "A friendly, more verbose description of the automatic scaling rule.",
"Trigger" : {
"CloudWatchAlarmDefinition" : {
"MetricName" : "The name of the CloudWatch metric that is watched to determine an alarm condition.",
"ComparisonOperator" : "Determines how the metric specified by MetricName is compared to the value specified by Threshold.",
"Statistic" : "The statistic to apply to the metric associated with the alarm. The default is AVERAGE.",
"Period" : "The period, in seconds, over which the statistic is applied. EMR CloudWatch metrics are emitted every five minutes (300 seconds), so if an EMR CloudWatch metric is specified, specify 300.",
"Dimensions" : [ {
"Value" : "The dimension value.",
"Key" : "The dimension name."
} ],
"EvaluationPeriods" : "The number of periods, expressed in seconds using Period, during which the alarm condition must exist before the alarm triggers automatic scaling activity. The default value is 1.",
"Unit" : "The unit of measure associated with the CloudWatch metric being watched. The value specified for Unit must correspond to the units specified in the CloudWatch metric.",
"Namespace" : "The namespace for the CloudWatch metric. The default is AWS/ElasticMapReduce.",
"Threshold" : "The value against which the specified statistic is compared."
}
},
"Name" : "The name used to identify an automatic scaling rule. Rule names must be unique within a scaling policy."
} ]
},
"EbsConfiguration" : {
"EbsBlockDeviceConfigs" : [ {
"VolumeSpecification" : {
"SizeInGB" : "The volume size, in gibibytes (GiB). This can be a number from 1 - 1024. If the volume type is EBS-optimized, the minimum value is 10.",
"VolumeType" : "The volume type. Volume types supported are gp2, io1, standard.",
"Iops" : "The number of I/O operations per second (IOPS) that the volume supports."
},
"VolumesPerInstance" : "Number of EBS volumes with a specific volume configuration that will be associated with every instance in the instance group"
} ],
"EbsOptimized" : "Indicates whether an Amazon EBS volume is EBS-optimized."
},
"InstanceRole" : "The role of the instance group in the cluster.",
"InstanceType" : "The EC2 instance type for all instances in the instance group.",
"Configurations" : [ {
"Classification" : "The classification within a configuration.",
"Configurations" : "ConfigurationList",
"Properties" : "A set of properties specified within a configuration classification."
} ],
"Market" : "Market type of the EC2 instances used to create a cluster node.",
"Name" : "Friendly name given to the instance group."
} ],
"TerminationProtected" : "Specifies whether to lock the cluster to prevent the Amazon EC2 instances from being terminated by API call, user intervention, or in the event of a job-flow error.",
"InstanceFleets" : [ {
"InstanceFleetType" : "The node type that the instance fleet hosts. Valid values are MASTER,CORE,and TASK.",
"TargetOnDemandCapacity" : "The target capacity of On-Demand units for the instance fleet, which determines how many On-Demand instances to provision. When the instance fleet launches, Amazon EMR tries to provision On-Demand instances as specified by InstanceTypeConfig. Each instance configuration has a specified WeightedCapacity. When an On-Demand instance is provisioned, the WeightedCapacity units count toward the target capacity. Amazon EMR provisions instances until the target capacity is totally fulfilled, even if this results in an overage. For example, if there are 2 units remaining to fulfill capacity, and Amazon EMR can only provision an instance with a WeightedCapacity of 5 units, the instance is provisioned, and the target capacity is exceeded by 3 units. \nIf not specified or set to 0, only Spot instances are provisioned for the instance fleet using TargetSpotCapacity. At least one of TargetSpotCapacity and TargetOnDemandCapacity should be greater than 0. For a master instance fleet, only one of TargetSpotCapacity and TargetOnDemandCapacity can be specified, and its value must be 1.",
"TargetSpotCapacity" : "The target capacity of Spot units for the instance fleet, which determines how many Spot instances to provision. When the instance fleet launches, Amazon EMR tries to provision Spot instances as specified by InstanceTypeConfig. Each instance configuration has a specified WeightedCapacity. When a Spot instance is provisioned, the WeightedCapacity units count toward the target capacity. Amazon EMR provisions instances until the target capacity is totally fulfilled, even if this results in an overage. For example, if there are 2 units remaining to fulfill capacity, and Amazon EMR can only provision an instance with a WeightedCapacity of 5 units, the instance is provisioned, and the target capacity is exceeded by 3 units. \nIf not specified or set to 0, only On-Demand instances are provisioned for the instance fleet. At least one of TargetSpotCapacity and TargetOnDemandCapacity should be greater than 0. For a master instance fleet, only one of TargetSpotCapacity and TargetOnDemandCapacity can be specified, and its value must be 1.",
"LaunchSpecifications" : {
"SpotSpecification" : {
"TimeoutDurationMinutes" : "The spot provisioning timeout period in minutes. If Spot instances are not provisioned within this time period, the TimeOutAction is taken. Minimum value is 5 and maximum value is 1440. The timeout applies only during initial provisioning, when the cluster is first created.",
"TimeoutAction" : "The action to take when TargetSpotCapacity has not been fulfilled when the TimeoutDurationMinutes has expired; that is, when all Spot instances could not be provisioned within the Spot provisioning timeout. Valid values are TERMINATE_CLUSTER and SWITCH_TO_ON_DEMAND. SWITCH_TO_ON_DEMAND specifies that if no Spot instances are available, On-Demand Instances should be provisioned to fulfill any remaining Spot capacity.",
"BlockDurationMinutes" : "The defined duration for Spot instances (also known as Spot blocks) in minutes. When specified, the Spot instance does not terminate before the defined duration expires, and defined duration pricing for Spot instances applies. Valid values are 60, 120, 180, 240, 300, or 360. The duration period starts as soon as a Spot instance receives its instance ID. At the end of the duration, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates. "
}
},
"InstanceTypeConfigs" : [ {
"BidPrice" : "The bid price for each EC2 Spot instance type as defined by InstanceType. Expressed in USD. If neither BidPrice nor BidPriceAsPercentageOfOnDemandPrice is provided, BidPriceAsPercentageOfOnDemandPrice defaults to 100%. ",
"WeightedCapacity" : "The number of units that a provisioned instance of this type provides toward fulfilling the target capacities defined in InstanceFleetConfig. This value is 1 for a master instance fleet, and must be 1 or greater for core and task instance fleets. Defaults to 1 if not specified. ",
"EbsConfiguration" : {
"EbsBlockDeviceConfigs" : [ {
"VolumeSpecification" : {
"SizeInGB" : "The volume size, in gibibytes (GiB). This can be a number from 1 - 1024. If the volume type is EBS-optimized, the minimum value is 10.",
"VolumeType" : "The volume type. Volume types supported are gp2, io1, standard.",
"Iops" : "The number of I/O operations per second (IOPS) that the volume supports."
},
"VolumesPerInstance" : "Number of EBS volumes with a specific volume configuration that will be associated with every instance in the instance group"
} ],
"EbsOptimized" : "Indicates whether an Amazon EBS volume is EBS-optimized."
},
"BidPriceAsPercentageOfOnDemandPrice" : "The bid price, as a percentage of On-Demand price, for each EC2 Spot instance as defined by InstanceType. Expressed as a number (for example, 20 specifies 20%). If neither BidPrice nor BidPriceAsPercentageOfOnDemandPrice is provided, BidPriceAsPercentageOfOnDemandPrice defaults to 100%.",
"InstanceType" : "An EC2 instance type, such as m3.xlarge. ",
"Configurations" : [ {
"Classification" : "The classification within a configuration.",
"Configurations" : "ConfigurationList",
"Properties" : "A set of properties specified within a configuration classification."
} ]
} ],
"Name" : "The friendly name of the instance fleet."
} ],
"MasterInstanceType" : "The EC2 instance type of the master node.",
"KeepJobFlowAliveWhenNoSteps" : "Specifies whether the cluster should remain available after completing all steps.",
"Ec2KeyName" : "The name of the EC2 key pair that can be used to ssh to the master node as the user called \"hadoop.\"",
"InstanceCount" : "The number of EC2 instances in the cluster.",
"Placement" : {
"AvailabilityZones" : [ "string" ],
"AvailabilityZone" : "The Amazon EC2 Availability Zone for the cluster. AvailabilityZone is used for uniform instance groups, while AvailabilityZones (plural) is used for instance fleets."
},
"Ec2SubnetId" : "Applies to clusters that use the uniform instance group configuration. To launch the cluster in Amazon Virtual Private Cloud (Amazon VPC), set this parameter to the identifier of the Amazon VPC subnet where you want the cluster to launch. If you do not specify this value and your account supports EC2-Classic, the cluster launches in EC2-Classic.",
"SlaveInstanceType" : "The EC2 instance type of the core and task nodes.",
"ServiceAccessSecurityGroup" : "The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets.",
"EmrManagedSlaveSecurityGroup" : "The identifier of the Amazon EC2 security group for the core and task nodes.",
"EmrManagedMasterSecurityGroup" : "The identifier of the Amazon EC2 security group for the master node.",
"AdditionalMasterSecurityGroups" : [ "string" ]
},
"NewSupportedProducts" : [ {
"Args" : [ "string" ],
"Name" : "The name of the product configuration."
} ],
"ScaleDownBehavior" : "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 blacklists 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 version 4.1.0 and later, and is the default for versions of Amazon EMR earlier than 5.1.0.",
"ServiceRole" : "The IAM role that will be assumed by the Amazon EMR service to access AWS resources on your behalf.",
"LogUri" : "The location in Amazon S3 to write the log files of the job flow. If a value is not provided, logs are not created.",
"JobFlowRole" : "Also called instance profile and EC2 role. An IAM role for an EMR cluster. The 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.",
"VisibleToAllUsers" : " This member will be deprecated. \nWhether the cluster is visible to all IAM users of the AWS account associated with the cluster. If this value is set to true, all IAM users of that AWS account can view and (if they have the proper policy permissions set) manage the cluster. If it is set to false, only the IAM user that created the cluster can view and manage it.",
"SupportedProducts" : [ "string" ],
"BootstrapActions" : [ {
"ScriptBootstrapAction" : {
"Path" : "Location of the script to run during a bootstrap action. Can be either a location in Amazon S3 or on a local file system.",
"Args" : [ "string" ]
},
"Name" : "The name of the bootstrap action."
} ],
"SecurityConfiguration" : "The name of a security configuration to apply to the cluster.",
"ReleaseLabel" : "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.",
"Configurations" : [ {
"Classification" : "The classification within a configuration.",
"Configurations" : "ConfigurationList",
"Properties" : "A set of properties specified within a configuration classification."
} ],
"Tags" : [ {
"Value" : "A user-defined value, which is optional in a tag. For more information, see Tag Clusters. ",
"Key" : "A user-defined key, which is the minimum required information for a valid tag. For more information, see Tag . "
} ],
"RepoUpgradeOnBoot" : "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."
}

set_termination_protection

SetTerminationProtection locks a cluster (job flow) so the EC2 instances in the cluster cannot be terminated by user intervention, an API call, or in the event of a job-flow error. The cluster still terminates upon successful completion of the job flow. Calling SetTerminationProtection on a cluster is similar to calling the Amazon EC2 DisableAPITermination API on all 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, seeManaging Cluster Termination in the Amazon EMR Management Guide.

Parameters

$body

The input argument to the TerminationProtection operation.

Type: object

{
"JobFlowIds" : [ "string" ],
"TerminationProtected" : "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."
}

set_visible_to_all_users

This member will be deprecated.
Sets whether all AWS Identity and Access Management (IAM) users under your account can access the specified clusters (job flows). This action works on running clusters. You can also set the visibility of a cluster when you launch it using the VisibleToAllUsers parameter of RunJobFlow. The SetVisibleToAllUsers action can be called only by an IAM user who created the cluster or the AWS account that owns the cluster.

Parameters

$body

This member will be deprecated.
The input to the SetVisibleToAllUsers action.

Type: object

{
"JobFlowIds" : [ "string" ],
"VisibleToAllUsers" : " This member will be deprecated. \nWhether the specified clusters are visible to all IAM users of the AWS account associated with the cluster. If this value is set to True, all IAM users of that AWS account can view and, if they have the proper IAM policy permissions set, manage the clusters. If it is set to False, only the IAM user that created a cluster can view and manage it."
}

terminate_job_flows

TerminateJobFlows shuts a list of clusters (job flows) down. When a job flow is shut down, any step not yet completed is canceled and the EC2 instances on which the cluster is running are stopped. Any log files not already saved are uploaded to Amazon S3 if a LogUri was specified when the cluster was created.
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.

Parameters

$body

Input to the TerminateJobFlows operation.

Type: object

{
"JobFlowIds" : [ "string" ]
}