AddInstanceGroups - Amazon EMR

AddInstanceGroups

Adds one or more instance groups to a running cluster.

Request Syntax

{ "InstanceGroups": [ { "AutoScalingPolicy": { "Constraints": { "MaxCapacity": number, "MinCapacity": number }, "Rules": [ { "Action": { "Market": "string", "SimpleScalingPolicyConfiguration": { "AdjustmentType": "string", "CoolDown": number, "ScalingAdjustment": number } }, "Description": "string", "Name": "string", "Trigger": { "CloudWatchAlarmDefinition": { "ComparisonOperator": "string", "Dimensions": [ { "Key": "string", "Value": "string" } ], "EvaluationPeriods": number, "MetricName": "string", "Namespace": "string", "Period": number, "Statistic": "string", "Threshold": number, "Unit": "string" } } } ] }, "BidPrice": "string", "Configurations": [ { "Classification": "string", "Configurations": [ "Configuration" ], "Properties": { "string" : "string" } } ], "CustomAmiId": "string", "EbsConfiguration": { "EbsBlockDeviceConfigs": [ { "VolumeSpecification": { "Iops": number, "SizeInGB": number, "Throughput": number, "VolumeType": "string" }, "VolumesPerInstance": number } ], "EbsOptimized": boolean }, "InstanceCount": number, "InstanceRole": "string", "InstanceType": "string", "Market": "string", "Name": "string" } ], "JobFlowId": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

InstanceGroups

Instance groups to add.

Type: Array of InstanceGroupConfig objects

Required: Yes

JobFlowId

Job flow in which to add the instance groups.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 256.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes

Response Syntax

{ "ClusterArn": "string", "InstanceGroupIds": [ "string" ], "JobFlowId": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

ClusterArn

The Amazon Resource Name of the cluster.

Type: String

Length Constraints: Minimum length of 20. Maximum length of 2048.

InstanceGroupIds

Instance group IDs of the newly created instance groups.

Type: Array of strings

Length Constraints: Minimum length of 0. Maximum length of 256.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

JobFlowId

The job flow ID in which the instance groups are added.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 256.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Errors

For information about the errors that are common to all actions, see Common Errors.

InternalServerError

Indicates that an error occurred while processing the request and that the request was not completed.

HTTP Status Code: 400

Examples

Example

This example illustrates one usage of AddInstanceGroups.

Sample Request

POST / HTTP/1.1 Content-Type: application/x-amz-json-1.1 X-Amz-Target: ElasticMapReduce.AddInstanceGroups Content-Length: 168 User-Agent: aws-sdk-ruby/1.9.2 ruby/1.9.3 i386-mingw32 Host: us-east-1.elasticmapreduce.amazonaws.com X-Amz-Date: 20130715T223346Z X-Amz-Content-Sha256: ac5a7193b1283898dd822a4b16ca36963879bb010d2dbe57198439973ab2a7d3 Authorization: AWS4-HMAC-SHA256 Credential=AKIAIOSFODNN7EXAMPLE/20130715/us-east-1/elasticmapreduce/aws4_request, SignedHeaders=content-length;content-type;host;user-agent;x-amz-content-sha256;x-amz-date;x-amz-target, Signature=4c5e7eb762ea45f292a5cd1a1cc56ed60009e19a9dba3d6e5e4e67e96d43af11 Accept: */* { "JobFlowId": "j-3U7TSX5GZFD8Y", "InstanceGroups": [{ "Name": "Task Instance Group", "InstanceRole": "TASK", "InstanceCount": 2, "InstanceType": "m1.small", "Market": "ON_DEMAND" }] }

Sample Response

HTTP/1.1 200 OK x-amzn-RequestId: 9da5a349-ed9e-11e2-90db-69a5154aeb8d Content-Type: application/x-amz-json-1.1 Content-Length: 71 Date: Mon, 15 Jul 2013 22:33:47 GMT { "InstanceGroupIds": ["ig-294A6A2KWT4WB"], "JobFlowId": "j-3U7TSX5GZFD8Y" }

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: