-
Notifications
You must be signed in to change notification settings - Fork 584
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(client-elasticsearch-service): Amazon OpenSearch Service now off…
…ers 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.
- Loading branch information
awstools
committed
Nov 10, 2022
1 parent
e1de795
commit f36b021
Showing
15 changed files
with
5,205 additions
and
1,137 deletions.
There are no files selected for viewing
335 changes: 335 additions & 0 deletions
335
clients/client-elasticsearch-service/src/ElasticsearchService.ts
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
121 changes: 121 additions & 0 deletions
121
clients/client-elasticsearch-service/src/commands/AuthorizeVpcEndpointAccessCommand.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
// smithy-typescript generated code | ||
import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint"; | ||
import { getSerdePlugin } from "@aws-sdk/middleware-serde"; | ||
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; | ||
import { Command as $Command } from "@aws-sdk/smithy-client"; | ||
import { | ||
FinalizeHandlerArguments, | ||
Handler, | ||
HandlerExecutionContext, | ||
HttpHandlerOptions as __HttpHandlerOptions, | ||
MetadataBearer as __MetadataBearer, | ||
MiddlewareStack, | ||
SerdeContext as __SerdeContext, | ||
} from "@aws-sdk/types"; | ||
|
||
import { | ||
ElasticsearchServiceClientResolvedConfig, | ||
ServiceInputTypes, | ||
ServiceOutputTypes, | ||
} from "../ElasticsearchServiceClient"; | ||
import { | ||
AuthorizeVpcEndpointAccessRequest, | ||
AuthorizeVpcEndpointAccessRequestFilterSensitiveLog, | ||
AuthorizeVpcEndpointAccessResponse, | ||
AuthorizeVpcEndpointAccessResponseFilterSensitiveLog, | ||
} from "../models/models_0"; | ||
import { | ||
deserializeAws_restJson1AuthorizeVpcEndpointAccessCommand, | ||
serializeAws_restJson1AuthorizeVpcEndpointAccessCommand, | ||
} from "../protocols/Aws_restJson1"; | ||
|
||
export interface AuthorizeVpcEndpointAccessCommandInput extends AuthorizeVpcEndpointAccessRequest {} | ||
export interface AuthorizeVpcEndpointAccessCommandOutput extends AuthorizeVpcEndpointAccessResponse, __MetadataBearer {} | ||
|
||
/** | ||
* <p>Provides access to an Amazon OpenSearch Service domain through the use of an interface VPC endpoint.</p> | ||
* @example | ||
* Use a bare-bones client and the command you need to make an API call. | ||
* ```javascript | ||
* import { ElasticsearchServiceClient, AuthorizeVpcEndpointAccessCommand } from "@aws-sdk/client-elasticsearch-service"; // ES Modules import | ||
* // const { ElasticsearchServiceClient, AuthorizeVpcEndpointAccessCommand } = require("@aws-sdk/client-elasticsearch-service"); // CommonJS import | ||
* const client = new ElasticsearchServiceClient(config); | ||
* const command = new AuthorizeVpcEndpointAccessCommand(input); | ||
* const response = await client.send(command); | ||
* ``` | ||
* | ||
* @see {@link AuthorizeVpcEndpointAccessCommandInput} for command's `input` shape. | ||
* @see {@link AuthorizeVpcEndpointAccessCommandOutput} for command's `response` shape. | ||
* @see {@link ElasticsearchServiceClientResolvedConfig | config} for ElasticsearchServiceClient's `config` shape. | ||
* | ||
*/ | ||
export class AuthorizeVpcEndpointAccessCommand extends $Command< | ||
AuthorizeVpcEndpointAccessCommandInput, | ||
AuthorizeVpcEndpointAccessCommandOutput, | ||
ElasticsearchServiceClientResolvedConfig | ||
> { | ||
// Start section: command_properties | ||
// End section: command_properties | ||
|
||
public static getEndpointParameterInstructions(): EndpointParameterInstructions { | ||
return { | ||
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, | ||
Endpoint: { type: "builtInParams", name: "endpoint" }, | ||
Region: { type: "builtInParams", name: "region" }, | ||
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, | ||
}; | ||
} | ||
|
||
constructor(readonly input: AuthorizeVpcEndpointAccessCommandInput) { | ||
// Start section: command_constructor | ||
super(); | ||
// End section: command_constructor | ||
} | ||
|
||
/** | ||
* @internal | ||
*/ | ||
resolveMiddleware( | ||
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, | ||
configuration: ElasticsearchServiceClientResolvedConfig, | ||
options?: __HttpHandlerOptions | ||
): Handler<AuthorizeVpcEndpointAccessCommandInput, AuthorizeVpcEndpointAccessCommandOutput> { | ||
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); | ||
this.middlewareStack.use( | ||
getEndpointPlugin(configuration, AuthorizeVpcEndpointAccessCommand.getEndpointParameterInstructions()) | ||
); | ||
|
||
const stack = clientStack.concat(this.middlewareStack); | ||
|
||
const { logger } = configuration; | ||
const clientName = "ElasticsearchServiceClient"; | ||
const commandName = "AuthorizeVpcEndpointAccessCommand"; | ||
const handlerExecutionContext: HandlerExecutionContext = { | ||
logger, | ||
clientName, | ||
commandName, | ||
inputFilterSensitiveLog: AuthorizeVpcEndpointAccessRequestFilterSensitiveLog, | ||
outputFilterSensitiveLog: AuthorizeVpcEndpointAccessResponseFilterSensitiveLog, | ||
}; | ||
const { requestHandler } = configuration; | ||
return stack.resolve( | ||
(request: FinalizeHandlerArguments<any>) => | ||
requestHandler.handle(request.request as __HttpRequest, options || {}), | ||
handlerExecutionContext | ||
); | ||
} | ||
|
||
private serialize(input: AuthorizeVpcEndpointAccessCommandInput, context: __SerdeContext): Promise<__HttpRequest> { | ||
return serializeAws_restJson1AuthorizeVpcEndpointAccessCommand(input, context); | ||
} | ||
|
||
private deserialize( | ||
output: __HttpResponse, | ||
context: __SerdeContext | ||
): Promise<AuthorizeVpcEndpointAccessCommandOutput> { | ||
return deserializeAws_restJson1AuthorizeVpcEndpointAccessCommand(output, context); | ||
} | ||
|
||
// Start section: command_body_extra | ||
// End section: command_body_extra | ||
} |
Oops, something went wrong.