Skip to content

Commit 12d4db1

Browse files
author
awstools
committed
feat(client-dataexchange): We added a new API action: SendDataSetNotification.
1 parent 313e52f commit 12d4db1

File tree

9 files changed

+1122
-1
lines changed

9 files changed

+1122
-1
lines changed

clients/client-dataexchange/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,14 @@ SendApiAsset
393393

394394
[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)
395395

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+
396404
</details>
397405
<details>
398406
<summary>

clients/client-dataexchange/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,14 @@
5757
"@smithy/util-endpoints": "^1.0.2",
5858
"@smithy/util-retry": "^2.0.5",
5959
"@smithy/util-utf8": "^2.0.0",
60-
"tslib": "^2.5.0"
60+
"tslib": "^2.5.0",
61+
"uuid": "^8.3.2"
6162
},
6263
"devDependencies": {
6364
"@smithy/service-client-documentation-generator": "^2.0.0",
6465
"@tsconfig/node14": "1.0.3",
6566
"@types/node": "^14.14.31",
67+
"@types/uuid": "^8.3.0",
6668
"concurrently": "7.0.0",
6769
"downlevel-dts": "0.10.1",
6870
"rimraf": "3.0.2",

clients/client-dataexchange/src/DataExchange.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,11 @@ import {
8080
SendApiAssetCommandInput,
8181
SendApiAssetCommandOutput,
8282
} from "./commands/SendApiAssetCommand";
83+
import {
84+
SendDataSetNotificationCommand,
85+
SendDataSetNotificationCommandInput,
86+
SendDataSetNotificationCommandOutput,
87+
} from "./commands/SendDataSetNotificationCommand";
8388
import { StartJobCommand, StartJobCommandInput, StartJobCommandOutput } from "./commands/StartJobCommand";
8489
import { TagResourceCommand, TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
8590
import {
@@ -128,6 +133,7 @@ const commands = {
128133
ListTagsForResourceCommand,
129134
RevokeRevisionCommand,
130135
SendApiAssetCommand,
136+
SendDataSetNotificationCommand,
131137
StartJobCommand,
132138
TagResourceCommand,
133139
UntagResourceCommand,
@@ -428,6 +434,23 @@ export interface DataExchange {
428434
cb: (err: any, data?: SendApiAssetCommandOutput) => void
429435
): void;
430436

437+
/**
438+
* @see {@link SendDataSetNotificationCommand}
439+
*/
440+
sendDataSetNotification(
441+
args: SendDataSetNotificationCommandInput,
442+
options?: __HttpHandlerOptions
443+
): Promise<SendDataSetNotificationCommandOutput>;
444+
sendDataSetNotification(
445+
args: SendDataSetNotificationCommandInput,
446+
cb: (err: any, data?: SendDataSetNotificationCommandOutput) => void
447+
): void;
448+
sendDataSetNotification(
449+
args: SendDataSetNotificationCommandInput,
450+
options: __HttpHandlerOptions,
451+
cb: (err: any, data?: SendDataSetNotificationCommandOutput) => void
452+
): void;
453+
431454
/**
432455
* @see {@link StartJobCommand}
433456
*/

clients/client-dataexchange/src/DataExchangeClient.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ import {
7878
} from "./commands/ListTagsForResourceCommand";
7979
import { RevokeRevisionCommandInput, RevokeRevisionCommandOutput } from "./commands/RevokeRevisionCommand";
8080
import { SendApiAssetCommandInput, SendApiAssetCommandOutput } from "./commands/SendApiAssetCommand";
81+
import {
82+
SendDataSetNotificationCommandInput,
83+
SendDataSetNotificationCommandOutput,
84+
} from "./commands/SendDataSetNotificationCommand";
8185
import { StartJobCommandInput, StartJobCommandOutput } from "./commands/StartJobCommand";
8286
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
8387
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
@@ -122,6 +126,7 @@ export type ServiceInputTypes =
122126
| ListTagsForResourceCommandInput
123127
| RevokeRevisionCommandInput
124128
| SendApiAssetCommandInput
129+
| SendDataSetNotificationCommandInput
125130
| StartJobCommandInput
126131
| TagResourceCommandInput
127132
| UntagResourceCommandInput
@@ -156,6 +161,7 @@ export type ServiceOutputTypes =
156161
| ListTagsForResourceCommandOutput
157162
| RevokeRevisionCommandOutput
158163
| SendApiAssetCommandOutput
164+
| SendDataSetNotificationCommandOutput
159165
| StartJobCommandOutput
160166
| TagResourceCommandOutput
161167
| UntagResourceCommandOutput
Lines changed: 212 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,212 @@
1+
// smithy-typescript generated code
2+
import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint";
3+
import { getSerdePlugin } from "@smithy/middleware-serde";
4+
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
5+
import { Command as $Command } from "@smithy/smithy-client";
6+
import {
7+
FinalizeHandlerArguments,
8+
Handler,
9+
HandlerExecutionContext,
10+
HttpHandlerOptions as __HttpHandlerOptions,
11+
MetadataBearer as __MetadataBearer,
12+
MiddlewareStack,
13+
SerdeContext as __SerdeContext,
14+
SMITHY_CONTEXT_KEY,
15+
} from "@smithy/types";
16+
17+
import { DataExchangeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DataExchangeClient";
18+
import { SendDataSetNotificationRequest, SendDataSetNotificationResponse } from "../models/models_0";
19+
import { de_SendDataSetNotificationCommand, se_SendDataSetNotificationCommand } from "../protocols/Aws_restJson1";
20+
21+
/**
22+
* @public
23+
*/
24+
export { __MetadataBearer, $Command };
25+
/**
26+
* @public
27+
*
28+
* The input for {@link SendDataSetNotificationCommand}.
29+
*/
30+
export interface SendDataSetNotificationCommandInput extends SendDataSetNotificationRequest {}
31+
/**
32+
* @public
33+
*
34+
* The output of {@link SendDataSetNotificationCommand}.
35+
*/
36+
export interface SendDataSetNotificationCommandOutput extends SendDataSetNotificationResponse, __MetadataBearer {}
37+
38+
/**
39+
* @public
40+
* <p>The type of event associated with the data set.</p>
41+
* @example
42+
* Use a bare-bones client and the command you need to make an API call.
43+
* ```javascript
44+
* import { DataExchangeClient, SendDataSetNotificationCommand } from "@aws-sdk/client-dataexchange"; // ES Modules import
45+
* // const { DataExchangeClient, SendDataSetNotificationCommand } = require("@aws-sdk/client-dataexchange"); // CommonJS import
46+
* const client = new DataExchangeClient(config);
47+
* const input = { // SendDataSetNotificationRequest
48+
* Scope: { // ScopeDetails
49+
* LakeFormationTagPolicies: [ // ListOfLakeFormationTagPolicies
50+
* { // LakeFormationTagPolicyDetails
51+
* Database: "STRING_VALUE",
52+
* Table: "STRING_VALUE",
53+
* },
54+
* ],
55+
* RedshiftDataShares: [ // ListOfRedshiftDataShares
56+
* { // RedshiftDataShareDetails
57+
* Arn: "STRING_VALUE", // required
58+
* Database: "STRING_VALUE", // required
59+
* Function: "STRING_VALUE",
60+
* Table: "STRING_VALUE",
61+
* Schema: "STRING_VALUE",
62+
* View: "STRING_VALUE",
63+
* },
64+
* ],
65+
* S3DataAccesses: [ // ListOfS3DataAccesses
66+
* { // S3DataAccessDetails
67+
* KeyPrefixes: [ // ListOf__string
68+
* "STRING_VALUE",
69+
* ],
70+
* Keys: [
71+
* "STRING_VALUE",
72+
* ],
73+
* },
74+
* ],
75+
* },
76+
* ClientToken: "STRING_VALUE",
77+
* Comment: "STRING_VALUE",
78+
* DataSetId: "STRING_VALUE", // required
79+
* Details: { // NotificationDetails
80+
* DataUpdate: { // DataUpdateRequestDetails
81+
* DataUpdatedAt: new Date("TIMESTAMP"),
82+
* },
83+
* Deprecation: { // DeprecationRequestDetails
84+
* DeprecationAt: new Date("TIMESTAMP"), // required
85+
* },
86+
* SchemaChange: { // SchemaChangeRequestDetails
87+
* Changes: [ // ListOfSchemaChangeDetails
88+
* { // SchemaChangeDetails
89+
* Name: "STRING_VALUE", // required
90+
* Type: "STRING_VALUE", // required
91+
* Description: "STRING_VALUE",
92+
* },
93+
* ],
94+
* SchemaChangeAt: new Date("TIMESTAMP"), // required
95+
* },
96+
* },
97+
* Type: "STRING_VALUE", // required
98+
* };
99+
* const command = new SendDataSetNotificationCommand(input);
100+
* const response = await client.send(command);
101+
* // {};
102+
*
103+
* ```
104+
*
105+
* @param SendDataSetNotificationCommandInput - {@link SendDataSetNotificationCommandInput}
106+
* @returns {@link SendDataSetNotificationCommandOutput}
107+
* @see {@link SendDataSetNotificationCommandInput} for command's `input` shape.
108+
* @see {@link SendDataSetNotificationCommandOutput} for command's `response` shape.
109+
* @see {@link DataExchangeClientResolvedConfig | config} for DataExchangeClient's `config` shape.
110+
*
111+
* @throws {@link AccessDeniedException} (client fault)
112+
* <p>Access to the resource is denied.</p>
113+
*
114+
* @throws {@link ConflictException} (client fault)
115+
* <p>The request couldn't be completed because it conflicted with the current state of the resource.</p>
116+
*
117+
* @throws {@link InternalServerException} (server fault)
118+
* <p>An exception occurred with the service.</p>
119+
*
120+
* @throws {@link ResourceNotFoundException} (client fault)
121+
* <p>The resource couldn't be found.</p>
122+
*
123+
* @throws {@link ThrottlingException} (client fault)
124+
* <p>The limit on the number of requests per second was exceeded.</p>
125+
*
126+
* @throws {@link ValidationException} (client fault)
127+
* <p>The request was invalid.</p>
128+
*
129+
* @throws {@link DataExchangeServiceException}
130+
* <p>Base exception class for all service exceptions from DataExchange service.</p>
131+
*
132+
*/
133+
export class SendDataSetNotificationCommand extends $Command<
134+
SendDataSetNotificationCommandInput,
135+
SendDataSetNotificationCommandOutput,
136+
DataExchangeClientResolvedConfig
137+
> {
138+
// Start section: command_properties
139+
// End section: command_properties
140+
141+
public static getEndpointParameterInstructions(): EndpointParameterInstructions {
142+
return {
143+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
144+
Endpoint: { type: "builtInParams", name: "endpoint" },
145+
Region: { type: "builtInParams", name: "region" },
146+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
147+
};
148+
}
149+
150+
/**
151+
* @public
152+
*/
153+
constructor(readonly input: SendDataSetNotificationCommandInput) {
154+
// Start section: command_constructor
155+
super();
156+
// End section: command_constructor
157+
}
158+
159+
/**
160+
* @internal
161+
*/
162+
resolveMiddleware(
163+
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
164+
configuration: DataExchangeClientResolvedConfig,
165+
options?: __HttpHandlerOptions
166+
): Handler<SendDataSetNotificationCommandInput, SendDataSetNotificationCommandOutput> {
167+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
168+
this.middlewareStack.use(
169+
getEndpointPlugin(configuration, SendDataSetNotificationCommand.getEndpointParameterInstructions())
170+
);
171+
172+
const stack = clientStack.concat(this.middlewareStack);
173+
174+
const { logger } = configuration;
175+
const clientName = "DataExchangeClient";
176+
const commandName = "SendDataSetNotificationCommand";
177+
const handlerExecutionContext: HandlerExecutionContext = {
178+
logger,
179+
clientName,
180+
commandName,
181+
inputFilterSensitiveLog: (_: any) => _,
182+
outputFilterSensitiveLog: (_: any) => _,
183+
[SMITHY_CONTEXT_KEY]: {
184+
service: "DataExchange",
185+
operation: "SendDataSetNotification",
186+
},
187+
};
188+
const { requestHandler } = configuration;
189+
return stack.resolve(
190+
(request: FinalizeHandlerArguments<any>) =>
191+
requestHandler.handle(request.request as __HttpRequest, options || {}),
192+
handlerExecutionContext
193+
);
194+
}
195+
196+
/**
197+
* @internal
198+
*/
199+
private serialize(input: SendDataSetNotificationCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
200+
return se_SendDataSetNotificationCommand(input, context);
201+
}
202+
203+
/**
204+
* @internal
205+
*/
206+
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<SendDataSetNotificationCommandOutput> {
207+
return de_SendDataSetNotificationCommand(output, context);
208+
}
209+
210+
// Start section: command_body_extra
211+
// End section: command_body_extra
212+
}

clients/client-dataexchange/src/commands/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export * from "./ListRevisionAssetsCommand";
2121
export * from "./ListTagsForResourceCommand";
2222
export * from "./RevokeRevisionCommand";
2323
export * from "./SendApiAssetCommand";
24+
export * from "./SendDataSetNotificationCommand";
2425
export * from "./StartJobCommand";
2526
export * from "./TagResourceCommand";
2627
export * from "./UntagResourceCommand";

0 commit comments

Comments
 (0)