Provides access to an Amazon OpenSearch Service domain through the use of an interface VPC endpoint.
Parameters:
-
domain_name
(DomainName)
–
The name of the OpenSearch Service domain to provide access to.
-
account
(Optional[AWSAccount], default:
None
)
–
The Amazon Web Services account ID to grant access to.
-
service
(Optional[AWSServicePrincipal], default:
None
)
–
The Amazon Web Services service SP to grant access to.
-
service_options
(Optional[ServiceOptions], default:
None
)
–
The options for the service, including the supported Regions for the endpoint access.
Raises:
Source code in docs_src/capo_opensearch/_services/open_search.py
| def authorize_vpc_endpoint_access(
self,
domain_name: "capo_opensearch.types.domain_name.DomainName",
*,
config_overrides: Optional[OpenSearchClientConfig] = None,
account: Optional["capo_opensearch.types.aws_account.AWSAccount"] = None,
service: Optional[
"capo_opensearch.types.aws_service_principal.AWSServicePrincipal"
] = None,
service_options: Optional[
"capo_opensearch.types.service_options.ServiceOptions"
] = None,
) -> "capo_opensearch.types.authorize_vpc_endpoint_access_response.AuthorizeVpcEndpointAccessResponse":
"""<p>Provides access to an Amazon OpenSearch Service domain through the use of an interface VPC endpoint.</p>
Args:
domain_name: <p>The name of the OpenSearch Service domain to provide access to.</p>
account: <p>The Amazon Web Services account ID to grant access to.</p>
service: <p>The Amazon Web Services service SP to grant access to.</p>
service_options: <p>The options for the service, including the supported Regions for the endpoint access.</p>
Raises:
capo_opensearch.errors.base_exception.BaseException: <p>An error occurred while processing the request.</p>
capo_opensearch.errors.disabled_operation_exception.DisabledOperationException: <p>An error occured because the client wanted to access an unsupported operation.</p>
capo_opensearch.errors.internal_exception.InternalException: <p>Request processing failed because of an unknown error, exception, or internal failure.</p>
capo_opensearch.errors.limit_exceeded_exception.LimitExceededException: <p>An exception for trying to create more than the allowed number of resources or sub-resources.</p>
capo_opensearch.errors.resource_not_found_exception.ResourceNotFoundException: <p>An exception for accessing or deleting a resource that doesn't exist.</p>
capo_opensearch.errors.validation_exception.ValidationException: <p>An exception for accessing or deleting a resource that doesn't exist.</p>
capo_opensearch.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_opensearch.types.authorize_vpc_endpoint_access_request.AuthorizeVpcEndpointAccessRequest]",
) -> OperationResponse[
"capo_opensearch.types.authorize_vpc_endpoint_access_response.AuthorizeVpcEndpointAccessResponse"
]:
import capo_opensearch._operations.amazon_open_search_service.authorize_vpc_endpoint_access
output, http_response = (
capo_opensearch._operations.amazon_open_search_service.authorize_vpc_endpoint_access.authorize_vpc_endpoint_access(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("AuthorizeVpcEndpointAccess")
)
input_: capo_opensearch.types.authorize_vpc_endpoint_access_request.AuthorizeVpcEndpointAccessRequest = {
"domain_name": domain_name
}
if account is not None:
input_["account"] = account
if service is not None:
input_["service"] = service
if service_options is not None:
input_["service_options"] = service_options
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|