Skip to content

Commit f36b021

Browse files
author
awstools
committed
feat(client-elasticsearch-service): Amazon OpenSearch Service now offers managed VPC endpoints to connect to your Amazon OpenSearch Service VPC-enabled domain in a Virtual Private Cloud (VPC). This feature allows you to privately access OpenSearch Service domain without using public IPs or requiring traffic to traverse the Internet.
1 parent e1de795 commit f36b021

15 files changed

+5205
-1137
lines changed

clients/client-elasticsearch-service/src/ElasticsearchService.ts

Lines changed: 335 additions & 0 deletions
Large diffs are not rendered by default.

clients/client-elasticsearch-service/src/ElasticsearchServiceClient.ts

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ import {
5353
} from "./commands/AcceptInboundCrossClusterSearchConnectionCommand";
5454
import { AddTagsCommandInput, AddTagsCommandOutput } from "./commands/AddTagsCommand";
5555
import { AssociatePackageCommandInput, AssociatePackageCommandOutput } from "./commands/AssociatePackageCommand";
56+
import {
57+
AuthorizeVpcEndpointAccessCommandInput,
58+
AuthorizeVpcEndpointAccessCommandOutput,
59+
} from "./commands/AuthorizeVpcEndpointAccessCommand";
5660
import {
5761
CancelElasticsearchServiceSoftwareUpdateCommandInput,
5862
CancelElasticsearchServiceSoftwareUpdateCommandOutput,
@@ -66,6 +70,7 @@ import {
6670
CreateOutboundCrossClusterSearchConnectionCommandOutput,
6771
} from "./commands/CreateOutboundCrossClusterSearchConnectionCommand";
6872
import { CreatePackageCommandInput, CreatePackageCommandOutput } from "./commands/CreatePackageCommand";
73+
import { CreateVpcEndpointCommandInput, CreateVpcEndpointCommandOutput } from "./commands/CreateVpcEndpointCommand";
6974
import {
7075
DeleteElasticsearchDomainCommandInput,
7176
DeleteElasticsearchDomainCommandOutput,
@@ -83,6 +88,7 @@ import {
8388
DeleteOutboundCrossClusterSearchConnectionCommandOutput,
8489
} from "./commands/DeleteOutboundCrossClusterSearchConnectionCommand";
8590
import { DeletePackageCommandInput, DeletePackageCommandOutput } from "./commands/DeletePackageCommand";
91+
import { DeleteVpcEndpointCommandInput, DeleteVpcEndpointCommandOutput } from "./commands/DeleteVpcEndpointCommand";
8692
import {
8793
DescribeDomainAutoTunesCommandInput,
8894
DescribeDomainAutoTunesCommandOutput,
@@ -124,6 +130,10 @@ import {
124130
DescribeReservedElasticsearchInstancesCommandInput,
125131
DescribeReservedElasticsearchInstancesCommandOutput,
126132
} from "./commands/DescribeReservedElasticsearchInstancesCommand";
133+
import {
134+
DescribeVpcEndpointsCommandInput,
135+
DescribeVpcEndpointsCommandOutput,
136+
} from "./commands/DescribeVpcEndpointsCommand";
127137
import { DissociatePackageCommandInput, DissociatePackageCommandOutput } from "./commands/DissociatePackageCommand";
128138
import {
129139
GetCompatibleElasticsearchVersionsCommandInput,
@@ -153,6 +163,15 @@ import {
153163
ListPackagesForDomainCommandOutput,
154164
} from "./commands/ListPackagesForDomainCommand";
155165
import { ListTagsCommandInput, ListTagsCommandOutput } from "./commands/ListTagsCommand";
166+
import {
167+
ListVpcEndpointAccessCommandInput,
168+
ListVpcEndpointAccessCommandOutput,
169+
} from "./commands/ListVpcEndpointAccessCommand";
170+
import { ListVpcEndpointsCommandInput, ListVpcEndpointsCommandOutput } from "./commands/ListVpcEndpointsCommand";
171+
import {
172+
ListVpcEndpointsForDomainCommandInput,
173+
ListVpcEndpointsForDomainCommandOutput,
174+
} from "./commands/ListVpcEndpointsForDomainCommand";
156175
import {
157176
PurchaseReservedElasticsearchInstanceOfferingCommandInput,
158177
PurchaseReservedElasticsearchInstanceOfferingCommandOutput,
@@ -162,6 +181,10 @@ import {
162181
RejectInboundCrossClusterSearchConnectionCommandOutput,
163182
} from "./commands/RejectInboundCrossClusterSearchConnectionCommand";
164183
import { RemoveTagsCommandInput, RemoveTagsCommandOutput } from "./commands/RemoveTagsCommand";
184+
import {
185+
RevokeVpcEndpointAccessCommandInput,
186+
RevokeVpcEndpointAccessCommandOutput,
187+
} from "./commands/RevokeVpcEndpointAccessCommand";
165188
import {
166189
StartElasticsearchServiceSoftwareUpdateCommandInput,
167190
StartElasticsearchServiceSoftwareUpdateCommandOutput,
@@ -171,6 +194,7 @@ import {
171194
UpdateElasticsearchDomainConfigCommandOutput,
172195
} from "./commands/UpdateElasticsearchDomainConfigCommand";
173196
import { UpdatePackageCommandInput, UpdatePackageCommandOutput } from "./commands/UpdatePackageCommand";
197+
import { UpdateVpcEndpointCommandInput, UpdateVpcEndpointCommandOutput } from "./commands/UpdateVpcEndpointCommand";
174198
import {
175199
UpgradeElasticsearchDomainCommandInput,
176200
UpgradeElasticsearchDomainCommandOutput,
@@ -187,15 +211,18 @@ export type ServiceInputTypes =
187211
| AcceptInboundCrossClusterSearchConnectionCommandInput
188212
| AddTagsCommandInput
189213
| AssociatePackageCommandInput
214+
| AuthorizeVpcEndpointAccessCommandInput
190215
| CancelElasticsearchServiceSoftwareUpdateCommandInput
191216
| CreateElasticsearchDomainCommandInput
192217
| CreateOutboundCrossClusterSearchConnectionCommandInput
193218
| CreatePackageCommandInput
219+
| CreateVpcEndpointCommandInput
194220
| DeleteElasticsearchDomainCommandInput
195221
| DeleteElasticsearchServiceRoleCommandInput
196222
| DeleteInboundCrossClusterSearchConnectionCommandInput
197223
| DeleteOutboundCrossClusterSearchConnectionCommandInput
198224
| DeletePackageCommandInput
225+
| DeleteVpcEndpointCommandInput
199226
| DescribeDomainAutoTunesCommandInput
200227
| DescribeDomainChangeProgressCommandInput
201228
| DescribeElasticsearchDomainCommandInput
@@ -207,6 +234,7 @@ export type ServiceInputTypes =
207234
| DescribePackagesCommandInput
208235
| DescribeReservedElasticsearchInstanceOfferingsCommandInput
209236
| DescribeReservedElasticsearchInstancesCommandInput
237+
| DescribeVpcEndpointsCommandInput
210238
| DissociatePackageCommandInput
211239
| GetCompatibleElasticsearchVersionsCommandInput
212240
| GetPackageVersionHistoryCommandInput
@@ -218,27 +246,35 @@ export type ServiceInputTypes =
218246
| ListElasticsearchVersionsCommandInput
219247
| ListPackagesForDomainCommandInput
220248
| ListTagsCommandInput
249+
| ListVpcEndpointAccessCommandInput
250+
| ListVpcEndpointsCommandInput
251+
| ListVpcEndpointsForDomainCommandInput
221252
| PurchaseReservedElasticsearchInstanceOfferingCommandInput
222253
| RejectInboundCrossClusterSearchConnectionCommandInput
223254
| RemoveTagsCommandInput
255+
| RevokeVpcEndpointAccessCommandInput
224256
| StartElasticsearchServiceSoftwareUpdateCommandInput
225257
| UpdateElasticsearchDomainConfigCommandInput
226258
| UpdatePackageCommandInput
259+
| UpdateVpcEndpointCommandInput
227260
| UpgradeElasticsearchDomainCommandInput;
228261

229262
export type ServiceOutputTypes =
230263
| AcceptInboundCrossClusterSearchConnectionCommandOutput
231264
| AddTagsCommandOutput
232265
| AssociatePackageCommandOutput
266+
| AuthorizeVpcEndpointAccessCommandOutput
233267
| CancelElasticsearchServiceSoftwareUpdateCommandOutput
234268
| CreateElasticsearchDomainCommandOutput
235269
| CreateOutboundCrossClusterSearchConnectionCommandOutput
236270
| CreatePackageCommandOutput
271+
| CreateVpcEndpointCommandOutput
237272
| DeleteElasticsearchDomainCommandOutput
238273
| DeleteElasticsearchServiceRoleCommandOutput
239274
| DeleteInboundCrossClusterSearchConnectionCommandOutput
240275
| DeleteOutboundCrossClusterSearchConnectionCommandOutput
241276
| DeletePackageCommandOutput
277+
| DeleteVpcEndpointCommandOutput
242278
| DescribeDomainAutoTunesCommandOutput
243279
| DescribeDomainChangeProgressCommandOutput
244280
| DescribeElasticsearchDomainCommandOutput
@@ -250,6 +286,7 @@ export type ServiceOutputTypes =
250286
| DescribePackagesCommandOutput
251287
| DescribeReservedElasticsearchInstanceOfferingsCommandOutput
252288
| DescribeReservedElasticsearchInstancesCommandOutput
289+
| DescribeVpcEndpointsCommandOutput
253290
| DissociatePackageCommandOutput
254291
| GetCompatibleElasticsearchVersionsCommandOutput
255292
| GetPackageVersionHistoryCommandOutput
@@ -261,12 +298,17 @@ export type ServiceOutputTypes =
261298
| ListElasticsearchVersionsCommandOutput
262299
| ListPackagesForDomainCommandOutput
263300
| ListTagsCommandOutput
301+
| ListVpcEndpointAccessCommandOutput
302+
| ListVpcEndpointsCommandOutput
303+
| ListVpcEndpointsForDomainCommandOutput
264304
| PurchaseReservedElasticsearchInstanceOfferingCommandOutput
265305
| RejectInboundCrossClusterSearchConnectionCommandOutput
266306
| RemoveTagsCommandOutput
307+
| RevokeVpcEndpointAccessCommandOutput
267308
| StartElasticsearchServiceSoftwareUpdateCommandOutput
268309
| UpdateElasticsearchDomainConfigCommandOutput
269310
| UpdatePackageCommandOutput
311+
| UpdateVpcEndpointCommandOutput
270312
| UpgradeElasticsearchDomainCommandOutput;
271313

272314
export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
// smithy-typescript generated code
2+
import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
3+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
4+
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
5+
import { Command as $Command } from "@aws-sdk/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+
} from "@aws-sdk/types";
15+
16+
import {
17+
ElasticsearchServiceClientResolvedConfig,
18+
ServiceInputTypes,
19+
ServiceOutputTypes,
20+
} from "../ElasticsearchServiceClient";
21+
import {
22+
AuthorizeVpcEndpointAccessRequest,
23+
AuthorizeVpcEndpointAccessRequestFilterSensitiveLog,
24+
AuthorizeVpcEndpointAccessResponse,
25+
AuthorizeVpcEndpointAccessResponseFilterSensitiveLog,
26+
} from "../models/models_0";
27+
import {
28+
deserializeAws_restJson1AuthorizeVpcEndpointAccessCommand,
29+
serializeAws_restJson1AuthorizeVpcEndpointAccessCommand,
30+
} from "../protocols/Aws_restJson1";
31+
32+
export interface AuthorizeVpcEndpointAccessCommandInput extends AuthorizeVpcEndpointAccessRequest {}
33+
export interface AuthorizeVpcEndpointAccessCommandOutput extends AuthorizeVpcEndpointAccessResponse, __MetadataBearer {}
34+
35+
/**
36+
* <p>Provides access to an Amazon OpenSearch Service domain through the use of an interface VPC endpoint.</p>
37+
* @example
38+
* Use a bare-bones client and the command you need to make an API call.
39+
* ```javascript
40+
* import { ElasticsearchServiceClient, AuthorizeVpcEndpointAccessCommand } from "@aws-sdk/client-elasticsearch-service"; // ES Modules import
41+
* // const { ElasticsearchServiceClient, AuthorizeVpcEndpointAccessCommand } = require("@aws-sdk/client-elasticsearch-service"); // CommonJS import
42+
* const client = new ElasticsearchServiceClient(config);
43+
* const command = new AuthorizeVpcEndpointAccessCommand(input);
44+
* const response = await client.send(command);
45+
* ```
46+
*
47+
* @see {@link AuthorizeVpcEndpointAccessCommandInput} for command's `input` shape.
48+
* @see {@link AuthorizeVpcEndpointAccessCommandOutput} for command's `response` shape.
49+
* @see {@link ElasticsearchServiceClientResolvedConfig | config} for ElasticsearchServiceClient's `config` shape.
50+
*
51+
*/
52+
export class AuthorizeVpcEndpointAccessCommand extends $Command<
53+
AuthorizeVpcEndpointAccessCommandInput,
54+
AuthorizeVpcEndpointAccessCommandOutput,
55+
ElasticsearchServiceClientResolvedConfig
56+
> {
57+
// Start section: command_properties
58+
// End section: command_properties
59+
60+
public static getEndpointParameterInstructions(): EndpointParameterInstructions {
61+
return {
62+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
63+
Endpoint: { type: "builtInParams", name: "endpoint" },
64+
Region: { type: "builtInParams", name: "region" },
65+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
66+
};
67+
}
68+
69+
constructor(readonly input: AuthorizeVpcEndpointAccessCommandInput) {
70+
// Start section: command_constructor
71+
super();
72+
// End section: command_constructor
73+
}
74+
75+
/**
76+
* @internal
77+
*/
78+
resolveMiddleware(
79+
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
80+
configuration: ElasticsearchServiceClientResolvedConfig,
81+
options?: __HttpHandlerOptions
82+
): Handler<AuthorizeVpcEndpointAccessCommandInput, AuthorizeVpcEndpointAccessCommandOutput> {
83+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
84+
this.middlewareStack.use(
85+
getEndpointPlugin(configuration, AuthorizeVpcEndpointAccessCommand.getEndpointParameterInstructions())
86+
);
87+
88+
const stack = clientStack.concat(this.middlewareStack);
89+
90+
const { logger } = configuration;
91+
const clientName = "ElasticsearchServiceClient";
92+
const commandName = "AuthorizeVpcEndpointAccessCommand";
93+
const handlerExecutionContext: HandlerExecutionContext = {
94+
logger,
95+
clientName,
96+
commandName,
97+
inputFilterSensitiveLog: AuthorizeVpcEndpointAccessRequestFilterSensitiveLog,
98+
outputFilterSensitiveLog: AuthorizeVpcEndpointAccessResponseFilterSensitiveLog,
99+
};
100+
const { requestHandler } = configuration;
101+
return stack.resolve(
102+
(request: FinalizeHandlerArguments<any>) =>
103+
requestHandler.handle(request.request as __HttpRequest, options || {}),
104+
handlerExecutionContext
105+
);
106+
}
107+
108+
private serialize(input: AuthorizeVpcEndpointAccessCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
109+
return serializeAws_restJson1AuthorizeVpcEndpointAccessCommand(input, context);
110+
}
111+
112+
private deserialize(
113+
output: __HttpResponse,
114+
context: __SerdeContext
115+
): Promise<AuthorizeVpcEndpointAccessCommandOutput> {
116+
return deserializeAws_restJson1AuthorizeVpcEndpointAccessCommand(output, context);
117+
}
118+
119+
// Start section: command_body_extra
120+
// End section: command_body_extra
121+
}

0 commit comments

Comments
 (0)