Skip to content

update_vpc_endpoint async

update_vpc_endpoint(
    vpc_endpoint_id: VpcEndpointId,
    vpc_options: VPCOptions,
    *,
    config_overrides: Optional[AsyncElasticsearchServiceClientConfig] = None,
) -> UpdateVpcEndpointResponse

Modifies an Amazon OpenSearch Service-managed interface VPC endpoint.

Parameters:

  • vpc_endpoint_id (VpcEndpointId) –

    Unique identifier of the VPC endpoint to be updated.

  • vpc_options (VPCOptions) –

    The security groups and/or subnets to add, remove, or modify.

Raises:

  • BaseException –

    An error occurred while processing the request.

  • ConflictException –

    An error occurred because the client attempts to remove a resource that is currently in use. Returns HTTP status code 409.

  • 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.

  • 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 update_vpc_endpoint(
    self,
    vpc_endpoint_id: "capo_elasticsearch_service.types.vpc_endpoint_id.VpcEndpointId",
    vpc_options: "capo_elasticsearch_service.types.vpc_options.VPCOptions",
    *,
    config_overrides: Optional[AsyncElasticsearchServiceClientConfig] = None,
) -> "capo_elasticsearch_service.types.update_vpc_endpoint_response.UpdateVpcEndpointResponse":
    """<p>Modifies an Amazon OpenSearch Service-managed interface VPC endpoint.</p>

    Args:
        vpc_endpoint_id: <p>Unique identifier of the VPC endpoint to be updated.</p>
        vpc_options: <p>The security groups and/or subnets to add, remove, or modify.</p>

    Raises:
        capo_elasticsearch_service.errors.base_exception.BaseException: <p>An error occurred while processing the request.</p>
        capo_elasticsearch_service.errors.conflict_exception.ConflictException: <p>An error occurred because the client attempts to remove a resource that is currently in use. Returns HTTP status code 409.</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.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.update_vpc_endpoint_request.UpdateVpcEndpointRequest]",
    ) -> AsyncOperationResponse[
        "capo_elasticsearch_service.types.update_vpc_endpoint_response.UpdateVpcEndpointResponse"
    ]:
        import capo_elasticsearch_service._operations.amazon_elasticsearch_service2015.update_vpc_endpoint

        (
            output,
            http_response,
        ) = await capo_elasticsearch_service._operations.amazon_elasticsearch_service2015.update_vpc_endpoint.async_update_vpc_endpoint(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateVpcEndpoint")
    )
    input_: capo_elasticsearch_service.types.update_vpc_endpoint_request.UpdateVpcEndpointRequest = {
        "vpc_endpoint_id": vpc_endpoint_id,
        "vpc_options": vpc_options,
    }

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