Skip to content

Commit

Permalink
feat(client-mediaconvert): This release adds the ability to reconfigu…
Browse files Browse the repository at this point in the history
…re concurrent job settings for existing queues and create queues with custom concurrent job settings.
  • Loading branch information
awstools committed Nov 20, 2024
1 parent d9ff29d commit 3e06157
Show file tree
Hide file tree
Showing 7 changed files with 221 additions and 0 deletions.
10 changes: 10 additions & 0 deletions clients/client-mediaconvert/src/commands/CreateQueueCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export interface CreateQueueCommandOutput extends CreateQueueResponse, __Metadat
* // const { MediaConvertClient, CreateQueueCommand } = require("@aws-sdk/client-mediaconvert"); // CommonJS import
* const client = new MediaConvertClient(config);
* const input = { // CreateQueueRequest
* ConcurrentJobs: Number("int"),
* Description: "STRING_VALUE",
* Name: "STRING_VALUE", // required
* PricingPlan: "ON_DEMAND" || "RESERVED",
Expand All @@ -54,6 +55,7 @@ export interface CreateQueueCommandOutput extends CreateQueueResponse, __Metadat
* // { // CreateQueueResponse
* // Queue: { // Queue
* // Arn: "STRING_VALUE",
* // ConcurrentJobs: Number("int"),
* // CreatedAt: new Date("TIMESTAMP"),
* // Description: "STRING_VALUE",
* // LastUpdated: new Date("TIMESTAMP"),
Expand All @@ -68,6 +70,14 @@ export interface CreateQueueCommandOutput extends CreateQueueResponse, __Metadat
* // ReservedSlots: Number("int"),
* // Status: "ACTIVE" || "EXPIRED",
* // },
* // ServiceOverrides: [ // __listOfServiceOverride
* // { // ServiceOverride
* // Message: "STRING_VALUE",
* // Name: "STRING_VALUE",
* // OverrideValue: "STRING_VALUE",
* // Value: "STRING_VALUE",
* // },
* // ],
* // Status: "ACTIVE" || "PAUSED",
* // SubmittedJobsCount: Number("int"),
* // Type: "SYSTEM" || "CUSTOM",
Expand Down
9 changes: 9 additions & 0 deletions clients/client-mediaconvert/src/commands/GetQueueCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export interface GetQueueCommandOutput extends GetQueueResponse, __MetadataBeare
* // { // GetQueueResponse
* // Queue: { // Queue
* // Arn: "STRING_VALUE",
* // ConcurrentJobs: Number("int"),
* // CreatedAt: new Date("TIMESTAMP"),
* // Description: "STRING_VALUE",
* // LastUpdated: new Date("TIMESTAMP"),
Expand All @@ -57,6 +58,14 @@ export interface GetQueueCommandOutput extends GetQueueResponse, __MetadataBeare
* // ReservedSlots: Number("int"),
* // Status: "ACTIVE" || "EXPIRED",
* // },
* // ServiceOverrides: [ // __listOfServiceOverride
* // { // ServiceOverride
* // Message: "STRING_VALUE",
* // Name: "STRING_VALUE",
* // OverrideValue: "STRING_VALUE",
* // Value: "STRING_VALUE",
* // },
* // ],
* // Status: "ACTIVE" || "PAUSED",
* // SubmittedJobsCount: Number("int"),
* // Type: "SYSTEM" || "CUSTOM",
Expand Down
11 changes: 11 additions & 0 deletions clients/client-mediaconvert/src/commands/ListQueuesCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export interface ListQueuesCommandOutput extends ListQueuesResponse, __MetadataB
* // Queues: [ // __listOfQueue
* // { // Queue
* // Arn: "STRING_VALUE",
* // ConcurrentJobs: Number("int"),
* // CreatedAt: new Date("TIMESTAMP"),
* // Description: "STRING_VALUE",
* // LastUpdated: new Date("TIMESTAMP"),
Expand All @@ -62,11 +63,21 @@ export interface ListQueuesCommandOutput extends ListQueuesResponse, __MetadataB
* // ReservedSlots: Number("int"),
* // Status: "ACTIVE" || "EXPIRED",
* // },
* // ServiceOverrides: [ // __listOfServiceOverride
* // { // ServiceOverride
* // Message: "STRING_VALUE",
* // Name: "STRING_VALUE",
* // OverrideValue: "STRING_VALUE",
* // Value: "STRING_VALUE",
* // },
* // ],
* // Status: "ACTIVE" || "PAUSED",
* // SubmittedJobsCount: Number("int"),
* // Type: "SYSTEM" || "CUSTOM",
* // },
* // ],
* // TotalConcurrentJobs: Number("int"),
* // UnallocatedConcurrentJobs: Number("int"),
* // };
*
* ```
Expand Down
10 changes: 10 additions & 0 deletions clients/client-mediaconvert/src/commands/UpdateQueueCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export interface UpdateQueueCommandOutput extends UpdateQueueResponse, __Metadat
* // const { MediaConvertClient, UpdateQueueCommand } = require("@aws-sdk/client-mediaconvert"); // CommonJS import
* const client = new MediaConvertClient(config);
* const input = { // UpdateQueueRequest
* ConcurrentJobs: Number("int"),
* Description: "STRING_VALUE",
* Name: "STRING_VALUE", // required
* ReservationPlanSettings: { // ReservationPlanSettings
Expand All @@ -50,6 +51,7 @@ export interface UpdateQueueCommandOutput extends UpdateQueueResponse, __Metadat
* // { // UpdateQueueResponse
* // Queue: { // Queue
* // Arn: "STRING_VALUE",
* // ConcurrentJobs: Number("int"),
* // CreatedAt: new Date("TIMESTAMP"),
* // Description: "STRING_VALUE",
* // LastUpdated: new Date("TIMESTAMP"),
Expand All @@ -64,6 +66,14 @@ export interface UpdateQueueCommandOutput extends UpdateQueueResponse, __Metadat
* // ReservedSlots: Number("int"),
* // Status: "ACTIVE" || "EXPIRED",
* // },
* // ServiceOverrides: [ // __listOfServiceOverride
* // { // ServiceOverride
* // Message: "STRING_VALUE",
* // Name: "STRING_VALUE",
* // OverrideValue: "STRING_VALUE",
* // Value: "STRING_VALUE",
* // },
* // ],
* // Status: "ACTIVE" || "PAUSED",
* // SubmittedJobsCount: Number("int"),
* // Type: "SYSTEM" || "CUSTOM",
Expand Down
66 changes: 66 additions & 0 deletions clients/client-mediaconvert/src/models/models_2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,36 @@ export interface ReservationPlan {
Status?: ReservationPlanStatus | undefined;
}

/**
* A service override applied by MediaConvert to the settings that you have configured. If you see any overrides, we recommend that you contact AWS Support.
* @public
*/
export interface ServiceOverride {
/**
* Details about the service override that MediaConvert has applied.
* @public
*/
Message?: string | undefined;

/**
* The name of the setting that MediaConvert has applied an override to.
* @public
*/
Name?: string | undefined;

/**
* The current value of the service override that MediaConvert has applied.
* @public
*/
OverrideValue?: string | undefined;

/**
* The value of the setting that you configured, prior to any overrides that MediaConvert has applied.
* @public
*/
Value?: string | undefined;
}

/**
* @public
* @enum
Expand All @@ -90,6 +120,12 @@ export interface Queue {
*/
Arn?: string | undefined;

/**
* The maximum number of jobs your queue can process concurrently.
* @public
*/
ConcurrentJobs?: number | undefined;

/**
* The timestamp in epoch seconds for when you created the queue.
* @public
Expand Down Expand Up @@ -132,6 +168,12 @@ export interface Queue {
*/
ReservationPlan?: ReservationPlan | undefined;

/**
* A list of any service overrides applied by MediaConvert to the settings that you have configured. If you see any overrides, we recommend that you contact AWS Support.
* @public
*/
ServiceOverrides?: ServiceOverride[] | undefined;

/**
* Queues can be ACTIVE or PAUSED. If you pause a queue, the service won't begin processing jobs in that queue. Jobs that are running when you pause the queue continue to run until they finish or result in an error.
* @public
Expand Down Expand Up @@ -565,6 +607,12 @@ export interface ReservationPlanSettings {
* @public
*/
export interface CreateQueueRequest {
/**
* Specify the maximum number of jobs your queue can process concurrently. For on-demand queues, the value you enter is constrained by your service quotas for Maximum concurrent jobs, per on-demand queue and Maximum concurrent jobs, per account. For reserved queues, specify the number of jobs you can process concurrently in your reservation plan instead.
* @public
*/
ConcurrentJobs?: number | undefined;

/**
* Optional. A description of the queue that you are creating.
* @public
Expand Down Expand Up @@ -1143,6 +1191,18 @@ export interface ListQueuesResponse {
* @public
*/
Queues?: Queue[] | undefined;

/**
* The maximum number of jobs that MediaConvert can process at one time, across all of your on-demand queues in the current AWS Region.
* @public
*/
TotalConcurrentJobs?: number | undefined;

/**
* The remaining number of concurrent jobs that are not associated with a queue and are available to allocate to a queue. You can allocate these jobs when you create or update a queue.
* @public
*/
UnallocatedConcurrentJobs?: number | undefined;
}

/**
Expand Down Expand Up @@ -1457,6 +1517,12 @@ export interface UpdatePresetResponse {
* @public
*/
export interface UpdateQueueRequest {
/**
* Specify the maximum number of jobs your queue can process concurrently. For on-demand queues, the value you enter is constrained by your service quotas for Maximum concurrent jobs, per on-demand queue and Maximum concurrent jobs, per account. For reserved queues, update your reservation plan instead in order to increase your yearly commitment.
* @public
*/
ConcurrentJobs?: number | undefined;

/**
* The new description for the queue, if you are changing it.
* @public
Expand Down
31 changes: 31 additions & 0 deletions clients/client-mediaconvert/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ import {
ReservationPlan,
ReservationPlanSettings,
ResourceTags,
ServiceOverride,
TooManyRequestsException,
} from "../models/models_2";

Expand Down Expand Up @@ -413,6 +414,7 @@ export const se_CreateQueueCommand = async (
let body: any;
body = JSON.stringify(
take(input, {
concurrentJobs: [, , `ConcurrentJobs`],
description: [, , `Description`],
name: [, , `Name`],
pricingPlan: [, , `PricingPlan`],
Expand Down Expand Up @@ -888,6 +890,7 @@ export const se_UpdateQueueCommand = async (
let body: any;
body = JSON.stringify(
take(input, {
concurrentJobs: [, , `ConcurrentJobs`],
description: [, , `Description`],
reservationPlanSettings: [, (_) => se_ReservationPlanSettings(_, context), `ReservationPlanSettings`],
status: [, , `Status`],
Expand Down Expand Up @@ -1310,6 +1313,8 @@ export const de_ListQueuesCommand = async (
const doc = take(data, {
NextToken: [, __expectString, `nextToken`],
Queues: [, (_) => de___listOfQueue(_, context), `queues`],
TotalConcurrentJobs: [, __expectInt32, `totalConcurrentJobs`],
UnallocatedConcurrentJobs: [, __expectInt32, `unallocatedConcurrentJobs`],
});
Object.assign(contents, doc);
return contents;
Expand Down Expand Up @@ -4941,6 +4946,18 @@ const de___listOfQueueTransition = (output: any, context: __SerdeContext): Queue
return retVal;
};

/**
* deserializeAws_restJson1__listOfServiceOverride
*/
const de___listOfServiceOverride = (output: any, context: __SerdeContext): ServiceOverride[] => {
const retVal = (output || [])
.filter((e: any) => e != null)
.map((entry: any) => {
return de_ServiceOverride(entry, context);
});
return retVal;
};

// de___listOfTeletextPageType omitted.

/**
Expand Down Expand Up @@ -7202,13 +7219,15 @@ const de_ProresSettings = (output: any, context: __SerdeContext): ProresSettings
const de_Queue = (output: any, context: __SerdeContext): Queue => {
return take(output, {
Arn: [, __expectString, `arn`],
ConcurrentJobs: [, __expectInt32, `concurrentJobs`],
CreatedAt: [, (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), `createdAt`],
Description: [, __expectString, `description`],
LastUpdated: [, (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), `lastUpdated`],
Name: [, __expectString, `name`],
PricingPlan: [, __expectString, `pricingPlan`],
ProgressingJobsCount: [, __expectInt32, `progressingJobsCount`],
ReservationPlan: [, (_: any) => de_ReservationPlan(_, context), `reservationPlan`],
ServiceOverrides: [, (_: any) => de___listOfServiceOverride(_, context), `serviceOverrides`],
Status: [, __expectString, `status`],
SubmittedJobsCount: [, __expectInt32, `submittedJobsCount`],
Type: [, __expectString, `type`],
Expand Down Expand Up @@ -7315,6 +7334,18 @@ const de_SccDestinationSettings = (output: any, context: __SerdeContext): SccDes
}) as any;
};

/**
* deserializeAws_restJson1ServiceOverride
*/
const de_ServiceOverride = (output: any, context: __SerdeContext): ServiceOverride => {
return take(output, {
Message: [, __expectString, `message`],
Name: [, __expectString, `name`],
OverrideValue: [, __expectString, `overrideValue`],
Value: [, __expectString, `value`],
}) as any;
};

/**
* deserializeAws_restJson1SpekeKeyProvider
*/
Expand Down
Loading

0 comments on commit 3e06157

Please sign in to comment.