Skip to content

Commit 33a5089

Browse files
author
awstools
committed
feat(client-mediaconvert): This release adds the ability to search for historical job records within the management console using a search box and/or via the SDK/CLI with partial string matching search on input file name.
1 parent 2d57a05 commit 33a5089

File tree

11 files changed

+1892
-2
lines changed

11 files changed

+1892
-2
lines changed

clients/client-mediaconvert/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,14 @@ PutPolicy
386386

387387
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/mediaconvert/command/PutPolicyCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-mediaconvert/Interface/PutPolicyCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-mediaconvert/Interface/PutPolicyCommandOutput/)
388388

389+
</details>
390+
<details>
391+
<summary>
392+
SearchJobs
393+
</summary>
394+
395+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/mediaconvert/command/SearchJobsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-mediaconvert/Interface/SearchJobsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-mediaconvert/Interface/SearchJobsCommandOutput/)
396+
389397
</details>
390398
<details>
391399
<summary>

clients/client-mediaconvert/src/MediaConvert.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ import {
6969
ListTagsForResourceCommandOutput,
7070
} from "./commands/ListTagsForResourceCommand";
7171
import { PutPolicyCommand, PutPolicyCommandInput, PutPolicyCommandOutput } from "./commands/PutPolicyCommand";
72+
import { SearchJobsCommand, SearchJobsCommandInput, SearchJobsCommandOutput } from "./commands/SearchJobsCommand";
7273
import { TagResourceCommand, TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
7374
import {
7475
UntagResourceCommand,
@@ -112,6 +113,7 @@ const commands = {
112113
ListQueuesCommand,
113114
ListTagsForResourceCommand,
114115
PutPolicyCommand,
116+
SearchJobsCommand,
115117
TagResourceCommand,
116118
UntagResourceCommand,
117119
UpdateJobTemplateCommand,
@@ -425,6 +427,18 @@ export interface MediaConvert {
425427
cb: (err: any, data?: PutPolicyCommandOutput) => void
426428
): void;
427429

430+
/**
431+
* @see {@link SearchJobsCommand}
432+
*/
433+
searchJobs(): Promise<SearchJobsCommandOutput>;
434+
searchJobs(args: SearchJobsCommandInput, options?: __HttpHandlerOptions): Promise<SearchJobsCommandOutput>;
435+
searchJobs(args: SearchJobsCommandInput, cb: (err: any, data?: SearchJobsCommandOutput) => void): void;
436+
searchJobs(
437+
args: SearchJobsCommandInput,
438+
options: __HttpHandlerOptions,
439+
cb: (err: any, data?: SearchJobsCommandOutput) => void
440+
): void;
441+
428442
/**
429443
* @see {@link TagResourceCommand}
430444
*/

clients/client-mediaconvert/src/MediaConvertClient.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ import {
8585
ListTagsForResourceCommandOutput,
8686
} from "./commands/ListTagsForResourceCommand";
8787
import { PutPolicyCommandInput, PutPolicyCommandOutput } from "./commands/PutPolicyCommand";
88+
import { SearchJobsCommandInput, SearchJobsCommandOutput } from "./commands/SearchJobsCommand";
8889
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
8990
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
9091
import { UpdateJobTemplateCommandInput, UpdateJobTemplateCommandOutput } from "./commands/UpdateJobTemplateCommand";
@@ -128,6 +129,7 @@ export type ServiceInputTypes =
128129
| ListQueuesCommandInput
129130
| ListTagsForResourceCommandInput
130131
| PutPolicyCommandInput
132+
| SearchJobsCommandInput
131133
| TagResourceCommandInput
132134
| UntagResourceCommandInput
133135
| UpdateJobTemplateCommandInput
@@ -161,6 +163,7 @@ export type ServiceOutputTypes =
161163
| ListQueuesCommandOutput
162164
| ListTagsForResourceCommandOutput
163165
| PutPolicyCommandOutput
166+
| SearchJobsCommandOutput
164167
| TagResourceCommandOutput
165168
| UntagResourceCommandOutput
166169
| UpdateJobTemplateCommandOutput

clients/client-mediaconvert/src/commands/DescribeEndpointsCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export interface DescribeEndpointsCommandInput extends DescribeEndpointsRequest
2828
export interface DescribeEndpointsCommandOutput extends DescribeEndpointsResponse, __MetadataBearer {}
2929

3030
/**
31-
* Send an request with an empty body to the regional API endpoint to get your account API endpoint.
31+
* Send a request with an empty body to the regional API endpoint to get your account API endpoint. Note that DescribeEndpoints is no longer required. We recommend that you send your requests directly to the regional endpoint instead.
3232
*
3333
* @deprecated DescribeEndpoints and account specific endpoints are no longer required. We recommend that you send your requests directly to the regional endpoint instead.
3434
* @example

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

Lines changed: 1619 additions & 0 deletions
Large diffs are not rendered by default.

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export * from "./ListPresetsCommand";
2222
export * from "./ListQueuesCommand";
2323
export * from "./ListTagsForResourceCommand";
2424
export * from "./PutPolicyCommand";
25+
export * from "./SearchJobsCommand";
2526
export * from "./TagResourceCommand";
2627
export * from "./UntagResourceCommand";
2728
export * from "./UpdateJobTemplateCommand";

clients/client-mediaconvert/src/models/models_2.ts

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -946,6 +946,64 @@ export interface PutPolicyResponse {
946946
Policy?: Policy;
947947
}
948948

949+
/**
950+
* @public
951+
*/
952+
export interface SearchJobsRequest {
953+
/**
954+
* Optional. Provide your input file URL or your partial input file name. The maximum length for an input file is 300 characters.
955+
* @public
956+
*/
957+
InputFile?: string;
958+
959+
/**
960+
* Optional. Number of jobs, up to twenty, that will be returned at one time.
961+
* @public
962+
*/
963+
MaxResults?: number;
964+
965+
/**
966+
* Optional. Use this string, provided with the response to a previous request, to request the next batch of jobs.
967+
* @public
968+
*/
969+
NextToken?: string;
970+
971+
/**
972+
* Optional. When you request lists of resources, you can specify whether they are sorted in ASCENDING or DESCENDING order. Default varies by resource.
973+
* @public
974+
*/
975+
Order?: Order;
976+
977+
/**
978+
* Optional. Provide a queue name, or a queue ARN, to return only jobs from that queue.
979+
* @public
980+
*/
981+
Queue?: string;
982+
983+
/**
984+
* Optional. A job's status can be SUBMITTED, PROGRESSING, COMPLETE, CANCELED, or ERROR.
985+
* @public
986+
*/
987+
Status?: JobStatus;
988+
}
989+
990+
/**
991+
* @public
992+
*/
993+
export interface SearchJobsResponse {
994+
/**
995+
* List of jobs.
996+
* @public
997+
*/
998+
Jobs?: Job[];
999+
1000+
/**
1001+
* Use this string to request the next batch of jobs.
1002+
* @public
1003+
*/
1004+
NextToken?: string;
1005+
}
1006+
9491007
/**
9501008
* @public
9511009
*/
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// smithy-typescript generated code
2+
import { createPaginator } from "@smithy/core";
3+
import { Paginator } from "@smithy/types";
4+
5+
import { SearchJobsCommand, SearchJobsCommandInput, SearchJobsCommandOutput } from "../commands/SearchJobsCommand";
6+
import { MediaConvertClient } from "../MediaConvertClient";
7+
import { MediaConvertPaginationConfiguration } from "./Interfaces";
8+
9+
/**
10+
* @public
11+
*/
12+
export const paginateSearchJobs: (
13+
config: MediaConvertPaginationConfiguration,
14+
input: SearchJobsCommandInput,
15+
...rest: any[]
16+
) => Paginator<SearchJobsCommandOutput> = createPaginator<
17+
MediaConvertPaginationConfiguration,
18+
SearchJobsCommandInput,
19+
SearchJobsCommandOutput
20+
>(MediaConvertClient, SearchJobsCommand, "NextToken", "NextToken", "MaxResults");

clients/client-mediaconvert/src/pagination/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ export * from "./ListJobTemplatesPaginator";
55
export * from "./ListJobsPaginator";
66
export * from "./ListPresetsPaginator";
77
export * from "./ListQueuesPaginator";
8+
export * from "./SearchJobsPaginator";

clients/client-mediaconvert/src/protocols/Aws_restJson1.ts

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ import {
5959
ListTagsForResourceCommandOutput,
6060
} from "../commands/ListTagsForResourceCommand";
6161
import { PutPolicyCommandInput, PutPolicyCommandOutput } from "../commands/PutPolicyCommand";
62+
import { SearchJobsCommandInput, SearchJobsCommandOutput } from "../commands/SearchJobsCommand";
6263
import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand";
6364
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand";
6465
import { UpdateJobTemplateCommandInput, UpdateJobTemplateCommandOutput } from "../commands/UpdateJobTemplateCommand";
@@ -723,6 +724,29 @@ export const se_PutPolicyCommand = async (
723724
return b.build();
724725
};
725726

727+
/**
728+
* serializeAws_restJson1SearchJobsCommand
729+
*/
730+
export const se_SearchJobsCommand = async (
731+
input: SearchJobsCommandInput,
732+
context: __SerdeContext
733+
): Promise<__HttpRequest> => {
734+
const b = rb(input, context);
735+
const headers: any = {};
736+
b.bp("/2017-08-29/search");
737+
const query: any = map({
738+
[_iF]: [, input[_IF]!],
739+
[_mR]: [() => input.MaxResults !== void 0, () => input[_MR]!.toString()],
740+
[_nT]: [, input[_NT]!],
741+
[_o]: [, input[_O]!],
742+
[_q]: [, input[_Q]!],
743+
[_s]: [, input[_S]!],
744+
});
745+
let body: any;
746+
b.m("GET").h(headers).q(query).b(body);
747+
return b.build();
748+
};
749+
726750
/**
727751
* serializeAws_restJson1TagResourceCommand
728752
*/
@@ -1309,6 +1333,28 @@ export const de_PutPolicyCommand = async (
13091333
return contents;
13101334
};
13111335

1336+
/**
1337+
* deserializeAws_restJson1SearchJobsCommand
1338+
*/
1339+
export const de_SearchJobsCommand = async (
1340+
output: __HttpResponse,
1341+
context: __SerdeContext
1342+
): Promise<SearchJobsCommandOutput> => {
1343+
if (output.statusCode !== 200 && output.statusCode >= 300) {
1344+
return de_CommandError(output, context);
1345+
}
1346+
const contents: any = map({
1347+
$metadata: deserializeMetadata(output),
1348+
});
1349+
const data: Record<string, any> = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1350+
const doc = take(data, {
1351+
Jobs: [, (_) => de___listOfJob(_, context), `jobs`],
1352+
NextToken: [, __expectString, `nextToken`],
1353+
});
1354+
Object.assign(contents, doc);
1355+
return contents;
1356+
};
1357+
13121358
/**
13131359
* deserializeAws_restJson1TagResourceCommand
13141360
*/
@@ -7597,13 +7643,15 @@ const isSerializableHeaderValue = (value: any): boolean =>
75977643
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
75987644

75997645
const _C = "Category";
7646+
const _IF = "InputFile";
76007647
const _LB = "ListBy";
76017648
const _MR = "MaxResults";
76027649
const _NT = "NextToken";
76037650
const _O = "Order";
76047651
const _Q = "Queue";
76057652
const _S = "Status";
76067653
const _c = "category";
7654+
const _iF = "inputFile";
76077655
const _lB = "listBy";
76087656
const _mR = "maxResults";
76097657
const _nT = "nextToken";

0 commit comments

Comments
 (0)