Skip to main content

applications

Creates, updates, deletes, gets or lists an applications resource.

Overview

Nameapplications
TypeResource
Idaws.emr_serverless.applications

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe name of the application. (pattern: <code>[A-Za-z0-9._/#-]+</code>)
application_idstringThe ID of the application. (pattern: <code>[0-9a-z]+</code>)
architecturestringThe CPU architecture of an application. (ARM64, X86_64)
arnstringThe ARN of the application. (pattern: <code>arn:(aws[a-zA-Z0-9-]*):emr-serverless:.+:(\d{12}):/applications/[0-9a-zA-Z]+</code>)
auto_start_configurationobjectThe configuration for an application to automatically start on job submission.
auto_stop_configurationobjectThe configuration for an application to automatically stop after a certain amount of time being idle.
created_atstring (date-time)The date and time when the application run was created.
disk_encryption_configurationobjectThe configuration object that allows encrypting local disks.
identity_center_configurationobjectThe IAM Identity Center configuration applied to enable trusted identity propagation.
image_configurationobjectThe applied image configuration.
initial_capacityobjectThe initial capacity of the application.
interactive_configurationobjectThe configuration to use to enable the different types of interactive use cases in an application.
job_level_cost_allocation_configurationobjectThe configuration object that enables job level cost allocation.
maximum_capacityobjectThe maximum allowed cumulative resources for an application. No new resources will be created once the limit is hit.
monitoring_configurationobjectThe configuration setting for monitoring.
network_configurationobjectThe network configuration for customer VPC connectivity.
release_labelstringThe Amazon EMR release associated with the application. (pattern: <code>[A-Za-z0-9._/-]+</code>)
runtime_configurationarrayThe Configuration specifications of an application. Each configuration consists of a classification and properties. You use this parameter when creating or updating an application. To see the runtimeConfiguration object of an application, run the GetApplication API operation.
scheduler_configurationobjectThe scheduler configuration for batch and streaming jobs running on this application. Supported with release labels emr-7.0.0 and above.
statestringThe state of the application. (CREATING, CREATED, STARTING, STARTED, STOPPING, STOPPED, TERMINATED)
state_detailsstringThe state details of the application. (pattern: <code>.\S.</code>)
tagsobjectThe tags assigned to the application.
type_stringThe type of application, such as Spark or Hive.
updated_atstring (date-time)The date and time when the application run was last updated.
worker_type_specificationsobjectThe specification applied to each worker type.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_applicationselectapplication_id, regionDisplays detailed information about a specified application.
list_applicationsselectregionnextToken, maxResults, statesLists applications based on a set of parameters.
create_applicationinsertregion, releaseLabel, type, clientTokenCreates an application.
update_applicationupdateapplication_id, region, clientTokenUpdates a specified application. An application has to be in a stopped or created state in order to be updated.
delete_applicationdeleteapplication_id, regionDeletes an application. An application has to be in a stopped or created state in order to be deleted.
cancel_job_runexecapplication_id, job_run_id, regionshutdownGracePeriodInSecondsCancels a job run.
start_job_runexecapplication_id, region, clientToken, executionRoleArnStarts a job run.
start_sessionexecapplication_id, region, clientToken, executionRoleArnCreates and starts a new session on the specified application. The application must be in the STARTED state or have AutoStart enabled, and have interactive sessions enabled. This operation is supported for EMR release 7.13.0 and later.
start_applicationexecapplication_id, regionStarts a specified application and initializes initial capacity if configured.
stop_applicationexecapplication_id, regionStops a specified application and releases initial capacity if configured. All scheduled and running jobs must be completed or cancelled before stopping an application.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
application_idstringThe ID of the application to stop.
job_run_idstringThe ID of the job run to cancel.
regionstringAWS region (default: us-east-1)
maxResultsintegerThe maximum number of applications that can be listed.
nextTokenstringThe token for the next set of application results.
shutdownGracePeriodInSecondsintegerThe duration in seconds to wait before forcefully terminating the job after cancellation is requested.
statesarrayAn optional filter for application states. Note that if this filter contains multiple states, the resulting list will be grouped by the state.

SELECT examples

Displays detailed information about a specified application.

SELECT
name,
application_id,
architecture,
arn,
auto_start_configuration,
auto_stop_configuration,
created_at,
disk_encryption_configuration,
identity_center_configuration,
image_configuration,
initial_capacity,
interactive_configuration,
job_level_cost_allocation_configuration,
maximum_capacity,
monitoring_configuration,
network_configuration,
release_label,
runtime_configuration,
scheduler_configuration,
state,
state_details,
tags,
type_,
updated_at,
worker_type_specifications
FROM aws.emr_serverless.applications
WHERE application_id = '{{ application_id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates an application.

INSERT INTO aws.emr_serverless.applications (
name,
releaseLabel,
type,
clientToken,
initialCapacity,
maximumCapacity,
tags,
autoStartConfiguration,
autoStopConfiguration,
networkConfiguration,
architecture,
imageConfiguration,
workerTypeSpecifications,
runtimeConfiguration,
monitoringConfiguration,
diskEncryptionConfiguration,
interactiveConfiguration,
schedulerConfiguration,
identityCenterConfiguration,
jobLevelCostAllocationConfiguration,
region
)
SELECT
'{{ name }}',
'{{ releaseLabel }}' /* required */,
'{{ type }}' /* required */,
'{{ clientToken }}' /* required */,
'{{ initialCapacity }}',
'{{ maximumCapacity }}',
'{{ tags }}',
'{{ autoStartConfiguration }}',
'{{ autoStopConfiguration }}',
'{{ networkConfiguration }}',
'{{ architecture }}',
'{{ imageConfiguration }}',
'{{ workerTypeSpecifications }}',
'{{ runtimeConfiguration }}',
'{{ monitoringConfiguration }}',
'{{ diskEncryptionConfiguration }}',
'{{ interactiveConfiguration }}',
'{{ schedulerConfiguration }}',
'{{ identityCenterConfiguration }}',
'{{ jobLevelCostAllocationConfiguration }}',
'{{ region }}'
RETURNING
name,
application_id,
arn
;

UPDATE examples

Updates a specified application. An application has to be in a stopped or created state in order to be updated.

UPDATE aws.emr_serverless.applications
SET
clientToken = '{{ clientToken }}',
initialCapacity = '{{ initialCapacity }}',
maximumCapacity = '{{ maximumCapacity }}',
autoStartConfiguration = '{{ autoStartConfiguration }}',
autoStopConfiguration = '{{ autoStopConfiguration }}',
networkConfiguration = '{{ networkConfiguration }}',
architecture = '{{ architecture }}',
imageConfiguration = '{{ imageConfiguration }}',
workerTypeSpecifications = '{{ workerTypeSpecifications }}',
interactiveConfiguration = '{{ interactiveConfiguration }}',
releaseLabel = '{{ releaseLabel }}',
runtimeConfiguration = '{{ runtimeConfiguration }}',
monitoringConfiguration = '{{ monitoringConfiguration }}',
diskEncryptionConfiguration = '{{ diskEncryptionConfiguration }}',
schedulerConfiguration = '{{ schedulerConfiguration }}',
identityCenterConfiguration = '{{ identityCenterConfiguration }}',
jobLevelCostAllocationConfiguration = '{{ jobLevelCostAllocationConfiguration }}'
WHERE
application_id = '{{ application_id }}' --required
AND region = '{{ region }}' --required
AND clientToken = '{{ clientToken }}' --required
RETURNING
application;

DELETE examples

Deletes an application. An application has to be in a stopped or created state in order to be deleted.

DELETE FROM aws.emr_serverless.applications
WHERE application_id = '{{ application_id }}' --required
AND region = '{{ region }}' --required
;

Lifecycle Methods

Cancels a job run.

EXEC aws.emr_serverless.applications.cancel_job_run
@application_id='{{ application_id }}' --required,
@job_run_id='{{ job_run_id }}' --required,
@region='{{ region }}' --required,
@shutdownGracePeriodInSeconds='{{ shutdownGracePeriodInSeconds }}'
;