Skip to content

authorize_vpc_endpoint_access async

authorize_vpc_endpoint_access(
    domain_name: DomainName,
    account: AWSAccount,
    *,
    config_overrides: Optional[AsyncElasticsearchServiceClientConfig] = 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 (AWSAccount) –

    The account ID to grant access to.

Raises:

  • BaseException –

    An error occurred while processing the request.

  • DisabledOperationException –

    An error occured because the client wanted to access a not supported operation. Gives http status code of 409.

  • InternalException –

    The request processing has failed because of an unknown error, exception or failure (the failure is internal to the service) . Gives http status code of 500.

  • LimitExceededException –

    An exception for trying to create more than allowed resources or sub-resources. Gives http status code of 409.

  • ResourceNotFoundException –

    An exception for accessing or deleting a resource that does not exist. Gives http status code of 400.

  • ValidationException –

    An exception for missing / invalid input fields. Gives http status code of 400.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_elasticsearch_service/_services/async_elasticsearch_service.py
async def authorize_vpc_endpoint_access(
    self,
    domain_name: "capo_elasticsearch_service.types.domain_name.DomainName",
    account: "capo_elasticsearch_service.types.aws_account.AWSAccount",
    *,
    config_overrides: Optional[AsyncElasticsearchServiceClientConfig] = None,
) -> "capo_elasticsearch_service.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 account ID to grant access to.</p>

    Raises:
        capo_elasticsearch_service.errors.base_exception.BaseException: <p>An error occurred while processing the request.</p>
        capo_elasticsearch_service.errors.disabled_operation_exception.DisabledOperationException: <p>An error occured because the client wanted to access a not supported operation. Gives http status code of 409.</p>
        capo_elasticsearch_service.errors.internal_exception.InternalException: <p>The request processing has failed because of an unknown error, exception or failure (the failure is internal to the service) . Gives http status code of 500.</p>
        capo_elasticsearch_service.errors.limit_exceeded_exception.LimitExceededException: <p>An exception for trying to create more than allowed resources or sub-resources. Gives http status code of 409.</p>
        capo_elasticsearch_service.errors.resource_not_found_exception.ResourceNotFoundException: <p>An exception for accessing or deleting a resource that does not exist. Gives http status code of 400.</p>
        capo_elasticsearch_service.errors.validation_exception.ValidationException: <p>An exception for missing / invalid input fields. Gives http status code of 400.</p>
        capo_elasticsearch_service.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

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

        (
            output,
            http_response,
        ) = await capo_elasticsearch_service._operations.amazon_elasticsearch_service2015.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_elasticsearch_service.types.authorize_vpc_endpoint_access_request.AuthorizeVpcEndpointAccessRequest = {
        "domain_name": domain_name,
        "account": account,
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output