Skip to content

describe_db_clusters async

describe_db_clusters(
    *,
    config_overrides: Optional[AsyncDocDBClientConfig] = None,
    db_cluster_identifier: Optional[String] = None,
    filters: Optional[FilterList] = None,
    max_records: Optional[IntegerOptional] = None,
    marker: Optional[String] = None,
) -> DBClusterMessage

Returns information about provisioned Amazon DocumentDB clusters. This API operation supports pagination. For certain management features such as cluster and instance lifecycle management, Amazon DocumentDB leverages operational technology that is shared with Amazon RDS and Amazon Neptune. Use the filterName=engine,Values=docdb filter parameter to return only Amazon DocumentDB clusters.

Parameters:

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

    The user-provided cluster identifier. If this parameter is specified, information from only the specific cluster is returned. This parameter isn't case sensitive.

    Constraints:

    • If provided, must match an existing DBClusterIdentifier.

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

    A filter that specifies one or more clusters to describe.

    Supported filters:

    • db-cluster-id - Accepts cluster identifiers and cluster Amazon Resource Names (ARNs). The results list only includes information about the clusters identified by these ARNs.

  • 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 (marker) is included in the response so that the remaining results can be retrieved.

    Default: 100

    Constraints: Minimum 20, maximum 100.

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

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

Raises:

Source code in docs_src/capo_docdb/_services/async_doc_db.py
async def describe_db_clusters(
    self,
    *,
    config_overrides: Optional[AsyncDocDBClientConfig] = None,
    db_cluster_identifier: Optional["capo_docdb.types.string.String"] = None,
    filters: Optional["capo_docdb.types.filter_list.FilterList"] = None,
    max_records: Optional[
        "capo_docdb.types.integer_optional.IntegerOptional"
    ] = None,
    marker: Optional["capo_docdb.types.string.String"] = None,
) -> "capo_docdb.types.db_cluster_message.DBClusterMessage":
    """<p>Returns information about provisioned Amazon DocumentDB clusters. This API operation supports pagination. For certain management features such as cluster and instance lifecycle management, Amazon DocumentDB leverages operational technology that is shared with Amazon RDS and Amazon Neptune. Use the <code>filterName=engine,Values=docdb</code> filter parameter to return only Amazon DocumentDB clusters.</p>

    Args:
        db_cluster_identifier: <p>The user-provided cluster identifier. If this parameter is specified, information from only the specific cluster is returned. This parameter isn't case sensitive.</p> <p>Constraints:</p> <ul> <li> <p>If provided, must match an existing <code>DBClusterIdentifier</code>.</p> </li> </ul>
        filters: <p>A filter that specifies one or more clusters to describe.</p> <p>Supported filters:</p> <ul> <li> <p> <code>db-cluster-id</code> - Accepts cluster identifiers and cluster Amazon Resource Names (ARNs). The results list only includes information about the clusters identified by these ARNs.</p> </li> </ul>
        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 (marker) is included in the response so that the remaining results can be retrieved.</p> <p>Default: 100</p> <p>Constraints: Minimum 20, maximum 100.</p>
        marker: <p>An optional pagination token provided by a previous 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_docdb.errors.db_cluster_not_found_fault.DBClusterNotFoundFault: <p> <code>DBClusterIdentifier</code> doesn't refer to an existing cluster. </p>
        capo_docdb.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_docdb.types.describe_db_clusters_message.DescribeDBClustersMessage]",
    ) -> AsyncOperationResponse[
        "capo_docdb.types.db_cluster_message.DBClusterMessage"
    ]:
        import capo_docdb._operations.amazon_rd_sv19.describe_db_clusters

        (
            output,
            http_response,
        ) = await capo_docdb._operations.amazon_rd_sv19.describe_db_clusters.async_describe_db_clusters(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeDBClusters")
    )
    input_: capo_docdb.types.describe_db_clusters_message.DescribeDBClustersMessage = {}
    if db_cluster_identifier is not None:
        input_["db_cluster_identifier"] = db_cluster_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