Skip to content

describe_clusters async

describe_clusters(
    *,
    config_overrides: Optional[AsyncMemoryDBClientConfig] = None,
    cluster_name: Optional[String] = None,
    max_results: Optional[IntegerOptional] = None,
    next_token: Optional[String] = None,
    show_shard_details: Optional[BooleanOptional] = None,
) -> DescribeClustersResponse

Returns information about all provisioned clusters if no cluster identifier is specified, or about a specific cluster if a cluster name is supplied.

Parameters:

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

    The name of the cluster.

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

    The maximum number of records to include in the response. If more records exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.

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

    An optional argument to pass in case the total number of records exceeds the value of MaxResults. If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged.

  • show_shard_details (Optional[BooleanOptional], default: None ) –

    An optional flag that can be included in the request to retrieve information about the individual shard(s).

Raises:

Source code in docs_src/capo_memorydb/_services/async_memory_db.py
async def describe_clusters(
    self,
    *,
    config_overrides: Optional[AsyncMemoryDBClientConfig] = None,
    cluster_name: Optional["capo_memorydb.types.string.String"] = None,
    max_results: Optional[
        "capo_memorydb.types.integer_optional.IntegerOptional"
    ] = None,
    next_token: Optional["capo_memorydb.types.string.String"] = None,
    show_shard_details: Optional[
        "capo_memorydb.types.boolean_optional.BooleanOptional"
    ] = None,
) -> "capo_memorydb.types.describe_clusters_response.DescribeClustersResponse":
    """<p>Returns information about all provisioned clusters if no cluster identifier is specified, or about a specific cluster if a cluster name is supplied.</p>

    Args:
        cluster_name: <p>The name of the cluster.</p>
        max_results: <p>The maximum number of records to include in the response. If more records exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.</p>
        next_token: <p>An optional argument to pass in case the total number of records exceeds the value of MaxResults. If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. </p>
        show_shard_details: <p>An optional flag that can be included in the request to retrieve information about the individual shard(s).</p>

    Raises:
        capo_memorydb.errors.cluster_not_found_fault.ClusterNotFoundFault: <p>The specified cluster does not exist.</p>
        capo_memorydb.errors.invalid_parameter_combination_exception.InvalidParameterCombinationException: <p>The specified parameter combination is not valid.</p>
        capo_memorydb.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>The specified parameter value is not valid.</p>
        capo_memorydb.errors.service_linked_role_not_found_fault.ServiceLinkedRoleNotFoundFault: <p>The required service-linked role was not found.</p>
        capo_memorydb.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_memorydb.types.describe_clusters_request.DescribeClustersRequest]",
    ) -> AsyncOperationResponse[
        "capo_memorydb.types.describe_clusters_response.DescribeClustersResponse"
    ]:
        import capo_memorydb._operations.amazon_memory_db.describe_clusters

        (
            output,
            http_response,
        ) = await capo_memorydb._operations.amazon_memory_db.describe_clusters.async_describe_clusters(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeClusters")
    )
    input_: capo_memorydb.types.describe_clusters_request.DescribeClustersRequest = {}
    if cluster_name is not None:
        input_["cluster_name"] = cluster_name
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if show_shard_details is not None:
        input_["show_shard_details"] = show_shard_details

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