@aws-sdk/client-mediapackage 3.476.0 → 3.478.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/dist-cjs/pagination/ListChannelsPaginator.js +2 -24
- package/dist-cjs/pagination/ListHarvestJobsPaginator.js +2 -24
- package/dist-cjs/pagination/ListOriginEndpointsPaginator.js +2 -24
- package/dist-cjs/protocols/Aws_restJson1.js +114 -240
- package/dist-es/pagination/ListChannelsPaginator.js +2 -23
- package/dist-es/pagination/ListHarvestJobsPaginator.js +2 -23
- package/dist-es/pagination/ListOriginEndpointsPaginator.js +2 -23
- package/dist-es/protocols/Aws_restJson1.js +115 -241
- package/dist-types/pagination/ListChannelsPaginator.d.ts +1 -1
- package/dist-types/pagination/ListHarvestJobsPaginator.d.ts +1 -1
- package/dist-types/pagination/ListOriginEndpointsPaginator.d.ts +1 -1
- package/dist-types/ts3.4/pagination/ListChannelsPaginator.d.ts +3 -3
- package/dist-types/ts3.4/pagination/ListHarvestJobsPaginator.d.ts +3 -3
- package/dist-types/ts3.4/pagination/ListOriginEndpointsPaginator.d.ts +3 -3
- package/package.json +7 -6
|
@@ -1,29 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.paginateListChannels = void 0;
|
|
4
|
+
const core_1 = require("@smithy/core");
|
|
4
5
|
const ListChannelsCommand_1 = require("../commands/ListChannelsCommand");
|
|
5
6
|
const MediaPackageClient_1 = require("../MediaPackageClient");
|
|
6
|
-
|
|
7
|
-
return await client.send(new ListChannelsCommand_1.ListChannelsCommand(input), ...args);
|
|
8
|
-
};
|
|
9
|
-
async function* paginateListChannels(config, input, ...additionalArguments) {
|
|
10
|
-
let token = config.startingToken || undefined;
|
|
11
|
-
let hasNext = true;
|
|
12
|
-
let page;
|
|
13
|
-
while (hasNext) {
|
|
14
|
-
input.NextToken = token;
|
|
15
|
-
input["MaxResults"] = config.pageSize;
|
|
16
|
-
if (config.client instanceof MediaPackageClient_1.MediaPackageClient) {
|
|
17
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
throw new Error("Invalid client, expected MediaPackage | MediaPackageClient");
|
|
21
|
-
}
|
|
22
|
-
yield page;
|
|
23
|
-
const prevToken = token;
|
|
24
|
-
token = page.NextToken;
|
|
25
|
-
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
26
|
-
}
|
|
27
|
-
return undefined;
|
|
28
|
-
}
|
|
29
|
-
exports.paginateListChannels = paginateListChannels;
|
|
7
|
+
exports.paginateListChannels = (0, core_1.createPaginator)(MediaPackageClient_1.MediaPackageClient, ListChannelsCommand_1.ListChannelsCommand, "NextToken", "NextToken", "MaxResults");
|
|
@@ -1,29 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.paginateListHarvestJobs = void 0;
|
|
4
|
+
const core_1 = require("@smithy/core");
|
|
4
5
|
const ListHarvestJobsCommand_1 = require("../commands/ListHarvestJobsCommand");
|
|
5
6
|
const MediaPackageClient_1 = require("../MediaPackageClient");
|
|
6
|
-
|
|
7
|
-
return await client.send(new ListHarvestJobsCommand_1.ListHarvestJobsCommand(input), ...args);
|
|
8
|
-
};
|
|
9
|
-
async function* paginateListHarvestJobs(config, input, ...additionalArguments) {
|
|
10
|
-
let token = config.startingToken || undefined;
|
|
11
|
-
let hasNext = true;
|
|
12
|
-
let page;
|
|
13
|
-
while (hasNext) {
|
|
14
|
-
input.NextToken = token;
|
|
15
|
-
input["MaxResults"] = config.pageSize;
|
|
16
|
-
if (config.client instanceof MediaPackageClient_1.MediaPackageClient) {
|
|
17
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
throw new Error("Invalid client, expected MediaPackage | MediaPackageClient");
|
|
21
|
-
}
|
|
22
|
-
yield page;
|
|
23
|
-
const prevToken = token;
|
|
24
|
-
token = page.NextToken;
|
|
25
|
-
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
26
|
-
}
|
|
27
|
-
return undefined;
|
|
28
|
-
}
|
|
29
|
-
exports.paginateListHarvestJobs = paginateListHarvestJobs;
|
|
7
|
+
exports.paginateListHarvestJobs = (0, core_1.createPaginator)(MediaPackageClient_1.MediaPackageClient, ListHarvestJobsCommand_1.ListHarvestJobsCommand, "NextToken", "NextToken", "MaxResults");
|
|
@@ -1,29 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.paginateListOriginEndpoints = void 0;
|
|
4
|
+
const core_1 = require("@smithy/core");
|
|
4
5
|
const ListOriginEndpointsCommand_1 = require("../commands/ListOriginEndpointsCommand");
|
|
5
6
|
const MediaPackageClient_1 = require("../MediaPackageClient");
|
|
6
|
-
|
|
7
|
-
return await client.send(new ListOriginEndpointsCommand_1.ListOriginEndpointsCommand(input), ...args);
|
|
8
|
-
};
|
|
9
|
-
async function* paginateListOriginEndpoints(config, input, ...additionalArguments) {
|
|
10
|
-
let token = config.startingToken || undefined;
|
|
11
|
-
let hasNext = true;
|
|
12
|
-
let page;
|
|
13
|
-
while (hasNext) {
|
|
14
|
-
input.NextToken = token;
|
|
15
|
-
input["MaxResults"] = config.pageSize;
|
|
16
|
-
if (config.client instanceof MediaPackageClient_1.MediaPackageClient) {
|
|
17
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
throw new Error("Invalid client, expected MediaPackage | MediaPackageClient");
|
|
21
|
-
}
|
|
22
|
-
yield page;
|
|
23
|
-
const prevToken = token;
|
|
24
|
-
token = page.NextToken;
|
|
25
|
-
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
26
|
-
}
|
|
27
|
-
return undefined;
|
|
28
|
-
}
|
|
29
|
-
exports.paginateListOriginEndpoints = paginateListOriginEndpoints;
|
|
7
|
+
exports.paginateListOriginEndpoints = (0, core_1.createPaginator)(MediaPackageClient_1.MediaPackageClient, ListOriginEndpointsCommand_1.ListOriginEndpointsCommand, "NextToken", "NextToken", "MaxResults");
|
|
@@ -1,62 +1,48 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.de_UpdateOriginEndpointCommand = exports.de_UpdateChannelCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_RotateIngestEndpointCredentialsCommand = exports.de_RotateChannelCredentialsCommand = exports.de_ListTagsForResourceCommand = exports.de_ListOriginEndpointsCommand = exports.de_ListHarvestJobsCommand = exports.de_ListChannelsCommand = exports.de_DescribeOriginEndpointCommand = exports.de_DescribeHarvestJobCommand = exports.de_DescribeChannelCommand = exports.de_DeleteOriginEndpointCommand = exports.de_DeleteChannelCommand = exports.de_CreateOriginEndpointCommand = exports.de_CreateHarvestJobCommand = exports.de_CreateChannelCommand = exports.de_ConfigureLogsCommand = exports.se_UpdateOriginEndpointCommand = exports.se_UpdateChannelCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_RotateIngestEndpointCredentialsCommand = exports.se_RotateChannelCredentialsCommand = exports.se_ListTagsForResourceCommand = exports.se_ListOriginEndpointsCommand = exports.se_ListHarvestJobsCommand = exports.se_ListChannelsCommand = exports.se_DescribeOriginEndpointCommand = exports.se_DescribeHarvestJobCommand = exports.se_DescribeChannelCommand = exports.se_DeleteOriginEndpointCommand = exports.se_DeleteChannelCommand = exports.se_CreateOriginEndpointCommand = exports.se_CreateHarvestJobCommand = exports.se_CreateChannelCommand = exports.se_ConfigureLogsCommand = void 0;
|
|
4
|
-
const
|
|
4
|
+
const core_1 = require("@smithy/core");
|
|
5
5
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
6
|
const MediaPackageServiceException_1 = require("../models/MediaPackageServiceException");
|
|
7
7
|
const models_0_1 = require("../models/models_0");
|
|
8
8
|
const se_ConfigureLogsCommand = async (input, context) => {
|
|
9
|
-
const
|
|
9
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
10
10
|
const headers = {
|
|
11
11
|
"content-type": "application/json",
|
|
12
12
|
};
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
b.bp("/channels/{Id}/configure_logs");
|
|
14
|
+
b.p("Id", () => input.Id, "{Id}", false);
|
|
15
15
|
let body;
|
|
16
16
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
17
17
|
egressAccessLogs: [, (_) => se_EgressAccessLogs(_, context), `EgressAccessLogs`],
|
|
18
18
|
ingressAccessLogs: [, (_) => se_IngressAccessLogs(_, context), `IngressAccessLogs`],
|
|
19
19
|
}));
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
hostname,
|
|
23
|
-
port,
|
|
24
|
-
method: "PUT",
|
|
25
|
-
headers,
|
|
26
|
-
path: resolvedPath,
|
|
27
|
-
body,
|
|
28
|
-
});
|
|
20
|
+
b.m("PUT").h(headers).b(body);
|
|
21
|
+
return b.build();
|
|
29
22
|
};
|
|
30
23
|
exports.se_ConfigureLogsCommand = se_ConfigureLogsCommand;
|
|
31
24
|
const se_CreateChannelCommand = async (input, context) => {
|
|
32
|
-
const
|
|
25
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
33
26
|
const headers = {
|
|
34
27
|
"content-type": "application/json",
|
|
35
28
|
};
|
|
36
|
-
|
|
29
|
+
b.bp("/channels");
|
|
37
30
|
let body;
|
|
38
31
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
39
32
|
description: [, , `Description`],
|
|
40
33
|
id: [, , `Id`],
|
|
41
34
|
tags: [, (_) => (0, smithy_client_1._json)(_), `Tags`],
|
|
42
35
|
}));
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
hostname,
|
|
46
|
-
port,
|
|
47
|
-
method: "POST",
|
|
48
|
-
headers,
|
|
49
|
-
path: resolvedPath,
|
|
50
|
-
body,
|
|
51
|
-
});
|
|
36
|
+
b.m("POST").h(headers).b(body);
|
|
37
|
+
return b.build();
|
|
52
38
|
};
|
|
53
39
|
exports.se_CreateChannelCommand = se_CreateChannelCommand;
|
|
54
40
|
const se_CreateHarvestJobCommand = async (input, context) => {
|
|
55
|
-
const
|
|
41
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
56
42
|
const headers = {
|
|
57
43
|
"content-type": "application/json",
|
|
58
44
|
};
|
|
59
|
-
|
|
45
|
+
b.bp("/harvest_jobs");
|
|
60
46
|
let body;
|
|
61
47
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
62
48
|
endTime: [, , `EndTime`],
|
|
@@ -65,23 +51,16 @@ const se_CreateHarvestJobCommand = async (input, context) => {
|
|
|
65
51
|
s3Destination: [, (_) => se_S3Destination(_, context), `S3Destination`],
|
|
66
52
|
startTime: [, , `StartTime`],
|
|
67
53
|
}));
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
hostname,
|
|
71
|
-
port,
|
|
72
|
-
method: "POST",
|
|
73
|
-
headers,
|
|
74
|
-
path: resolvedPath,
|
|
75
|
-
body,
|
|
76
|
-
});
|
|
54
|
+
b.m("POST").h(headers).b(body);
|
|
55
|
+
return b.build();
|
|
77
56
|
};
|
|
78
57
|
exports.se_CreateHarvestJobCommand = se_CreateHarvestJobCommand;
|
|
79
58
|
const se_CreateOriginEndpointCommand = async (input, context) => {
|
|
80
|
-
const
|
|
59
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
81
60
|
const headers = {
|
|
82
61
|
"content-type": "application/json",
|
|
83
62
|
};
|
|
84
|
-
|
|
63
|
+
b.bp("/origin_endpoints");
|
|
85
64
|
let body;
|
|
86
65
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
87
66
|
authorization: [, (_) => se_Authorization(_, context), `Authorization`],
|
|
@@ -99,296 +78,186 @@ const se_CreateOriginEndpointCommand = async (input, context) => {
|
|
|
99
78
|
timeDelaySeconds: [, , `TimeDelaySeconds`],
|
|
100
79
|
whitelist: [, (_) => (0, smithy_client_1._json)(_), `Whitelist`],
|
|
101
80
|
}));
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
hostname,
|
|
105
|
-
port,
|
|
106
|
-
method: "POST",
|
|
107
|
-
headers,
|
|
108
|
-
path: resolvedPath,
|
|
109
|
-
body,
|
|
110
|
-
});
|
|
81
|
+
b.m("POST").h(headers).b(body);
|
|
82
|
+
return b.build();
|
|
111
83
|
};
|
|
112
84
|
exports.se_CreateOriginEndpointCommand = se_CreateOriginEndpointCommand;
|
|
113
85
|
const se_DeleteChannelCommand = async (input, context) => {
|
|
114
|
-
const
|
|
86
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
115
87
|
const headers = {};
|
|
116
|
-
|
|
117
|
-
|
|
88
|
+
b.bp("/channels/{Id}");
|
|
89
|
+
b.p("Id", () => input.Id, "{Id}", false);
|
|
118
90
|
let body;
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
hostname,
|
|
122
|
-
port,
|
|
123
|
-
method: "DELETE",
|
|
124
|
-
headers,
|
|
125
|
-
path: resolvedPath,
|
|
126
|
-
body,
|
|
127
|
-
});
|
|
91
|
+
b.m("DELETE").h(headers).b(body);
|
|
92
|
+
return b.build();
|
|
128
93
|
};
|
|
129
94
|
exports.se_DeleteChannelCommand = se_DeleteChannelCommand;
|
|
130
95
|
const se_DeleteOriginEndpointCommand = async (input, context) => {
|
|
131
|
-
const
|
|
96
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
132
97
|
const headers = {};
|
|
133
|
-
|
|
134
|
-
|
|
98
|
+
b.bp("/origin_endpoints/{Id}");
|
|
99
|
+
b.p("Id", () => input.Id, "{Id}", false);
|
|
135
100
|
let body;
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
hostname,
|
|
139
|
-
port,
|
|
140
|
-
method: "DELETE",
|
|
141
|
-
headers,
|
|
142
|
-
path: resolvedPath,
|
|
143
|
-
body,
|
|
144
|
-
});
|
|
101
|
+
b.m("DELETE").h(headers).b(body);
|
|
102
|
+
return b.build();
|
|
145
103
|
};
|
|
146
104
|
exports.se_DeleteOriginEndpointCommand = se_DeleteOriginEndpointCommand;
|
|
147
105
|
const se_DescribeChannelCommand = async (input, context) => {
|
|
148
|
-
const
|
|
106
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
149
107
|
const headers = {};
|
|
150
|
-
|
|
151
|
-
|
|
108
|
+
b.bp("/channels/{Id}");
|
|
109
|
+
b.p("Id", () => input.Id, "{Id}", false);
|
|
152
110
|
let body;
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
hostname,
|
|
156
|
-
port,
|
|
157
|
-
method: "GET",
|
|
158
|
-
headers,
|
|
159
|
-
path: resolvedPath,
|
|
160
|
-
body,
|
|
161
|
-
});
|
|
111
|
+
b.m("GET").h(headers).b(body);
|
|
112
|
+
return b.build();
|
|
162
113
|
};
|
|
163
114
|
exports.se_DescribeChannelCommand = se_DescribeChannelCommand;
|
|
164
115
|
const se_DescribeHarvestJobCommand = async (input, context) => {
|
|
165
|
-
const
|
|
116
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
166
117
|
const headers = {};
|
|
167
|
-
|
|
168
|
-
|
|
118
|
+
b.bp("/harvest_jobs/{Id}");
|
|
119
|
+
b.p("Id", () => input.Id, "{Id}", false);
|
|
169
120
|
let body;
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
hostname,
|
|
173
|
-
port,
|
|
174
|
-
method: "GET",
|
|
175
|
-
headers,
|
|
176
|
-
path: resolvedPath,
|
|
177
|
-
body,
|
|
178
|
-
});
|
|
121
|
+
b.m("GET").h(headers).b(body);
|
|
122
|
+
return b.build();
|
|
179
123
|
};
|
|
180
124
|
exports.se_DescribeHarvestJobCommand = se_DescribeHarvestJobCommand;
|
|
181
125
|
const se_DescribeOriginEndpointCommand = async (input, context) => {
|
|
182
|
-
const
|
|
126
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
183
127
|
const headers = {};
|
|
184
|
-
|
|
185
|
-
|
|
128
|
+
b.bp("/origin_endpoints/{Id}");
|
|
129
|
+
b.p("Id", () => input.Id, "{Id}", false);
|
|
186
130
|
let body;
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
hostname,
|
|
190
|
-
port,
|
|
191
|
-
method: "GET",
|
|
192
|
-
headers,
|
|
193
|
-
path: resolvedPath,
|
|
194
|
-
body,
|
|
195
|
-
});
|
|
131
|
+
b.m("GET").h(headers).b(body);
|
|
132
|
+
return b.build();
|
|
196
133
|
};
|
|
197
134
|
exports.se_DescribeOriginEndpointCommand = se_DescribeOriginEndpointCommand;
|
|
198
135
|
const se_ListChannelsCommand = async (input, context) => {
|
|
199
|
-
const
|
|
136
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
200
137
|
const headers = {};
|
|
201
|
-
|
|
138
|
+
b.bp("/channels");
|
|
202
139
|
const query = (0, smithy_client_1.map)({
|
|
203
|
-
|
|
204
|
-
|
|
140
|
+
[_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
|
|
141
|
+
[_nT]: [, input[_NT]],
|
|
205
142
|
});
|
|
206
143
|
let body;
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
hostname,
|
|
210
|
-
port,
|
|
211
|
-
method: "GET",
|
|
212
|
-
headers,
|
|
213
|
-
path: resolvedPath,
|
|
214
|
-
query,
|
|
215
|
-
body,
|
|
216
|
-
});
|
|
144
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
145
|
+
return b.build();
|
|
217
146
|
};
|
|
218
147
|
exports.se_ListChannelsCommand = se_ListChannelsCommand;
|
|
219
148
|
const se_ListHarvestJobsCommand = async (input, context) => {
|
|
220
|
-
const
|
|
149
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
221
150
|
const headers = {};
|
|
222
|
-
|
|
151
|
+
b.bp("/harvest_jobs");
|
|
223
152
|
const query = (0, smithy_client_1.map)({
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
153
|
+
[_iCI]: [, input[_ICI]],
|
|
154
|
+
[_iS]: [, input[_IS]],
|
|
155
|
+
[_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
|
|
156
|
+
[_nT]: [, input[_NT]],
|
|
228
157
|
});
|
|
229
158
|
let body;
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
hostname,
|
|
233
|
-
port,
|
|
234
|
-
method: "GET",
|
|
235
|
-
headers,
|
|
236
|
-
path: resolvedPath,
|
|
237
|
-
query,
|
|
238
|
-
body,
|
|
239
|
-
});
|
|
159
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
160
|
+
return b.build();
|
|
240
161
|
};
|
|
241
162
|
exports.se_ListHarvestJobsCommand = se_ListHarvestJobsCommand;
|
|
242
163
|
const se_ListOriginEndpointsCommand = async (input, context) => {
|
|
243
|
-
const
|
|
164
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
244
165
|
const headers = {};
|
|
245
|
-
|
|
166
|
+
b.bp("/origin_endpoints");
|
|
246
167
|
const query = (0, smithy_client_1.map)({
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
168
|
+
[_cI]: [, input[_CI]],
|
|
169
|
+
[_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
|
|
170
|
+
[_nT]: [, input[_NT]],
|
|
250
171
|
});
|
|
251
172
|
let body;
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
hostname,
|
|
255
|
-
port,
|
|
256
|
-
method: "GET",
|
|
257
|
-
headers,
|
|
258
|
-
path: resolvedPath,
|
|
259
|
-
query,
|
|
260
|
-
body,
|
|
261
|
-
});
|
|
173
|
+
b.m("GET").h(headers).q(query).b(body);
|
|
174
|
+
return b.build();
|
|
262
175
|
};
|
|
263
176
|
exports.se_ListOriginEndpointsCommand = se_ListOriginEndpointsCommand;
|
|
264
177
|
const se_ListTagsForResourceCommand = async (input, context) => {
|
|
265
|
-
const
|
|
178
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
266
179
|
const headers = {};
|
|
267
|
-
|
|
268
|
-
|
|
180
|
+
b.bp("/tags/{ResourceArn}");
|
|
181
|
+
b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
269
182
|
let body;
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
hostname,
|
|
273
|
-
port,
|
|
274
|
-
method: "GET",
|
|
275
|
-
headers,
|
|
276
|
-
path: resolvedPath,
|
|
277
|
-
body,
|
|
278
|
-
});
|
|
183
|
+
b.m("GET").h(headers).b(body);
|
|
184
|
+
return b.build();
|
|
279
185
|
};
|
|
280
186
|
exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
|
|
281
187
|
const se_RotateChannelCredentialsCommand = async (input, context) => {
|
|
282
|
-
const
|
|
188
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
283
189
|
const headers = {};
|
|
284
|
-
|
|
285
|
-
|
|
190
|
+
b.bp("/channels/{Id}/credentials");
|
|
191
|
+
b.p("Id", () => input.Id, "{Id}", false);
|
|
286
192
|
let body;
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
hostname,
|
|
290
|
-
port,
|
|
291
|
-
method: "PUT",
|
|
292
|
-
headers,
|
|
293
|
-
path: resolvedPath,
|
|
294
|
-
body,
|
|
295
|
-
});
|
|
193
|
+
b.m("PUT").h(headers).b(body);
|
|
194
|
+
return b.build();
|
|
296
195
|
};
|
|
297
196
|
exports.se_RotateChannelCredentialsCommand = se_RotateChannelCredentialsCommand;
|
|
298
197
|
const se_RotateIngestEndpointCredentialsCommand = async (input, context) => {
|
|
299
|
-
const
|
|
198
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
300
199
|
const headers = {};
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "IngestEndpointId", () => input.IngestEndpointId, "{IngestEndpointId}", false);
|
|
200
|
+
b.bp("/channels/{Id}/ingest_endpoints/{IngestEndpointId}/credentials");
|
|
201
|
+
b.p("Id", () => input.Id, "{Id}", false);
|
|
202
|
+
b.p("IngestEndpointId", () => input.IngestEndpointId, "{IngestEndpointId}", false);
|
|
305
203
|
let body;
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
hostname,
|
|
309
|
-
port,
|
|
310
|
-
method: "PUT",
|
|
311
|
-
headers,
|
|
312
|
-
path: resolvedPath,
|
|
313
|
-
body,
|
|
314
|
-
});
|
|
204
|
+
b.m("PUT").h(headers).b(body);
|
|
205
|
+
return b.build();
|
|
315
206
|
};
|
|
316
207
|
exports.se_RotateIngestEndpointCredentialsCommand = se_RotateIngestEndpointCredentialsCommand;
|
|
317
208
|
const se_TagResourceCommand = async (input, context) => {
|
|
318
|
-
const
|
|
209
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
319
210
|
const headers = {
|
|
320
211
|
"content-type": "application/json",
|
|
321
212
|
};
|
|
322
|
-
|
|
323
|
-
|
|
213
|
+
b.bp("/tags/{ResourceArn}");
|
|
214
|
+
b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
324
215
|
let body;
|
|
325
216
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
326
217
|
tags: [, (_) => (0, smithy_client_1._json)(_), `Tags`],
|
|
327
218
|
}));
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
hostname,
|
|
331
|
-
port,
|
|
332
|
-
method: "POST",
|
|
333
|
-
headers,
|
|
334
|
-
path: resolvedPath,
|
|
335
|
-
body,
|
|
336
|
-
});
|
|
219
|
+
b.m("POST").h(headers).b(body);
|
|
220
|
+
return b.build();
|
|
337
221
|
};
|
|
338
222
|
exports.se_TagResourceCommand = se_TagResourceCommand;
|
|
339
223
|
const se_UntagResourceCommand = async (input, context) => {
|
|
340
|
-
const
|
|
224
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
341
225
|
const headers = {};
|
|
342
|
-
|
|
343
|
-
|
|
226
|
+
b.bp("/tags/{ResourceArn}");
|
|
227
|
+
b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
344
228
|
const query = (0, smithy_client_1.map)({
|
|
345
|
-
|
|
229
|
+
[_tK]: [
|
|
346
230
|
(0, smithy_client_1.expectNonNull)(input.TagKeys, `TagKeys`) != null,
|
|
347
|
-
() => (input
|
|
231
|
+
() => (input[_TK] || []).map((_entry) => _entry),
|
|
348
232
|
],
|
|
349
233
|
});
|
|
350
234
|
let body;
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
hostname,
|
|
354
|
-
port,
|
|
355
|
-
method: "DELETE",
|
|
356
|
-
headers,
|
|
357
|
-
path: resolvedPath,
|
|
358
|
-
query,
|
|
359
|
-
body,
|
|
360
|
-
});
|
|
235
|
+
b.m("DELETE").h(headers).q(query).b(body);
|
|
236
|
+
return b.build();
|
|
361
237
|
};
|
|
362
238
|
exports.se_UntagResourceCommand = se_UntagResourceCommand;
|
|
363
239
|
const se_UpdateChannelCommand = async (input, context) => {
|
|
364
|
-
const
|
|
240
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
365
241
|
const headers = {
|
|
366
242
|
"content-type": "application/json",
|
|
367
243
|
};
|
|
368
|
-
|
|
369
|
-
|
|
244
|
+
b.bp("/channels/{Id}");
|
|
245
|
+
b.p("Id", () => input.Id, "{Id}", false);
|
|
370
246
|
let body;
|
|
371
247
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
372
248
|
description: [, , `Description`],
|
|
373
249
|
}));
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
hostname,
|
|
377
|
-
port,
|
|
378
|
-
method: "PUT",
|
|
379
|
-
headers,
|
|
380
|
-
path: resolvedPath,
|
|
381
|
-
body,
|
|
382
|
-
});
|
|
250
|
+
b.m("PUT").h(headers).b(body);
|
|
251
|
+
return b.build();
|
|
383
252
|
};
|
|
384
253
|
exports.se_UpdateChannelCommand = se_UpdateChannelCommand;
|
|
385
254
|
const se_UpdateOriginEndpointCommand = async (input, context) => {
|
|
386
|
-
const
|
|
255
|
+
const b = (0, core_1.requestBuilder)(input, context);
|
|
387
256
|
const headers = {
|
|
388
257
|
"content-type": "application/json",
|
|
389
258
|
};
|
|
390
|
-
|
|
391
|
-
|
|
259
|
+
b.bp("/origin_endpoints/{Id}");
|
|
260
|
+
b.p("Id", () => input.Id, "{Id}", false);
|
|
392
261
|
let body;
|
|
393
262
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
394
263
|
authorization: [, (_) => se_Authorization(_, context), `Authorization`],
|
|
@@ -403,15 +272,8 @@ const se_UpdateOriginEndpointCommand = async (input, context) => {
|
|
|
403
272
|
timeDelaySeconds: [, , `TimeDelaySeconds`],
|
|
404
273
|
whitelist: [, (_) => (0, smithy_client_1._json)(_), `Whitelist`],
|
|
405
274
|
}));
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
hostname,
|
|
409
|
-
port,
|
|
410
|
-
method: "PUT",
|
|
411
|
-
headers,
|
|
412
|
-
path: resolvedPath,
|
|
413
|
-
body,
|
|
414
|
-
});
|
|
275
|
+
b.m("PUT").h(headers).b(body);
|
|
276
|
+
return b.build();
|
|
415
277
|
};
|
|
416
278
|
exports.se_UpdateOriginEndpointCommand = se_UpdateOriginEndpointCommand;
|
|
417
279
|
const de_ConfigureLogsCommand = async (output, context) => {
|
|
@@ -1861,6 +1723,18 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
|
1861
1723
|
value !== "" &&
|
|
1862
1724
|
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1863
1725
|
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1726
|
+
const _CI = "ChannelId";
|
|
1727
|
+
const _ICI = "IncludeChannelId";
|
|
1728
|
+
const _IS = "IncludeStatus";
|
|
1729
|
+
const _MR = "MaxResults";
|
|
1730
|
+
const _NT = "NextToken";
|
|
1731
|
+
const _TK = "TagKeys";
|
|
1732
|
+
const _cI = "channelId";
|
|
1733
|
+
const _iCI = "includeChannelId";
|
|
1734
|
+
const _iS = "includeStatus";
|
|
1735
|
+
const _mR = "maxResults";
|
|
1736
|
+
const _nT = "nextToken";
|
|
1737
|
+
const _tK = "tagKeys";
|
|
1864
1738
|
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1865
1739
|
if (encoded.length) {
|
|
1866
1740
|
return JSON.parse(encoded);
|
|
@@ -1,25 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
1
2
|
import { ListChannelsCommand, } from "../commands/ListChannelsCommand";
|
|
2
3
|
import { MediaPackageClient } from "../MediaPackageClient";
|
|
3
|
-
const
|
|
4
|
-
return await client.send(new ListChannelsCommand(input), ...args);
|
|
5
|
-
};
|
|
6
|
-
export async function* paginateListChannels(config, input, ...additionalArguments) {
|
|
7
|
-
let token = config.startingToken || undefined;
|
|
8
|
-
let hasNext = true;
|
|
9
|
-
let page;
|
|
10
|
-
while (hasNext) {
|
|
11
|
-
input.NextToken = token;
|
|
12
|
-
input["MaxResults"] = config.pageSize;
|
|
13
|
-
if (config.client instanceof MediaPackageClient) {
|
|
14
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
throw new Error("Invalid client, expected MediaPackage | MediaPackageClient");
|
|
18
|
-
}
|
|
19
|
-
yield page;
|
|
20
|
-
const prevToken = token;
|
|
21
|
-
token = page.NextToken;
|
|
22
|
-
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
23
|
-
}
|
|
24
|
-
return undefined;
|
|
25
|
-
}
|
|
4
|
+
export const paginateListChannels = createPaginator(MediaPackageClient, ListChannelsCommand, "NextToken", "NextToken", "MaxResults");
|