@aws-sdk/client-dataexchange 3.437.0 → 3.439.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 CHANGED
@@ -393,6 +393,14 @@ SendApiAsset
393
393
 
394
394
  [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-dataexchange/classes/sendapiassetcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-dataexchange/interfaces/sendapiassetcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-dataexchange/interfaces/sendapiassetcommandoutput.html)
395
395
 
396
+ </details>
397
+ <details>
398
+ <summary>
399
+ SendDataSetNotification
400
+ </summary>
401
+
402
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-dataexchange/classes/senddatasetnotificationcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-dataexchange/interfaces/senddatasetnotificationcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-dataexchange/interfaces/senddatasetnotificationcommandoutput.html)
403
+
396
404
  </details>
397
405
  <details>
398
406
  <summary>
@@ -24,6 +24,7 @@ const ListRevisionAssetsCommand_1 = require("./commands/ListRevisionAssetsComman
24
24
  const ListTagsForResourceCommand_1 = require("./commands/ListTagsForResourceCommand");
25
25
  const RevokeRevisionCommand_1 = require("./commands/RevokeRevisionCommand");
26
26
  const SendApiAssetCommand_1 = require("./commands/SendApiAssetCommand");
27
+ const SendDataSetNotificationCommand_1 = require("./commands/SendDataSetNotificationCommand");
27
28
  const StartJobCommand_1 = require("./commands/StartJobCommand");
28
29
  const TagResourceCommand_1 = require("./commands/TagResourceCommand");
29
30
  const UntagResourceCommand_1 = require("./commands/UntagResourceCommand");
@@ -55,6 +56,7 @@ const commands = {
55
56
  ListTagsForResourceCommand: ListTagsForResourceCommand_1.ListTagsForResourceCommand,
56
57
  RevokeRevisionCommand: RevokeRevisionCommand_1.RevokeRevisionCommand,
57
58
  SendApiAssetCommand: SendApiAssetCommand_1.SendApiAssetCommand,
59
+ SendDataSetNotificationCommand: SendDataSetNotificationCommand_1.SendDataSetNotificationCommand,
58
60
  StartJobCommand: StartJobCommand_1.StartJobCommand,
59
61
  TagResourceCommand: TagResourceCommand_1.TagResourceCommand,
60
62
  UntagResourceCommand: UntagResourceCommand_1.UntagResourceCommand,
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SendDataSetNotificationCommand = exports.$Command = void 0;
4
+ const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
5
+ const middleware_serde_1 = require("@smithy/middleware-serde");
6
+ const smithy_client_1 = require("@smithy/smithy-client");
7
+ Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
+ const types_1 = require("@smithy/types");
9
+ const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
10
+ class SendDataSetNotificationCommand extends smithy_client_1.Command {
11
+ static getEndpointParameterInstructions() {
12
+ return {
13
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
14
+ Endpoint: { type: "builtInParams", name: "endpoint" },
15
+ Region: { type: "builtInParams", name: "region" },
16
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
17
+ };
18
+ }
19
+ constructor(input) {
20
+ super();
21
+ this.input = input;
22
+ }
23
+ resolveMiddleware(clientStack, configuration, options) {
24
+ this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
25
+ this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, SendDataSetNotificationCommand.getEndpointParameterInstructions()));
26
+ const stack = clientStack.concat(this.middlewareStack);
27
+ const { logger } = configuration;
28
+ const clientName = "DataExchangeClient";
29
+ const commandName = "SendDataSetNotificationCommand";
30
+ const handlerExecutionContext = {
31
+ logger,
32
+ clientName,
33
+ commandName,
34
+ inputFilterSensitiveLog: (_) => _,
35
+ outputFilterSensitiveLog: (_) => _,
36
+ [types_1.SMITHY_CONTEXT_KEY]: {
37
+ service: "DataExchange",
38
+ operation: "SendDataSetNotification",
39
+ },
40
+ };
41
+ const { requestHandler } = configuration;
42
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
43
+ }
44
+ serialize(input, context) {
45
+ return (0, Aws_restJson1_1.se_SendDataSetNotificationCommand)(input, context);
46
+ }
47
+ deserialize(output, context) {
48
+ return (0, Aws_restJson1_1.de_SendDataSetNotificationCommand)(output, context);
49
+ }
50
+ }
51
+ exports.SendDataSetNotificationCommand = SendDataSetNotificationCommand;
@@ -23,6 +23,7 @@ tslib_1.__exportStar(require("./ListRevisionAssetsCommand"), exports);
23
23
  tslib_1.__exportStar(require("./ListTagsForResourceCommand"), exports);
24
24
  tslib_1.__exportStar(require("./RevokeRevisionCommand"), exports);
25
25
  tslib_1.__exportStar(require("./SendApiAssetCommand"), exports);
26
+ tslib_1.__exportStar(require("./SendDataSetNotificationCommand"), exports);
26
27
  tslib_1.__exportStar(require("./StartJobCommand"), exports);
27
28
  tslib_1.__exportStar(require("./TagResourceCommand"), exports);
28
29
  tslib_1.__exportStar(require("./UntagResourceCommand"), exports);
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.defaultEndpointResolver = void 0;
4
- const util_endpoints_1 = require("@aws-sdk/util-endpoints");
4
+ const util_endpoints_1 = require("@smithy/util-endpoints");
5
5
  const ruleset_1 = require("./ruleset");
6
6
  const defaultEndpointResolver = (endpointParams, context = {}) => {
7
7
  return (0, util_endpoints_1.resolveEndpoint)(ruleset_1.ruleSet, {
package/dist-cjs/index.js CHANGED
@@ -7,5 +7,6 @@ tslib_1.__exportStar(require("./DataExchange"), exports);
7
7
  tslib_1.__exportStar(require("./commands"), exports);
8
8
  tslib_1.__exportStar(require("./pagination"), exports);
9
9
  tslib_1.__exportStar(require("./models"), exports);
10
+ require("@aws-sdk/util-endpoints");
10
11
  var DataExchangeServiceException_1 = require("./models/DataExchangeServiceException");
11
12
  Object.defineProperty(exports, "DataExchangeServiceException", { enumerable: true, get: function () { return DataExchangeServiceException_1.DataExchangeServiceException; } });
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.State = exports.JobErrorResourceTypes = exports.JobErrorLimitName = exports.Type = exports.TableTagPolicyLFPermission = exports.DatabaseLFTagPolicyPermission = exports.ServiceLimitExceededException = exports.LimitName = exports.Origin = exports.Code = exports.ValidationException = exports.ExceptionCause = exports.ThrottlingException = exports.ResourceNotFoundException = exports.InternalServerException = exports.ConflictException = exports.ResourceType = exports.AssetType = exports.LFPermission = exports.LakeFormationDataPermissionType = exports.LFResourceType = exports.ProtocolType = exports.ServerSideEncryptionTypes = exports.AccessDeniedException = void 0;
3
+ exports.NotificationType = exports.SchemaChangeType = exports.State = exports.JobErrorResourceTypes = exports.JobErrorLimitName = exports.Type = exports.TableTagPolicyLFPermission = exports.DatabaseLFTagPolicyPermission = exports.ServiceLimitExceededException = exports.LimitName = exports.Origin = exports.Code = exports.ValidationException = exports.ExceptionCause = exports.ThrottlingException = exports.ResourceNotFoundException = exports.InternalServerException = exports.ConflictException = exports.ResourceType = exports.AssetType = exports.LFPermission = exports.LakeFormationDataPermissionType = exports.LFResourceType = exports.ProtocolType = exports.ServerSideEncryptionTypes = exports.AccessDeniedException = void 0;
4
4
  const DataExchangeServiceException_1 = require("./DataExchangeServiceException");
5
5
  class AccessDeniedException extends DataExchangeServiceException_1.DataExchangeServiceException {
6
6
  constructor(opts) {
@@ -224,3 +224,14 @@ exports.State = {
224
224
  TIMED_OUT: "TIMED_OUT",
225
225
  WAITING: "WAITING",
226
226
  };
227
+ exports.SchemaChangeType = {
228
+ ADD: "ADD",
229
+ MODIFY: "MODIFY",
230
+ REMOVE: "REMOVE",
231
+ };
232
+ exports.NotificationType = {
233
+ DATA_DELAY: "DATA_DELAY",
234
+ DATA_UPDATE: "DATA_UPDATE",
235
+ DEPRECATION: "DEPRECATION",
236
+ SCHEMA_CHANGE: "SCHEMA_CHANGE",
237
+ };
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_RevokeRevisionCommand = exports.de_ListTagsForResourceCommand = exports.de_ListRevisionAssetsCommand = exports.de_ListJobsCommand = exports.de_ListEventActionsCommand = exports.de_ListDataSetsCommand = exports.de_ListDataSetRevisionsCommand = exports.de_GetRevisionCommand = exports.de_GetJobCommand = exports.de_GetEventActionCommand = exports.de_GetDataSetCommand = exports.de_GetAssetCommand = exports.de_DeleteRevisionCommand = exports.de_DeleteEventActionCommand = exports.de_DeleteDataSetCommand = exports.de_DeleteAssetCommand = exports.de_CreateRevisionCommand = exports.de_CreateJobCommand = exports.de_CreateEventActionCommand = exports.de_CreateDataSetCommand = exports.de_CancelJobCommand = exports.se_UpdateRevisionCommand = exports.se_UpdateEventActionCommand = exports.se_UpdateDataSetCommand = exports.se_UpdateAssetCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StartJobCommand = exports.se_SendApiAssetCommand = exports.se_RevokeRevisionCommand = exports.se_ListTagsForResourceCommand = exports.se_ListRevisionAssetsCommand = exports.se_ListJobsCommand = exports.se_ListEventActionsCommand = exports.se_ListDataSetsCommand = exports.se_ListDataSetRevisionsCommand = exports.se_GetRevisionCommand = exports.se_GetJobCommand = exports.se_GetEventActionCommand = exports.se_GetDataSetCommand = exports.se_GetAssetCommand = exports.se_DeleteRevisionCommand = exports.se_DeleteEventActionCommand = exports.se_DeleteDataSetCommand = exports.se_DeleteAssetCommand = exports.se_CreateRevisionCommand = exports.se_CreateJobCommand = exports.se_CreateEventActionCommand = exports.se_CreateDataSetCommand = exports.se_CancelJobCommand = void 0;
4
- exports.de_UpdateRevisionCommand = exports.de_UpdateEventActionCommand = exports.de_UpdateDataSetCommand = exports.de_UpdateAssetCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StartJobCommand = exports.de_SendApiAssetCommand = void 0;
3
+ exports.de_ListTagsForResourceCommand = exports.de_ListRevisionAssetsCommand = exports.de_ListJobsCommand = exports.de_ListEventActionsCommand = exports.de_ListDataSetsCommand = exports.de_ListDataSetRevisionsCommand = exports.de_GetRevisionCommand = exports.de_GetJobCommand = exports.de_GetEventActionCommand = exports.de_GetDataSetCommand = exports.de_GetAssetCommand = exports.de_DeleteRevisionCommand = exports.de_DeleteEventActionCommand = exports.de_DeleteDataSetCommand = exports.de_DeleteAssetCommand = exports.de_CreateRevisionCommand = exports.de_CreateJobCommand = exports.de_CreateEventActionCommand = exports.de_CreateDataSetCommand = exports.de_CancelJobCommand = exports.se_UpdateRevisionCommand = exports.se_UpdateEventActionCommand = exports.se_UpdateDataSetCommand = exports.se_UpdateAssetCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StartJobCommand = exports.se_SendDataSetNotificationCommand = exports.se_SendApiAssetCommand = exports.se_RevokeRevisionCommand = exports.se_ListTagsForResourceCommand = exports.se_ListRevisionAssetsCommand = exports.se_ListJobsCommand = exports.se_ListEventActionsCommand = exports.se_ListDataSetsCommand = exports.se_ListDataSetRevisionsCommand = exports.se_GetRevisionCommand = exports.se_GetJobCommand = exports.se_GetEventActionCommand = exports.se_GetDataSetCommand = exports.se_GetAssetCommand = exports.se_DeleteRevisionCommand = exports.se_DeleteEventActionCommand = exports.se_DeleteDataSetCommand = exports.se_DeleteAssetCommand = exports.se_CreateRevisionCommand = exports.se_CreateJobCommand = exports.se_CreateEventActionCommand = exports.se_CreateDataSetCommand = exports.se_CancelJobCommand = void 0;
4
+ exports.de_UpdateRevisionCommand = exports.de_UpdateEventActionCommand = exports.de_UpdateDataSetCommand = exports.de_UpdateAssetCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StartJobCommand = exports.de_SendDataSetNotificationCommand = exports.de_SendApiAssetCommand = exports.de_RevokeRevisionCommand = void 0;
5
5
  const protocol_http_1 = require("@smithy/protocol-http");
6
6
  const smithy_client_1 = require("@smithy/smithy-client");
7
+ const uuid_1 = require("uuid");
7
8
  const DataExchangeServiceException_1 = require("../models/DataExchangeServiceException");
8
9
  const models_0_1 = require("../models/models_0");
9
10
  const se_CancelJobCommand = async (input, context) => {
@@ -473,6 +474,32 @@ const se_SendApiAssetCommand = async (input, context) => {
473
474
  });
474
475
  };
475
476
  exports.se_SendApiAssetCommand = se_SendApiAssetCommand;
477
+ const se_SendDataSetNotificationCommand = async (input, context) => {
478
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
479
+ const headers = {
480
+ "content-type": "application/json",
481
+ };
482
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/data-sets/{DataSetId}/notification";
483
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "DataSetId", () => input.DataSetId, "{DataSetId}", false);
484
+ let body;
485
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
486
+ ClientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
487
+ Comment: [],
488
+ Details: (_) => se_NotificationDetails(_, context),
489
+ Scope: (_) => (0, smithy_client_1._json)(_),
490
+ Type: [],
491
+ }));
492
+ return new protocol_http_1.HttpRequest({
493
+ protocol,
494
+ hostname,
495
+ port,
496
+ method: "POST",
497
+ headers,
498
+ path: resolvedPath,
499
+ body,
500
+ });
501
+ };
502
+ exports.se_SendDataSetNotificationCommand = se_SendDataSetNotificationCommand;
476
503
  const se_StartJobCommand = async (input, context) => {
477
504
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
478
505
  const headers = {};
@@ -1683,6 +1710,51 @@ const de_SendApiAssetCommandError = async (output, context) => {
1683
1710
  });
1684
1711
  }
1685
1712
  };
1713
+ const de_SendDataSetNotificationCommand = async (output, context) => {
1714
+ if (output.statusCode !== 202 && output.statusCode >= 300) {
1715
+ return de_SendDataSetNotificationCommandError(output, context);
1716
+ }
1717
+ const contents = (0, smithy_client_1.map)({
1718
+ $metadata: deserializeMetadata(output),
1719
+ });
1720
+ await (0, smithy_client_1.collectBody)(output.body, context);
1721
+ return contents;
1722
+ };
1723
+ exports.de_SendDataSetNotificationCommand = de_SendDataSetNotificationCommand;
1724
+ const de_SendDataSetNotificationCommandError = async (output, context) => {
1725
+ const parsedOutput = {
1726
+ ...output,
1727
+ body: await parseErrorBody(output.body, context),
1728
+ };
1729
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1730
+ switch (errorCode) {
1731
+ case "AccessDeniedException":
1732
+ case "com.amazonaws.dataexchange#AccessDeniedException":
1733
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1734
+ case "ConflictException":
1735
+ case "com.amazonaws.dataexchange#ConflictException":
1736
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1737
+ case "InternalServerException":
1738
+ case "com.amazonaws.dataexchange#InternalServerException":
1739
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1740
+ case "ResourceNotFoundException":
1741
+ case "com.amazonaws.dataexchange#ResourceNotFoundException":
1742
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1743
+ case "ThrottlingException":
1744
+ case "com.amazonaws.dataexchange#ThrottlingException":
1745
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1746
+ case "ValidationException":
1747
+ case "com.amazonaws.dataexchange#ValidationException":
1748
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1749
+ default:
1750
+ const parsedBody = parsedOutput.body;
1751
+ return throwDefaultError({
1752
+ output,
1753
+ parsedBody,
1754
+ errorCode,
1755
+ });
1756
+ }
1757
+ };
1686
1758
  const de_StartJobCommand = async (output, context) => {
1687
1759
  if (output.statusCode !== 202 && output.statusCode >= 300) {
1688
1760
  return de_StartJobCommandError(output, context);
@@ -2098,6 +2170,29 @@ const de_ValidationExceptionRes = async (parsedOutput, context) => {
2098
2170
  });
2099
2171
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2100
2172
  };
2173
+ const se_DataUpdateRequestDetails = (input, context) => {
2174
+ return (0, smithy_client_1.take)(input, {
2175
+ DataUpdatedAt: (_) => _.toISOString().split(".")[0] + "Z",
2176
+ });
2177
+ };
2178
+ const se_DeprecationRequestDetails = (input, context) => {
2179
+ return (0, smithy_client_1.take)(input, {
2180
+ DeprecationAt: (_) => _.toISOString().split(".")[0] + "Z",
2181
+ });
2182
+ };
2183
+ const se_NotificationDetails = (input, context) => {
2184
+ return (0, smithy_client_1.take)(input, {
2185
+ DataUpdate: (_) => se_DataUpdateRequestDetails(_, context),
2186
+ Deprecation: (_) => se_DeprecationRequestDetails(_, context),
2187
+ SchemaChange: (_) => se_SchemaChangeRequestDetails(_, context),
2188
+ });
2189
+ };
2190
+ const se_SchemaChangeRequestDetails = (input, context) => {
2191
+ return (0, smithy_client_1.take)(input, {
2192
+ Changes: smithy_client_1._json,
2193
+ SchemaChangeAt: (_) => _.toISOString().split(".")[0] + "Z",
2194
+ });
2195
+ };
2101
2196
  const de_ApiGatewayApiAsset = (output, context) => {
2102
2197
  return (0, smithy_client_1.take)(output, {
2103
2198
  ApiDescription: smithy_client_1.expectString,
@@ -21,6 +21,7 @@ import { ListRevisionAssetsCommand, } from "./commands/ListRevisionAssetsCommand
21
21
  import { ListTagsForResourceCommand, } from "./commands/ListTagsForResourceCommand";
22
22
  import { RevokeRevisionCommand, } from "./commands/RevokeRevisionCommand";
23
23
  import { SendApiAssetCommand, } from "./commands/SendApiAssetCommand";
24
+ import { SendDataSetNotificationCommand, } from "./commands/SendDataSetNotificationCommand";
24
25
  import { StartJobCommand } from "./commands/StartJobCommand";
25
26
  import { TagResourceCommand } from "./commands/TagResourceCommand";
26
27
  import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
@@ -52,6 +53,7 @@ const commands = {
52
53
  ListTagsForResourceCommand,
53
54
  RevokeRevisionCommand,
54
55
  SendApiAssetCommand,
56
+ SendDataSetNotificationCommand,
55
57
  StartJobCommand,
56
58
  TagResourceCommand,
57
59
  UntagResourceCommand,
@@ -0,0 +1,47 @@
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_SendDataSetNotificationCommand, se_SendDataSetNotificationCommand } from "../protocols/Aws_restJson1";
6
+ export { $Command };
7
+ export class SendDataSetNotificationCommand extends $Command {
8
+ static getEndpointParameterInstructions() {
9
+ return {
10
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
11
+ Endpoint: { type: "builtInParams", name: "endpoint" },
12
+ Region: { type: "builtInParams", name: "region" },
13
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
14
+ };
15
+ }
16
+ constructor(input) {
17
+ super();
18
+ this.input = input;
19
+ }
20
+ resolveMiddleware(clientStack, configuration, options) {
21
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
22
+ this.middlewareStack.use(getEndpointPlugin(configuration, SendDataSetNotificationCommand.getEndpointParameterInstructions()));
23
+ const stack = clientStack.concat(this.middlewareStack);
24
+ const { logger } = configuration;
25
+ const clientName = "DataExchangeClient";
26
+ const commandName = "SendDataSetNotificationCommand";
27
+ const handlerExecutionContext = {
28
+ logger,
29
+ clientName,
30
+ commandName,
31
+ inputFilterSensitiveLog: (_) => _,
32
+ outputFilterSensitiveLog: (_) => _,
33
+ [SMITHY_CONTEXT_KEY]: {
34
+ service: "DataExchange",
35
+ operation: "SendDataSetNotification",
36
+ },
37
+ };
38
+ const { requestHandler } = configuration;
39
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
40
+ }
41
+ serialize(input, context) {
42
+ return se_SendDataSetNotificationCommand(input, context);
43
+ }
44
+ deserialize(output, context) {
45
+ return de_SendDataSetNotificationCommand(output, context);
46
+ }
47
+ }
@@ -20,6 +20,7 @@ export * from "./ListRevisionAssetsCommand";
20
20
  export * from "./ListTagsForResourceCommand";
21
21
  export * from "./RevokeRevisionCommand";
22
22
  export * from "./SendApiAssetCommand";
23
+ export * from "./SendDataSetNotificationCommand";
23
24
  export * from "./StartJobCommand";
24
25
  export * from "./TagResourceCommand";
25
26
  export * from "./UntagResourceCommand";
@@ -1,4 +1,4 @@
1
- import { resolveEndpoint } from "@aws-sdk/util-endpoints";
1
+ import { resolveEndpoint } from "@smithy/util-endpoints";
2
2
  import { ruleSet } from "./ruleset";
3
3
  export const defaultEndpointResolver = (endpointParams, context = {}) => {
4
4
  return resolveEndpoint(ruleSet, {
package/dist-es/index.js CHANGED
@@ -3,4 +3,5 @@ export * from "./DataExchange";
3
3
  export * from "./commands";
4
4
  export * from "./pagination";
5
5
  export * from "./models";
6
+ import "@aws-sdk/util-endpoints";
6
7
  export { DataExchangeServiceException } from "./models/DataExchangeServiceException";
@@ -214,3 +214,14 @@ export const State = {
214
214
  TIMED_OUT: "TIMED_OUT",
215
215
  WAITING: "WAITING",
216
216
  };
217
+ export const SchemaChangeType = {
218
+ ADD: "ADD",
219
+ MODIFY: "MODIFY",
220
+ REMOVE: "REMOVE",
221
+ };
222
+ export const NotificationType = {
223
+ DATA_DELAY: "DATA_DELAY",
224
+ DATA_UPDATE: "DATA_UPDATE",
225
+ DEPRECATION: "DEPRECATION",
226
+ SCHEMA_CHANGE: "SCHEMA_CHANGE",
227
+ };
@@ -1,5 +1,6 @@
1
1
  import { HttpRequest as __HttpRequest, isValidHostname as __isValidHostname, } from "@smithy/protocol-http";
2
2
  import { _json, collectBody, convertMap, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, take, withBaseException, } from "@smithy/smithy-client";
3
+ import { v4 as generateIdempotencyToken } from "uuid";
3
4
  import { DataExchangeServiceException as __BaseException } from "../models/DataExchangeServiceException";
4
5
  import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceLimitExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
5
6
  export const se_CancelJobCommand = async (input, context) => {
@@ -447,6 +448,31 @@ export const se_SendApiAssetCommand = async (input, context) => {
447
448
  body,
448
449
  });
449
450
  };
451
+ export const se_SendDataSetNotificationCommand = async (input, context) => {
452
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
453
+ const headers = {
454
+ "content-type": "application/json",
455
+ };
456
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/data-sets/{DataSetId}/notification";
457
+ resolvedPath = __resolvedPath(resolvedPath, input, "DataSetId", () => input.DataSetId, "{DataSetId}", false);
458
+ let body;
459
+ body = JSON.stringify(take(input, {
460
+ ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
461
+ Comment: [],
462
+ Details: (_) => se_NotificationDetails(_, context),
463
+ Scope: (_) => _json(_),
464
+ Type: [],
465
+ }));
466
+ return new __HttpRequest({
467
+ protocol,
468
+ hostname,
469
+ port,
470
+ method: "POST",
471
+ headers,
472
+ path: resolvedPath,
473
+ body,
474
+ });
475
+ };
450
476
  export const se_StartJobCommand = async (input, context) => {
451
477
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
452
478
  const headers = {};
@@ -1628,6 +1654,50 @@ const de_SendApiAssetCommandError = async (output, context) => {
1628
1654
  });
1629
1655
  }
1630
1656
  };
1657
+ export const de_SendDataSetNotificationCommand = async (output, context) => {
1658
+ if (output.statusCode !== 202 && output.statusCode >= 300) {
1659
+ return de_SendDataSetNotificationCommandError(output, context);
1660
+ }
1661
+ const contents = map({
1662
+ $metadata: deserializeMetadata(output),
1663
+ });
1664
+ await collectBody(output.body, context);
1665
+ return contents;
1666
+ };
1667
+ const de_SendDataSetNotificationCommandError = async (output, context) => {
1668
+ const parsedOutput = {
1669
+ ...output,
1670
+ body: await parseErrorBody(output.body, context),
1671
+ };
1672
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1673
+ switch (errorCode) {
1674
+ case "AccessDeniedException":
1675
+ case "com.amazonaws.dataexchange#AccessDeniedException":
1676
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1677
+ case "ConflictException":
1678
+ case "com.amazonaws.dataexchange#ConflictException":
1679
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1680
+ case "InternalServerException":
1681
+ case "com.amazonaws.dataexchange#InternalServerException":
1682
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1683
+ case "ResourceNotFoundException":
1684
+ case "com.amazonaws.dataexchange#ResourceNotFoundException":
1685
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1686
+ case "ThrottlingException":
1687
+ case "com.amazonaws.dataexchange#ThrottlingException":
1688
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1689
+ case "ValidationException":
1690
+ case "com.amazonaws.dataexchange#ValidationException":
1691
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1692
+ default:
1693
+ const parsedBody = parsedOutput.body;
1694
+ return throwDefaultError({
1695
+ output,
1696
+ parsedBody,
1697
+ errorCode,
1698
+ });
1699
+ }
1700
+ };
1631
1701
  export const de_StartJobCommand = async (output, context) => {
1632
1702
  if (output.statusCode !== 202 && output.statusCode >= 300) {
1633
1703
  return de_StartJobCommandError(output, context);
@@ -2036,6 +2106,29 @@ const de_ValidationExceptionRes = async (parsedOutput, context) => {
2036
2106
  });
2037
2107
  return __decorateServiceException(exception, parsedOutput.body);
2038
2108
  };
2109
+ const se_DataUpdateRequestDetails = (input, context) => {
2110
+ return take(input, {
2111
+ DataUpdatedAt: (_) => _.toISOString().split(".")[0] + "Z",
2112
+ });
2113
+ };
2114
+ const se_DeprecationRequestDetails = (input, context) => {
2115
+ return take(input, {
2116
+ DeprecationAt: (_) => _.toISOString().split(".")[0] + "Z",
2117
+ });
2118
+ };
2119
+ const se_NotificationDetails = (input, context) => {
2120
+ return take(input, {
2121
+ DataUpdate: (_) => se_DataUpdateRequestDetails(_, context),
2122
+ Deprecation: (_) => se_DeprecationRequestDetails(_, context),
2123
+ SchemaChange: (_) => se_SchemaChangeRequestDetails(_, context),
2124
+ });
2125
+ };
2126
+ const se_SchemaChangeRequestDetails = (input, context) => {
2127
+ return take(input, {
2128
+ Changes: _json,
2129
+ SchemaChangeAt: (_) => _.toISOString().split(".")[0] + "Z",
2130
+ });
2131
+ };
2039
2132
  const de_ApiGatewayApiAsset = (output, context) => {
2040
2133
  return take(output, {
2041
2134
  ApiDescription: __expectString,
@@ -21,6 +21,7 @@ import { ListRevisionAssetsCommandInput, ListRevisionAssetsCommandOutput } from
21
21
  import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
22
22
  import { RevokeRevisionCommandInput, RevokeRevisionCommandOutput } from "./commands/RevokeRevisionCommand";
23
23
  import { SendApiAssetCommandInput, SendApiAssetCommandOutput } from "./commands/SendApiAssetCommand";
24
+ import { SendDataSetNotificationCommandInput, SendDataSetNotificationCommandOutput } from "./commands/SendDataSetNotificationCommand";
24
25
  import { StartJobCommandInput, StartJobCommandOutput } from "./commands/StartJobCommand";
25
26
  import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
26
27
  import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
@@ -162,6 +163,12 @@ export interface DataExchange {
162
163
  sendApiAsset(args: SendApiAssetCommandInput, options?: __HttpHandlerOptions): Promise<SendApiAssetCommandOutput>;
163
164
  sendApiAsset(args: SendApiAssetCommandInput, cb: (err: any, data?: SendApiAssetCommandOutput) => void): void;
164
165
  sendApiAsset(args: SendApiAssetCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: SendApiAssetCommandOutput) => void): void;
166
+ /**
167
+ * @see {@link SendDataSetNotificationCommand}
168
+ */
169
+ sendDataSetNotification(args: SendDataSetNotificationCommandInput, options?: __HttpHandlerOptions): Promise<SendDataSetNotificationCommandOutput>;
170
+ sendDataSetNotification(args: SendDataSetNotificationCommandInput, cb: (err: any, data?: SendDataSetNotificationCommandOutput) => void): void;
171
+ sendDataSetNotification(args: SendDataSetNotificationCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: SendDataSetNotificationCommandOutput) => void): void;
165
172
  /**
166
173
  * @see {@link StartJobCommand}
167
174
  */
@@ -30,6 +30,7 @@ import { ListRevisionAssetsCommandInput, ListRevisionAssetsCommandOutput } from
30
30
  import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
31
31
  import { RevokeRevisionCommandInput, RevokeRevisionCommandOutput } from "./commands/RevokeRevisionCommand";
32
32
  import { SendApiAssetCommandInput, SendApiAssetCommandOutput } from "./commands/SendApiAssetCommand";
33
+ import { SendDataSetNotificationCommandInput, SendDataSetNotificationCommandOutput } from "./commands/SendDataSetNotificationCommand";
33
34
  import { StartJobCommandInput, StartJobCommandOutput } from "./commands/StartJobCommand";
34
35
  import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
35
36
  import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
@@ -43,11 +44,11 @@ export { __Client };
43
44
  /**
44
45
  * @public
45
46
  */
46
- export type ServiceInputTypes = CancelJobCommandInput | CreateDataSetCommandInput | CreateEventActionCommandInput | CreateJobCommandInput | CreateRevisionCommandInput | DeleteAssetCommandInput | DeleteDataSetCommandInput | DeleteEventActionCommandInput | DeleteRevisionCommandInput | GetAssetCommandInput | GetDataSetCommandInput | GetEventActionCommandInput | GetJobCommandInput | GetRevisionCommandInput | ListDataSetRevisionsCommandInput | ListDataSetsCommandInput | ListEventActionsCommandInput | ListJobsCommandInput | ListRevisionAssetsCommandInput | ListTagsForResourceCommandInput | RevokeRevisionCommandInput | SendApiAssetCommandInput | StartJobCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateAssetCommandInput | UpdateDataSetCommandInput | UpdateEventActionCommandInput | UpdateRevisionCommandInput;
47
+ export type ServiceInputTypes = CancelJobCommandInput | CreateDataSetCommandInput | CreateEventActionCommandInput | CreateJobCommandInput | CreateRevisionCommandInput | DeleteAssetCommandInput | DeleteDataSetCommandInput | DeleteEventActionCommandInput | DeleteRevisionCommandInput | GetAssetCommandInput | GetDataSetCommandInput | GetEventActionCommandInput | GetJobCommandInput | GetRevisionCommandInput | ListDataSetRevisionsCommandInput | ListDataSetsCommandInput | ListEventActionsCommandInput | ListJobsCommandInput | ListRevisionAssetsCommandInput | ListTagsForResourceCommandInput | RevokeRevisionCommandInput | SendApiAssetCommandInput | SendDataSetNotificationCommandInput | StartJobCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateAssetCommandInput | UpdateDataSetCommandInput | UpdateEventActionCommandInput | UpdateRevisionCommandInput;
47
48
  /**
48
49
  * @public
49
50
  */
50
- export type ServiceOutputTypes = CancelJobCommandOutput | CreateDataSetCommandOutput | CreateEventActionCommandOutput | CreateJobCommandOutput | CreateRevisionCommandOutput | DeleteAssetCommandOutput | DeleteDataSetCommandOutput | DeleteEventActionCommandOutput | DeleteRevisionCommandOutput | GetAssetCommandOutput | GetDataSetCommandOutput | GetEventActionCommandOutput | GetJobCommandOutput | GetRevisionCommandOutput | ListDataSetRevisionsCommandOutput | ListDataSetsCommandOutput | ListEventActionsCommandOutput | ListJobsCommandOutput | ListRevisionAssetsCommandOutput | ListTagsForResourceCommandOutput | RevokeRevisionCommandOutput | SendApiAssetCommandOutput | StartJobCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateAssetCommandOutput | UpdateDataSetCommandOutput | UpdateEventActionCommandOutput | UpdateRevisionCommandOutput;
51
+ export type ServiceOutputTypes = CancelJobCommandOutput | CreateDataSetCommandOutput | CreateEventActionCommandOutput | CreateJobCommandOutput | CreateRevisionCommandOutput | DeleteAssetCommandOutput | DeleteDataSetCommandOutput | DeleteEventActionCommandOutput | DeleteRevisionCommandOutput | GetAssetCommandOutput | GetDataSetCommandOutput | GetEventActionCommandOutput | GetJobCommandOutput | GetRevisionCommandOutput | ListDataSetRevisionsCommandOutput | ListDataSetsCommandOutput | ListEventActionsCommandOutput | ListJobsCommandOutput | ListRevisionAssetsCommandOutput | ListTagsForResourceCommandOutput | RevokeRevisionCommandOutput | SendApiAssetCommandOutput | SendDataSetNotificationCommandOutput | StartJobCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateAssetCommandOutput | UpdateDataSetCommandOutput | UpdateEventActionCommandOutput | UpdateRevisionCommandOutput;
51
52
  /**
52
53
  * @public
53
54
  */