@aws-sdk/client-kinesis 3.454.0 → 3.458.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 +53 -29
- package/dist-cjs/Kinesis.js +6 -0
- package/dist-cjs/commands/DeleteResourcePolicyCommand.js +53 -0
- package/dist-cjs/commands/GetResourcePolicyCommand.js +53 -0
- package/dist-cjs/commands/PutResourcePolicyCommand.js +53 -0
- package/dist-cjs/commands/index.js +3 -0
- package/dist-cjs/endpoint/ruleset.js +3 -3
- package/dist-cjs/protocols/Aws_json1_1.js +149 -2
- package/dist-es/Kinesis.js +6 -0
- package/dist-es/commands/DeleteResourcePolicyCommand.js +49 -0
- package/dist-es/commands/GetResourcePolicyCommand.js +49 -0
- package/dist-es/commands/PutResourcePolicyCommand.js +49 -0
- package/dist-es/commands/index.js +3 -0
- package/dist-es/endpoint/ruleset.js +3 -3
- package/dist-es/protocols/Aws_json1_1.js +141 -0
- package/dist-types/Kinesis.d.ts +21 -0
- package/dist-types/KinesisClient.d.ts +5 -2
- package/dist-types/commands/AddTagsToStreamCommand.d.ts +3 -2
- package/dist-types/commands/DecreaseStreamRetentionPeriodCommand.d.ts +3 -2
- package/dist-types/commands/DeleteResourcePolicyCommand.d.ts +101 -0
- package/dist-types/commands/DeleteStreamCommand.d.ts +3 -2
- package/dist-types/commands/DescribeStreamCommand.d.ts +3 -2
- package/dist-types/commands/DescribeStreamConsumerCommand.d.ts +3 -0
- package/dist-types/commands/DescribeStreamSummaryCommand.d.ts +3 -2
- package/dist-types/commands/DisableEnhancedMonitoringCommand.d.ts +3 -2
- package/dist-types/commands/EnableEnhancedMonitoringCommand.d.ts +3 -2
- package/dist-types/commands/GetRecordsCommand.d.ts +3 -2
- package/dist-types/commands/GetResourcePolicyCommand.d.ts +99 -0
- package/dist-types/commands/GetShardIteratorCommand.d.ts +3 -2
- package/dist-types/commands/IncreaseStreamRetentionPeriodCommand.d.ts +3 -2
- package/dist-types/commands/ListShardsCommand.d.ts +3 -2
- package/dist-types/commands/ListTagsForStreamCommand.d.ts +3 -2
- package/dist-types/commands/MergeShardsCommand.d.ts +3 -2
- package/dist-types/commands/PutRecordCommand.d.ts +3 -2
- package/dist-types/commands/PutRecordsCommand.d.ts +3 -2
- package/dist-types/commands/PutResourcePolicyCommand.d.ts +109 -0
- package/dist-types/commands/RemoveTagsFromStreamCommand.d.ts +3 -2
- package/dist-types/commands/SplitShardCommand.d.ts +3 -2
- package/dist-types/commands/StartStreamEncryptionCommand.d.ts +5 -4
- package/dist-types/commands/StopStreamEncryptionCommand.d.ts +3 -2
- package/dist-types/commands/UpdateShardCountCommand.d.ts +6 -2
- package/dist-types/commands/index.d.ts +3 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +45 -0
- package/dist-types/protocols/Aws_json1_1.d.ts +27 -0
- package/dist-types/ts3.4/Kinesis.d.ts +51 -0
- package/dist-types/ts3.4/KinesisClient.d.ts +18 -0
- package/dist-types/ts3.4/commands/DeleteResourcePolicyCommand.d.ts +37 -0
- package/dist-types/ts3.4/commands/GetResourcePolicyCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/PutResourcePolicyCommand.d.ts +33 -0
- package/dist-types/ts3.4/commands/index.d.ts +3 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +13 -0
- package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +36 -0
- package/package.json +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.de_UpdateStreamModeCommand = exports.de_UpdateShardCountCommand = exports.de_SubscribeToShardCommand = exports.de_StopStreamEncryptionCommand = exports.de_StartStreamEncryptionCommand = exports.de_SplitShardCommand = exports.de_RemoveTagsFromStreamCommand = exports.de_RegisterStreamConsumerCommand = void 0;
|
|
3
|
+
exports.de_ListStreamConsumersCommand = exports.de_ListShardsCommand = exports.de_IncreaseStreamRetentionPeriodCommand = exports.de_GetShardIteratorCommand = exports.de_GetResourcePolicyCommand = exports.de_GetRecordsCommand = exports.de_EnableEnhancedMonitoringCommand = exports.de_DisableEnhancedMonitoringCommand = exports.de_DescribeStreamSummaryCommand = exports.de_DescribeStreamConsumerCommand = exports.de_DescribeStreamCommand = exports.de_DescribeLimitsCommand = exports.de_DeregisterStreamConsumerCommand = exports.de_DeleteStreamCommand = exports.de_DeleteResourcePolicyCommand = exports.de_DecreaseStreamRetentionPeriodCommand = exports.de_CreateStreamCommand = exports.de_AddTagsToStreamCommand = exports.se_UpdateStreamModeCommand = exports.se_UpdateShardCountCommand = exports.se_SubscribeToShardCommand = exports.se_StopStreamEncryptionCommand = exports.se_StartStreamEncryptionCommand = exports.se_SplitShardCommand = exports.se_RemoveTagsFromStreamCommand = exports.se_RegisterStreamConsumerCommand = exports.se_PutResourcePolicyCommand = exports.se_PutRecordsCommand = exports.se_PutRecordCommand = exports.se_MergeShardsCommand = exports.se_ListTagsForStreamCommand = exports.se_ListStreamsCommand = exports.se_ListStreamConsumersCommand = exports.se_ListShardsCommand = exports.se_IncreaseStreamRetentionPeriodCommand = exports.se_GetShardIteratorCommand = exports.se_GetResourcePolicyCommand = exports.se_GetRecordsCommand = exports.se_EnableEnhancedMonitoringCommand = exports.se_DisableEnhancedMonitoringCommand = exports.se_DescribeStreamSummaryCommand = exports.se_DescribeStreamConsumerCommand = exports.se_DescribeStreamCommand = exports.se_DescribeLimitsCommand = exports.se_DeregisterStreamConsumerCommand = exports.se_DeleteStreamCommand = exports.se_DeleteResourcePolicyCommand = exports.se_DecreaseStreamRetentionPeriodCommand = exports.se_CreateStreamCommand = exports.se_AddTagsToStreamCommand = void 0;
|
|
4
|
+
exports.de_UpdateStreamModeCommand = exports.de_UpdateShardCountCommand = exports.de_SubscribeToShardCommand = exports.de_StopStreamEncryptionCommand = exports.de_StartStreamEncryptionCommand = exports.de_SplitShardCommand = exports.de_RemoveTagsFromStreamCommand = exports.de_RegisterStreamConsumerCommand = exports.de_PutResourcePolicyCommand = exports.de_PutRecordsCommand = exports.de_PutRecordCommand = exports.de_MergeShardsCommand = exports.de_ListTagsForStreamCommand = exports.de_ListStreamsCommand = void 0;
|
|
5
5
|
const protocol_http_1 = require("@smithy/protocol-http");
|
|
6
6
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
7
|
const KinesisServiceException_1 = require("../models/KinesisServiceException");
|
|
@@ -27,6 +27,13 @@ const se_DecreaseStreamRetentionPeriodCommand = async (input, context) => {
|
|
|
27
27
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
28
28
|
};
|
|
29
29
|
exports.se_DecreaseStreamRetentionPeriodCommand = se_DecreaseStreamRetentionPeriodCommand;
|
|
30
|
+
const se_DeleteResourcePolicyCommand = async (input, context) => {
|
|
31
|
+
const headers = sharedHeaders("DeleteResourcePolicy");
|
|
32
|
+
let body;
|
|
33
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
34
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
35
|
+
};
|
|
36
|
+
exports.se_DeleteResourcePolicyCommand = se_DeleteResourcePolicyCommand;
|
|
30
37
|
const se_DeleteStreamCommand = async (input, context) => {
|
|
31
38
|
const headers = sharedHeaders("DeleteStream");
|
|
32
39
|
let body;
|
|
@@ -90,6 +97,13 @@ const se_GetRecordsCommand = async (input, context) => {
|
|
|
90
97
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
91
98
|
};
|
|
92
99
|
exports.se_GetRecordsCommand = se_GetRecordsCommand;
|
|
100
|
+
const se_GetResourcePolicyCommand = async (input, context) => {
|
|
101
|
+
const headers = sharedHeaders("GetResourcePolicy");
|
|
102
|
+
let body;
|
|
103
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
104
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
105
|
+
};
|
|
106
|
+
exports.se_GetResourcePolicyCommand = se_GetResourcePolicyCommand;
|
|
93
107
|
const se_GetShardIteratorCommand = async (input, context) => {
|
|
94
108
|
const headers = sharedHeaders("GetShardIterator");
|
|
95
109
|
let body;
|
|
@@ -153,6 +167,13 @@ const se_PutRecordsCommand = async (input, context) => {
|
|
|
153
167
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
154
168
|
};
|
|
155
169
|
exports.se_PutRecordsCommand = se_PutRecordsCommand;
|
|
170
|
+
const se_PutResourcePolicyCommand = async (input, context) => {
|
|
171
|
+
const headers = sharedHeaders("PutResourcePolicy");
|
|
172
|
+
let body;
|
|
173
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
174
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
175
|
+
};
|
|
176
|
+
exports.se_PutResourcePolicyCommand = se_PutResourcePolicyCommand;
|
|
156
177
|
const se_RegisterStreamConsumerCommand = async (input, context) => {
|
|
157
178
|
const headers = sharedHeaders("RegisterStreamConsumer");
|
|
158
179
|
let body;
|
|
@@ -329,6 +350,48 @@ const de_DecreaseStreamRetentionPeriodCommandError = async (output, context) =>
|
|
|
329
350
|
});
|
|
330
351
|
}
|
|
331
352
|
};
|
|
353
|
+
const de_DeleteResourcePolicyCommand = async (output, context) => {
|
|
354
|
+
if (output.statusCode >= 300) {
|
|
355
|
+
return de_DeleteResourcePolicyCommandError(output, context);
|
|
356
|
+
}
|
|
357
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
358
|
+
const response = {
|
|
359
|
+
$metadata: deserializeMetadata(output),
|
|
360
|
+
};
|
|
361
|
+
return response;
|
|
362
|
+
};
|
|
363
|
+
exports.de_DeleteResourcePolicyCommand = de_DeleteResourcePolicyCommand;
|
|
364
|
+
const de_DeleteResourcePolicyCommandError = async (output, context) => {
|
|
365
|
+
const parsedOutput = {
|
|
366
|
+
...output,
|
|
367
|
+
body: await parseErrorBody(output.body, context),
|
|
368
|
+
};
|
|
369
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
370
|
+
switch (errorCode) {
|
|
371
|
+
case "AccessDeniedException":
|
|
372
|
+
case "com.amazonaws.kinesis#AccessDeniedException":
|
|
373
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
374
|
+
case "InvalidArgumentException":
|
|
375
|
+
case "com.amazonaws.kinesis#InvalidArgumentException":
|
|
376
|
+
throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
|
|
377
|
+
case "LimitExceededException":
|
|
378
|
+
case "com.amazonaws.kinesis#LimitExceededException":
|
|
379
|
+
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
380
|
+
case "ResourceInUseException":
|
|
381
|
+
case "com.amazonaws.kinesis#ResourceInUseException":
|
|
382
|
+
throw await de_ResourceInUseExceptionRes(parsedOutput, context);
|
|
383
|
+
case "ResourceNotFoundException":
|
|
384
|
+
case "com.amazonaws.kinesis#ResourceNotFoundException":
|
|
385
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
386
|
+
default:
|
|
387
|
+
const parsedBody = parsedOutput.body;
|
|
388
|
+
return throwDefaultError({
|
|
389
|
+
output,
|
|
390
|
+
parsedBody,
|
|
391
|
+
errorCode,
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
};
|
|
332
395
|
const de_DeleteStreamCommand = async (output, context) => {
|
|
333
396
|
if (output.statusCode >= 300) {
|
|
334
397
|
return de_DeleteStreamCommandError(output, context);
|
|
@@ -716,6 +779,48 @@ const de_GetRecordsCommandError = async (output, context) => {
|
|
|
716
779
|
});
|
|
717
780
|
}
|
|
718
781
|
};
|
|
782
|
+
const de_GetResourcePolicyCommand = async (output, context) => {
|
|
783
|
+
if (output.statusCode >= 300) {
|
|
784
|
+
return de_GetResourcePolicyCommandError(output, context);
|
|
785
|
+
}
|
|
786
|
+
const data = await parseBody(output.body, context);
|
|
787
|
+
let contents = {};
|
|
788
|
+
contents = (0, smithy_client_1._json)(data);
|
|
789
|
+
const response = {
|
|
790
|
+
$metadata: deserializeMetadata(output),
|
|
791
|
+
...contents,
|
|
792
|
+
};
|
|
793
|
+
return response;
|
|
794
|
+
};
|
|
795
|
+
exports.de_GetResourcePolicyCommand = de_GetResourcePolicyCommand;
|
|
796
|
+
const de_GetResourcePolicyCommandError = async (output, context) => {
|
|
797
|
+
const parsedOutput = {
|
|
798
|
+
...output,
|
|
799
|
+
body: await parseErrorBody(output.body, context),
|
|
800
|
+
};
|
|
801
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
802
|
+
switch (errorCode) {
|
|
803
|
+
case "AccessDeniedException":
|
|
804
|
+
case "com.amazonaws.kinesis#AccessDeniedException":
|
|
805
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
806
|
+
case "InvalidArgumentException":
|
|
807
|
+
case "com.amazonaws.kinesis#InvalidArgumentException":
|
|
808
|
+
throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
|
|
809
|
+
case "LimitExceededException":
|
|
810
|
+
case "com.amazonaws.kinesis#LimitExceededException":
|
|
811
|
+
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
812
|
+
case "ResourceNotFoundException":
|
|
813
|
+
case "com.amazonaws.kinesis#ResourceNotFoundException":
|
|
814
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
815
|
+
default:
|
|
816
|
+
const parsedBody = parsedOutput.body;
|
|
817
|
+
return throwDefaultError({
|
|
818
|
+
output,
|
|
819
|
+
parsedBody,
|
|
820
|
+
errorCode,
|
|
821
|
+
});
|
|
822
|
+
}
|
|
823
|
+
};
|
|
719
824
|
const de_GetShardIteratorCommand = async (output, context) => {
|
|
720
825
|
if (output.statusCode >= 300) {
|
|
721
826
|
return de_GetShardIteratorCommandError(output, context);
|
|
@@ -1139,6 +1244,48 @@ const de_PutRecordsCommandError = async (output, context) => {
|
|
|
1139
1244
|
});
|
|
1140
1245
|
}
|
|
1141
1246
|
};
|
|
1247
|
+
const de_PutResourcePolicyCommand = async (output, context) => {
|
|
1248
|
+
if (output.statusCode >= 300) {
|
|
1249
|
+
return de_PutResourcePolicyCommandError(output, context);
|
|
1250
|
+
}
|
|
1251
|
+
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1252
|
+
const response = {
|
|
1253
|
+
$metadata: deserializeMetadata(output),
|
|
1254
|
+
};
|
|
1255
|
+
return response;
|
|
1256
|
+
};
|
|
1257
|
+
exports.de_PutResourcePolicyCommand = de_PutResourcePolicyCommand;
|
|
1258
|
+
const de_PutResourcePolicyCommandError = async (output, context) => {
|
|
1259
|
+
const parsedOutput = {
|
|
1260
|
+
...output,
|
|
1261
|
+
body: await parseErrorBody(output.body, context),
|
|
1262
|
+
};
|
|
1263
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1264
|
+
switch (errorCode) {
|
|
1265
|
+
case "AccessDeniedException":
|
|
1266
|
+
case "com.amazonaws.kinesis#AccessDeniedException":
|
|
1267
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1268
|
+
case "InvalidArgumentException":
|
|
1269
|
+
case "com.amazonaws.kinesis#InvalidArgumentException":
|
|
1270
|
+
throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
|
|
1271
|
+
case "LimitExceededException":
|
|
1272
|
+
case "com.amazonaws.kinesis#LimitExceededException":
|
|
1273
|
+
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
1274
|
+
case "ResourceInUseException":
|
|
1275
|
+
case "com.amazonaws.kinesis#ResourceInUseException":
|
|
1276
|
+
throw await de_ResourceInUseExceptionRes(parsedOutput, context);
|
|
1277
|
+
case "ResourceNotFoundException":
|
|
1278
|
+
case "com.amazonaws.kinesis#ResourceNotFoundException":
|
|
1279
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1280
|
+
default:
|
|
1281
|
+
const parsedBody = parsedOutput.body;
|
|
1282
|
+
return throwDefaultError({
|
|
1283
|
+
output,
|
|
1284
|
+
parsedBody,
|
|
1285
|
+
errorCode,
|
|
1286
|
+
});
|
|
1287
|
+
}
|
|
1288
|
+
};
|
|
1142
1289
|
const de_RegisterStreamConsumerCommand = async (output, context) => {
|
|
1143
1290
|
if (output.statusCode >= 300) {
|
|
1144
1291
|
return de_RegisterStreamConsumerCommandError(output, context);
|
package/dist-es/Kinesis.js
CHANGED
|
@@ -2,6 +2,7 @@ import { createAggregatedClient } from "@smithy/smithy-client";
|
|
|
2
2
|
import { AddTagsToStreamCommand, } from "./commands/AddTagsToStreamCommand";
|
|
3
3
|
import { CreateStreamCommand, } from "./commands/CreateStreamCommand";
|
|
4
4
|
import { DecreaseStreamRetentionPeriodCommand, } from "./commands/DecreaseStreamRetentionPeriodCommand";
|
|
5
|
+
import { DeleteResourcePolicyCommand, } from "./commands/DeleteResourcePolicyCommand";
|
|
5
6
|
import { DeleteStreamCommand, } from "./commands/DeleteStreamCommand";
|
|
6
7
|
import { DeregisterStreamConsumerCommand, } from "./commands/DeregisterStreamConsumerCommand";
|
|
7
8
|
import { DescribeLimitsCommand, } from "./commands/DescribeLimitsCommand";
|
|
@@ -11,6 +12,7 @@ import { DescribeStreamSummaryCommand, } from "./commands/DescribeStreamSummaryC
|
|
|
11
12
|
import { DisableEnhancedMonitoringCommand, } from "./commands/DisableEnhancedMonitoringCommand";
|
|
12
13
|
import { EnableEnhancedMonitoringCommand, } from "./commands/EnableEnhancedMonitoringCommand";
|
|
13
14
|
import { GetRecordsCommand } from "./commands/GetRecordsCommand";
|
|
15
|
+
import { GetResourcePolicyCommand, } from "./commands/GetResourcePolicyCommand";
|
|
14
16
|
import { GetShardIteratorCommand, } from "./commands/GetShardIteratorCommand";
|
|
15
17
|
import { IncreaseStreamRetentionPeriodCommand, } from "./commands/IncreaseStreamRetentionPeriodCommand";
|
|
16
18
|
import { ListShardsCommand } from "./commands/ListShardsCommand";
|
|
@@ -20,6 +22,7 @@ import { ListTagsForStreamCommand, } from "./commands/ListTagsForStreamCommand";
|
|
|
20
22
|
import { MergeShardsCommand } from "./commands/MergeShardsCommand";
|
|
21
23
|
import { PutRecordCommand } from "./commands/PutRecordCommand";
|
|
22
24
|
import { PutRecordsCommand } from "./commands/PutRecordsCommand";
|
|
25
|
+
import { PutResourcePolicyCommand, } from "./commands/PutResourcePolicyCommand";
|
|
23
26
|
import { RegisterStreamConsumerCommand, } from "./commands/RegisterStreamConsumerCommand";
|
|
24
27
|
import { RemoveTagsFromStreamCommand, } from "./commands/RemoveTagsFromStreamCommand";
|
|
25
28
|
import { SplitShardCommand } from "./commands/SplitShardCommand";
|
|
@@ -33,6 +36,7 @@ const commands = {
|
|
|
33
36
|
AddTagsToStreamCommand,
|
|
34
37
|
CreateStreamCommand,
|
|
35
38
|
DecreaseStreamRetentionPeriodCommand,
|
|
39
|
+
DeleteResourcePolicyCommand,
|
|
36
40
|
DeleteStreamCommand,
|
|
37
41
|
DeregisterStreamConsumerCommand,
|
|
38
42
|
DescribeLimitsCommand,
|
|
@@ -42,6 +46,7 @@ const commands = {
|
|
|
42
46
|
DisableEnhancedMonitoringCommand,
|
|
43
47
|
EnableEnhancedMonitoringCommand,
|
|
44
48
|
GetRecordsCommand,
|
|
49
|
+
GetResourcePolicyCommand,
|
|
45
50
|
GetShardIteratorCommand,
|
|
46
51
|
IncreaseStreamRetentionPeriodCommand,
|
|
47
52
|
ListShardsCommand,
|
|
@@ -51,6 +56,7 @@ const commands = {
|
|
|
51
56
|
MergeShardsCommand,
|
|
52
57
|
PutRecordCommand,
|
|
53
58
|
PutRecordsCommand,
|
|
59
|
+
PutResourcePolicyCommand,
|
|
54
60
|
RegisterStreamConsumerCommand,
|
|
55
61
|
RemoveTagsFromStreamCommand,
|
|
56
62
|
SplitShardCommand,
|
|
@@ -0,0 +1,49 @@
|
|
|
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 { SMITHY_CONTEXT_KEY, } from "@smithy/types";
|
|
5
|
+
import { de_DeleteResourcePolicyCommand, se_DeleteResourcePolicyCommand } from "../protocols/Aws_json1_1";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class DeleteResourcePolicyCommand extends $Command {
|
|
8
|
+
static getEndpointParameterInstructions() {
|
|
9
|
+
return {
|
|
10
|
+
OperationType: { type: "staticContextParams", value: `control` },
|
|
11
|
+
ResourceARN: { type: "contextParams", name: "ResourceARN" },
|
|
12
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
13
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
14
|
+
Region: { type: "builtInParams", name: "region" },
|
|
15
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
constructor(input) {
|
|
19
|
+
super();
|
|
20
|
+
this.input = input;
|
|
21
|
+
}
|
|
22
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
23
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
24
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, DeleteResourcePolicyCommand.getEndpointParameterInstructions()));
|
|
25
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
26
|
+
const { logger } = configuration;
|
|
27
|
+
const clientName = "KinesisClient";
|
|
28
|
+
const commandName = "DeleteResourcePolicyCommand";
|
|
29
|
+
const handlerExecutionContext = {
|
|
30
|
+
logger,
|
|
31
|
+
clientName,
|
|
32
|
+
commandName,
|
|
33
|
+
inputFilterSensitiveLog: (_) => _,
|
|
34
|
+
outputFilterSensitiveLog: (_) => _,
|
|
35
|
+
[SMITHY_CONTEXT_KEY]: {
|
|
36
|
+
service: "Kinesis_20131202",
|
|
37
|
+
operation: "DeleteResourcePolicy",
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
const { requestHandler } = configuration;
|
|
41
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
42
|
+
}
|
|
43
|
+
serialize(input, context) {
|
|
44
|
+
return se_DeleteResourcePolicyCommand(input, context);
|
|
45
|
+
}
|
|
46
|
+
deserialize(output, context) {
|
|
47
|
+
return de_DeleteResourcePolicyCommand(output, context);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
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 { SMITHY_CONTEXT_KEY, } from "@smithy/types";
|
|
5
|
+
import { de_GetResourcePolicyCommand, se_GetResourcePolicyCommand } from "../protocols/Aws_json1_1";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class GetResourcePolicyCommand extends $Command {
|
|
8
|
+
static getEndpointParameterInstructions() {
|
|
9
|
+
return {
|
|
10
|
+
OperationType: { type: "staticContextParams", value: `control` },
|
|
11
|
+
ResourceARN: { type: "contextParams", name: "ResourceARN" },
|
|
12
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
13
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
14
|
+
Region: { type: "builtInParams", name: "region" },
|
|
15
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
constructor(input) {
|
|
19
|
+
super();
|
|
20
|
+
this.input = input;
|
|
21
|
+
}
|
|
22
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
23
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
24
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, GetResourcePolicyCommand.getEndpointParameterInstructions()));
|
|
25
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
26
|
+
const { logger } = configuration;
|
|
27
|
+
const clientName = "KinesisClient";
|
|
28
|
+
const commandName = "GetResourcePolicyCommand";
|
|
29
|
+
const handlerExecutionContext = {
|
|
30
|
+
logger,
|
|
31
|
+
clientName,
|
|
32
|
+
commandName,
|
|
33
|
+
inputFilterSensitiveLog: (_) => _,
|
|
34
|
+
outputFilterSensitiveLog: (_) => _,
|
|
35
|
+
[SMITHY_CONTEXT_KEY]: {
|
|
36
|
+
service: "Kinesis_20131202",
|
|
37
|
+
operation: "GetResourcePolicy",
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
const { requestHandler } = configuration;
|
|
41
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
42
|
+
}
|
|
43
|
+
serialize(input, context) {
|
|
44
|
+
return se_GetResourcePolicyCommand(input, context);
|
|
45
|
+
}
|
|
46
|
+
deserialize(output, context) {
|
|
47
|
+
return de_GetResourcePolicyCommand(output, context);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
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 { SMITHY_CONTEXT_KEY, } from "@smithy/types";
|
|
5
|
+
import { de_PutResourcePolicyCommand, se_PutResourcePolicyCommand } from "../protocols/Aws_json1_1";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class PutResourcePolicyCommand extends $Command {
|
|
8
|
+
static getEndpointParameterInstructions() {
|
|
9
|
+
return {
|
|
10
|
+
OperationType: { type: "staticContextParams", value: `control` },
|
|
11
|
+
ResourceARN: { type: "contextParams", name: "ResourceARN" },
|
|
12
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
13
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
14
|
+
Region: { type: "builtInParams", name: "region" },
|
|
15
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
constructor(input) {
|
|
19
|
+
super();
|
|
20
|
+
this.input = input;
|
|
21
|
+
}
|
|
22
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
23
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
24
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, PutResourcePolicyCommand.getEndpointParameterInstructions()));
|
|
25
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
26
|
+
const { logger } = configuration;
|
|
27
|
+
const clientName = "KinesisClient";
|
|
28
|
+
const commandName = "PutResourcePolicyCommand";
|
|
29
|
+
const handlerExecutionContext = {
|
|
30
|
+
logger,
|
|
31
|
+
clientName,
|
|
32
|
+
commandName,
|
|
33
|
+
inputFilterSensitiveLog: (_) => _,
|
|
34
|
+
outputFilterSensitiveLog: (_) => _,
|
|
35
|
+
[SMITHY_CONTEXT_KEY]: {
|
|
36
|
+
service: "Kinesis_20131202",
|
|
37
|
+
operation: "PutResourcePolicy",
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
const { requestHandler } = configuration;
|
|
41
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
42
|
+
}
|
|
43
|
+
serialize(input, context) {
|
|
44
|
+
return se_PutResourcePolicyCommand(input, context);
|
|
45
|
+
}
|
|
46
|
+
deserialize(output, context) {
|
|
47
|
+
return de_PutResourcePolicyCommand(output, context);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./AddTagsToStreamCommand";
|
|
2
2
|
export * from "./CreateStreamCommand";
|
|
3
3
|
export * from "./DecreaseStreamRetentionPeriodCommand";
|
|
4
|
+
export * from "./DeleteResourcePolicyCommand";
|
|
4
5
|
export * from "./DeleteStreamCommand";
|
|
5
6
|
export * from "./DeregisterStreamConsumerCommand";
|
|
6
7
|
export * from "./DescribeLimitsCommand";
|
|
@@ -10,6 +11,7 @@ export * from "./DescribeStreamSummaryCommand";
|
|
|
10
11
|
export * from "./DisableEnhancedMonitoringCommand";
|
|
11
12
|
export * from "./EnableEnhancedMonitoringCommand";
|
|
12
13
|
export * from "./GetRecordsCommand";
|
|
14
|
+
export * from "./GetResourcePolicyCommand";
|
|
13
15
|
export * from "./GetShardIteratorCommand";
|
|
14
16
|
export * from "./IncreaseStreamRetentionPeriodCommand";
|
|
15
17
|
export * from "./ListShardsCommand";
|
|
@@ -19,6 +21,7 @@ export * from "./ListTagsForStreamCommand";
|
|
|
19
21
|
export * from "./MergeShardsCommand";
|
|
20
22
|
export * from "./PutRecordCommand";
|
|
21
23
|
export * from "./PutRecordsCommand";
|
|
24
|
+
export * from "./PutResourcePolicyCommand";
|
|
22
25
|
export * from "./RegisterStreamConsumerCommand";
|
|
23
26
|
export * from "./RemoveTagsFromStreamCommand";
|
|
24
27
|
export * from "./SplitShardCommand";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
2
|
-
const a = true, b = "isSet", c = "stringEquals", d = "aws.parseArn", e = "arn", f = "booleanEquals", g = "endpoint", h = "tree", i = "error", j = { [
|
|
3
|
-
const _data = { version: "1.0", parameters: { Region: j, UseDualStack: k, UseFIPS: k, Endpoint: j, StreamARN: j, OperationType: j, ConsumerARN: j }, [
|
|
1
|
+
const H = "required", I = "type", J = "rules", K = "conditions", L = "fn", M = "argv", N = "ref", O = "assign", P = "url", Q = "properties", R = "headers";
|
|
2
|
+
const a = true, b = "isSet", c = "stringEquals", d = "aws.parseArn", e = "arn", f = "booleanEquals", g = "endpoint", h = "tree", i = "error", j = { [H]: false, [I]: "String" }, k = { [H]: true, "default": false, [I]: "Boolean" }, l = { [L]: "not", [M]: [{ [L]: b, [M]: [{ [N]: "Endpoint" }] }] }, m = { [N]: "Endpoint" }, n = { [L]: b, [M]: [{ [N]: "Region" }] }, o = { [L]: "aws.partition", [M]: [{ [N]: "Region" }], [O]: "PartitionResult" }, p = { [L]: "not", [M]: [{ [L]: c, [M]: [{ [L]: "getAttr", [M]: [{ [N]: "PartitionResult" }, "name"] }, "aws-iso"] }] }, q = { [L]: "getAttr", [M]: [{ [N]: "PartitionResult" }, "name"] }, r = { [L]: "not", [M]: [{ [L]: c, [M]: [q, "aws-iso-b"] }] }, s = { [L]: "getAttr", [M]: [{ [N]: "PartitionResult" }, "supportsFIPS"] }, t = {}, u = { [i]: "FIPS is enabled but this partition does not support FIPS", [I]: i }, v = { [i]: "DualStack is enabled but this partition does not support DualStack", [I]: i }, w = { [i]: "Invalid ARN: Failed to parse ARN.", [I]: i }, x = { [L]: f, [M]: [true, { [L]: "getAttr", [M]: [{ [N]: "PartitionResult" }, "supportsDualStack"] }] }, y = [{ [N]: "StreamARN" }], z = [{ [L]: b, [M]: [m] }], A = [{ [K]: [{ [L]: "isValidHostLabel", [M]: [{ [L]: "getAttr", [M]: [{ [N]: e }, "accountId"] }, false] }], [J]: [{ [K]: [{ [L]: "isValidHostLabel", [M]: [{ [L]: "getAttr", [M]: [{ [N]: e }, "region"] }, false] }], [J]: [{ [K]: [{ [L]: c, [M]: [{ [L]: "getAttr", [M]: [{ [N]: e }, "service"] }, "kinesis"] }], [J]: [{ [K]: [{ [L]: "getAttr", [M]: [{ [N]: e }, "resourceId[0]"], [O]: "arnType" }, { [L]: "not", [M]: [{ [L]: c, [M]: [{ [N]: "arnType" }, ""] }] }], [J]: [{ [K]: [{ [L]: c, [M]: [{ [N]: "arnType" }, "stream"] }], [J]: [{ [K]: [{ [L]: c, [M]: [q, "{arn#partition}"] }], [J]: [{ [K]: [{ [L]: b, [M]: [{ [N]: "OperationType" }] }], [J]: [{ [K]: [{ [L]: f, [M]: [{ [N]: "UseFIPS" }, true] }, { [L]: f, [M]: [{ [N]: "UseDualStack" }, true] }], [J]: [{ [K]: [{ [L]: f, [M]: [s, true] }], [J]: [{ [K]: [{ [L]: f, [M]: [{ [L]: "getAttr", [M]: [{ [N]: "PartitionResult" }, "supportsDualStack"] }, true] }], [J]: [{ [g]: { [P]: "https://{arn#accountId}.{OperationType}-kinesis-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", [Q]: {}, [R]: {} }, [I]: g }], [I]: h }, { [i]: "DualStack is enabled, but this partition does not support DualStack.", [I]: i }], [I]: h }, { [i]: "FIPS is enabled, but this partition does not support FIPS.", [I]: i }], [I]: h }, { [K]: [{ [L]: f, [M]: [{ [N]: "UseFIPS" }, true] }], [J]: [{ [K]: [{ [L]: f, [M]: [s, true] }], [J]: [{ [g]: { [P]: "https://{arn#accountId}.{OperationType}-kinesis-fips.{Region}.{PartitionResult#dnsSuffix}", [Q]: {}, [R]: {} }, [I]: g }], [I]: h }, u], [I]: h }, { [K]: [{ [L]: f, [M]: [{ [N]: "UseDualStack" }, true] }], [J]: [{ [K]: [{ [L]: f, [M]: [{ [L]: "getAttr", [M]: [{ [N]: "PartitionResult" }, "supportsDualStack"] }, true] }], [J]: [{ [g]: { [P]: "https://{arn#accountId}.{OperationType}-kinesis.{Region}.{PartitionResult#dualStackDnsSuffix}", [Q]: {}, [R]: {} }, [I]: g }], [I]: h }, v], [I]: h }, { [g]: { [P]: "https://{arn#accountId}.{OperationType}-kinesis.{Region}.{PartitionResult#dnsSuffix}", [Q]: {}, [R]: {} }, [I]: g }], [I]: h }, { [i]: "Operation Type is not set. Please contact service team for resolution.", [I]: i }], [I]: h }, { [i]: "Partition: {arn#partition} from ARN doesn't match with partition name: {PartitionResult#name}.", [I]: i }], [I]: h }, { [i]: "Invalid ARN: Kinesis ARNs don't support `{arnType}` arn types.", [I]: i }], [I]: h }, { [i]: "Invalid ARN: No ARN type specified", [I]: i }], [I]: h }, { [i]: "Invalid ARN: The ARN was not for the Kinesis service, found: {arn#service}.", [I]: i }], [I]: h }, { [i]: "Invalid ARN: Invalid region.", [I]: i }], [I]: h }, { [i]: "Invalid ARN: Invalid account id.", [I]: i }], B = [{ [L]: f, [M]: [{ [N]: "UseFIPS" }, true] }, { [L]: f, [M]: [{ [N]: "UseDualStack" }, true] }], C = [{ [L]: f, [M]: [s, true] }], D = [{ [L]: f, [M]: [{ [N]: "UseFIPS" }, true] }], E = [{ [L]: f, [M]: [{ [N]: "UseDualStack" }, true] }], F = [{ [N]: "ConsumerARN" }], G = [{ [N]: "ResourceARN" }];
|
|
3
|
+
const _data = { version: "1.0", parameters: { Region: j, UseDualStack: k, UseFIPS: k, Endpoint: j, StreamARN: j, OperationType: j, ConsumerARN: j, ResourceARN: j }, [J]: [{ [K]: [{ [L]: b, [M]: y }, l, n, o, p, r], [J]: [{ [K]: [{ [L]: d, [M]: y, [O]: e }], [J]: A, [I]: h }, w], [I]: h }, { [K]: [{ [L]: b, [M]: F }, l, n, o, p, r], [J]: [{ [K]: [{ [L]: d, [M]: F, [O]: e }], [J]: A, [I]: h }, w], [I]: h }, { [K]: [{ [L]: b, [M]: G }, l, n, o, p, r], [J]: [{ [K]: [{ [L]: d, [M]: G, [O]: e }], [J]: A, [I]: h }, w], [I]: h }, { [K]: z, [J]: [{ [K]: D, error: "Invalid Configuration: FIPS and custom endpoint are not supported", [I]: i }, { [K]: E, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", [I]: i }, { endpoint: { [P]: m, [Q]: t, [R]: t }, [I]: g }], [I]: h }, { [K]: [n], [J]: [{ [K]: [o], [J]: [{ [K]: B, [J]: [{ [K]: [{ [L]: f, [M]: [a, s] }, x], [J]: [{ endpoint: { [P]: "https://kinesis-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", [Q]: t, [R]: t }, [I]: g }], [I]: h }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", [I]: i }], [I]: h }, { [K]: D, [J]: [{ [K]: C, [J]: [{ [K]: [{ [L]: c, [M]: [q, "aws-us-gov"] }], endpoint: { [P]: "https://kinesis.{Region}.amazonaws.com", [Q]: t, [R]: t }, [I]: g }, { endpoint: { [P]: "https://kinesis-fips.{Region}.{PartitionResult#dnsSuffix}", [Q]: t, [R]: t }, [I]: g }], [I]: h }, u], [I]: h }, { [K]: E, [J]: [{ [K]: [x], [J]: [{ endpoint: { [P]: "https://kinesis.{Region}.{PartitionResult#dualStackDnsSuffix}", [Q]: t, [R]: t }, [I]: g }], [I]: h }, v], [I]: h }, { endpoint: { [P]: "https://kinesis.{Region}.{PartitionResult#dnsSuffix}", [Q]: t, [R]: t }, [I]: g }], [I]: h }], [I]: h }, { error: "Invalid Configuration: Missing Region", [I]: i }] };
|
|
4
4
|
export const ruleSet = _data;
|
|
@@ -20,6 +20,12 @@ export const se_DecreaseStreamRetentionPeriodCommand = async (input, context) =>
|
|
|
20
20
|
body = JSON.stringify(_json(input));
|
|
21
21
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
22
22
|
};
|
|
23
|
+
export const se_DeleteResourcePolicyCommand = async (input, context) => {
|
|
24
|
+
const headers = sharedHeaders("DeleteResourcePolicy");
|
|
25
|
+
let body;
|
|
26
|
+
body = JSON.stringify(_json(input));
|
|
27
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
28
|
+
};
|
|
23
29
|
export const se_DeleteStreamCommand = async (input, context) => {
|
|
24
30
|
const headers = sharedHeaders("DeleteStream");
|
|
25
31
|
let body;
|
|
@@ -74,6 +80,12 @@ export const se_GetRecordsCommand = async (input, context) => {
|
|
|
74
80
|
body = JSON.stringify(_json(input));
|
|
75
81
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
76
82
|
};
|
|
83
|
+
export const se_GetResourcePolicyCommand = async (input, context) => {
|
|
84
|
+
const headers = sharedHeaders("GetResourcePolicy");
|
|
85
|
+
let body;
|
|
86
|
+
body = JSON.stringify(_json(input));
|
|
87
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
88
|
+
};
|
|
77
89
|
export const se_GetShardIteratorCommand = async (input, context) => {
|
|
78
90
|
const headers = sharedHeaders("GetShardIterator");
|
|
79
91
|
let body;
|
|
@@ -128,6 +140,12 @@ export const se_PutRecordsCommand = async (input, context) => {
|
|
|
128
140
|
body = JSON.stringify(se_PutRecordsInput(input, context));
|
|
129
141
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
130
142
|
};
|
|
143
|
+
export const se_PutResourcePolicyCommand = async (input, context) => {
|
|
144
|
+
const headers = sharedHeaders("PutResourcePolicy");
|
|
145
|
+
let body;
|
|
146
|
+
body = JSON.stringify(_json(input));
|
|
147
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
148
|
+
};
|
|
131
149
|
export const se_RegisterStreamConsumerCommand = async (input, context) => {
|
|
132
150
|
const headers = sharedHeaders("RegisterStreamConsumer");
|
|
133
151
|
let body;
|
|
@@ -293,6 +311,47 @@ const de_DecreaseStreamRetentionPeriodCommandError = async (output, context) =>
|
|
|
293
311
|
});
|
|
294
312
|
}
|
|
295
313
|
};
|
|
314
|
+
export const de_DeleteResourcePolicyCommand = async (output, context) => {
|
|
315
|
+
if (output.statusCode >= 300) {
|
|
316
|
+
return de_DeleteResourcePolicyCommandError(output, context);
|
|
317
|
+
}
|
|
318
|
+
await collectBody(output.body, context);
|
|
319
|
+
const response = {
|
|
320
|
+
$metadata: deserializeMetadata(output),
|
|
321
|
+
};
|
|
322
|
+
return response;
|
|
323
|
+
};
|
|
324
|
+
const de_DeleteResourcePolicyCommandError = async (output, context) => {
|
|
325
|
+
const parsedOutput = {
|
|
326
|
+
...output,
|
|
327
|
+
body: await parseErrorBody(output.body, context),
|
|
328
|
+
};
|
|
329
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
330
|
+
switch (errorCode) {
|
|
331
|
+
case "AccessDeniedException":
|
|
332
|
+
case "com.amazonaws.kinesis#AccessDeniedException":
|
|
333
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
334
|
+
case "InvalidArgumentException":
|
|
335
|
+
case "com.amazonaws.kinesis#InvalidArgumentException":
|
|
336
|
+
throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
|
|
337
|
+
case "LimitExceededException":
|
|
338
|
+
case "com.amazonaws.kinesis#LimitExceededException":
|
|
339
|
+
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
340
|
+
case "ResourceInUseException":
|
|
341
|
+
case "com.amazonaws.kinesis#ResourceInUseException":
|
|
342
|
+
throw await de_ResourceInUseExceptionRes(parsedOutput, context);
|
|
343
|
+
case "ResourceNotFoundException":
|
|
344
|
+
case "com.amazonaws.kinesis#ResourceNotFoundException":
|
|
345
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
346
|
+
default:
|
|
347
|
+
const parsedBody = parsedOutput.body;
|
|
348
|
+
return throwDefaultError({
|
|
349
|
+
output,
|
|
350
|
+
parsedBody,
|
|
351
|
+
errorCode,
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
};
|
|
296
355
|
export const de_DeleteStreamCommand = async (output, context) => {
|
|
297
356
|
if (output.statusCode >= 300) {
|
|
298
357
|
return de_DeleteStreamCommandError(output, context);
|
|
@@ -671,6 +730,47 @@ const de_GetRecordsCommandError = async (output, context) => {
|
|
|
671
730
|
});
|
|
672
731
|
}
|
|
673
732
|
};
|
|
733
|
+
export const de_GetResourcePolicyCommand = async (output, context) => {
|
|
734
|
+
if (output.statusCode >= 300) {
|
|
735
|
+
return de_GetResourcePolicyCommandError(output, context);
|
|
736
|
+
}
|
|
737
|
+
const data = await parseBody(output.body, context);
|
|
738
|
+
let contents = {};
|
|
739
|
+
contents = _json(data);
|
|
740
|
+
const response = {
|
|
741
|
+
$metadata: deserializeMetadata(output),
|
|
742
|
+
...contents,
|
|
743
|
+
};
|
|
744
|
+
return response;
|
|
745
|
+
};
|
|
746
|
+
const de_GetResourcePolicyCommandError = async (output, context) => {
|
|
747
|
+
const parsedOutput = {
|
|
748
|
+
...output,
|
|
749
|
+
body: await parseErrorBody(output.body, context),
|
|
750
|
+
};
|
|
751
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
752
|
+
switch (errorCode) {
|
|
753
|
+
case "AccessDeniedException":
|
|
754
|
+
case "com.amazonaws.kinesis#AccessDeniedException":
|
|
755
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
756
|
+
case "InvalidArgumentException":
|
|
757
|
+
case "com.amazonaws.kinesis#InvalidArgumentException":
|
|
758
|
+
throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
|
|
759
|
+
case "LimitExceededException":
|
|
760
|
+
case "com.amazonaws.kinesis#LimitExceededException":
|
|
761
|
+
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
762
|
+
case "ResourceNotFoundException":
|
|
763
|
+
case "com.amazonaws.kinesis#ResourceNotFoundException":
|
|
764
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
765
|
+
default:
|
|
766
|
+
const parsedBody = parsedOutput.body;
|
|
767
|
+
return throwDefaultError({
|
|
768
|
+
output,
|
|
769
|
+
parsedBody,
|
|
770
|
+
errorCode,
|
|
771
|
+
});
|
|
772
|
+
}
|
|
773
|
+
};
|
|
674
774
|
export const de_GetShardIteratorCommand = async (output, context) => {
|
|
675
775
|
if (output.statusCode >= 300) {
|
|
676
776
|
return de_GetShardIteratorCommandError(output, context);
|
|
@@ -1085,6 +1185,47 @@ const de_PutRecordsCommandError = async (output, context) => {
|
|
|
1085
1185
|
});
|
|
1086
1186
|
}
|
|
1087
1187
|
};
|
|
1188
|
+
export const de_PutResourcePolicyCommand = async (output, context) => {
|
|
1189
|
+
if (output.statusCode >= 300) {
|
|
1190
|
+
return de_PutResourcePolicyCommandError(output, context);
|
|
1191
|
+
}
|
|
1192
|
+
await collectBody(output.body, context);
|
|
1193
|
+
const response = {
|
|
1194
|
+
$metadata: deserializeMetadata(output),
|
|
1195
|
+
};
|
|
1196
|
+
return response;
|
|
1197
|
+
};
|
|
1198
|
+
const de_PutResourcePolicyCommandError = async (output, context) => {
|
|
1199
|
+
const parsedOutput = {
|
|
1200
|
+
...output,
|
|
1201
|
+
body: await parseErrorBody(output.body, context),
|
|
1202
|
+
};
|
|
1203
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1204
|
+
switch (errorCode) {
|
|
1205
|
+
case "AccessDeniedException":
|
|
1206
|
+
case "com.amazonaws.kinesis#AccessDeniedException":
|
|
1207
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
1208
|
+
case "InvalidArgumentException":
|
|
1209
|
+
case "com.amazonaws.kinesis#InvalidArgumentException":
|
|
1210
|
+
throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
|
|
1211
|
+
case "LimitExceededException":
|
|
1212
|
+
case "com.amazonaws.kinesis#LimitExceededException":
|
|
1213
|
+
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
1214
|
+
case "ResourceInUseException":
|
|
1215
|
+
case "com.amazonaws.kinesis#ResourceInUseException":
|
|
1216
|
+
throw await de_ResourceInUseExceptionRes(parsedOutput, context);
|
|
1217
|
+
case "ResourceNotFoundException":
|
|
1218
|
+
case "com.amazonaws.kinesis#ResourceNotFoundException":
|
|
1219
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1220
|
+
default:
|
|
1221
|
+
const parsedBody = parsedOutput.body;
|
|
1222
|
+
return throwDefaultError({
|
|
1223
|
+
output,
|
|
1224
|
+
parsedBody,
|
|
1225
|
+
errorCode,
|
|
1226
|
+
});
|
|
1227
|
+
}
|
|
1228
|
+
};
|
|
1088
1229
|
export const de_RegisterStreamConsumerCommand = async (output, context) => {
|
|
1089
1230
|
if (output.statusCode >= 300) {
|
|
1090
1231
|
return de_RegisterStreamConsumerCommandError(output, context);
|