@aws-sdk/client-dataexchange 3.669.0 → 3.674.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 (69) hide show
  1. package/README.md +71 -13
  2. package/dist-cjs/index.js +467 -40
  3. package/dist-cjs/runtimeConfig.browser.js +1 -1
  4. package/dist-cjs/runtimeConfig.js +1 -1
  5. package/dist-es/DataExchange.js +14 -0
  6. package/dist-es/commands/AcceptDataGrantCommand.js +22 -0
  7. package/dist-es/commands/CreateDataGrantCommand.js +22 -0
  8. package/dist-es/commands/DeleteDataGrantCommand.js +22 -0
  9. package/dist-es/commands/GetDataGrantCommand.js +22 -0
  10. package/dist-es/commands/GetReceivedDataGrantCommand.js +22 -0
  11. package/dist-es/commands/ListDataGrantsCommand.js +22 -0
  12. package/dist-es/commands/ListReceivedDataGrantsCommand.js +22 -0
  13. package/dist-es/commands/index.js +7 -0
  14. package/dist-es/models/models_0.js +44 -29
  15. package/dist-es/pagination/ListDataGrantsPaginator.js +4 -0
  16. package/dist-es/pagination/ListReceivedDataGrantsPaginator.js +4 -0
  17. package/dist-es/pagination/index.js +2 -0
  18. package/dist-es/protocols/Aws_restJson1.js +280 -3
  19. package/dist-es/runtimeConfig.browser.js +2 -2
  20. package/dist-es/runtimeConfig.js +2 -2
  21. package/dist-types/DataExchange.d.ts +66 -13
  22. package/dist-types/DataExchangeClient.d.ts +24 -15
  23. package/dist-types/commands/AcceptDataGrantCommand.d.ts +102 -0
  24. package/dist-types/commands/CancelJobCommand.d.ts +4 -2
  25. package/dist-types/commands/CreateDataGrantCommand.d.ts +113 -0
  26. package/dist-types/commands/CreateDataSetCommand.d.ts +1 -0
  27. package/dist-types/commands/CreateJobCommand.d.ts +2 -1
  28. package/dist-types/commands/DeleteAssetCommand.d.ts +2 -1
  29. package/dist-types/commands/DeleteDataGrantCommand.d.ts +84 -0
  30. package/dist-types/commands/DeleteDataSetCommand.d.ts +2 -1
  31. package/dist-types/commands/DeleteRevisionCommand.d.ts +2 -1
  32. package/dist-types/commands/GetDataGrantCommand.d.ts +102 -0
  33. package/dist-types/commands/GetDataSetCommand.d.ts +1 -0
  34. package/dist-types/commands/GetReceivedDataGrantCommand.d.ts +98 -0
  35. package/dist-types/commands/ListDataGrantsCommand.d.ts +103 -0
  36. package/dist-types/commands/ListDataSetRevisionsCommand.d.ts +2 -1
  37. package/dist-types/commands/ListDataSetsCommand.d.ts +3 -1
  38. package/dist-types/commands/ListReceivedDataGrantsCommand.d.ts +105 -0
  39. package/dist-types/commands/ListRevisionAssetsCommand.d.ts +2 -1
  40. package/dist-types/commands/RevokeRevisionCommand.d.ts +2 -1
  41. package/dist-types/commands/SendApiAssetCommand.d.ts +2 -1
  42. package/dist-types/commands/SendDataSetNotificationCommand.d.ts +2 -1
  43. package/dist-types/commands/StartJobCommand.d.ts +2 -1
  44. package/dist-types/commands/UpdateAssetCommand.d.ts +2 -1
  45. package/dist-types/commands/UpdateDataSetCommand.d.ts +1 -0
  46. package/dist-types/commands/UpdateRevisionCommand.d.ts +2 -1
  47. package/dist-types/commands/index.d.ts +7 -0
  48. package/dist-types/index.d.ts +15 -13
  49. package/dist-types/models/models_0.d.ts +1016 -282
  50. package/dist-types/pagination/ListDataGrantsPaginator.d.ts +7 -0
  51. package/dist-types/pagination/ListReceivedDataGrantsPaginator.d.ts +7 -0
  52. package/dist-types/pagination/index.d.ts +2 -0
  53. package/dist-types/protocols/Aws_restJson1.d.ts +63 -0
  54. package/dist-types/ts3.4/DataExchange.d.ts +121 -0
  55. package/dist-types/ts3.4/DataExchangeClient.d.ts +42 -0
  56. package/dist-types/ts3.4/commands/AcceptDataGrantCommand.d.ts +50 -0
  57. package/dist-types/ts3.4/commands/CreateDataGrantCommand.d.ts +50 -0
  58. package/dist-types/ts3.4/commands/DeleteDataGrantCommand.d.ts +45 -0
  59. package/dist-types/ts3.4/commands/GetDataGrantCommand.d.ts +47 -0
  60. package/dist-types/ts3.4/commands/GetReceivedDataGrantCommand.d.ts +51 -0
  61. package/dist-types/ts3.4/commands/ListDataGrantsCommand.d.ts +50 -0
  62. package/dist-types/ts3.4/commands/ListReceivedDataGrantsCommand.d.ts +51 -0
  63. package/dist-types/ts3.4/commands/index.d.ts +7 -0
  64. package/dist-types/ts3.4/models/models_0.d.ts +229 -78
  65. package/dist-types/ts3.4/pagination/ListDataGrantsPaginator.d.ts +11 -0
  66. package/dist-types/ts3.4/pagination/ListReceivedDataGrantsPaginator.d.ts +11 -0
  67. package/dist-types/ts3.4/pagination/index.d.ts +2 -0
  68. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +84 -0
  69. package/package.json +6 -6
@@ -5,6 +5,15 @@ import { _json, collectBody, convertMap, decorateServiceException as __decorateS
5
5
  import { v4 as generateIdempotencyToken } from "uuid";
6
6
  import { DataExchangeServiceException as __BaseException } from "../models/DataExchangeServiceException";
7
7
  import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceLimitExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
8
+ export const se_AcceptDataGrantCommand = async (input, context) => {
9
+ const b = rb(input, context);
10
+ const headers = {};
11
+ b.bp("/v1/data-grants/{DataGrantArn}/accept");
12
+ b.p("DataGrantArn", () => input.DataGrantArn, "{DataGrantArn}", false);
13
+ let body;
14
+ b.m("POST").h(headers).b(body);
15
+ return b.build();
16
+ };
8
17
  export const se_CancelJobCommand = async (input, context) => {
9
18
  const b = rb(input, context);
10
19
  const headers = {};
@@ -14,6 +23,25 @@ export const se_CancelJobCommand = async (input, context) => {
14
23
  b.m("DELETE").h(headers).b(body);
15
24
  return b.build();
16
25
  };
26
+ export const se_CreateDataGrantCommand = async (input, context) => {
27
+ const b = rb(input, context);
28
+ const headers = {
29
+ "content-type": "application/json",
30
+ };
31
+ b.bp("/v1/data-grants");
32
+ let body;
33
+ body = JSON.stringify(take(input, {
34
+ Description: [],
35
+ EndsAt: (_) => __serializeDateTime(_),
36
+ GrantDistributionScope: [],
37
+ Name: [],
38
+ ReceiverPrincipal: [],
39
+ SourceDataSetId: [],
40
+ Tags: (_) => _json(_),
41
+ }));
42
+ b.m("POST").h(headers).b(body);
43
+ return b.build();
44
+ };
17
45
  export const se_CreateDataSetCommand = async (input, context) => {
18
46
  const b = rb(input, context);
19
47
  const headers = {
@@ -84,6 +112,15 @@ export const se_DeleteAssetCommand = async (input, context) => {
84
112
  b.m("DELETE").h(headers).b(body);
85
113
  return b.build();
86
114
  };
115
+ export const se_DeleteDataGrantCommand = async (input, context) => {
116
+ const b = rb(input, context);
117
+ const headers = {};
118
+ b.bp("/v1/data-grants/{DataGrantId}");
119
+ b.p("DataGrantId", () => input.DataGrantId, "{DataGrantId}", false);
120
+ let body;
121
+ b.m("DELETE").h(headers).b(body);
122
+ return b.build();
123
+ };
87
124
  export const se_DeleteDataSetCommand = async (input, context) => {
88
125
  const b = rb(input, context);
89
126
  const headers = {};
@@ -123,6 +160,15 @@ export const se_GetAssetCommand = async (input, context) => {
123
160
  b.m("GET").h(headers).b(body);
124
161
  return b.build();
125
162
  };
163
+ export const se_GetDataGrantCommand = async (input, context) => {
164
+ const b = rb(input, context);
165
+ const headers = {};
166
+ b.bp("/v1/data-grants/{DataGrantId}");
167
+ b.p("DataGrantId", () => input.DataGrantId, "{DataGrantId}", false);
168
+ let body;
169
+ b.m("GET").h(headers).b(body);
170
+ return b.build();
171
+ };
126
172
  export const se_GetDataSetCommand = async (input, context) => {
127
173
  const b = rb(input, context);
128
174
  const headers = {};
@@ -150,6 +196,15 @@ export const se_GetJobCommand = async (input, context) => {
150
196
  b.m("GET").h(headers).b(body);
151
197
  return b.build();
152
198
  };
199
+ export const se_GetReceivedDataGrantCommand = async (input, context) => {
200
+ const b = rb(input, context);
201
+ const headers = {};
202
+ b.bp("/v1/received-data-grants/{DataGrantArn}");
203
+ b.p("DataGrantArn", () => input.DataGrantArn, "{DataGrantArn}", false);
204
+ let body;
205
+ b.m("GET").h(headers).b(body);
206
+ return b.build();
207
+ };
153
208
  export const se_GetRevisionCommand = async (input, context) => {
154
209
  const b = rb(input, context);
155
210
  const headers = {};
@@ -160,6 +215,18 @@ export const se_GetRevisionCommand = async (input, context) => {
160
215
  b.m("GET").h(headers).b(body);
161
216
  return b.build();
162
217
  };
218
+ export const se_ListDataGrantsCommand = async (input, context) => {
219
+ const b = rb(input, context);
220
+ const headers = {};
221
+ b.bp("/v1/data-grants");
222
+ const query = map({
223
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
224
+ [_nT]: [, input[_NT]],
225
+ });
226
+ let body;
227
+ b.m("GET").h(headers).q(query).b(body);
228
+ return b.build();
229
+ };
163
230
  export const se_ListDataSetRevisionsCommand = async (input, context) => {
164
231
  const b = rb(input, context);
165
232
  const headers = {};
@@ -213,6 +280,19 @@ export const se_ListJobsCommand = async (input, context) => {
213
280
  b.m("GET").h(headers).q(query).b(body);
214
281
  return b.build();
215
282
  };
283
+ export const se_ListReceivedDataGrantsCommand = async (input, context) => {
284
+ const b = rb(input, context);
285
+ const headers = {};
286
+ b.bp("/v1/received-data-grants");
287
+ const query = map({
288
+ [_mR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
289
+ [_nT]: [, input[_NT]],
290
+ [_aS]: [() => input.AcceptanceState !== void 0, () => input[_AS] || []],
291
+ });
292
+ let body;
293
+ b.m("GET").h(headers).q(query).b(body);
294
+ return b.build();
295
+ };
216
296
  export const se_ListRevisionAssetsCommand = async (input, context) => {
217
297
  const b = rb(input, context);
218
298
  const headers = {};
@@ -399,6 +479,32 @@ export const se_UpdateRevisionCommand = async (input, context) => {
399
479
  b.m("PATCH").h(headers).b(body);
400
480
  return b.build();
401
481
  };
482
+ export const de_AcceptDataGrantCommand = async (output, context) => {
483
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
484
+ return de_CommandError(output, context);
485
+ }
486
+ const contents = map({
487
+ $metadata: deserializeMetadata(output),
488
+ });
489
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
490
+ const doc = take(data, {
491
+ AcceptanceState: __expectString,
492
+ AcceptedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
493
+ Arn: __expectString,
494
+ CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
495
+ DataSetId: __expectString,
496
+ Description: __expectString,
497
+ EndsAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
498
+ GrantDistributionScope: __expectString,
499
+ Id: __expectString,
500
+ Name: __expectString,
501
+ ReceiverPrincipal: __expectString,
502
+ SenderPrincipal: __expectString,
503
+ UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
504
+ });
505
+ Object.assign(contents, doc);
506
+ return contents;
507
+ };
402
508
  export const de_CancelJobCommand = async (output, context) => {
403
509
  if (output.statusCode !== 204 && output.statusCode >= 300) {
404
510
  return de_CommandError(output, context);
@@ -409,6 +515,34 @@ export const de_CancelJobCommand = async (output, context) => {
409
515
  await collectBody(output.body, context);
410
516
  return contents;
411
517
  };
518
+ export const de_CreateDataGrantCommand = async (output, context) => {
519
+ if (output.statusCode !== 201 && output.statusCode >= 300) {
520
+ return de_CommandError(output, context);
521
+ }
522
+ const contents = map({
523
+ $metadata: deserializeMetadata(output),
524
+ });
525
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
526
+ const doc = take(data, {
527
+ AcceptanceState: __expectString,
528
+ AcceptedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
529
+ Arn: __expectString,
530
+ CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
531
+ DataSetId: __expectString,
532
+ Description: __expectString,
533
+ EndsAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
534
+ GrantDistributionScope: __expectString,
535
+ Id: __expectString,
536
+ Name: __expectString,
537
+ ReceiverPrincipal: __expectString,
538
+ SenderPrincipal: __expectString,
539
+ SourceDataSetId: __expectString,
540
+ Tags: _json,
541
+ UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
542
+ });
543
+ Object.assign(contents, doc);
544
+ return contents;
545
+ };
412
546
  export const de_CreateDataSetCommand = async (output, context) => {
413
547
  if (output.statusCode !== 201 && output.statusCode >= 300) {
414
548
  return de_CommandError(output, context);
@@ -508,6 +642,16 @@ export const de_DeleteAssetCommand = async (output, context) => {
508
642
  await collectBody(output.body, context);
509
643
  return contents;
510
644
  };
645
+ export const de_DeleteDataGrantCommand = async (output, context) => {
646
+ if (output.statusCode !== 204 && output.statusCode >= 300) {
647
+ return de_CommandError(output, context);
648
+ }
649
+ const contents = map({
650
+ $metadata: deserializeMetadata(output),
651
+ });
652
+ await collectBody(output.body, context);
653
+ return contents;
654
+ };
511
655
  export const de_DeleteDataSetCommand = async (output, context) => {
512
656
  if (output.statusCode !== 204 && output.statusCode >= 300) {
513
657
  return de_CommandError(output, context);
@@ -561,6 +705,34 @@ export const de_GetAssetCommand = async (output, context) => {
561
705
  Object.assign(contents, doc);
562
706
  return contents;
563
707
  };
708
+ export const de_GetDataGrantCommand = async (output, context) => {
709
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
710
+ return de_CommandError(output, context);
711
+ }
712
+ const contents = map({
713
+ $metadata: deserializeMetadata(output),
714
+ });
715
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
716
+ const doc = take(data, {
717
+ AcceptanceState: __expectString,
718
+ AcceptedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
719
+ Arn: __expectString,
720
+ CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
721
+ DataSetId: __expectString,
722
+ Description: __expectString,
723
+ EndsAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
724
+ GrantDistributionScope: __expectString,
725
+ Id: __expectString,
726
+ Name: __expectString,
727
+ ReceiverPrincipal: __expectString,
728
+ SenderPrincipal: __expectString,
729
+ SourceDataSetId: __expectString,
730
+ Tags: _json,
731
+ UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
732
+ });
733
+ Object.assign(contents, doc);
734
+ return contents;
735
+ };
564
736
  export const de_GetDataSetCommand = async (output, context) => {
565
737
  if (output.statusCode !== 200 && output.statusCode >= 300) {
566
738
  return de_CommandError(output, context);
@@ -625,6 +797,32 @@ export const de_GetJobCommand = async (output, context) => {
625
797
  Object.assign(contents, doc);
626
798
  return contents;
627
799
  };
800
+ export const de_GetReceivedDataGrantCommand = async (output, context) => {
801
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
802
+ return de_CommandError(output, context);
803
+ }
804
+ const contents = map({
805
+ $metadata: deserializeMetadata(output),
806
+ });
807
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
808
+ const doc = take(data, {
809
+ AcceptanceState: __expectString,
810
+ AcceptedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
811
+ Arn: __expectString,
812
+ CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
813
+ DataSetId: __expectString,
814
+ Description: __expectString,
815
+ EndsAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
816
+ GrantDistributionScope: __expectString,
817
+ Id: __expectString,
818
+ Name: __expectString,
819
+ ReceiverPrincipal: __expectString,
820
+ SenderPrincipal: __expectString,
821
+ UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
822
+ });
823
+ Object.assign(contents, doc);
824
+ return contents;
825
+ };
628
826
  export const de_GetRevisionCommand = async (output, context) => {
629
827
  if (output.statusCode !== 200 && output.statusCode >= 300) {
630
828
  return de_CommandError(output, context);
@@ -650,6 +848,21 @@ export const de_GetRevisionCommand = async (output, context) => {
650
848
  Object.assign(contents, doc);
651
849
  return contents;
652
850
  };
851
+ export const de_ListDataGrantsCommand = async (output, context) => {
852
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
853
+ return de_CommandError(output, context);
854
+ }
855
+ const contents = map({
856
+ $metadata: deserializeMetadata(output),
857
+ });
858
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
859
+ const doc = take(data, {
860
+ DataGrantSummaries: (_) => de_ListOfDataGrantSummaryEntry(_, context),
861
+ NextToken: __expectString,
862
+ });
863
+ Object.assign(contents, doc);
864
+ return contents;
865
+ };
653
866
  export const de_ListDataSetRevisionsCommand = async (output, context) => {
654
867
  if (output.statusCode !== 200 && output.statusCode >= 300) {
655
868
  return de_CommandError(output, context);
@@ -710,6 +923,21 @@ export const de_ListJobsCommand = async (output, context) => {
710
923
  Object.assign(contents, doc);
711
924
  return contents;
712
925
  };
926
+ export const de_ListReceivedDataGrantsCommand = async (output, context) => {
927
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
928
+ return de_CommandError(output, context);
929
+ }
930
+ const contents = map({
931
+ $metadata: deserializeMetadata(output),
932
+ });
933
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
934
+ const doc = take(data, {
935
+ DataGrantSummaries: (_) => de_ListOfReceivedDataGrantSummariesEntry(_, context),
936
+ NextToken: __expectString,
937
+ });
938
+ Object.assign(contents, doc);
939
+ return contents;
940
+ };
713
941
  export const de_ListRevisionAssetsCommand = async (output, context) => {
714
942
  if (output.statusCode !== 200 && output.statusCode >= 300) {
715
943
  return de_CommandError(output, context);
@@ -919,6 +1147,9 @@ const de_CommandError = async (output, context) => {
919
1147
  };
920
1148
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
921
1149
  switch (errorCode) {
1150
+ case "AccessDeniedException":
1151
+ case "com.amazonaws.dataexchange#AccessDeniedException":
1152
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
922
1153
  case "ConflictException":
923
1154
  case "com.amazonaws.dataexchange#ConflictException":
924
1155
  throw await de_ConflictExceptionRes(parsedOutput, context);
@@ -934,9 +1165,6 @@ const de_CommandError = async (output, context) => {
934
1165
  case "ValidationException":
935
1166
  case "com.amazonaws.dataexchange#ValidationException":
936
1167
  throw await de_ValidationExceptionRes(parsedOutput, context);
937
- case "AccessDeniedException":
938
- case "com.amazonaws.dataexchange#AccessDeniedException":
939
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
940
1168
  case "ServiceLimitExceededException":
941
1169
  case "com.amazonaws.dataexchange#ServiceLimitExceededException":
942
1170
  throw await de_ServiceLimitExceededExceptionRes(parsedOutput, context);
@@ -1107,6 +1335,22 @@ const de_AssetEntry = (output, context) => {
1107
1335
  UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1108
1336
  });
1109
1337
  };
1338
+ const de_DataGrantSummaryEntry = (output, context) => {
1339
+ return take(output, {
1340
+ AcceptanceState: __expectString,
1341
+ AcceptedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1342
+ Arn: __expectString,
1343
+ CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1344
+ DataSetId: __expectString,
1345
+ EndsAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1346
+ Id: __expectString,
1347
+ Name: __expectString,
1348
+ ReceiverPrincipal: __expectString,
1349
+ SenderPrincipal: __expectString,
1350
+ SourceDataSetId: __expectString,
1351
+ UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1352
+ });
1353
+ };
1110
1354
  const de_DataSetEntry = (output, context) => {
1111
1355
  return take(output, {
1112
1356
  Arn: __expectString,
@@ -1196,6 +1440,14 @@ const de_ListOfAssetEntry = (output, context) => {
1196
1440
  });
1197
1441
  return retVal;
1198
1442
  };
1443
+ const de_ListOfDataGrantSummaryEntry = (output, context) => {
1444
+ const retVal = (output || [])
1445
+ .filter((e) => e != null)
1446
+ .map((entry) => {
1447
+ return de_DataGrantSummaryEntry(entry, context);
1448
+ });
1449
+ return retVal;
1450
+ };
1199
1451
  const de_ListOfDataSetEntry = (output, context) => {
1200
1452
  const retVal = (output || [])
1201
1453
  .filter((e) => e != null)
@@ -1228,6 +1480,14 @@ const de_ListOfJobError = (output, context) => {
1228
1480
  });
1229
1481
  return retVal;
1230
1482
  };
1483
+ const de_ListOfReceivedDataGrantSummariesEntry = (output, context) => {
1484
+ const retVal = (output || [])
1485
+ .filter((e) => e != null)
1486
+ .map((entry) => {
1487
+ return de_ReceivedDataGrantSummariesEntry(entry, context);
1488
+ });
1489
+ return retVal;
1490
+ };
1231
1491
  const de_ListOfRevisionEntry = (output, context) => {
1232
1492
  const retVal = (output || [])
1233
1493
  .filter((e) => e != null)
@@ -1236,6 +1496,21 @@ const de_ListOfRevisionEntry = (output, context) => {
1236
1496
  });
1237
1497
  return retVal;
1238
1498
  };
1499
+ const de_ReceivedDataGrantSummariesEntry = (output, context) => {
1500
+ return take(output, {
1501
+ AcceptanceState: __expectString,
1502
+ AcceptedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1503
+ Arn: __expectString,
1504
+ CreatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1505
+ DataSetId: __expectString,
1506
+ EndsAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1507
+ Id: __expectString,
1508
+ Name: __expectString,
1509
+ ReceiverPrincipal: __expectString,
1510
+ SenderPrincipal: __expectString,
1511
+ UpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1512
+ });
1513
+ };
1239
1514
  const de_ResponseDetails = (output, context) => {
1240
1515
  return take(output, {
1241
1516
  CreateS3DataAccessFromS3Bucket: _json,
@@ -1277,6 +1552,7 @@ const deserializeMetadata = (output) => ({
1277
1552
  });
1278
1553
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1279
1554
  const _AI = "AssetId";
1555
+ const _AS = "AcceptanceState";
1280
1556
  const _DSI = "DataSetId";
1281
1557
  const _ESI = "EventSourceId";
1282
1558
  const _M = "Method";
@@ -1286,6 +1562,7 @@ const _O = "Origin";
1286
1562
  const _P = "Path";
1287
1563
  const _RI = "RevisionId";
1288
1564
  const _TK = "TagKeys";
1565
+ const _aS = "acceptanceState";
1289
1566
  const _dSI = "dataSetId";
1290
1567
  const _eSI = "eventSourceId";
1291
1568
  const _mR = "maxResults";
@@ -1,6 +1,6 @@
1
1
  import packageInfo from "../package.json";
2
2
  import { Sha256 } from "@aws-crypto/sha256-browser";
3
- import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
3
+ import { createDefaultUserAgentProvider } from "@aws-sdk/util-user-agent-browser";
4
4
  import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@smithy/config-resolver";
5
5
  import { FetchHttpHandler as RequestHandler, streamCollector } from "@smithy/fetch-http-handler";
6
6
  import { invalidProvider } from "@smithy/invalid-dependency";
@@ -21,7 +21,7 @@ export const getRuntimeConfig = (config) => {
21
21
  bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
22
22
  credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
23
23
  defaultUserAgentProvider: config?.defaultUserAgentProvider ??
24
- defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
24
+ createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
25
25
  maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
26
26
  region: config?.region ?? invalidProvider("Region is missing"),
27
27
  requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
@@ -1,7 +1,7 @@
1
1
  import packageInfo from "../package.json";
2
2
  import { emitWarningIfUnsupportedVersion as awsCheckVersion } from "@aws-sdk/core";
3
3
  import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
4
- import { NODE_APP_ID_CONFIG_OPTIONS, defaultUserAgent } from "@aws-sdk/util-user-agent-node";
4
+ import { NODE_APP_ID_CONFIG_OPTIONS, createDefaultUserAgentProvider } from "@aws-sdk/util-user-agent-node";
5
5
  import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@smithy/config-resolver";
6
6
  import { Hash } from "@smithy/hash-node";
7
7
  import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@smithy/middleware-retry";
@@ -27,7 +27,7 @@ export const getRuntimeConfig = (config) => {
27
27
  bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
28
28
  credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
29
29
  defaultUserAgentProvider: config?.defaultUserAgentProvider ??
30
- defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
30
+ createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
31
31
  maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
32
32
  region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
33
33
  requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
@@ -1,22 +1,29 @@
1
1
  import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
2
+ import { AcceptDataGrantCommandInput, AcceptDataGrantCommandOutput } from "./commands/AcceptDataGrantCommand";
2
3
  import { CancelJobCommandInput, CancelJobCommandOutput } from "./commands/CancelJobCommand";
4
+ import { CreateDataGrantCommandInput, CreateDataGrantCommandOutput } from "./commands/CreateDataGrantCommand";
3
5
  import { CreateDataSetCommandInput, CreateDataSetCommandOutput } from "./commands/CreateDataSetCommand";
4
6
  import { CreateEventActionCommandInput, CreateEventActionCommandOutput } from "./commands/CreateEventActionCommand";
5
7
  import { CreateJobCommandInput, CreateJobCommandOutput } from "./commands/CreateJobCommand";
6
8
  import { CreateRevisionCommandInput, CreateRevisionCommandOutput } from "./commands/CreateRevisionCommand";
7
9
  import { DeleteAssetCommandInput, DeleteAssetCommandOutput } from "./commands/DeleteAssetCommand";
10
+ import { DeleteDataGrantCommandInput, DeleteDataGrantCommandOutput } from "./commands/DeleteDataGrantCommand";
8
11
  import { DeleteDataSetCommandInput, DeleteDataSetCommandOutput } from "./commands/DeleteDataSetCommand";
9
12
  import { DeleteEventActionCommandInput, DeleteEventActionCommandOutput } from "./commands/DeleteEventActionCommand";
10
13
  import { DeleteRevisionCommandInput, DeleteRevisionCommandOutput } from "./commands/DeleteRevisionCommand";
11
14
  import { GetAssetCommandInput, GetAssetCommandOutput } from "./commands/GetAssetCommand";
15
+ import { GetDataGrantCommandInput, GetDataGrantCommandOutput } from "./commands/GetDataGrantCommand";
12
16
  import { GetDataSetCommandInput, GetDataSetCommandOutput } from "./commands/GetDataSetCommand";
13
17
  import { GetEventActionCommandInput, GetEventActionCommandOutput } from "./commands/GetEventActionCommand";
14
18
  import { GetJobCommandInput, GetJobCommandOutput } from "./commands/GetJobCommand";
19
+ import { GetReceivedDataGrantCommandInput, GetReceivedDataGrantCommandOutput } from "./commands/GetReceivedDataGrantCommand";
15
20
  import { GetRevisionCommandInput, GetRevisionCommandOutput } from "./commands/GetRevisionCommand";
21
+ import { ListDataGrantsCommandInput, ListDataGrantsCommandOutput } from "./commands/ListDataGrantsCommand";
16
22
  import { ListDataSetRevisionsCommandInput, ListDataSetRevisionsCommandOutput } from "./commands/ListDataSetRevisionsCommand";
17
23
  import { ListDataSetsCommandInput, ListDataSetsCommandOutput } from "./commands/ListDataSetsCommand";
18
24
  import { ListEventActionsCommandInput, ListEventActionsCommandOutput } from "./commands/ListEventActionsCommand";
19
25
  import { ListJobsCommandInput, ListJobsCommandOutput } from "./commands/ListJobsCommand";
26
+ import { ListReceivedDataGrantsCommandInput, ListReceivedDataGrantsCommandOutput } from "./commands/ListReceivedDataGrantsCommand";
20
27
  import { ListRevisionAssetsCommandInput, ListRevisionAssetsCommandOutput } from "./commands/ListRevisionAssetsCommand";
21
28
  import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
22
29
  import { RevokeRevisionCommandInput, RevokeRevisionCommandOutput } from "./commands/RevokeRevisionCommand";
@@ -31,12 +38,24 @@ import { UpdateEventActionCommandInput, UpdateEventActionCommandOutput } from ".
31
38
  import { UpdateRevisionCommandInput, UpdateRevisionCommandOutput } from "./commands/UpdateRevisionCommand";
32
39
  import { DataExchangeClient } from "./DataExchangeClient";
33
40
  export interface DataExchange {
41
+ /**
42
+ * @see {@link AcceptDataGrantCommand}
43
+ */
44
+ acceptDataGrant(args: AcceptDataGrantCommandInput, options?: __HttpHandlerOptions): Promise<AcceptDataGrantCommandOutput>;
45
+ acceptDataGrant(args: AcceptDataGrantCommandInput, cb: (err: any, data?: AcceptDataGrantCommandOutput) => void): void;
46
+ acceptDataGrant(args: AcceptDataGrantCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: AcceptDataGrantCommandOutput) => void): void;
34
47
  /**
35
48
  * @see {@link CancelJobCommand}
36
49
  */
37
50
  cancelJob(args: CancelJobCommandInput, options?: __HttpHandlerOptions): Promise<CancelJobCommandOutput>;
38
51
  cancelJob(args: CancelJobCommandInput, cb: (err: any, data?: CancelJobCommandOutput) => void): void;
39
52
  cancelJob(args: CancelJobCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CancelJobCommandOutput) => void): void;
53
+ /**
54
+ * @see {@link CreateDataGrantCommand}
55
+ */
56
+ createDataGrant(args: CreateDataGrantCommandInput, options?: __HttpHandlerOptions): Promise<CreateDataGrantCommandOutput>;
57
+ createDataGrant(args: CreateDataGrantCommandInput, cb: (err: any, data?: CreateDataGrantCommandOutput) => void): void;
58
+ createDataGrant(args: CreateDataGrantCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateDataGrantCommandOutput) => void): void;
40
59
  /**
41
60
  * @see {@link CreateDataSetCommand}
42
61
  */
@@ -67,6 +86,12 @@ export interface DataExchange {
67
86
  deleteAsset(args: DeleteAssetCommandInput, options?: __HttpHandlerOptions): Promise<DeleteAssetCommandOutput>;
68
87
  deleteAsset(args: DeleteAssetCommandInput, cb: (err: any, data?: DeleteAssetCommandOutput) => void): void;
69
88
  deleteAsset(args: DeleteAssetCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteAssetCommandOutput) => void): void;
89
+ /**
90
+ * @see {@link DeleteDataGrantCommand}
91
+ */
92
+ deleteDataGrant(args: DeleteDataGrantCommandInput, options?: __HttpHandlerOptions): Promise<DeleteDataGrantCommandOutput>;
93
+ deleteDataGrant(args: DeleteDataGrantCommandInput, cb: (err: any, data?: DeleteDataGrantCommandOutput) => void): void;
94
+ deleteDataGrant(args: DeleteDataGrantCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteDataGrantCommandOutput) => void): void;
70
95
  /**
71
96
  * @see {@link DeleteDataSetCommand}
72
97
  */
@@ -91,6 +116,12 @@ export interface DataExchange {
91
116
  getAsset(args: GetAssetCommandInput, options?: __HttpHandlerOptions): Promise<GetAssetCommandOutput>;
92
117
  getAsset(args: GetAssetCommandInput, cb: (err: any, data?: GetAssetCommandOutput) => void): void;
93
118
  getAsset(args: GetAssetCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetAssetCommandOutput) => void): void;
119
+ /**
120
+ * @see {@link GetDataGrantCommand}
121
+ */
122
+ getDataGrant(args: GetDataGrantCommandInput, options?: __HttpHandlerOptions): Promise<GetDataGrantCommandOutput>;
123
+ getDataGrant(args: GetDataGrantCommandInput, cb: (err: any, data?: GetDataGrantCommandOutput) => void): void;
124
+ getDataGrant(args: GetDataGrantCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetDataGrantCommandOutput) => void): void;
94
125
  /**
95
126
  * @see {@link GetDataSetCommand}
96
127
  */
@@ -109,12 +140,25 @@ export interface DataExchange {
109
140
  getJob(args: GetJobCommandInput, options?: __HttpHandlerOptions): Promise<GetJobCommandOutput>;
110
141
  getJob(args: GetJobCommandInput, cb: (err: any, data?: GetJobCommandOutput) => void): void;
111
142
  getJob(args: GetJobCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetJobCommandOutput) => void): void;
143
+ /**
144
+ * @see {@link GetReceivedDataGrantCommand}
145
+ */
146
+ getReceivedDataGrant(args: GetReceivedDataGrantCommandInput, options?: __HttpHandlerOptions): Promise<GetReceivedDataGrantCommandOutput>;
147
+ getReceivedDataGrant(args: GetReceivedDataGrantCommandInput, cb: (err: any, data?: GetReceivedDataGrantCommandOutput) => void): void;
148
+ getReceivedDataGrant(args: GetReceivedDataGrantCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetReceivedDataGrantCommandOutput) => void): void;
112
149
  /**
113
150
  * @see {@link GetRevisionCommand}
114
151
  */
115
152
  getRevision(args: GetRevisionCommandInput, options?: __HttpHandlerOptions): Promise<GetRevisionCommandOutput>;
116
153
  getRevision(args: GetRevisionCommandInput, cb: (err: any, data?: GetRevisionCommandOutput) => void): void;
117
154
  getRevision(args: GetRevisionCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetRevisionCommandOutput) => void): void;
155
+ /**
156
+ * @see {@link ListDataGrantsCommand}
157
+ */
158
+ listDataGrants(): Promise<ListDataGrantsCommandOutput>;
159
+ listDataGrants(args: ListDataGrantsCommandInput, options?: __HttpHandlerOptions): Promise<ListDataGrantsCommandOutput>;
160
+ listDataGrants(args: ListDataGrantsCommandInput, cb: (err: any, data?: ListDataGrantsCommandOutput) => void): void;
161
+ listDataGrants(args: ListDataGrantsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListDataGrantsCommandOutput) => void): void;
118
162
  /**
119
163
  * @see {@link ListDataSetRevisionsCommand}
120
164
  */
@@ -142,6 +186,13 @@ export interface DataExchange {
142
186
  listJobs(args: ListJobsCommandInput, options?: __HttpHandlerOptions): Promise<ListJobsCommandOutput>;
143
187
  listJobs(args: ListJobsCommandInput, cb: (err: any, data?: ListJobsCommandOutput) => void): void;
144
188
  listJobs(args: ListJobsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListJobsCommandOutput) => void): void;
189
+ /**
190
+ * @see {@link ListReceivedDataGrantsCommand}
191
+ */
192
+ listReceivedDataGrants(): Promise<ListReceivedDataGrantsCommandOutput>;
193
+ listReceivedDataGrants(args: ListReceivedDataGrantsCommandInput, options?: __HttpHandlerOptions): Promise<ListReceivedDataGrantsCommandOutput>;
194
+ listReceivedDataGrants(args: ListReceivedDataGrantsCommandInput, cb: (err: any, data?: ListReceivedDataGrantsCommandOutput) => void): void;
195
+ listReceivedDataGrants(args: ListReceivedDataGrantsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListReceivedDataGrantsCommandOutput) => void): void;
145
196
  /**
146
197
  * @see {@link ListRevisionAssetsCommand}
147
198
  */
@@ -216,21 +267,23 @@ export interface DataExchange {
216
267
  updateRevision(args: UpdateRevisionCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UpdateRevisionCommandOutput) => void): void;
217
268
  }
218
269
  /**
219
- * <p>AWS Data Exchange is a service that makes it easy for AWS customers to exchange data in the cloud. You can use the AWS Data Exchange APIs to create, update, manage, and access file-based data set in the AWS Cloud.</p>
220
- * <p>As a subscriber, you can view and access the data sets that you have an entitlement to through
221
- * a subscription. You can use the APIs to download or copy your entitled data sets to Amazon
222
- * Simple Storage Service (Amazon S3) for use across a variety of AWS analytics and machine
223
- * learning services.</p>
224
- * <p>As a provider, you can create and manage your data sets that you would like to publish to a
225
- * product. Being able to package and provide your data sets into products requires a few
270
+ * <p>AWS Data Exchange is a service that makes it easy for AWS customers to exchange data in
271
+ * the cloud. You can use the AWS Data Exchange APIs to create, update, manage, and access
272
+ * file-based data set in the AWS Cloud.</p>
273
+ * <p>As a subscriber, you can view and access the data sets that you have an entitlement to
274
+ * through a subscription. You can use the APIs to download or copy your entitled data sets to
275
+ * Amazon Simple Storage Service (Amazon S3) for use across a variety of AWS analytics and
276
+ * machine learning services.</p>
277
+ * <p>As a provider, you can create and manage your data sets that you would like to publish
278
+ * to a product. Being able to package and provide your data sets into products requires a few
226
279
  * steps to determine eligibility. For more information, visit the <i>AWS Data Exchange
227
280
  * User Guide</i>.</p>
228
- * <p>A data set is a collection of data that can be changed or updated over time. Data sets can be
229
- * updated using revisions, which represent a new version or incremental change to a data set.
230
- * A revision contains one or more assets. An asset in AWS Data Exchange is a piece of data
231
- * that can be stored as an Amazon S3 object, Redshift datashare, API Gateway API, AWS Lake
232
- * Formation data permission, or Amazon S3 data access. The asset can be a structured data
233
- * file, an image file, or some other data file. Jobs are asynchronous import or export
281
+ * <p>A data set is a collection of data that can be changed or updated over time. Data sets
282
+ * can be updated using revisions, which represent a new version or incremental change to a
283
+ * data set. A revision contains one or more assets. An asset in AWS Data Exchange is a piece
284
+ * of data that can be stored as an Amazon S3 object, Redshift datashare, API Gateway API, AWS
285
+ * Lake Formation data permission, or Amazon S3 data access. The asset can be a structured
286
+ * data file, an image file, or some other data file. Jobs are asynchronous import or export
234
287
  * operations used to create or copy assets.</p>
235
288
  * @public
236
289
  */