Skip to content

create_private_graph_endpoint async

create_private_graph_endpoint(
    graph_identifier: GraphIdentifier,
    *,
    config_overrides: Optional[AsyncNeptuneGraphClientConfig] = None,
    vpc_id: Optional[VpcId] = None,
    subnet_ids: Optional[SubnetIds] = None,
    vpc_security_group_ids: Optional[SecurityGroupIds] = None,
) -> CreatePrivateGraphEndpointOutput

Create a private graph endpoint to allow private access to the graph from within a VPC. You can attach security groups to the private graph endpoint.

VPC endpoint charges apply.

Parameters:

  • graph_identifier (GraphIdentifier) –

    The unique identifier of the Neptune Analytics graph.

  • vpc_id (Optional[VpcId], default: None ) –

    The VPC in which the private graph endpoint needs to be created.

  • subnet_ids (Optional[SubnetIds], default: None ) –

    Subnets in which private graph endpoint ENIs are created.

  • vpc_security_group_ids (Optional[SecurityGroupIds], default: None ) –

    Security groups to be attached to the private graph endpoint.

Raises:

Source code in docs_src/capo_neptune_graph/_services/async_neptune_graph.py
async def create_private_graph_endpoint(
    self,
    graph_identifier: "capo_neptune_graph.types.graph_identifier.GraphIdentifier",
    *,
    config_overrides: Optional[AsyncNeptuneGraphClientConfig] = None,
    vpc_id: Optional["capo_neptune_graph.types.vpc_id.VpcId"] = None,
    subnet_ids: Optional["capo_neptune_graph.types.subnet_ids.SubnetIds"] = None,
    vpc_security_group_ids: Optional[
        "capo_neptune_graph.types.security_group_ids.SecurityGroupIds"
    ] = None,
) -> "capo_neptune_graph.types.create_private_graph_endpoint_output.CreatePrivateGraphEndpointOutput":
    """<p>Create a private graph endpoint to allow private access to the graph from within a VPC. You can attach security groups to the private graph endpoint.</p> <note> <p>VPC endpoint charges apply.</p> </note>

    Args:
        graph_identifier: <p>The unique identifier of the Neptune Analytics graph.</p>
        vpc_id: <p> The VPC in which the private graph endpoint needs to be created.</p>
        subnet_ids: <p>Subnets in which private graph endpoint ENIs are created.</p>
        vpc_security_group_ids: <p>Security groups to be attached to the private graph endpoint.</p>

    Raises:
        capo_neptune_graph.errors.conflict_exception.ConflictException: <p>Raised when a conflict is encountered.</p>
        capo_neptune_graph.errors.internal_server_exception.InternalServerException: <p>A failure occurred on the server.</p>
        capo_neptune_graph.errors.resource_not_found_exception.ResourceNotFoundException: <p>A specified resource could not be located.</p>
        capo_neptune_graph.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>A service quota was exceeded.</p>
        capo_neptune_graph.errors.throttling_exception.ThrottlingException: <p>The exception was interrupted by throttling.</p>
        capo_neptune_graph.errors.validation_exception.ValidationException: <p>A resource could not be validated.</p>
        capo_neptune_graph.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_neptune_graph.types.create_private_graph_endpoint_input.CreatePrivateGraphEndpointInput]",
    ) -> AsyncOperationResponse[
        "capo_neptune_graph.types.create_private_graph_endpoint_output.CreatePrivateGraphEndpointOutput"
    ]:
        import capo_neptune_graph._operations.amazon_neptune_graph.create_private_graph_endpoint

        (
            output,
            http_response,
        ) = await capo_neptune_graph._operations.amazon_neptune_graph.create_private_graph_endpoint.async_create_private_graph_endpoint(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreatePrivateGraphEndpoint")
    )
    input_: capo_neptune_graph.types.create_private_graph_endpoint_input.CreatePrivateGraphEndpointInput = {
        "graph_identifier": graph_identifier
    }
    if vpc_id is not None:
        input_["vpc_id"] = vpc_id
    if subnet_ids is not None:
        input_["subnet_ids"] = subnet_ids
    if vpc_security_group_ids is not None:
        input_["vpc_security_group_ids"] = vpc_security_group_ids

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