|
| 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 | +} |
0 commit comments