Skip to content

describe_db_cluster_endpoints async

describe_db_cluster_endpoints(
    *,
    config_overrides: Optional[AsyncRDSClientConfig] = None,
    db_cluster_identifier: Optional[String] = None,
    db_cluster_endpoint_identifier: Optional[String] = None,
    filters: Optional[FilterList] = None,
    max_records: Optional[IntegerOptional] = None,
    marker: Optional[String] = None,
) -> DBClusterEndpointMessage

Returns information about endpoints for an Amazon Aurora DB cluster.

This action only applies to Aurora DB clusters.

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 of the endpoint to describe. This parameter is stored as a lowercase string.

  • filters (Optional[FilterList], default: None ) –

    A set of name-value pairs that define which endpoints to include in the output. The filters are specified as name-value pairs, in the format Name=endpoint_type,Values=endpoint_type1,endpoint_type2,.... Name can be one of: db-cluster-endpoint-type, db-cluster-endpoint-custom-type, db-cluster-endpoint-id, db-cluster-endpoint-status. Values for the db-cluster-endpoint-type filter can be one or more of: reader, writer, custom. Values for the db-cluster-endpoint-custom-type filter can be one or more of: reader, any. Values for the db-cluster-endpoint-status filter can be one or more of: available, creating, deleting, inactive, modifying.

  • max_records (Optional[IntegerOptional], default: None ) –

    The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a pagination token called a marker is included in the response so you can retrieve the remaining results.

    Default: 100

    Constraints: Minimum 20, maximum 100.

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

    An optional pagination token provided by a previous DescribeDBClusterEndpoints request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords.

Raises:

Examples:

To describe DB cluster endpoints The following example retrieves details for your DB cluster endpoints. The most common kinds of Aurora clusters have two endpoints. One endpoint has type WRITER. You can use this endpoint for all SQL statements. The other endpoint has type READER. You can use this endpoint only for SELECT and other read-only SQL statements.

>>> await client.describe_db_cluster_endpoints()
To describe DB cluster endpoints of a single DB cluster
The following example retrieves details for the DB cluster endpoints of a single specified DB cluster. Aurora Serverless clusters have only a single endpoint with a type of WRITER.
>>> await client.describe_db_cluster_endpoints(db_cluster_identifier='serverless-cluster')
Source code in docs_src/capo_rds/_services/async_rds.py
async def describe_db_cluster_endpoints(
    self,
    *,
    config_overrides: Optional[AsyncRDSClientConfig] = None,
    db_cluster_identifier: Optional["capo_rds.types.string.String"] = None,
    db_cluster_endpoint_identifier: Optional["capo_rds.types.string.String"] = None,
    filters: Optional["capo_rds.types.filter_list.FilterList"] = None,
    max_records: Optional["capo_rds.types.integer_optional.IntegerOptional"] = None,
    marker: Optional["capo_rds.types.string.String"] = None,
) -> "capo_rds.types.db_cluster_endpoint_message.DBClusterEndpointMessage":
    """<p>Returns information about endpoints for an Amazon Aurora DB cluster.</p> <note> <p>This action only applies to Aurora DB clusters.</p> </note>

    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 of the endpoint to describe. This parameter is stored as a lowercase string.</p>
        filters: <p>A set of name-value pairs that define which endpoints to include in the output. The filters are specified as name-value pairs, in the format <code>Name=<i>endpoint_type</i>,Values=<i>endpoint_type1</i>,<i>endpoint_type2</i>,...</code>. <code>Name</code> can be one of: <code>db-cluster-endpoint-type</code>, <code>db-cluster-endpoint-custom-type</code>, <code>db-cluster-endpoint-id</code>, <code>db-cluster-endpoint-status</code>. <code>Values</code> for the <code> db-cluster-endpoint-type</code> filter can be one or more of: <code>reader</code>, <code>writer</code>, <code>custom</code>. <code>Values</code> for the <code>db-cluster-endpoint-custom-type</code> filter can be one or more of: <code>reader</code>, <code>any</code>. <code>Values</code> for the <code>db-cluster-endpoint-status</code> filter can be one or more of: <code>available</code>, <code>creating</code>, <code>deleting</code>, <code>inactive</code>, <code>modifying</code>.</p>
        max_records: <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a pagination token called a marker is included in the response so you can retrieve the remaining results.</p> <p>Default: 100</p> <p>Constraints: Minimum 20, maximum 100.</p>
        marker: <p>An optional pagination token provided by a previous <code>DescribeDBClusterEndpoints</code> request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.</p>

    Raises:
        capo_rds.errors.db_cluster_not_found_fault.DBClusterNotFoundFault: <p> <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.</p>
        capo_rds.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To describe DB cluster endpoints
        The following example retrieves details for your DB cluster endpoints. The most common kinds of Aurora clusters have two endpoints. One endpoint has type WRITER. You can use this endpoint for all SQL statements. The other endpoint has type READER. You can use this endpoint only for SELECT and other read-only SQL statements.

        >>> await client.describe_db_cluster_endpoints()
        To describe DB cluster endpoints of a single DB cluster
        The following example retrieves details for the DB cluster endpoints of a single specified DB cluster. Aurora Serverless clusters have only a single endpoint with a type of WRITER.

        >>> await client.describe_db_cluster_endpoints(db_cluster_identifier='serverless-cluster')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_rds.types.describe_db_cluster_endpoints_message.DescribeDBClusterEndpointsMessage]",
    ) -> AsyncOperationResponse[
        "capo_rds.types.db_cluster_endpoint_message.DBClusterEndpointMessage"
    ]:
        import capo_rds._operations.amazon_rd_sv19.describe_db_cluster_endpoints

        (
            output,
            http_response,
        ) = await capo_rds._operations.amazon_rd_sv19.describe_db_cluster_endpoints.async_describe_db_cluster_endpoints(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeDBClusterEndpoints")
    )
    input_: capo_rds.types.describe_db_cluster_endpoints_message.DescribeDBClusterEndpointsMessage = {}
    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 filters is not None:
        input_["filters"] = filters
    if max_records is not None:
        input_["max_records"] = max_records
    if marker is not None:
        input_["marker"] = marker

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