Skip to content

Commit

Permalink
feat(client-emr-serverless): This release adds support for job concur…
Browse files Browse the repository at this point in the history
…rency and queuing configuration at Application level.
  • Loading branch information
awstools committed Sep 23, 2024
1 parent 70db983 commit f6a2631
Show file tree
Hide file tree
Showing 7 changed files with 149 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ export interface CreateApplicationCommandOutput extends CreateApplicationRespons
* studioEnabled: true || false,
* livyEndpointEnabled: true || false,
* },
* schedulerConfiguration: { // SchedulerConfiguration
* queueTimeoutMinutes: Number("int"),
* maxConcurrentRuns: Number("int"),
* },
* };
* const command = new CreateApplicationCommand(input);
* const response = await client.send(command);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ export interface GetApplicationCommandOutput extends GetApplicationResponse, __M
* // studioEnabled: true || false,
* // livyEndpointEnabled: true || false,
* // },
* // schedulerConfiguration: { // SchedulerConfiguration
* // queueTimeoutMinutes: Number("int"),
* // maxConcurrentRuns: Number("int"),
* // },
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ export interface GetJobRunCommandOutput extends GetJobRunResponse, __MetadataBea
* // attempt: Number("int"),
* // attemptCreatedAt: new Date("TIMESTAMP"),
* // attemptUpdatedAt: new Date("TIMESTAMP"),
* // startedAt: new Date("TIMESTAMP"),
* // endedAt: new Date("TIMESTAMP"),
* // queuedDurationMilliseconds: Number("long"),
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ export interface UpdateApplicationCommandOutput extends UpdateApplicationRespons
* remoteWriteUrl: "STRING_VALUE",
* },
* },
* schedulerConfiguration: { // SchedulerConfiguration
* queueTimeoutMinutes: Number("int"),
* maxConcurrentRuns: Number("int"),
* },
* };
* const command = new UpdateApplicationCommand(input);
* const response = await client.send(command);
Expand Down Expand Up @@ -238,6 +242,10 @@ export interface UpdateApplicationCommandOutput extends UpdateApplicationRespons
* // studioEnabled: true || false,
* // livyEndpointEnabled: true || false,
* // },
* // schedulerConfiguration: { // SchedulerConfiguration
* // queueTimeoutMinutes: Number("int"),
* // maxConcurrentRuns: Number("int"),
* // },
* // },
* // };
*
Expand Down
58 changes: 56 additions & 2 deletions clients/client-emr-serverless/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,7 @@ export interface InteractiveConfiguration {
}

/**
* <p>The maximum allowed cumulative resources for an application. No new resources will be
* created once the limit is hit.</p>
* <p>The maximum allowed cumulative resources for an application. No new resources will be created once the limit is hit.</p>
* @public
*/
export interface MaximumAllowedResources {
Expand Down Expand Up @@ -320,6 +319,24 @@ export interface NetworkConfiguration {
securityGroupIds?: string[];
}

/**
* <p>The scheduler configuration for batch and streaming jobs running on this application. Supported with release labels emr-7.0.0 and above.</p>
* @public
*/
export interface SchedulerConfiguration {
/**
* <p>The maximum duration in minutes for the job in QUEUED state. If scheduler configuration is enabled on your application, the default value is 360 minutes (6 hours). The valid range is from 15 to 720.</p>
* @public
*/
queueTimeoutMinutes?: number;

/**
* <p>The maximum concurrent job runs on this application. If scheduler configuration is enabled on your application, the default value is 15. The valid range is 1 to 1000.</p>
* @public
*/
maxConcurrentRuns?: number;
}

/**
* @public
* @enum
Expand Down Expand Up @@ -930,6 +947,7 @@ export const JobRunState = {
CANCELLING: "CANCELLING",
FAILED: "FAILED",
PENDING: "PENDING",
QUEUED: "QUEUED",
RUNNING: "RUNNING",
SCHEDULED: "SCHEDULED",
SUBMITTED: "SUBMITTED",
Expand Down Expand Up @@ -1540,6 +1558,12 @@ export interface Application {
* @public
*/
interactiveConfiguration?: InteractiveConfiguration;

/**
* <p>The scheduler configuration for batch and streaming jobs running on this application. Supported with release labels emr-7.0.0 and above.</p>
* @public
*/
schedulerConfiguration?: SchedulerConfiguration;
}

/**
Expand Down Expand Up @@ -1674,6 +1698,12 @@ export interface CreateApplicationRequest {
* @public
*/
interactiveConfiguration?: InteractiveConfiguration;

/**
* <p>The scheduler configuration for batch and streaming jobs running on this application. Supported with release labels emr-7.0.0 and above.</p>
* @public
*/
schedulerConfiguration?: SchedulerConfiguration;
}

/**
Expand Down Expand Up @@ -1779,6 +1809,12 @@ export interface UpdateApplicationRequest {
* @public
*/
monitoringConfiguration?: MonitoringConfiguration;

/**
* <p>The scheduler configuration for batch and streaming jobs running on this application. Supported with release labels emr-7.0.0 and above.</p>
* @public
*/
schedulerConfiguration?: SchedulerConfiguration;
}

/**
Expand Down Expand Up @@ -1950,6 +1986,24 @@ export interface JobRun {
* @public
*/
attemptUpdatedAt?: Date;

/**
* <p>The date and time when the job moved to the RUNNING state.</p>
* @public
*/
startedAt?: Date;

/**
* <p>The date and time when the job was terminated.</p>
* @public
*/
endedAt?: Date;

/**
* <p>The total time for a job in the QUEUED state in milliseconds.</p>
* @public
*/
queuedDurationMilliseconds?: number;
}

/**
Expand Down
11 changes: 11 additions & 0 deletions clients/client-emr-serverless/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ import {
ResourceUtilization,
RetryPolicy,
S3MonitoringConfiguration,
SchedulerConfiguration,
ServiceQuotaExceededException,
SparkSubmit,
TotalResourceUtilization,
Expand Down Expand Up @@ -136,6 +137,7 @@ export const se_CreateApplicationCommand = async (
networkConfiguration: (_) => _json(_),
releaseLabel: [],
runtimeConfiguration: (_) => se_ConfigurationList(_, context),
schedulerConfiguration: (_) => _json(_),
tags: (_) => _json(_),
type: [],
workerTypeSpecifications: (_) => _json(_),
Expand Down Expand Up @@ -434,6 +436,7 @@ export const se_UpdateApplicationCommand = async (
networkConfiguration: (_) => _json(_),
releaseLabel: [],
runtimeConfiguration: (_) => se_ConfigurationList(_, context),
schedulerConfiguration: (_) => _json(_),
workerTypeSpecifications: (_) => _json(_),
})
);
Expand Down Expand Up @@ -965,6 +968,8 @@ const se_ConfigurationOverrides = (input: ConfigurationOverrides, context: __Ser

// se_S3MonitoringConfiguration omitted.

// se_SchedulerConfiguration omitted.

// se_SecurityGroupIds omitted.

// se_SensitivePropertiesMap omitted.
Expand Down Expand Up @@ -1001,6 +1006,7 @@ const de_Application = (output: any, context: __SerdeContext): Application => {
networkConfiguration: _json,
releaseLabel: __expectString,
runtimeConfiguration: (_: any) => de_ConfigurationList(_, context),
schedulerConfiguration: _json,
state: __expectString,
stateDetails: __expectString,
tags: _json,
Expand Down Expand Up @@ -1107,15 +1113,18 @@ const de_JobRun = (output: any, context: __SerdeContext): JobRun => {
configurationOverrides: (_: any) => de_ConfigurationOverrides(_, context),
createdAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
createdBy: __expectString,
endedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
executionRole: __expectString,
executionTimeoutMinutes: __expectLong,
jobDriver: (_: any) => _json(__expectUnion(_)),
jobRunId: __expectString,
mode: __expectString,
name: __expectString,
networkConfiguration: _json,
queuedDurationMilliseconds: __expectLong,
releaseLabel: __expectString,
retryPolicy: _json,
startedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
state: __expectString,
stateDetails: __expectString,
tags: _json,
Expand Down Expand Up @@ -1225,6 +1234,8 @@ const de_ResourceUtilization = (output: any, context: __SerdeContext): ResourceU

// de_S3MonitoringConfiguration omitted.

// de_SchedulerConfiguration omitted.

// de_SecurityGroupIds omitted.

// de_SensitivePropertiesMap omitted.
Expand Down
66 changes: 63 additions & 3 deletions codegen/sdk-codegen/aws-models/emr-serverless.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,12 @@
"traits": {
"smithy.api#documentation": "<p>The interactive configuration object that enables the interactive use cases for an application.</p>"
}
},
"schedulerConfiguration": {
"target": "com.amazonaws.emrserverless#SchedulerConfiguration",
"traits": {
"smithy.api#documentation": "<p>The scheduler configuration for batch and streaming jobs running on this application. Supported with release labels emr-7.0.0 and above.</p>"
}
}
},
"traits": {
Expand Down Expand Up @@ -1489,6 +1495,12 @@
"traits": {
"smithy.api#documentation": "<p>The interactive configuration object that enables the interactive use cases \n to use when running an application.</p>"
}
},
"schedulerConfiguration": {
"target": "com.amazonaws.emrserverless#SchedulerConfiguration",
"traits": {
"smithy.api#documentation": "<p>The scheduler configuration for batch and streaming jobs running on this application. Supported with release labels emr-7.0.0 and above.</p>"
}
}
}
},
Expand Down Expand Up @@ -1600,7 +1612,7 @@
"min": 20,
"max": 2048
},
"smithy.api#pattern": "^arn:(aws[a-zA-Z0-9-]*):kms:[a-zA-Z0-9\\-]*:(\\d{12})?:key\\/[a-zA-Z0-9-]+$"
"smithy.api#pattern": "^arn:(aws[a-zA-Z0-9-]*):kms:[a-zA-Z0-9\\-]*:([0-9]{12}):key\\/[a-zA-Z0-9-]+$"
}
},
"com.amazonaws.emrserverless#EngineType": {
Expand Down Expand Up @@ -1881,7 +1893,7 @@
"min": 20,
"max": 2048
},
"smithy.api#pattern": "^arn:(aws[a-zA-Z0-9-]*):iam::(\\d{12})?:(role((\\u002F)|(\\u002F[\\u0021-\\u007F]+\\u002F))[\\w+=,.@-]+)$"
"smithy.api#pattern": "^arn:(aws[a-zA-Z0-9-]*):iam::([0-9]{12}):(role((\\u002F)|(\\u002F[\\u0021-\\u007F]+\\u002F))[\\w+=,.@-]+)$"
}
},
"com.amazonaws.emrserverless#ImageConfiguration": {
Expand Down Expand Up @@ -2207,6 +2219,24 @@
"traits": {
"smithy.api#documentation": "<p>The date and time of when the job run attempt was last updated.</p>"
}
},
"startedAt": {
"target": "com.amazonaws.emrserverless#Date",
"traits": {
"smithy.api#documentation": "<p>The date and time when the job moved to the RUNNING state.</p>"
}
},
"endedAt": {
"target": "com.amazonaws.emrserverless#Date",
"traits": {
"smithy.api#documentation": "<p>The date and time when the job was terminated.</p>"
}
},
"queuedDurationMilliseconds": {
"target": "smithy.api#Long",
"traits": {
"smithy.api#documentation": "<p>The total time for a job in the QUEUED state in milliseconds.</p>"
}
}
},
"traits": {
Expand Down Expand Up @@ -2421,6 +2451,10 @@
{
"value": "CANCELLED",
"name": "CANCELLED"
},
{
"value": "QUEUED",
"name": "QUEUED"
}
]
}
Expand Down Expand Up @@ -3008,7 +3042,7 @@
}
},
"traits": {
"smithy.api#documentation": "<p>The maximum allowed cumulative resources for an application. No new resources will be\n created once the limit is hit.</p>"
"smithy.api#documentation": "<p>The maximum allowed cumulative resources for an application. No new resources will be created once the limit is hit.</p>"
}
},
"com.amazonaws.emrserverless#MemorySize": {
Expand Down Expand Up @@ -3234,6 +3268,26 @@
"smithy.api#documentation": "<p>The Amazon S3 configuration for monitoring log publishing. You can configure your jobs\n to send log information to Amazon S3.</p>"
}
},
"com.amazonaws.emrserverless#SchedulerConfiguration": {
"type": "structure",
"members": {
"queueTimeoutMinutes": {
"target": "smithy.api#Integer",
"traits": {
"smithy.api#documentation": "<p>The maximum duration in minutes for the job in QUEUED state. If scheduler configuration is enabled on your application, the default value is 360 minutes (6 hours). The valid range is from 15 to 720.</p>"
}
},
"maxConcurrentRuns": {
"target": "smithy.api#Integer",
"traits": {
"smithy.api#documentation": "<p>The maximum concurrent job runs on this application. If scheduler configuration is enabled on your application, the default value is 15. The valid range is 1 to 1000.</p>"
}
}
},
"traits": {
"smithy.api#documentation": "<p>The scheduler configuration for batch and streaming jobs running on this application. Supported with release labels emr-7.0.0 and above.</p>"
}
},
"com.amazonaws.emrserverless#SecurityGroupIds": {
"type": "list",
"member": {
Expand Down Expand Up @@ -3886,6 +3940,12 @@
"traits": {
"smithy.api#documentation": "<p>The configuration setting for monitoring.</p>"
}
},
"schedulerConfiguration": {
"target": "com.amazonaws.emrserverless#SchedulerConfiguration",
"traits": {
"smithy.api#documentation": "<p>The scheduler configuration for batch and streaming jobs running on this application. Supported with release labels emr-7.0.0 and above.</p>"
}
}
}
},
Expand Down

0 comments on commit f6a2631

Please sign in to comment.