@aws-sdk/client-dynamodb 3.535.0 → 3.540.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.
Files changed (33) hide show
  1. package/README.md +24 -0
  2. package/dist-cjs/endpoint/endpointResolver.js +4 -2
  3. package/dist-cjs/index.js +148 -3
  4. package/dist-es/DynamoDB.js +6 -0
  5. package/dist-es/commands/DeleteResourcePolicyCommand.js +24 -0
  6. package/dist-es/commands/GetResourcePolicyCommand.js +24 -0
  7. package/dist-es/commands/PutResourcePolicyCommand.js +24 -0
  8. package/dist-es/commands/index.js +3 -0
  9. package/dist-es/endpoint/endpointResolver.js +3 -1
  10. package/dist-es/index.js +0 -1
  11. package/dist-es/models/models_0.js +12 -0
  12. package/dist-es/protocols/Aws_json1_0.js +70 -1
  13. package/dist-types/DynamoDB.d.ts +21 -0
  14. package/dist-types/DynamoDBClient.d.ts +5 -2
  15. package/dist-types/commands/CreateTableCommand.d.ts +1 -0
  16. package/dist-types/commands/DeleteResourcePolicyCommand.d.ts +104 -0
  17. package/dist-types/commands/GetResourcePolicyCommand.d.ts +90 -0
  18. package/dist-types/commands/PutResourcePolicyCommand.d.ts +104 -0
  19. package/dist-types/commands/UpdateTableCommand.d.ts +5 -8
  20. package/dist-types/commands/index.d.ts +3 -0
  21. package/dist-types/index.d.ts +0 -1
  22. package/dist-types/models/models_0.d.ts +148 -37
  23. package/dist-types/protocols/Aws_json1_0.d.ts +27 -0
  24. package/dist-types/ts3.4/DynamoDB.d.ts +51 -0
  25. package/dist-types/ts3.4/DynamoDBClient.d.ts +18 -0
  26. package/dist-types/ts3.4/commands/DeleteResourcePolicyCommand.d.ts +39 -0
  27. package/dist-types/ts3.4/commands/GetResourcePolicyCommand.d.ts +38 -0
  28. package/dist-types/ts3.4/commands/PutResourcePolicyCommand.d.ts +38 -0
  29. package/dist-types/ts3.4/commands/index.d.ts +3 -0
  30. package/dist-types/ts3.4/index.d.ts +0 -1
  31. package/dist-types/ts3.4/models/models_0.d.ts +31 -0
  32. package/dist-types/ts3.4/protocols/Aws_json1_0.d.ts +36 -0
  33. package/package.json +5 -5
package/README.md CHANGED
@@ -283,6 +283,14 @@ DeleteItem
283
283
 
284
284
  [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/dynamodb/command/DeleteItemCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-dynamodb/Interface/DeleteItemCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-dynamodb/Interface/DeleteItemCommandOutput/)
285
285
 
286
+ </details>
287
+ <details>
288
+ <summary>
289
+ DeleteResourcePolicy
290
+ </summary>
291
+
292
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/dynamodb/command/DeleteResourcePolicyCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-dynamodb/Interface/DeleteResourcePolicyCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-dynamodb/Interface/DeleteResourcePolicyCommandOutput/)
293
+
286
294
  </details>
287
295
  <details>
288
296
  <summary>
@@ -443,6 +451,14 @@ GetItem
443
451
 
444
452
  [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/dynamodb/command/GetItemCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-dynamodb/Interface/GetItemCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-dynamodb/Interface/GetItemCommandOutput/)
445
453
 
454
+ </details>
455
+ <details>
456
+ <summary>
457
+ GetResourcePolicy
458
+ </summary>
459
+
460
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/dynamodb/command/GetResourcePolicyCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-dynamodb/Interface/GetResourcePolicyCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-dynamodb/Interface/GetResourcePolicyCommandOutput/)
461
+
446
462
  </details>
447
463
  <details>
448
464
  <summary>
@@ -515,6 +531,14 @@ PutItem
515
531
 
516
532
  [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/dynamodb/command/PutItemCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-dynamodb/Interface/PutItemCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-dynamodb/Interface/PutItemCommandOutput/)
517
533
 
534
+ </details>
535
+ <details>
536
+ <summary>
537
+ PutResourcePolicy
538
+ </summary>
539
+
540
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/dynamodb/command/PutResourcePolicyCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-dynamodb/Interface/PutResourcePolicyCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-dynamodb/Interface/PutResourcePolicyCommandOutput/)
541
+
518
542
  </details>
519
543
  <details>
520
544
  <summary>
@@ -1,12 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.defaultEndpointResolver = void 0;
4
- const util_endpoints_1 = require("@smithy/util-endpoints");
4
+ const util_endpoints_1 = require("@aws-sdk/util-endpoints");
5
+ const util_endpoints_2 = require("@smithy/util-endpoints");
5
6
  const ruleset_1 = require("./ruleset");
6
7
  const defaultEndpointResolver = (endpointParams, context = {}) => {
7
- return (0, util_endpoints_1.resolveEndpoint)(ruleset_1.ruleSet, {
8
+ return (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {
8
9
  endpointParams: endpointParams,
9
10
  logger: context.logger,
10
11
  });
11
12
  };
12
13
  exports.defaultEndpointResolver = defaultEndpointResolver;
14
+ util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;
package/dist-cjs/index.js CHANGED
@@ -46,6 +46,7 @@ __export(src_exports, {
46
46
  CreateTableCommand: () => CreateTableCommand,
47
47
  DeleteBackupCommand: () => DeleteBackupCommand,
48
48
  DeleteItemCommand: () => DeleteItemCommand,
49
+ DeleteResourcePolicyCommand: () => DeleteResourcePolicyCommand,
49
50
  DeleteTableCommand: () => DeleteTableCommand,
50
51
  DescribeBackupCommand: () => DescribeBackupCommand,
51
52
  DescribeContinuousBackupsCommand: () => DescribeContinuousBackupsCommand,
@@ -77,6 +78,7 @@ __export(src_exports, {
77
78
  ExportType: () => ExportType,
78
79
  ExportViewType: () => ExportViewType,
79
80
  GetItemCommand: () => GetItemCommand,
81
+ GetResourcePolicyCommand: () => GetResourcePolicyCommand,
80
82
  GlobalTableAlreadyExistsException: () => GlobalTableAlreadyExistsException,
81
83
  GlobalTableNotFoundException: () => GlobalTableNotFoundException,
82
84
  GlobalTableStatus: () => GlobalTableStatus,
@@ -105,9 +107,11 @@ __export(src_exports, {
105
107
  ListTagsOfResourceCommand: () => ListTagsOfResourceCommand,
106
108
  PointInTimeRecoveryStatus: () => PointInTimeRecoveryStatus,
107
109
  PointInTimeRecoveryUnavailableException: () => PointInTimeRecoveryUnavailableException,
110
+ PolicyNotFoundException: () => PolicyNotFoundException,
108
111
  ProjectionType: () => ProjectionType,
109
112
  ProvisionedThroughputExceededException: () => ProvisionedThroughputExceededException,
110
113
  PutItemCommand: () => PutItemCommand,
114
+ PutResourcePolicyCommand: () => PutResourcePolicyCommand,
111
115
  QueryCommand: () => QueryCommand,
112
116
  ReplicaAlreadyExistsException: () => ReplicaAlreadyExistsException,
113
117
  ReplicaNotFoundException: () => ReplicaNotFoundException,
@@ -648,6 +652,23 @@ var _TransactionConflictException = class _TransactionConflictException extends
648
652
  };
649
653
  __name(_TransactionConflictException, "TransactionConflictException");
650
654
  var TransactionConflictException = _TransactionConflictException;
655
+ var _PolicyNotFoundException = class _PolicyNotFoundException extends DynamoDBServiceException {
656
+ /**
657
+ * @internal
658
+ */
659
+ constructor(opts) {
660
+ super({
661
+ name: "PolicyNotFoundException",
662
+ $fault: "client",
663
+ ...opts
664
+ });
665
+ this.name = "PolicyNotFoundException";
666
+ this.$fault = "client";
667
+ Object.setPrototypeOf(this, _PolicyNotFoundException.prototype);
668
+ }
669
+ };
670
+ __name(_PolicyNotFoundException, "PolicyNotFoundException");
671
+ var PolicyNotFoundException = _PolicyNotFoundException;
651
672
  var ExportFormat = {
652
673
  DYNAMODB_JSON: "DYNAMODB_JSON",
653
674
  ION: "ION"
@@ -1070,6 +1091,12 @@ var se_DeleteItemCommand = /* @__PURE__ */ __name(async (input, context) => {
1070
1091
  body = JSON.stringify(se_DeleteItemInput(input, context));
1071
1092
  return buildHttpRpcRequest(context, headers, "/", void 0, body);
1072
1093
  }, "se_DeleteItemCommand");
1094
+ var se_DeleteResourcePolicyCommand = /* @__PURE__ */ __name(async (input, context) => {
1095
+ const headers = sharedHeaders("DeleteResourcePolicy");
1096
+ let body;
1097
+ body = JSON.stringify((0, import_smithy_client._json)(input));
1098
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
1099
+ }, "se_DeleteResourcePolicyCommand");
1073
1100
  var se_DeleteTableCommand = /* @__PURE__ */ __name(async (input, context) => {
1074
1101
  const headers = sharedHeaders("DeleteTable");
1075
1102
  let body;
@@ -1190,6 +1217,12 @@ var se_GetItemCommand = /* @__PURE__ */ __name(async (input, context) => {
1190
1217
  body = JSON.stringify(se_GetItemInput(input, context));
1191
1218
  return buildHttpRpcRequest(context, headers, "/", void 0, body);
1192
1219
  }, "se_GetItemCommand");
1220
+ var se_GetResourcePolicyCommand = /* @__PURE__ */ __name(async (input, context) => {
1221
+ const headers = sharedHeaders("GetResourcePolicy");
1222
+ let body;
1223
+ body = JSON.stringify((0, import_smithy_client._json)(input));
1224
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
1225
+ }, "se_GetResourcePolicyCommand");
1193
1226
  var se_ImportTableCommand = /* @__PURE__ */ __name(async (input, context) => {
1194
1227
  const headers = sharedHeaders("ImportTable");
1195
1228
  let body;
@@ -1244,6 +1277,12 @@ var se_PutItemCommand = /* @__PURE__ */ __name(async (input, context) => {
1244
1277
  body = JSON.stringify(se_PutItemInput(input, context));
1245
1278
  return buildHttpRpcRequest(context, headers, "/", void 0, body);
1246
1279
  }, "se_PutItemCommand");
1280
+ var se_PutResourcePolicyCommand = /* @__PURE__ */ __name(async (input, context) => {
1281
+ const headers = sharedHeaders("PutResourcePolicy");
1282
+ let body;
1283
+ body = JSON.stringify((0, import_smithy_client._json)(input));
1284
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
1285
+ }, "se_PutResourcePolicyCommand");
1247
1286
  var se_QueryCommand = /* @__PURE__ */ __name(async (input, context) => {
1248
1287
  const headers = sharedHeaders("Query");
1249
1288
  let body;
@@ -1450,6 +1489,19 @@ var de_DeleteItemCommand = /* @__PURE__ */ __name(async (output, context) => {
1450
1489
  };
1451
1490
  return response;
1452
1491
  }, "de_DeleteItemCommand");
1492
+ var de_DeleteResourcePolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
1493
+ if (output.statusCode >= 300) {
1494
+ return de_CommandError(output, context);
1495
+ }
1496
+ const data = await (0, import_core.parseJsonBody)(output.body, context);
1497
+ let contents = {};
1498
+ contents = (0, import_smithy_client._json)(data);
1499
+ const response = {
1500
+ $metadata: deserializeMetadata(output),
1501
+ ...contents
1502
+ };
1503
+ return response;
1504
+ }, "de_DeleteResourcePolicyCommand");
1453
1505
  var de_DeleteTableCommand = /* @__PURE__ */ __name(async (output, context) => {
1454
1506
  if (output.statusCode >= 300) {
1455
1507
  return de_CommandError(output, context);
@@ -1710,6 +1762,19 @@ var de_GetItemCommand = /* @__PURE__ */ __name(async (output, context) => {
1710
1762
  };
1711
1763
  return response;
1712
1764
  }, "de_GetItemCommand");
1765
+ var de_GetResourcePolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
1766
+ if (output.statusCode >= 300) {
1767
+ return de_CommandError(output, context);
1768
+ }
1769
+ const data = await (0, import_core.parseJsonBody)(output.body, context);
1770
+ let contents = {};
1771
+ contents = (0, import_smithy_client._json)(data);
1772
+ const response = {
1773
+ $metadata: deserializeMetadata(output),
1774
+ ...contents
1775
+ };
1776
+ return response;
1777
+ }, "de_GetResourcePolicyCommand");
1713
1778
  var de_ImportTableCommand = /* @__PURE__ */ __name(async (output, context) => {
1714
1779
  if (output.statusCode >= 300) {
1715
1780
  return de_CommandError(output, context);
@@ -1827,6 +1892,19 @@ var de_PutItemCommand = /* @__PURE__ */ __name(async (output, context) => {
1827
1892
  };
1828
1893
  return response;
1829
1894
  }, "de_PutItemCommand");
1895
+ var de_PutResourcePolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
1896
+ if (output.statusCode >= 300) {
1897
+ return de_CommandError(output, context);
1898
+ }
1899
+ const data = await (0, import_core.parseJsonBody)(output.body, context);
1900
+ let contents = {};
1901
+ contents = (0, import_smithy_client._json)(data);
1902
+ const response = {
1903
+ $metadata: deserializeMetadata(output),
1904
+ ...contents
1905
+ };
1906
+ return response;
1907
+ }, "de_PutResourcePolicyCommand");
1830
1908
  var de_QueryCommand = /* @__PURE__ */ __name(async (output, context) => {
1831
1909
  if (output.statusCode >= 300) {
1832
1910
  return de_CommandError(output, context);
@@ -2097,6 +2175,9 @@ var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
2097
2175
  case "TransactionConflictException":
2098
2176
  case "com.amazonaws.dynamodb#TransactionConflictException":
2099
2177
  throw await de_TransactionConflictExceptionRes(parsedOutput, context);
2178
+ case "PolicyNotFoundException":
2179
+ case "com.amazonaws.dynamodb#PolicyNotFoundException":
2180
+ throw await de_PolicyNotFoundExceptionRes(parsedOutput, context);
2100
2181
  case "ExportNotFoundException":
2101
2182
  case "com.amazonaws.dynamodb#ExportNotFoundException":
2102
2183
  throw await de_ExportNotFoundExceptionRes(parsedOutput, context);
@@ -2334,6 +2415,15 @@ var de_PointInTimeRecoveryUnavailableExceptionRes = /* @__PURE__ */ __name(async
2334
2415
  });
2335
2416
  return (0, import_smithy_client.decorateServiceException)(exception, body);
2336
2417
  }, "de_PointInTimeRecoveryUnavailableExceptionRes");
2418
+ var de_PolicyNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
2419
+ const body = parsedOutput.body;
2420
+ const deserialized = (0, import_smithy_client._json)(body);
2421
+ const exception = new PolicyNotFoundException({
2422
+ $metadata: deserializeMetadata(parsedOutput),
2423
+ ...deserialized
2424
+ });
2425
+ return (0, import_smithy_client.decorateServiceException)(exception, body);
2426
+ }, "de_PolicyNotFoundExceptionRes");
2337
2427
  var de_ProvisionedThroughputExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
2338
2428
  const body = parsedOutput.body;
2339
2429
  const deserialized = (0, import_smithy_client._json)(body);
@@ -4220,6 +4310,23 @@ var _DeleteItemCommand = class _DeleteItemCommand extends import_smithy_client.C
4220
4310
  __name(_DeleteItemCommand, "DeleteItemCommand");
4221
4311
  var DeleteItemCommand = _DeleteItemCommand;
4222
4312
 
4313
+ // src/commands/DeleteResourcePolicyCommand.ts
4314
+
4315
+
4316
+
4317
+
4318
+ var _DeleteResourcePolicyCommand = class _DeleteResourcePolicyCommand extends import_smithy_client.Command.classBuilder().ep({
4319
+ ...commonParams
4320
+ }).m(function(Command, cs, config, o) {
4321
+ return [
4322
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
4323
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
4324
+ ];
4325
+ }).s("DynamoDB_20120810", "DeleteResourcePolicy", {}).n("DynamoDBClient", "DeleteResourcePolicyCommand").f(void 0, void 0).ser(se_DeleteResourcePolicyCommand).de(de_DeleteResourcePolicyCommand).build() {
4326
+ };
4327
+ __name(_DeleteResourcePolicyCommand, "DeleteResourcePolicyCommand");
4328
+ var DeleteResourcePolicyCommand = _DeleteResourcePolicyCommand;
4329
+
4223
4330
  // src/commands/DeleteTableCommand.ts
4224
4331
 
4225
4332
 
@@ -4543,6 +4650,23 @@ var _GetItemCommand = class _GetItemCommand extends import_smithy_client.Command
4543
4650
  __name(_GetItemCommand, "GetItemCommand");
4544
4651
  var GetItemCommand = _GetItemCommand;
4545
4652
 
4653
+ // src/commands/GetResourcePolicyCommand.ts
4654
+
4655
+
4656
+
4657
+
4658
+ var _GetResourcePolicyCommand = class _GetResourcePolicyCommand extends import_smithy_client.Command.classBuilder().ep({
4659
+ ...commonParams
4660
+ }).m(function(Command, cs, config, o) {
4661
+ return [
4662
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
4663
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
4664
+ ];
4665
+ }).s("DynamoDB_20120810", "GetResourcePolicy", {}).n("DynamoDBClient", "GetResourcePolicyCommand").f(void 0, void 0).ser(se_GetResourcePolicyCommand).de(de_GetResourcePolicyCommand).build() {
4666
+ };
4667
+ __name(_GetResourcePolicyCommand, "GetResourcePolicyCommand");
4668
+ var GetResourcePolicyCommand = _GetResourcePolicyCommand;
4669
+
4546
4670
  // src/commands/ImportTableCommand.ts
4547
4671
 
4548
4672
 
@@ -4696,6 +4820,23 @@ var _PutItemCommand = class _PutItemCommand extends import_smithy_client.Command
4696
4820
  __name(_PutItemCommand, "PutItemCommand");
4697
4821
  var PutItemCommand = _PutItemCommand;
4698
4822
 
4823
+ // src/commands/PutResourcePolicyCommand.ts
4824
+
4825
+
4826
+
4827
+
4828
+ var _PutResourcePolicyCommand = class _PutResourcePolicyCommand extends import_smithy_client.Command.classBuilder().ep({
4829
+ ...commonParams
4830
+ }).m(function(Command, cs, config, o) {
4831
+ return [
4832
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
4833
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
4834
+ ];
4835
+ }).s("DynamoDB_20120810", "PutResourcePolicy", {}).n("DynamoDBClient", "PutResourcePolicyCommand").f(void 0, void 0).ser(se_PutResourcePolicyCommand).de(de_PutResourcePolicyCommand).build() {
4836
+ };
4837
+ __name(_PutResourcePolicyCommand, "PutResourcePolicyCommand");
4838
+ var PutResourcePolicyCommand = _PutResourcePolicyCommand;
4839
+
4699
4840
  // src/commands/QueryCommand.ts
4700
4841
 
4701
4842
 
@@ -4995,6 +5136,7 @@ var commands = {
4995
5136
  CreateTableCommand,
4996
5137
  DeleteBackupCommand,
4997
5138
  DeleteItemCommand,
5139
+ DeleteResourcePolicyCommand,
4998
5140
  DeleteTableCommand,
4999
5141
  DescribeBackupCommand,
5000
5142
  DescribeContinuousBackupsCommand,
@@ -5015,6 +5157,7 @@ var commands = {
5015
5157
  ExecuteTransactionCommand,
5016
5158
  ExportTableToPointInTimeCommand,
5017
5159
  GetItemCommand,
5160
+ GetResourcePolicyCommand,
5018
5161
  ImportTableCommand,
5019
5162
  ListBackupsCommand,
5020
5163
  ListContributorInsightsCommand,
@@ -5024,6 +5167,7 @@ var commands = {
5024
5167
  ListTablesCommand,
5025
5168
  ListTagsOfResourceCommand,
5026
5169
  PutItemCommand,
5170
+ PutResourcePolicyCommand,
5027
5171
  QueryCommand,
5028
5172
  RestoreTableFromBackupCommand,
5029
5173
  RestoreTableToPointInTimeCommand,
@@ -5130,9 +5274,6 @@ var waitUntilTableNotExists = /* @__PURE__ */ __name(async (params, input) => {
5130
5274
  const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState2);
5131
5275
  return (0, import_util_waiter.checkExceptions)(result);
5132
5276
  }, "waitUntilTableNotExists");
5133
-
5134
- // src/index.ts
5135
- var import_util_endpoints = require("@aws-sdk/util-endpoints");
5136
5277
  // Annotate the CommonJS export names for ESM import in node:
5137
5278
 
5138
5279
  0 && (module.exports = {
@@ -5149,6 +5290,7 @@ var import_util_endpoints = require("@aws-sdk/util-endpoints");
5149
5290
  CreateTableCommand,
5150
5291
  DeleteBackupCommand,
5151
5292
  DeleteItemCommand,
5293
+ DeleteResourcePolicyCommand,
5152
5294
  DeleteTableCommand,
5153
5295
  DescribeBackupCommand,
5154
5296
  DescribeContinuousBackupsCommand,
@@ -5169,6 +5311,7 @@ var import_util_endpoints = require("@aws-sdk/util-endpoints");
5169
5311
  ExecuteTransactionCommand,
5170
5312
  ExportTableToPointInTimeCommand,
5171
5313
  GetItemCommand,
5314
+ GetResourcePolicyCommand,
5172
5315
  ImportTableCommand,
5173
5316
  ListBackupsCommand,
5174
5317
  ListContributorInsightsCommand,
@@ -5178,6 +5321,7 @@ var import_util_endpoints = require("@aws-sdk/util-endpoints");
5178
5321
  ListTablesCommand,
5179
5322
  ListTagsOfResourceCommand,
5180
5323
  PutItemCommand,
5324
+ PutResourcePolicyCommand,
5181
5325
  QueryCommand,
5182
5326
  RestoreTableFromBackupCommand,
5183
5327
  RestoreTableToPointInTimeCommand,
@@ -5249,6 +5393,7 @@ var import_util_endpoints = require("@aws-sdk/util-endpoints");
5249
5393
  ResourceInUseException,
5250
5394
  ReturnValue,
5251
5395
  TransactionConflictException,
5396
+ PolicyNotFoundException,
5252
5397
  ExportFormat,
5253
5398
  ExportStatus,
5254
5399
  ExportType,
@@ -7,6 +7,7 @@ import { CreateGlobalTableCommand, } from "./commands/CreateGlobalTableCommand";
7
7
  import { CreateTableCommand } from "./commands/CreateTableCommand";
8
8
  import { DeleteBackupCommand, } from "./commands/DeleteBackupCommand";
9
9
  import { DeleteItemCommand } from "./commands/DeleteItemCommand";
10
+ import { DeleteResourcePolicyCommand, } from "./commands/DeleteResourcePolicyCommand";
10
11
  import { DeleteTableCommand } from "./commands/DeleteTableCommand";
11
12
  import { DescribeBackupCommand, } from "./commands/DescribeBackupCommand";
12
13
  import { DescribeContinuousBackupsCommand, } from "./commands/DescribeContinuousBackupsCommand";
@@ -27,6 +28,7 @@ import { ExecuteStatementCommand, } from "./commands/ExecuteStatementCommand";
27
28
  import { ExecuteTransactionCommand, } from "./commands/ExecuteTransactionCommand";
28
29
  import { ExportTableToPointInTimeCommand, } from "./commands/ExportTableToPointInTimeCommand";
29
30
  import { GetItemCommand } from "./commands/GetItemCommand";
31
+ import { GetResourcePolicyCommand, } from "./commands/GetResourcePolicyCommand";
30
32
  import { ImportTableCommand } from "./commands/ImportTableCommand";
31
33
  import { ListBackupsCommand } from "./commands/ListBackupsCommand";
32
34
  import { ListContributorInsightsCommand, } from "./commands/ListContributorInsightsCommand";
@@ -36,6 +38,7 @@ import { ListImportsCommand } from "./commands/ListImportsCommand";
36
38
  import { ListTablesCommand } from "./commands/ListTablesCommand";
37
39
  import { ListTagsOfResourceCommand, } from "./commands/ListTagsOfResourceCommand";
38
40
  import { PutItemCommand } from "./commands/PutItemCommand";
41
+ import { PutResourcePolicyCommand, } from "./commands/PutResourcePolicyCommand";
39
42
  import { QueryCommand } from "./commands/QueryCommand";
40
43
  import { RestoreTableFromBackupCommand, } from "./commands/RestoreTableFromBackupCommand";
41
44
  import { RestoreTableToPointInTimeCommand, } from "./commands/RestoreTableToPointInTimeCommand";
@@ -63,6 +66,7 @@ const commands = {
63
66
  CreateTableCommand,
64
67
  DeleteBackupCommand,
65
68
  DeleteItemCommand,
69
+ DeleteResourcePolicyCommand,
66
70
  DeleteTableCommand,
67
71
  DescribeBackupCommand,
68
72
  DescribeContinuousBackupsCommand,
@@ -83,6 +87,7 @@ const commands = {
83
87
  ExecuteTransactionCommand,
84
88
  ExportTableToPointInTimeCommand,
85
89
  GetItemCommand,
90
+ GetResourcePolicyCommand,
86
91
  ImportTableCommand,
87
92
  ListBackupsCommand,
88
93
  ListContributorInsightsCommand,
@@ -92,6 +97,7 @@ const commands = {
92
97
  ListTablesCommand,
93
98
  ListTagsOfResourceCommand,
94
99
  PutItemCommand,
100
+ PutResourcePolicyCommand,
95
101
  QueryCommand,
96
102
  RestoreTableFromBackupCommand,
97
103
  RestoreTableToPointInTimeCommand,
@@ -0,0 +1,24 @@
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_DeleteResourcePolicyCommand, se_DeleteResourcePolicyCommand } from "../protocols/Aws_json1_0";
6
+ export { $Command };
7
+ export class DeleteResourcePolicyCommand extends $Command
8
+ .classBuilder()
9
+ .ep({
10
+ ...commonParams,
11
+ })
12
+ .m(function (Command, cs, config, o) {
13
+ return [
14
+ getSerdePlugin(config, this.serialize, this.deserialize),
15
+ getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
16
+ ];
17
+ })
18
+ .s("DynamoDB_20120810", "DeleteResourcePolicy", {})
19
+ .n("DynamoDBClient", "DeleteResourcePolicyCommand")
20
+ .f(void 0, void 0)
21
+ .ser(se_DeleteResourcePolicyCommand)
22
+ .de(de_DeleteResourcePolicyCommand)
23
+ .build() {
24
+ }
@@ -0,0 +1,24 @@
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_GetResourcePolicyCommand, se_GetResourcePolicyCommand } from "../protocols/Aws_json1_0";
6
+ export { $Command };
7
+ export class GetResourcePolicyCommand extends $Command
8
+ .classBuilder()
9
+ .ep({
10
+ ...commonParams,
11
+ })
12
+ .m(function (Command, cs, config, o) {
13
+ return [
14
+ getSerdePlugin(config, this.serialize, this.deserialize),
15
+ getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
16
+ ];
17
+ })
18
+ .s("DynamoDB_20120810", "GetResourcePolicy", {})
19
+ .n("DynamoDBClient", "GetResourcePolicyCommand")
20
+ .f(void 0, void 0)
21
+ .ser(se_GetResourcePolicyCommand)
22
+ .de(de_GetResourcePolicyCommand)
23
+ .build() {
24
+ }
@@ -0,0 +1,24 @@
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_PutResourcePolicyCommand, se_PutResourcePolicyCommand } from "../protocols/Aws_json1_0";
6
+ export { $Command };
7
+ export class PutResourcePolicyCommand extends $Command
8
+ .classBuilder()
9
+ .ep({
10
+ ...commonParams,
11
+ })
12
+ .m(function (Command, cs, config, o) {
13
+ return [
14
+ getSerdePlugin(config, this.serialize, this.deserialize),
15
+ getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
16
+ ];
17
+ })
18
+ .s("DynamoDB_20120810", "PutResourcePolicy", {})
19
+ .n("DynamoDBClient", "PutResourcePolicyCommand")
20
+ .f(void 0, void 0)
21
+ .ser(se_PutResourcePolicyCommand)
22
+ .de(de_PutResourcePolicyCommand)
23
+ .build() {
24
+ }
@@ -6,6 +6,7 @@ export * from "./CreateGlobalTableCommand";
6
6
  export * from "./CreateTableCommand";
7
7
  export * from "./DeleteBackupCommand";
8
8
  export * from "./DeleteItemCommand";
9
+ export * from "./DeleteResourcePolicyCommand";
9
10
  export * from "./DeleteTableCommand";
10
11
  export * from "./DescribeBackupCommand";
11
12
  export * from "./DescribeContinuousBackupsCommand";
@@ -26,6 +27,7 @@ export * from "./ExecuteStatementCommand";
26
27
  export * from "./ExecuteTransactionCommand";
27
28
  export * from "./ExportTableToPointInTimeCommand";
28
29
  export * from "./GetItemCommand";
30
+ export * from "./GetResourcePolicyCommand";
29
31
  export * from "./ImportTableCommand";
30
32
  export * from "./ListBackupsCommand";
31
33
  export * from "./ListContributorInsightsCommand";
@@ -35,6 +37,7 @@ export * from "./ListImportsCommand";
35
37
  export * from "./ListTablesCommand";
36
38
  export * from "./ListTagsOfResourceCommand";
37
39
  export * from "./PutItemCommand";
40
+ export * from "./PutResourcePolicyCommand";
38
41
  export * from "./QueryCommand";
39
42
  export * from "./RestoreTableFromBackupCommand";
40
43
  export * from "./RestoreTableToPointInTimeCommand";
@@ -1,4 +1,5 @@
1
- import { resolveEndpoint } from "@smithy/util-endpoints";
1
+ import { awsEndpointFunctions } from "@aws-sdk/util-endpoints";
2
+ import { customEndpointFunctions, resolveEndpoint } from "@smithy/util-endpoints";
2
3
  import { ruleSet } from "./ruleset";
3
4
  export const defaultEndpointResolver = (endpointParams, context = {}) => {
4
5
  return resolveEndpoint(ruleSet, {
@@ -6,3 +7,4 @@ export const defaultEndpointResolver = (endpointParams, context = {}) => {
6
7
  logger: context.logger,
7
8
  });
8
9
  };
10
+ customEndpointFunctions.aws = awsEndpointFunctions;
package/dist-es/index.js CHANGED
@@ -4,5 +4,4 @@ export * from "./commands";
4
4
  export * from "./pagination";
5
5
  export * from "./waiters";
6
6
  export * from "./models";
7
- import "@aws-sdk/util-endpoints";
8
7
  export { DynamoDBServiceException } from "./models/DynamoDBServiceException";
@@ -351,6 +351,18 @@ export class TransactionConflictException extends __BaseException {
351
351
  Object.setPrototypeOf(this, TransactionConflictException.prototype);
352
352
  }
353
353
  }
354
+ export class PolicyNotFoundException extends __BaseException {
355
+ constructor(opts) {
356
+ super({
357
+ name: "PolicyNotFoundException",
358
+ $fault: "client",
359
+ ...opts,
360
+ });
361
+ this.name = "PolicyNotFoundException";
362
+ this.$fault = "client";
363
+ Object.setPrototypeOf(this, PolicyNotFoundException.prototype);
364
+ }
365
+ }
354
366
  export const ExportFormat = {
355
367
  DYNAMODB_JSON: "DYNAMODB_JSON",
356
368
  ION: "ION",