Skip to content

authorize_vpc_endpoint_access async

authorize_vpc_endpoint_access(
    domain_name: DomainName,
    *,
    config_overrides: Optional[AsyncOpenSearchClientConfig] = None,
    account: Optional[AWSAccount] = None,
    service: Optional[AWSServicePrincipal] = None,
    service_options: Optional[ServiceOptions] = None,
) -> AuthorizeVpcEndpointAccessResponse

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/async_open_search.py
async def authorize_vpc_endpoint_access(
    self,
    domain_name: "capo_opensearch.types.domain_name.DomainName",
    *,
    config_overrides: Optional[AsyncOpenSearchClientConfig] = 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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_opensearch.types.authorize_vpc_endpoint_access_request.AuthorizeVpcEndpointAccessRequest]",
    ) -> AsyncOperationResponse[
        "capo_opensearch.types.authorize_vpc_endpoint_access_response.AuthorizeVpcEndpointAccessResponse"
    ]:
        import capo_opensearch._operations.amazon_open_search_service.authorize_vpc_endpoint_access

        (
            output,
            http_response,
        ) = await capo_opensearch._operations.amazon_open_search_service.authorize_vpc_endpoint_access.async_authorize_vpc_endpoint_access(
            req.options, req.input
        )
        return AsyncOperationResponse(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 = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output