- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
AuthorizeVpcEndpointAccessCommand
Provides access to an Amazon OpenSearch Service domain through the use of an interface VPC endpoint.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { OpenSearchClient, AuthorizeVpcEndpointAccessCommand } from "@aws-sdk/client-opensearch"; // ES Modules import
// const { OpenSearchClient, AuthorizeVpcEndpointAccessCommand } = require("@aws-sdk/client-opensearch"); // CommonJS import
const client = new OpenSearchClient(config);
const input = { // AuthorizeVpcEndpointAccessRequest
DomainName: "STRING_VALUE", // required
Account: "STRING_VALUE",
Service: "application.opensearchservice.amazonaws.com",
};
const command = new AuthorizeVpcEndpointAccessCommand(input);
const response = await client.send(command);
// { // AuthorizeVpcEndpointAccessResponse
// AuthorizedPrincipal: { // AuthorizedPrincipal
// PrincipalType: "AWS_ACCOUNT" || "AWS_SERVICE",
// Principal: "STRING_VALUE",
// },
// };
AuthorizeVpcEndpointAccessCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
DomainName Required | string | undefined | The name of the OpenSearch Service domain to provide access to. |
Account | string | undefined | The Amazon Web Services account ID to grant access to. |
Service | AWSServicePrincipal | undefined | The Amazon Web Services service SP to grant access to. |
AuthorizeVpcEndpointAccessCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
AuthorizedPrincipal Required | AuthorizedPrincipal | undefined | Information about the Amazon Web Services account or service that was provided access to the domain. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
BaseException | client | An error occurred while processing the request. |
DisabledOperationException | client | An error occured because the client wanted to access an unsupported operation. |
InternalException | server | Request processing failed because of an unknown error, exception, or internal failure. |
LimitExceededException | client | An exception for trying to create more than the allowed number of resources or sub-resources. |
ResourceNotFoundException | client | An exception for accessing or deleting a resource that doesn't exist. |
ValidationException | client | An exception for accessing or deleting a resource that doesn't exist. |
OpenSearchServiceException | Base exception class for all service exceptions from OpenSearch service. |