CreateApplication - Amazon EMR Serverless

CreateApplication

Creates an application.

Request Syntax

POST /applications HTTP/1.1 Content-type: application/json { "autoStartConfiguration": { "enabled": boolean }, "autoStopConfiguration": { "enabled": boolean, "idleTimeoutMinutes": number }, "clientToken": "string", "initialCapacity": { "string" : { "workerConfiguration": { "cpu": "string", "disk": "string", "memory": "string" }, "workerCount": number } }, "maximumCapacity": { "cpu": "string", "disk": "string", "memory": "string" }, "name": "string", "networkConfiguration": { "securityGroupIds": [ "string" ], "subnetIds": [ "string" ] }, "releaseLabel": "string", "tags": { "string" : "string" }, "type": "string" }

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

autoStartConfiguration

The configuration for an application to automatically start on job submission.

Type: AutoStartConfig object

Required: No

autoStopConfiguration

The configuration for an application to automatically stop after a certain amount of time being idle.

Type: AutoStopConfig object

Required: No

clientToken

The client idempotency token of the application to create. Its value must be unique for each request.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: ^[A-Za-z0-9._-]+$

Required: Yes

initialCapacity

The capacity to initialize when the application is created.

Type: String to InitialCapacityConfig object map

Map Entries: Minimum number of 0 items. Maximum number of 10 items.

Key Length Constraints: Minimum length of 1. Maximum length of 50.

Key Pattern: ^[a-zA-Z]+[-_]*[a-zA-Z]+$

Required: No

maximumCapacity

The maximum capacity to allocate when the application is created. This is cumulative across all workers at any given point in time, not just when an application is created. No new resources will be created once any one of the defined limits is hit.

Type: MaximumAllowedResources object

Required: No

name

The name of the application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: ^[A-Za-z0-9._/#-]+$

Required: No

networkConfiguration

The network configuration for customer VPC connectivity.

Type: NetworkConfiguration object

Required: No

releaseLabel

The EMR release version associated with the application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: ^[A-Za-z0-9._/-]+$

Required: Yes

tags

The tags assigned to the application.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 200 items.

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: ^[A-Za-z0-9 /_.:=+@-]+$

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

Value Pattern: ^[A-Za-z0-9 /_.:=+@-]*$

Required: No

type

The type of application you want to start, such as Spark or Hive.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Required: Yes

Response Syntax

HTTP/1.1 200 Content-type: application/json { "applicationId": "string", "arn": "string", "name": "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.

applicationId

The output contains the application ID.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: ^[0-9a-z]+$

arn

The output contains the ARN of the application.

Type: String

Length Constraints: Minimum length of 60. Maximum length of 1024.

Pattern: ^arn:(aws[a-zA-Z0-9-]*):emr-serverless:.+:(\d{12}):\/applications\/[0-9a-zA-Z]+$

name

The output contains the name of the application.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: ^[A-Za-z0-9._/#-]+$

Errors

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

ConflictException

The request could not be processed because of conflict in the current state of the resource.

HTTP Status Code: 409

InternalServerException

Request processing failed because of an error or failure with the service.

HTTP Status Code: 500

ValidationException

The input fails to satisfy the constraints specified by an AWS service.

HTTP Status Code: 400

See Also

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