Skip to content

Commit 9c4d17d

Browse files
author
awstools
committed
feat(client-deadline): Add support for using the template from a previous job during job creation and listing parameter definitions for a job.
1 parent 990f025 commit 9c4d17d

17 files changed

+551
-57
lines changed

clients/client-deadline/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -697,6 +697,14 @@ ListJobMembers
697697

698698
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/deadline/command/ListJobMembersCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-deadline/Interface/ListJobMembersCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-deadline/Interface/ListJobMembersCommandOutput/)
699699

700+
</details>
701+
<details>
702+
<summary>
703+
ListJobParameterDefinitions
704+
</summary>
705+
706+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/deadline/command/ListJobParameterDefinitionsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-deadline/Interface/ListJobParameterDefinitionsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-deadline/Interface/ListJobParameterDefinitionsCommandOutput/)
707+
700708
</details>
701709
<details>
702710
<summary>

clients/client-deadline/src/Deadline.ts

+23
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,11 @@ import {
227227
ListJobMembersCommandInput,
228228
ListJobMembersCommandOutput,
229229
} from "./commands/ListJobMembersCommand";
230+
import {
231+
ListJobParameterDefinitionsCommand,
232+
ListJobParameterDefinitionsCommandInput,
233+
ListJobParameterDefinitionsCommandOutput,
234+
} from "./commands/ListJobParameterDefinitionsCommand";
230235
import { ListJobsCommand, ListJobsCommandInput, ListJobsCommandOutput } from "./commands/ListJobsCommand";
231236
import {
232237
ListLicenseEndpointsCommand,
@@ -436,6 +441,7 @@ const commands = {
436441
ListFleetMembersCommand,
437442
ListFleetsCommand,
438443
ListJobMembersCommand,
444+
ListJobParameterDefinitionsCommand,
439445
ListJobsCommand,
440446
ListLicenseEndpointsCommand,
441447
ListMeteredProductsCommand,
@@ -1354,6 +1360,23 @@ export interface Deadline {
13541360
cb: (err: any, data?: ListJobMembersCommandOutput) => void
13551361
): void;
13561362

1363+
/**
1364+
* @see {@link ListJobParameterDefinitionsCommand}
1365+
*/
1366+
listJobParameterDefinitions(
1367+
args: ListJobParameterDefinitionsCommandInput,
1368+
options?: __HttpHandlerOptions
1369+
): Promise<ListJobParameterDefinitionsCommandOutput>;
1370+
listJobParameterDefinitions(
1371+
args: ListJobParameterDefinitionsCommandInput,
1372+
cb: (err: any, data?: ListJobParameterDefinitionsCommandOutput) => void
1373+
): void;
1374+
listJobParameterDefinitions(
1375+
args: ListJobParameterDefinitionsCommandInput,
1376+
options: __HttpHandlerOptions,
1377+
cb: (err: any, data?: ListJobParameterDefinitionsCommandOutput) => void
1378+
): void;
1379+
13571380
/**
13581381
* @see {@link ListJobsCommand}
13591382
*/

clients/client-deadline/src/DeadlineClient.ts

+6
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,10 @@ import { ListFarmsCommandInput, ListFarmsCommandOutput } from "./commands/ListFa
195195
import { ListFleetMembersCommandInput, ListFleetMembersCommandOutput } from "./commands/ListFleetMembersCommand";
196196
import { ListFleetsCommandInput, ListFleetsCommandOutput } from "./commands/ListFleetsCommand";
197197
import { ListJobMembersCommandInput, ListJobMembersCommandOutput } from "./commands/ListJobMembersCommand";
198+
import {
199+
ListJobParameterDefinitionsCommandInput,
200+
ListJobParameterDefinitionsCommandOutput,
201+
} from "./commands/ListJobParameterDefinitionsCommand";
198202
import { ListJobsCommandInput, ListJobsCommandOutput } from "./commands/ListJobsCommand";
199203
import {
200204
ListLicenseEndpointsCommandInput,
@@ -354,6 +358,7 @@ export type ServiceInputTypes =
354358
| ListFleetMembersCommandInput
355359
| ListFleetsCommandInput
356360
| ListJobMembersCommandInput
361+
| ListJobParameterDefinitionsCommandInput
357362
| ListJobsCommandInput
358363
| ListLicenseEndpointsCommandInput
359364
| ListMeteredProductsCommandInput
@@ -461,6 +466,7 @@ export type ServiceOutputTypes =
461466
| ListFleetMembersCommandOutput
462467
| ListFleetsCommandOutput
463468
| ListJobMembersCommandOutput
469+
| ListJobParameterDefinitionsCommandOutput
464470
| ListJobsCommandOutput
465471
| ListLicenseEndpointsCommandOutput
466472
| ListMeteredProductsCommandOutput

clients/client-deadline/src/commands/CreateJobCommand.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ export interface CreateJobCommandOutput extends CreateJobResponse, __MetadataBea
4141
* farmId: "STRING_VALUE", // required
4242
* queueId: "STRING_VALUE", // required
4343
* clientToken: "STRING_VALUE",
44-
* template: "STRING_VALUE", // required
45-
* templateType: "JSON" || "YAML", // required
44+
* template: "STRING_VALUE",
45+
* templateType: "JSON" || "YAML",
4646
* priority: Number("int"), // required
4747
* parameters: { // JobParameters
4848
* "<keys>": { // JobParameter Union: only one key present
@@ -71,6 +71,7 @@ export interface CreateJobCommandOutput extends CreateJobResponse, __MetadataBea
7171
* targetTaskRunStatus: "READY" || "SUSPENDED",
7272
* maxFailedTasksCount: Number("int"),
7373
* maxRetriesPerTask: Number("int"),
74+
* sourceJobId: "STRING_VALUE",
7475
* };
7576
* const command = new CreateJobCommand(input);
7677
* const response = await client.send(command);

clients/client-deadline/src/commands/GetJobCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ export interface GetJobCommandOutput extends GetJobResponse, __MetadataBearer {}
8686
* // fileSystem: "COPIED" || "VIRTUAL",
8787
* // },
8888
* // description: "STRING_VALUE",
89+
* // sourceJobId: "STRING_VALUE",
8990
* // };
9091
*
9192
* ```
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
// smithy-typescript generated code
2+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3+
import { getSerdePlugin } from "@smithy/middleware-serde";
4+
import { Command as $Command } from "@smithy/smithy-client";
5+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
6+
7+
import { DeadlineClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DeadlineClient";
8+
import { commonParams } from "../endpoint/EndpointParameters";
9+
import { ListJobParameterDefinitionsRequest, ListJobParameterDefinitionsResponse } from "../models/models_0";
10+
import {
11+
de_ListJobParameterDefinitionsCommand,
12+
se_ListJobParameterDefinitionsCommand,
13+
} from "../protocols/Aws_restJson1";
14+
15+
/**
16+
* @public
17+
*/
18+
export type { __MetadataBearer };
19+
export { $Command };
20+
/**
21+
* @public
22+
*
23+
* The input for {@link ListJobParameterDefinitionsCommand}.
24+
*/
25+
export interface ListJobParameterDefinitionsCommandInput extends ListJobParameterDefinitionsRequest {}
26+
/**
27+
* @public
28+
*
29+
* The output of {@link ListJobParameterDefinitionsCommand}.
30+
*/
31+
export interface ListJobParameterDefinitionsCommandOutput
32+
extends ListJobParameterDefinitionsResponse,
33+
__MetadataBearer {}
34+
35+
/**
36+
* <p>Lists parameter definitions of a job.</p>
37+
* @example
38+
* Use a bare-bones client and the command you need to make an API call.
39+
* ```javascript
40+
* import { DeadlineClient, ListJobParameterDefinitionsCommand } from "@aws-sdk/client-deadline"; // ES Modules import
41+
* // const { DeadlineClient, ListJobParameterDefinitionsCommand } = require("@aws-sdk/client-deadline"); // CommonJS import
42+
* const client = new DeadlineClient(config);
43+
* const input = { // ListJobParameterDefinitionsRequest
44+
* farmId: "STRING_VALUE", // required
45+
* jobId: "STRING_VALUE", // required
46+
* queueId: "STRING_VALUE", // required
47+
* nextToken: "STRING_VALUE",
48+
* maxResults: Number("int"),
49+
* };
50+
* const command = new ListJobParameterDefinitionsCommand(input);
51+
* const response = await client.send(command);
52+
* // { // ListJobParameterDefinitionsResponse
53+
* // jobParameterDefinitions: [ // JobParameterDefinitions // required
54+
* // "DOCUMENT_VALUE",
55+
* // ],
56+
* // nextToken: "STRING_VALUE",
57+
* // };
58+
*
59+
* ```
60+
*
61+
* @param ListJobParameterDefinitionsCommandInput - {@link ListJobParameterDefinitionsCommandInput}
62+
* @returns {@link ListJobParameterDefinitionsCommandOutput}
63+
* @see {@link ListJobParameterDefinitionsCommandInput} for command's `input` shape.
64+
* @see {@link ListJobParameterDefinitionsCommandOutput} for command's `response` shape.
65+
* @see {@link DeadlineClientResolvedConfig | config} for DeadlineClient's `config` shape.
66+
*
67+
* @throws {@link AccessDeniedException} (client fault)
68+
* <p>You don't have permission to perform the action.</p>
69+
*
70+
* @throws {@link InternalServerErrorException} (server fault)
71+
* <p>Deadline Cloud can't process your request right now. Try again later.</p>
72+
*
73+
* @throws {@link ResourceNotFoundException} (client fault)
74+
* <p>The requested resource can't be found.</p>
75+
*
76+
* @throws {@link ThrottlingException} (client fault)
77+
* <p>Your request exceeded a request rate quota.</p>
78+
*
79+
* @throws {@link ValidationException} (client fault)
80+
* <p>The request isn't valid. This can occur if your request contains malformed JSON or
81+
* unsupported characters.</p>
82+
*
83+
* @throws {@link DeadlineServiceException}
84+
* <p>Base exception class for all service exceptions from Deadline service.</p>
85+
*
86+
* @public
87+
*/
88+
export class ListJobParameterDefinitionsCommand extends $Command
89+
.classBuilder<
90+
ListJobParameterDefinitionsCommandInput,
91+
ListJobParameterDefinitionsCommandOutput,
92+
DeadlineClientResolvedConfig,
93+
ServiceInputTypes,
94+
ServiceOutputTypes
95+
>()
96+
.ep(commonParams)
97+
.m(function (this: any, Command: any, cs: any, config: DeadlineClientResolvedConfig, o: any) {
98+
return [
99+
getSerdePlugin(config, this.serialize, this.deserialize),
100+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
101+
];
102+
})
103+
.s("Deadline", "ListJobParameterDefinitions", {})
104+
.n("DeadlineClient", "ListJobParameterDefinitionsCommand")
105+
.f(void 0, void 0)
106+
.ser(se_ListJobParameterDefinitionsCommand)
107+
.de(de_ListJobParameterDefinitionsCommand)
108+
.build() {
109+
/** @internal type navigation helper, not in runtime. */
110+
protected declare static __types: {
111+
api: {
112+
input: ListJobParameterDefinitionsRequest;
113+
output: ListJobParameterDefinitionsResponse;
114+
};
115+
sdk: {
116+
input: ListJobParameterDefinitionsCommandInput;
117+
output: ListJobParameterDefinitionsCommandOutput;
118+
};
119+
};
120+
}

clients/client-deadline/src/commands/ListJobsCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ export interface ListJobsCommandOutput extends ListJobsResponse, __MetadataBeare
6565
* // },
6666
* // maxFailedTasksCount: Number("int"),
6767
* // maxRetriesPerTask: Number("int"),
68+
* // sourceJobId: "STRING_VALUE",
6869
* // },
6970
* // ],
7071
* // nextToken: "STRING_VALUE",

clients/client-deadline/src/commands/ListQueuesCommand.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
66

77
import { DeadlineClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DeadlineClient";
88
import { commonParams } from "../endpoint/EndpointParameters";
9-
import { ListQueuesRequest, ListQueuesResponse } from "../models/models_0";
9+
import { ListQueuesRequest } from "../models/models_0";
10+
import { ListQueuesResponse } from "../models/models_1";
1011
import { de_ListQueuesCommand, se_ListQueuesCommand } from "../protocols/Aws_restJson1";
1112

1213
/**

clients/client-deadline/src/commands/ListStorageProfilesForQueueCommand.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
66

77
import { DeadlineClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DeadlineClient";
88
import { commonParams } from "../endpoint/EndpointParameters";
9-
import { ListStorageProfilesForQueueRequest } from "../models/models_0";
10-
import { ListStorageProfilesForQueueResponse } from "../models/models_1";
9+
import { ListStorageProfilesForQueueRequest, ListStorageProfilesForQueueResponse } from "../models/models_1";
1110
import {
1211
de_ListStorageProfilesForQueueCommand,
1312
se_ListStorageProfilesForQueueCommand,

clients/client-deadline/src/commands/SearchJobsCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ export interface SearchJobsCommandOutput extends SearchJobsResponse, __MetadataB
139139
* // path: "STRING_VALUE",
140140
* // },
141141
* // },
142+
* // sourceJobId: "STRING_VALUE",
142143
* // },
143144
* // ],
144145
* // nextItemOffset: Number("int"),

clients/client-deadline/src/commands/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ export * from "./ListFarmsCommand";
6060
export * from "./ListFleetMembersCommand";
6161
export * from "./ListFleetsCommand";
6262
export * from "./ListJobMembersCommand";
63+
export * from "./ListJobParameterDefinitionsCommand";
6364
export * from "./ListJobsCommand";
6465
export * from "./ListLicenseEndpointsCommand";
6566
export * from "./ListMeteredProductsCommand";

0 commit comments

Comments
 (0)