@aws-sdk/client-mediapackagev2 3.679.0 → 3.682.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -1
- package/dist-cjs/index.js +388 -32
- package/dist-es/MediaPackageV2.js +8 -0
- package/dist-es/commands/CancelHarvestJobCommand.js +22 -0
- package/dist-es/commands/CreateHarvestJobCommand.js +22 -0
- package/dist-es/commands/GetHarvestJobCommand.js +22 -0
- package/dist-es/commands/ListHarvestJobsCommand.js +22 -0
- package/dist-es/commands/index.js +4 -0
- package/dist-es/index.js +1 -0
- package/dist-es/models/models_0.js +35 -19
- package/dist-es/pagination/ListHarvestJobsPaginator.js +4 -0
- package/dist-es/pagination/index.js +1 -0
- package/dist-es/protocols/Aws_restJson1.js +192 -3
- package/dist-es/waiters/index.js +1 -0
- package/dist-es/waiters/waitForHarvestJobFinished.js +67 -0
- package/dist-types/MediaPackageV2.d.ts +28 -0
- package/dist-types/MediaPackageV2Client.d.ts +6 -2
- package/dist-types/commands/CancelHarvestJobCommand.d.ts +105 -0
- package/dist-types/commands/CreateHarvestJobCommand.d.ts +253 -0
- package/dist-types/commands/GetHarvestJobCommand.d.ts +188 -0
- package/dist-types/commands/ListHarvestJobsCommand.d.ts +473 -0
- package/dist-types/commands/index.d.ts +4 -0
- package/dist-types/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +580 -52
- package/dist-types/pagination/ListHarvestJobsPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +1 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +36 -0
- package/dist-types/ts3.4/MediaPackageV2.d.ts +68 -0
- package/dist-types/ts3.4/MediaPackageV2Client.d.ts +24 -0
- package/dist-types/ts3.4/commands/CancelHarvestJobCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/CreateHarvestJobCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/GetHarvestJobCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/ListHarvestJobsCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/index.d.ts +4 -0
- package/dist-types/ts3.4/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +157 -26
- package/dist-types/ts3.4/pagination/ListHarvestJobsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +1 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +48 -0
- package/dist-types/ts3.4/waiters/index.d.ts +1 -0
- package/dist-types/ts3.4/waiters/waitForHarvestJobFinished.d.ts +11 -0
- package/dist-types/waiters/index.d.ts +1 -0
- package/dist-types/waiters/waitForHarvestJobFinished.d.ts +14 -0
- package/package.json +7 -6
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { createAggregatedClient } from "@smithy/smithy-client";
|
|
2
|
+
import { CancelHarvestJobCommand, } from "./commands/CancelHarvestJobCommand";
|
|
2
3
|
import { CreateChannelCommand, } from "./commands/CreateChannelCommand";
|
|
3
4
|
import { CreateChannelGroupCommand, } from "./commands/CreateChannelGroupCommand";
|
|
5
|
+
import { CreateHarvestJobCommand, } from "./commands/CreateHarvestJobCommand";
|
|
4
6
|
import { CreateOriginEndpointCommand, } from "./commands/CreateOriginEndpointCommand";
|
|
5
7
|
import { DeleteChannelCommand, } from "./commands/DeleteChannelCommand";
|
|
6
8
|
import { DeleteChannelGroupCommand, } from "./commands/DeleteChannelGroupCommand";
|
|
@@ -10,10 +12,12 @@ import { DeleteOriginEndpointPolicyCommand, } from "./commands/DeleteOriginEndpo
|
|
|
10
12
|
import { GetChannelCommand } from "./commands/GetChannelCommand";
|
|
11
13
|
import { GetChannelGroupCommand, } from "./commands/GetChannelGroupCommand";
|
|
12
14
|
import { GetChannelPolicyCommand, } from "./commands/GetChannelPolicyCommand";
|
|
15
|
+
import { GetHarvestJobCommand, } from "./commands/GetHarvestJobCommand";
|
|
13
16
|
import { GetOriginEndpointCommand, } from "./commands/GetOriginEndpointCommand";
|
|
14
17
|
import { GetOriginEndpointPolicyCommand, } from "./commands/GetOriginEndpointPolicyCommand";
|
|
15
18
|
import { ListChannelGroupsCommand, } from "./commands/ListChannelGroupsCommand";
|
|
16
19
|
import { ListChannelsCommand, } from "./commands/ListChannelsCommand";
|
|
20
|
+
import { ListHarvestJobsCommand, } from "./commands/ListHarvestJobsCommand";
|
|
17
21
|
import { ListOriginEndpointsCommand, } from "./commands/ListOriginEndpointsCommand";
|
|
18
22
|
import { ListTagsForResourceCommand, } from "./commands/ListTagsForResourceCommand";
|
|
19
23
|
import { PutChannelPolicyCommand, } from "./commands/PutChannelPolicyCommand";
|
|
@@ -25,8 +29,10 @@ import { UpdateChannelGroupCommand, } from "./commands/UpdateChannelGroupCommand
|
|
|
25
29
|
import { UpdateOriginEndpointCommand, } from "./commands/UpdateOriginEndpointCommand";
|
|
26
30
|
import { MediaPackageV2Client } from "./MediaPackageV2Client";
|
|
27
31
|
const commands = {
|
|
32
|
+
CancelHarvestJobCommand,
|
|
28
33
|
CreateChannelCommand,
|
|
29
34
|
CreateChannelGroupCommand,
|
|
35
|
+
CreateHarvestJobCommand,
|
|
30
36
|
CreateOriginEndpointCommand,
|
|
31
37
|
DeleteChannelCommand,
|
|
32
38
|
DeleteChannelGroupCommand,
|
|
@@ -36,10 +42,12 @@ const commands = {
|
|
|
36
42
|
GetChannelCommand,
|
|
37
43
|
GetChannelGroupCommand,
|
|
38
44
|
GetChannelPolicyCommand,
|
|
45
|
+
GetHarvestJobCommand,
|
|
39
46
|
GetOriginEndpointCommand,
|
|
40
47
|
GetOriginEndpointPolicyCommand,
|
|
41
48
|
ListChannelGroupsCommand,
|
|
42
49
|
ListChannelsCommand,
|
|
50
|
+
ListHarvestJobsCommand,
|
|
43
51
|
ListOriginEndpointsCommand,
|
|
44
52
|
ListTagsForResourceCommand,
|
|
45
53
|
PutChannelPolicyCommand,
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
5
|
+
import { de_CancelHarvestJobCommand, se_CancelHarvestJobCommand } from "../protocols/Aws_restJson1";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class CancelHarvestJobCommand extends $Command
|
|
8
|
+
.classBuilder()
|
|
9
|
+
.ep(commonParams)
|
|
10
|
+
.m(function (Command, cs, config, o) {
|
|
11
|
+
return [
|
|
12
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
13
|
+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
14
|
+
];
|
|
15
|
+
})
|
|
16
|
+
.s("mediapackagev2", "CancelHarvestJob", {})
|
|
17
|
+
.n("MediaPackageV2Client", "CancelHarvestJobCommand")
|
|
18
|
+
.f(void 0, void 0)
|
|
19
|
+
.ser(se_CancelHarvestJobCommand)
|
|
20
|
+
.de(de_CancelHarvestJobCommand)
|
|
21
|
+
.build() {
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
5
|
+
import { de_CreateHarvestJobCommand, se_CreateHarvestJobCommand } from "../protocols/Aws_restJson1";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class CreateHarvestJobCommand extends $Command
|
|
8
|
+
.classBuilder()
|
|
9
|
+
.ep(commonParams)
|
|
10
|
+
.m(function (Command, cs, config, o) {
|
|
11
|
+
return [
|
|
12
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
13
|
+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
14
|
+
];
|
|
15
|
+
})
|
|
16
|
+
.s("mediapackagev2", "CreateHarvestJob", {})
|
|
17
|
+
.n("MediaPackageV2Client", "CreateHarvestJobCommand")
|
|
18
|
+
.f(void 0, void 0)
|
|
19
|
+
.ser(se_CreateHarvestJobCommand)
|
|
20
|
+
.de(de_CreateHarvestJobCommand)
|
|
21
|
+
.build() {
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
5
|
+
import { de_GetHarvestJobCommand, se_GetHarvestJobCommand } from "../protocols/Aws_restJson1";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class GetHarvestJobCommand extends $Command
|
|
8
|
+
.classBuilder()
|
|
9
|
+
.ep(commonParams)
|
|
10
|
+
.m(function (Command, cs, config, o) {
|
|
11
|
+
return [
|
|
12
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
13
|
+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
14
|
+
];
|
|
15
|
+
})
|
|
16
|
+
.s("mediapackagev2", "GetHarvestJob", {})
|
|
17
|
+
.n("MediaPackageV2Client", "GetHarvestJobCommand")
|
|
18
|
+
.f(void 0, void 0)
|
|
19
|
+
.ser(se_GetHarvestJobCommand)
|
|
20
|
+
.de(de_GetHarvestJobCommand)
|
|
21
|
+
.build() {
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
5
|
+
import { de_ListHarvestJobsCommand, se_ListHarvestJobsCommand } from "../protocols/Aws_restJson1";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class ListHarvestJobsCommand extends $Command
|
|
8
|
+
.classBuilder()
|
|
9
|
+
.ep(commonParams)
|
|
10
|
+
.m(function (Command, cs, config, o) {
|
|
11
|
+
return [
|
|
12
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
13
|
+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
14
|
+
];
|
|
15
|
+
})
|
|
16
|
+
.s("mediapackagev2", "ListHarvestJobs", {})
|
|
17
|
+
.n("MediaPackageV2Client", "ListHarvestJobsCommand")
|
|
18
|
+
.f(void 0, void 0)
|
|
19
|
+
.ser(se_ListHarvestJobsCommand)
|
|
20
|
+
.de(de_ListHarvestJobsCommand)
|
|
21
|
+
.build() {
|
|
22
|
+
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
export * from "./CancelHarvestJobCommand";
|
|
1
2
|
export * from "./CreateChannelCommand";
|
|
2
3
|
export * from "./CreateChannelGroupCommand";
|
|
4
|
+
export * from "./CreateHarvestJobCommand";
|
|
3
5
|
export * from "./CreateOriginEndpointCommand";
|
|
4
6
|
export * from "./DeleteChannelCommand";
|
|
5
7
|
export * from "./DeleteChannelGroupCommand";
|
|
@@ -9,10 +11,12 @@ export * from "./DeleteOriginEndpointPolicyCommand";
|
|
|
9
11
|
export * from "./GetChannelCommand";
|
|
10
12
|
export * from "./GetChannelGroupCommand";
|
|
11
13
|
export * from "./GetChannelPolicyCommand";
|
|
14
|
+
export * from "./GetHarvestJobCommand";
|
|
12
15
|
export * from "./GetOriginEndpointCommand";
|
|
13
16
|
export * from "./GetOriginEndpointPolicyCommand";
|
|
14
17
|
export * from "./ListChannelGroupsCommand";
|
|
15
18
|
export * from "./ListChannelsCommand";
|
|
19
|
+
export * from "./ListHarvestJobsCommand";
|
|
16
20
|
export * from "./ListOriginEndpointsCommand";
|
|
17
21
|
export * from "./ListTagsForResourceCommand";
|
|
18
22
|
export * from "./PutChannelPolicyCommand";
|
package/dist-es/index.js
CHANGED
|
@@ -2,5 +2,6 @@ export * from "./MediaPackageV2Client";
|
|
|
2
2
|
export * from "./MediaPackageV2";
|
|
3
3
|
export * from "./commands";
|
|
4
4
|
export * from "./pagination";
|
|
5
|
+
export * from "./waiters";
|
|
5
6
|
export * from "./models";
|
|
6
7
|
export { MediaPackageV2ServiceException } from "./models/MediaPackageV2ServiceException";
|
|
@@ -52,6 +52,26 @@ export class InternalServerException extends __BaseException {
|
|
|
52
52
|
this.Message = opts.Message;
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
+
export const ResourceTypeNotFound = {
|
|
56
|
+
CHANNEL: "CHANNEL",
|
|
57
|
+
CHANNEL_GROUP: "CHANNEL_GROUP",
|
|
58
|
+
HARVEST_JOB: "HARVEST_JOB",
|
|
59
|
+
ORIGIN_ENDPOINT: "ORIGIN_ENDPOINT",
|
|
60
|
+
};
|
|
61
|
+
export class ResourceNotFoundException extends __BaseException {
|
|
62
|
+
constructor(opts) {
|
|
63
|
+
super({
|
|
64
|
+
name: "ResourceNotFoundException",
|
|
65
|
+
$fault: "client",
|
|
66
|
+
...opts,
|
|
67
|
+
});
|
|
68
|
+
this.name = "ResourceNotFoundException";
|
|
69
|
+
this.$fault = "client";
|
|
70
|
+
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
71
|
+
this.Message = opts.Message;
|
|
72
|
+
this.ResourceTypeNotFound = opts.ResourceTypeNotFound;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
55
75
|
export class ThrottlingException extends __BaseException {
|
|
56
76
|
constructor(opts) {
|
|
57
77
|
super({
|
|
@@ -77,6 +97,13 @@ export const ValidationExceptionType = {
|
|
|
77
97
|
ENCRYPTION_CONTRACT_WITHOUT_AUDIO_RENDITION_INCOMPATIBLE: "ENCRYPTION_CONTRACT_WITHOUT_AUDIO_RENDITION_INCOMPATIBLE",
|
|
78
98
|
ENCRYPTION_METHOD_CONTAINER_TYPE_MISMATCH: "ENCRYPTION_METHOD_CONTAINER_TYPE_MISMATCH",
|
|
79
99
|
END_TIME_EARLIER_THAN_START_TIME: "END_TIME_EARLIER_THAN_START_TIME",
|
|
100
|
+
HARVESTED_MANIFEST_HAS_START_END_FILTER_CONFIGURATION: "HARVESTED_MANIFEST_HAS_START_END_FILTER_CONFIGURATION",
|
|
101
|
+
HARVESTED_MANIFEST_NOT_FOUND_ON_ENDPOINT: "HARVESTED_MANIFEST_NOT_FOUND_ON_ENDPOINT",
|
|
102
|
+
HARVEST_JOB_CUSTOMER_ENDPOINT_READ_ACCESS_DENIED: "HARVEST_JOB_CUSTOMER_ENDPOINT_READ_ACCESS_DENIED",
|
|
103
|
+
HARVEST_JOB_INELIGIBLE_FOR_CANCELLATION: "HARVEST_JOB_INELIGIBLE_FOR_CANCELLATION",
|
|
104
|
+
HARVEST_JOB_S3_DESTINATION_MISSING_OR_INCOMPLETE: "HARVEST_JOB_S3_DESTINATION_MISSING_OR_INCOMPLETE",
|
|
105
|
+
HARVEST_JOB_UNABLE_TO_WRITE_TO_S3_DESTINATION: "HARVEST_JOB_UNABLE_TO_WRITE_TO_S3_DESTINATION",
|
|
106
|
+
INVALID_HARVEST_JOB_DURATION: "INVALID_HARVEST_JOB_DURATION",
|
|
80
107
|
INVALID_MANIFEST_FILTER: "INVALID_MANIFEST_FILTER",
|
|
81
108
|
INVALID_PAGINATION_MAX_RESULTS: "INVALID_PAGINATION_MAX_RESULTS",
|
|
82
109
|
INVALID_PAGINATION_TOKEN: "INVALID_PAGINATION_TOKEN",
|
|
@@ -104,6 +131,7 @@ export const ValidationExceptionType = {
|
|
|
104
131
|
SOURCE_DISRUPTIONS_ENABLED_INCORRECTLY: "SOURCE_DISRUPTIONS_ENABLED_INCORRECTLY",
|
|
105
132
|
START_TAG_TIME_OFFSET_INVALID: "START_TAG_TIME_OFFSET_INVALID",
|
|
106
133
|
TIMING_SOURCE_MISSING: "TIMING_SOURCE_MISSING",
|
|
134
|
+
TOO_MANY_IN_PROGRESS_HARVEST_JOBS: "TOO_MANY_IN_PROGRESS_HARVEST_JOBS",
|
|
107
135
|
TS_CONTAINER_TYPE_WITH_DASH_MANIFEST: "TS_CONTAINER_TYPE_WITH_DASH_MANIFEST",
|
|
108
136
|
UPDATE_PERIOD_SMALLER_THAN_SEGMENT_DURATION: "UPDATE_PERIOD_SMALLER_THAN_SEGMENT_DURATION",
|
|
109
137
|
URL_INVALID: "URL_INVALID",
|
|
@@ -130,25 +158,6 @@ export class ValidationException extends __BaseException {
|
|
|
130
158
|
this.ValidationExceptionType = opts.ValidationExceptionType;
|
|
131
159
|
}
|
|
132
160
|
}
|
|
133
|
-
export const ResourceTypeNotFound = {
|
|
134
|
-
CHANNEL: "CHANNEL",
|
|
135
|
-
CHANNEL_GROUP: "CHANNEL_GROUP",
|
|
136
|
-
ORIGIN_ENDPOINT: "ORIGIN_ENDPOINT",
|
|
137
|
-
};
|
|
138
|
-
export class ResourceNotFoundException extends __BaseException {
|
|
139
|
-
constructor(opts) {
|
|
140
|
-
super({
|
|
141
|
-
name: "ResourceNotFoundException",
|
|
142
|
-
$fault: "client",
|
|
143
|
-
...opts,
|
|
144
|
-
});
|
|
145
|
-
this.name = "ResourceNotFoundException";
|
|
146
|
-
this.$fault = "client";
|
|
147
|
-
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
148
|
-
this.Message = opts.Message;
|
|
149
|
-
this.ResourceTypeNotFound = opts.ResourceTypeNotFound;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
161
|
export const InputType = {
|
|
153
162
|
CMAF: "CMAF",
|
|
154
163
|
HLS: "HLS",
|
|
@@ -241,3 +250,10 @@ export const ScteFilter = {
|
|
|
241
250
|
PROVIDER_PLACEMENT_OPPORTUNITY: "PROVIDER_PLACEMENT_OPPORTUNITY",
|
|
242
251
|
SPLICE_INSERT: "SPLICE_INSERT",
|
|
243
252
|
};
|
|
253
|
+
export const HarvestJobStatus = {
|
|
254
|
+
CANCELLED: "CANCELLED",
|
|
255
|
+
COMPLETED: "COMPLETED",
|
|
256
|
+
FAILED: "FAILED",
|
|
257
|
+
IN_PROGRESS: "IN_PROGRESS",
|
|
258
|
+
QUEUED: "QUEUED",
|
|
259
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
2
|
+
import { ListHarvestJobsCommand, } from "../commands/ListHarvestJobsCommand";
|
|
3
|
+
import { MediaPackageV2Client } from "../MediaPackageV2Client";
|
|
4
|
+
export const paginateListHarvestJobs = createPaginator(MediaPackageV2Client, ListHarvestJobsCommand, "NextToken", "NextToken", "MaxResults");
|
|
@@ -4,6 +4,20 @@ import { _json, collectBody, decorateServiceException as __decorateServiceExcept
|
|
|
4
4
|
import { v4 as generateIdempotencyToken } from "uuid";
|
|
5
5
|
import { MediaPackageV2ServiceException as __BaseException } from "../models/MediaPackageV2ServiceException";
|
|
6
6
|
import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
|
|
7
|
+
export const se_CancelHarvestJobCommand = async (input, context) => {
|
|
8
|
+
const b = rb(input, context);
|
|
9
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
10
|
+
[_xauim]: input[_ET],
|
|
11
|
+
});
|
|
12
|
+
b.bp("/channelGroup/{ChannelGroupName}/channel/{ChannelName}/originEndpoint/{OriginEndpointName}/harvestJob/{HarvestJobName}");
|
|
13
|
+
b.p("ChannelGroupName", () => input.ChannelGroupName, "{ChannelGroupName}", false);
|
|
14
|
+
b.p("ChannelName", () => input.ChannelName, "{ChannelName}", false);
|
|
15
|
+
b.p("OriginEndpointName", () => input.OriginEndpointName, "{OriginEndpointName}", false);
|
|
16
|
+
b.p("HarvestJobName", () => input.HarvestJobName, "{HarvestJobName}", false);
|
|
17
|
+
let body;
|
|
18
|
+
b.m("PUT").h(headers).b(body);
|
|
19
|
+
return b.build();
|
|
20
|
+
};
|
|
7
21
|
export const se_CreateChannelCommand = async (input, context) => {
|
|
8
22
|
const b = rb(input, context);
|
|
9
23
|
const headers = map({}, isSerializableHeaderValue, {
|
|
@@ -38,6 +52,28 @@ export const se_CreateChannelGroupCommand = async (input, context) => {
|
|
|
38
52
|
b.m("POST").h(headers).b(body);
|
|
39
53
|
return b.build();
|
|
40
54
|
};
|
|
55
|
+
export const se_CreateHarvestJobCommand = async (input, context) => {
|
|
56
|
+
const b = rb(input, context);
|
|
57
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
58
|
+
"content-type": "application/json",
|
|
59
|
+
[_xact]: input[_CT] ?? generateIdempotencyToken(),
|
|
60
|
+
});
|
|
61
|
+
b.bp("/channelGroup/{ChannelGroupName}/channel/{ChannelName}/originEndpoint/{OriginEndpointName}/harvestJob");
|
|
62
|
+
b.p("ChannelGroupName", () => input.ChannelGroupName, "{ChannelGroupName}", false);
|
|
63
|
+
b.p("ChannelName", () => input.ChannelName, "{ChannelName}", false);
|
|
64
|
+
b.p("OriginEndpointName", () => input.OriginEndpointName, "{OriginEndpointName}", false);
|
|
65
|
+
let body;
|
|
66
|
+
body = JSON.stringify(take(input, {
|
|
67
|
+
Description: [],
|
|
68
|
+
Destination: (_) => _json(_),
|
|
69
|
+
HarvestJobName: [],
|
|
70
|
+
HarvestedManifests: (_) => _json(_),
|
|
71
|
+
ScheduleConfiguration: (_) => se_HarvesterScheduleConfiguration(_, context),
|
|
72
|
+
Tags: (_) => _json(_),
|
|
73
|
+
}));
|
|
74
|
+
b.m("POST").h(headers).b(body);
|
|
75
|
+
return b.build();
|
|
76
|
+
};
|
|
41
77
|
export const se_CreateOriginEndpointCommand = async (input, context) => {
|
|
42
78
|
const b = rb(input, context);
|
|
43
79
|
const headers = map({}, isSerializableHeaderValue, {
|
|
@@ -143,6 +179,18 @@ export const se_GetChannelPolicyCommand = async (input, context) => {
|
|
|
143
179
|
b.m("GET").h(headers).b(body);
|
|
144
180
|
return b.build();
|
|
145
181
|
};
|
|
182
|
+
export const se_GetHarvestJobCommand = async (input, context) => {
|
|
183
|
+
const b = rb(input, context);
|
|
184
|
+
const headers = {};
|
|
185
|
+
b.bp("/channelGroup/{ChannelGroupName}/channel/{ChannelName}/originEndpoint/{OriginEndpointName}/harvestJob/{HarvestJobName}");
|
|
186
|
+
b.p("ChannelGroupName", () => input.ChannelGroupName, "{ChannelGroupName}", false);
|
|
187
|
+
b.p("ChannelName", () => input.ChannelName, "{ChannelName}", false);
|
|
188
|
+
b.p("OriginEndpointName", () => input.OriginEndpointName, "{OriginEndpointName}", false);
|
|
189
|
+
b.p("HarvestJobName", () => input.HarvestJobName, "{HarvestJobName}", false);
|
|
190
|
+
let body;
|
|
191
|
+
b.m("GET").h(headers).b(body);
|
|
192
|
+
return b.build();
|
|
193
|
+
};
|
|
146
194
|
export const se_GetOriginEndpointCommand = async (input, context) => {
|
|
147
195
|
const b = rb(input, context);
|
|
148
196
|
const headers = {};
|
|
@@ -190,6 +238,22 @@ export const se_ListChannelsCommand = async (input, context) => {
|
|
|
190
238
|
b.m("GET").h(headers).q(query).b(body);
|
|
191
239
|
return b.build();
|
|
192
240
|
};
|
|
241
|
+
export const se_ListHarvestJobsCommand = async (input, context) => {
|
|
242
|
+
const b = rb(input, context);
|
|
243
|
+
const headers = {};
|
|
244
|
+
b.bp("/channelGroup/{ChannelGroupName}/harvestJob");
|
|
245
|
+
b.p("ChannelGroupName", () => input.ChannelGroupName, "{ChannelGroupName}", false);
|
|
246
|
+
const query = map({
|
|
247
|
+
[_cN]: [, input[_CN]],
|
|
248
|
+
[_oEN]: [, input[_OEN]],
|
|
249
|
+
[_iS]: [, input[_S]],
|
|
250
|
+
[_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
|
|
251
|
+
[_nT]: [, input[_NT]],
|
|
252
|
+
});
|
|
253
|
+
let body;
|
|
254
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
255
|
+
return b.build();
|
|
256
|
+
};
|
|
193
257
|
export const se_ListOriginEndpointsCommand = async (input, context) => {
|
|
194
258
|
const b = rb(input, context);
|
|
195
259
|
const headers = {};
|
|
@@ -325,6 +389,16 @@ export const se_UpdateOriginEndpointCommand = async (input, context) => {
|
|
|
325
389
|
b.m("PUT").h(headers).b(body);
|
|
326
390
|
return b.build();
|
|
327
391
|
};
|
|
392
|
+
export const de_CancelHarvestJobCommand = async (output, context) => {
|
|
393
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
394
|
+
return de_CommandError(output, context);
|
|
395
|
+
}
|
|
396
|
+
const contents = map({
|
|
397
|
+
$metadata: deserializeMetadata(output),
|
|
398
|
+
});
|
|
399
|
+
await collectBody(output.body, context);
|
|
400
|
+
return contents;
|
|
401
|
+
};
|
|
328
402
|
export const de_CreateChannelCommand = async (output, context) => {
|
|
329
403
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
330
404
|
return de_CommandError(output, context);
|
|
@@ -369,6 +443,34 @@ export const de_CreateChannelGroupCommand = async (output, context) => {
|
|
|
369
443
|
Object.assign(contents, doc);
|
|
370
444
|
return contents;
|
|
371
445
|
};
|
|
446
|
+
export const de_CreateHarvestJobCommand = async (output, context) => {
|
|
447
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
448
|
+
return de_CommandError(output, context);
|
|
449
|
+
}
|
|
450
|
+
const contents = map({
|
|
451
|
+
$metadata: deserializeMetadata(output),
|
|
452
|
+
});
|
|
453
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
454
|
+
const doc = take(data, {
|
|
455
|
+
Arn: __expectString,
|
|
456
|
+
ChannelGroupName: __expectString,
|
|
457
|
+
ChannelName: __expectString,
|
|
458
|
+
CreatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
459
|
+
Description: __expectString,
|
|
460
|
+
Destination: _json,
|
|
461
|
+
ETag: __expectString,
|
|
462
|
+
ErrorMessage: __expectString,
|
|
463
|
+
HarvestJobName: __expectString,
|
|
464
|
+
HarvestedManifests: _json,
|
|
465
|
+
ModifiedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
466
|
+
OriginEndpointName: __expectString,
|
|
467
|
+
ScheduleConfiguration: (_) => de_HarvesterScheduleConfiguration(_, context),
|
|
468
|
+
Status: __expectString,
|
|
469
|
+
Tags: _json,
|
|
470
|
+
});
|
|
471
|
+
Object.assign(contents, doc);
|
|
472
|
+
return contents;
|
|
473
|
+
};
|
|
372
474
|
export const de_CreateOriginEndpointCommand = async (output, context) => {
|
|
373
475
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
374
476
|
return de_CommandError(output, context);
|
|
@@ -508,6 +610,34 @@ export const de_GetChannelPolicyCommand = async (output, context) => {
|
|
|
508
610
|
Object.assign(contents, doc);
|
|
509
611
|
return contents;
|
|
510
612
|
};
|
|
613
|
+
export const de_GetHarvestJobCommand = async (output, context) => {
|
|
614
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
615
|
+
return de_CommandError(output, context);
|
|
616
|
+
}
|
|
617
|
+
const contents = map({
|
|
618
|
+
$metadata: deserializeMetadata(output),
|
|
619
|
+
});
|
|
620
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
621
|
+
const doc = take(data, {
|
|
622
|
+
Arn: __expectString,
|
|
623
|
+
ChannelGroupName: __expectString,
|
|
624
|
+
ChannelName: __expectString,
|
|
625
|
+
CreatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
626
|
+
Description: __expectString,
|
|
627
|
+
Destination: _json,
|
|
628
|
+
ETag: __expectString,
|
|
629
|
+
ErrorMessage: __expectString,
|
|
630
|
+
HarvestJobName: __expectString,
|
|
631
|
+
HarvestedManifests: _json,
|
|
632
|
+
ModifiedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
633
|
+
OriginEndpointName: __expectString,
|
|
634
|
+
ScheduleConfiguration: (_) => de_HarvesterScheduleConfiguration(_, context),
|
|
635
|
+
Status: __expectString,
|
|
636
|
+
Tags: _json,
|
|
637
|
+
});
|
|
638
|
+
Object.assign(contents, doc);
|
|
639
|
+
return contents;
|
|
640
|
+
};
|
|
511
641
|
export const de_GetOriginEndpointCommand = async (output, context) => {
|
|
512
642
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
513
643
|
return de_CommandError(output, context);
|
|
@@ -584,6 +714,21 @@ export const de_ListChannelsCommand = async (output, context) => {
|
|
|
584
714
|
Object.assign(contents, doc);
|
|
585
715
|
return contents;
|
|
586
716
|
};
|
|
717
|
+
export const de_ListHarvestJobsCommand = async (output, context) => {
|
|
718
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
719
|
+
return de_CommandError(output, context);
|
|
720
|
+
}
|
|
721
|
+
const contents = map({
|
|
722
|
+
$metadata: deserializeMetadata(output),
|
|
723
|
+
});
|
|
724
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
725
|
+
const doc = take(data, {
|
|
726
|
+
Items: (_) => de_HarvestJobsList(_, context),
|
|
727
|
+
NextToken: __expectString,
|
|
728
|
+
});
|
|
729
|
+
Object.assign(contents, doc);
|
|
730
|
+
return contents;
|
|
731
|
+
};
|
|
587
732
|
export const de_ListOriginEndpointsCommand = async (output, context) => {
|
|
588
733
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
589
734
|
return de_CommandError(output, context);
|
|
@@ -745,15 +890,15 @@ const de_CommandError = async (output, context) => {
|
|
|
745
890
|
case "ResourceNotFoundException":
|
|
746
891
|
case "com.amazonaws.mediapackagev2#ResourceNotFoundException":
|
|
747
892
|
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
748
|
-
case "ServiceQuotaExceededException":
|
|
749
|
-
case "com.amazonaws.mediapackagev2#ServiceQuotaExceededException":
|
|
750
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
751
893
|
case "ThrottlingException":
|
|
752
894
|
case "com.amazonaws.mediapackagev2#ThrottlingException":
|
|
753
895
|
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
754
896
|
case "ValidationException":
|
|
755
897
|
case "com.amazonaws.mediapackagev2#ValidationException":
|
|
756
898
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
899
|
+
case "ServiceQuotaExceededException":
|
|
900
|
+
case "com.amazonaws.mediapackagev2#ServiceQuotaExceededException":
|
|
901
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
757
902
|
default:
|
|
758
903
|
const parsedBody = parsedOutput.body;
|
|
759
904
|
return throwDefaultError({
|
|
@@ -925,6 +1070,12 @@ const se_FilterConfiguration = (input, context) => {
|
|
|
925
1070
|
TimeDelaySeconds: [],
|
|
926
1071
|
});
|
|
927
1072
|
};
|
|
1073
|
+
const se_HarvesterScheduleConfiguration = (input, context) => {
|
|
1074
|
+
return take(input, {
|
|
1075
|
+
EndTime: (_) => _.getTime() / 1000,
|
|
1076
|
+
StartTime: (_) => _.getTime() / 1000,
|
|
1077
|
+
});
|
|
1078
|
+
};
|
|
928
1079
|
const se_StartTag = (input, context) => {
|
|
929
1080
|
return take(input, {
|
|
930
1081
|
Precise: [],
|
|
@@ -1040,6 +1191,38 @@ const de_GetLowLatencyHlsManifests = (output, context) => {
|
|
|
1040
1191
|
});
|
|
1041
1192
|
return retVal;
|
|
1042
1193
|
};
|
|
1194
|
+
const de_HarvesterScheduleConfiguration = (output, context) => {
|
|
1195
|
+
return take(output, {
|
|
1196
|
+
EndTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
1197
|
+
StartTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
1198
|
+
});
|
|
1199
|
+
};
|
|
1200
|
+
const de_HarvestJob = (output, context) => {
|
|
1201
|
+
return take(output, {
|
|
1202
|
+
Arn: __expectString,
|
|
1203
|
+
ChannelGroupName: __expectString,
|
|
1204
|
+
ChannelName: __expectString,
|
|
1205
|
+
CreatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
1206
|
+
Description: __expectString,
|
|
1207
|
+
Destination: _json,
|
|
1208
|
+
ETag: __expectString,
|
|
1209
|
+
ErrorMessage: __expectString,
|
|
1210
|
+
HarvestJobName: __expectString,
|
|
1211
|
+
HarvestedManifests: _json,
|
|
1212
|
+
ModifiedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
1213
|
+
OriginEndpointName: __expectString,
|
|
1214
|
+
ScheduleConfiguration: (_) => de_HarvesterScheduleConfiguration(_, context),
|
|
1215
|
+
Status: __expectString,
|
|
1216
|
+
});
|
|
1217
|
+
};
|
|
1218
|
+
const de_HarvestJobsList = (output, context) => {
|
|
1219
|
+
const retVal = (output || [])
|
|
1220
|
+
.filter((e) => e != null)
|
|
1221
|
+
.map((entry) => {
|
|
1222
|
+
return de_HarvestJob(entry, context);
|
|
1223
|
+
});
|
|
1224
|
+
return retVal;
|
|
1225
|
+
};
|
|
1043
1226
|
const de_OriginEndpointListConfiguration = (output, context) => {
|
|
1044
1227
|
return take(output, {
|
|
1045
1228
|
Arn: __expectString,
|
|
@@ -1077,13 +1260,19 @@ const deserializeMetadata = (output) => ({
|
|
|
1077
1260
|
cfId: output.headers["x-amz-cf-id"],
|
|
1078
1261
|
});
|
|
1079
1262
|
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1263
|
+
const _CN = "ChannelName";
|
|
1080
1264
|
const _CT = "ClientToken";
|
|
1081
1265
|
const _ET = "ETag";
|
|
1082
1266
|
const _MR = "MaxResults";
|
|
1083
1267
|
const _NT = "NextToken";
|
|
1268
|
+
const _OEN = "OriginEndpointName";
|
|
1269
|
+
const _S = "Status";
|
|
1084
1270
|
const _TK = "TagKeys";
|
|
1271
|
+
const _cN = "channelName";
|
|
1272
|
+
const _iS = "includeStatus";
|
|
1085
1273
|
const _mR = "maxResults";
|
|
1086
1274
|
const _nT = "nextToken";
|
|
1275
|
+
const _oEN = "originEndpointName";
|
|
1087
1276
|
const _tK = "tagKeys";
|
|
1088
1277
|
const _xact = "x-amzn-client-token";
|
|
1089
1278
|
const _xauim = "x-amzn-update-if-match";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./waitForHarvestJobFinished";
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { checkExceptions, createWaiter, WaiterState } from "@smithy/util-waiter";
|
|
2
|
+
import { GetHarvestJobCommand } from "../commands/GetHarvestJobCommand";
|
|
3
|
+
const checkState = async (client, input) => {
|
|
4
|
+
let reason;
|
|
5
|
+
try {
|
|
6
|
+
const result = await client.send(new GetHarvestJobCommand(input));
|
|
7
|
+
reason = result;
|
|
8
|
+
try {
|
|
9
|
+
const returnComparator = () => {
|
|
10
|
+
return result.Status;
|
|
11
|
+
};
|
|
12
|
+
if (returnComparator() === "COMPLETED") {
|
|
13
|
+
return { state: WaiterState.SUCCESS, reason };
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
catch (e) { }
|
|
17
|
+
try {
|
|
18
|
+
const returnComparator = () => {
|
|
19
|
+
return result.Status;
|
|
20
|
+
};
|
|
21
|
+
if (returnComparator() === "CANCELLED") {
|
|
22
|
+
return { state: WaiterState.SUCCESS, reason };
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
catch (e) { }
|
|
26
|
+
try {
|
|
27
|
+
const returnComparator = () => {
|
|
28
|
+
return result.Status;
|
|
29
|
+
};
|
|
30
|
+
if (returnComparator() === "FAILED") {
|
|
31
|
+
return { state: WaiterState.FAILURE, reason };
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
catch (e) { }
|
|
35
|
+
try {
|
|
36
|
+
const returnComparator = () => {
|
|
37
|
+
return result.Status;
|
|
38
|
+
};
|
|
39
|
+
if (returnComparator() === "QUEUED") {
|
|
40
|
+
return { state: WaiterState.RETRY, reason };
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
catch (e) { }
|
|
44
|
+
try {
|
|
45
|
+
const returnComparator = () => {
|
|
46
|
+
return result.Status;
|
|
47
|
+
};
|
|
48
|
+
if (returnComparator() === "IN_PROGRESS") {
|
|
49
|
+
return { state: WaiterState.RETRY, reason };
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
catch (e) { }
|
|
53
|
+
}
|
|
54
|
+
catch (exception) {
|
|
55
|
+
reason = exception;
|
|
56
|
+
}
|
|
57
|
+
return { state: WaiterState.RETRY, reason };
|
|
58
|
+
};
|
|
59
|
+
export const waitForHarvestJobFinished = async (params, input) => {
|
|
60
|
+
const serviceDefaults = { minDelay: 2, maxDelay: 120 };
|
|
61
|
+
return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
62
|
+
};
|
|
63
|
+
export const waitUntilHarvestJobFinished = async (params, input) => {
|
|
64
|
+
const serviceDefaults = { minDelay: 2, maxDelay: 120 };
|
|
65
|
+
const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
66
|
+
return checkExceptions(result);
|
|
67
|
+
};
|