Skip to content

create_db_cluster_endpoint async

create_db_cluster_endpoint(
    *,
    config_overrides: Optional[AsyncNeptuneClientConfig] = None,
    db_cluster_identifier: Optional[String] = None,
    db_cluster_endpoint_identifier: Optional[String] = None,
    endpoint_type: Optional[String] = None,
    static_members: Optional[StringList] = None,
    excluded_members: Optional[StringList] = None,
    tags: Optional[TagList] = None,
) -> CreateDBClusterEndpointOutput

Creates a new custom endpoint and associates it with an Amazon Neptune DB cluster.

Parameters:

  • db_cluster_identifier (Optional[String], default: None ) –

    The DB cluster identifier of the DB cluster associated with the endpoint. This parameter is stored as a lowercase string.

  • db_cluster_endpoint_identifier (Optional[String], default: None ) –

    The identifier to use for the new endpoint. This parameter is stored as a lowercase string.

  • endpoint_type (Optional[String], default: None ) –

    The type of the endpoint. One of: READER, WRITER, ANY.

  • static_members (Optional[StringList], default: None ) –

    List of DB instance identifiers that are part of the custom endpoint group.

  • excluded_members (Optional[StringList], default: None ) –

    List of DB instance identifiers that aren't part of the custom endpoint group. All other eligible instances are reachable through the custom endpoint. Only relevant if the list of static members is empty.

  • tags (Optional[TagList], default: None ) –

    The tags to be assigned to the Amazon Neptune resource.

Raises:

Source code in docs_src/capo_neptune/_services/async_neptune.py
async def create_db_cluster_endpoint(
    self,
    *,
    config_overrides: Optional[AsyncNeptuneClientConfig] = None,
    db_cluster_identifier: Optional["capo_neptune.types.string.String"] = None,
    db_cluster_endpoint_identifier: Optional[
        "capo_neptune.types.string.String"
    ] = None,
    endpoint_type: Optional["capo_neptune.types.string.String"] = None,
    static_members: Optional["capo_neptune.types.string_list.StringList"] = None,
    excluded_members: Optional["capo_neptune.types.string_list.StringList"] = None,
    tags: Optional["capo_neptune.types.tag_list.TagList"] = None,
) -> "capo_neptune.types.create_db_cluster_endpoint_output.CreateDBClusterEndpointOutput":
    """<p>Creates a new custom endpoint and associates it with an Amazon Neptune DB cluster.</p>

    Args:
        db_cluster_identifier: <p>The DB cluster identifier of the DB cluster associated with the endpoint. This parameter is stored as a lowercase string.</p>
        db_cluster_endpoint_identifier: <p>The identifier to use for the new endpoint. This parameter is stored as a lowercase string.</p>
        endpoint_type: <p>The type of the endpoint. One of: <code>READER</code>, <code>WRITER</code>, <code>ANY</code>.</p>
        static_members: <p>List of DB instance identifiers that are part of the custom endpoint group.</p>
        excluded_members: <p>List of DB instance identifiers that aren't part of the custom endpoint group. All other eligible instances are reachable through the custom endpoint. Only relevant if the list of static members is empty.</p>
        tags: <p>The tags to be assigned to the Amazon Neptune resource.</p>

    Raises:
        capo_neptune.errors.db_cluster_endpoint_already_exists_fault.DBClusterEndpointAlreadyExistsFault: <p>The specified custom endpoint cannot be created because it already exists.</p>
        capo_neptune.errors.db_cluster_endpoint_quota_exceeded_fault.DBClusterEndpointQuotaExceededFault: <p>The cluster already has the maximum number of custom endpoints.</p>
        capo_neptune.errors.db_cluster_not_found_fault.DBClusterNotFoundFault: <p> <i>DBClusterIdentifier</i> does not refer to an existing DB cluster.</p>
        capo_neptune.errors.db_instance_not_found_fault.DBInstanceNotFoundFault: <p> <i>DBInstanceIdentifier</i> does not refer to an existing DB instance.</p>
        capo_neptune.errors.invalid_db_cluster_state_fault.InvalidDBClusterStateFault: <p>The DB cluster is not in a valid state.</p>
        capo_neptune.errors.invalid_db_instance_state_fault.InvalidDBInstanceStateFault: <p>The specified DB instance is not in the <i>available</i> state.</p>
        capo_neptune.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_neptune.types.create_db_cluster_endpoint_message.CreateDBClusterEndpointMessage]",
    ) -> AsyncOperationResponse[
        "capo_neptune.types.create_db_cluster_endpoint_output.CreateDBClusterEndpointOutput"
    ]:
        import capo_neptune._operations.amazon_rd_sv19.create_db_cluster_endpoint

        (
            output,
            http_response,
        ) = await capo_neptune._operations.amazon_rd_sv19.create_db_cluster_endpoint.async_create_db_cluster_endpoint(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateDBClusterEndpoint")
    )
    input_: capo_neptune.types.create_db_cluster_endpoint_message.CreateDBClusterEndpointMessage = {}
    if db_cluster_identifier is not None:
        input_["db_cluster_identifier"] = db_cluster_identifier
    if db_cluster_endpoint_identifier is not None:
        input_["db_cluster_endpoint_identifier"] = db_cluster_endpoint_identifier
    if endpoint_type is not None:
        input_["endpoint_type"] = endpoint_type
    if static_members is not None:
        input_["static_members"] = static_members
    if excluded_members is not None:
        input_["excluded_members"] = excluded_members
    if tags is not None:
        input_["tags"] = tags

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