Skip to content

list_cluster_snapshots async

list_cluster_snapshots(
    *,
    config_overrides: Optional[AsyncDocDBElasticClientConfig] = None,
    cluster_arn: Optional[str] = None,
    next_token: Optional[PaginationToken] = None,
    max_results: Optional[int] = None,
    snapshot_type: Optional[str] = None,
) -> ListClusterSnapshotsOutput

Returns information about snapshots for a specified elastic cluster.

Parameters:

  • cluster_arn (Optional[str], default: None ) –

    The ARN identifier of the elastic cluster.

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

    A pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond this token, up to the value specified by max-results.

    If there is no more data in the responce, the nextToken will not be returned.

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

    The maximum number of elastic cluster snapshot results to receive in the response.

  • snapshot_type (Optional[str], default: None ) –

    The type of cluster snapshots to be returned. You can specify one of the following values:

    • automated - Return all cluster snapshots that Amazon DocumentDB has automatically created for your Amazon Web Services account.

    • manual - Return all cluster snapshots that you have manually created for your Amazon Web Services account.

Raises:

Source code in docs_src/capo_docdb_elastic/_services/async_doc_db_elastic.py
async def list_cluster_snapshots(
    self,
    *,
    config_overrides: Optional[AsyncDocDBElasticClientConfig] = None,
    cluster_arn: Optional[str] = None,
    next_token: Optional[
        "capo_docdb_elastic.types.pagination_token.PaginationToken"
    ] = None,
    max_results: Optional[int] = None,
    snapshot_type: Optional[str] = None,
) -> "capo_docdb_elastic.types.list_cluster_snapshots_output.ListClusterSnapshotsOutput":
    """<p>Returns information about snapshots for a specified elastic cluster.</p>

    Args:
        cluster_arn: <p>The ARN identifier of the elastic cluster.</p>
        next_token: <p>A pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond this token, up to the value specified by <code>max-results</code>.</p> <p>If there is no more data in the responce, the <code>nextToken</code> will not be returned.</p>
        max_results: <p>The maximum number of elastic cluster snapshot results to receive in the response.</p>
        snapshot_type: <p>The type of cluster snapshots to be returned. You can specify one of the following values:</p> <ul> <li> <p> <code>automated</code> - Return all cluster snapshots that Amazon DocumentDB has automatically created for your Amazon Web Services account.</p> </li> <li> <p> <code>manual</code> - Return all cluster snapshots that you have manually created for your Amazon Web Services account.</p> </li> </ul>

    Raises:
        capo_docdb_elastic.errors.access_denied_exception.AccessDeniedException: <p>An exception that occurs when there are not sufficient permissions to perform an action.</p>
        capo_docdb_elastic.errors.internal_server_exception.InternalServerException: <p>There was an internal server error.</p>
        capo_docdb_elastic.errors.throttling_exception.ThrottlingException: <p>ThrottlingException will be thrown when request was denied due to request throttling.</p>
        capo_docdb_elastic.errors.validation_exception.ValidationException: <p>A structure defining a validation exception.</p>
        capo_docdb_elastic.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_docdb_elastic.types.list_cluster_snapshots_input.ListClusterSnapshotsInput]",
    ) -> AsyncOperationResponse[
        "capo_docdb_elastic.types.list_cluster_snapshots_output.ListClusterSnapshotsOutput"
    ]:
        import capo_docdb_elastic._operations.chimera_db_lionfish_service_lambda.list_cluster_snapshots

        (
            output,
            http_response,
        ) = await capo_docdb_elastic._operations.chimera_db_lionfish_service_lambda.list_cluster_snapshots.async_list_cluster_snapshots(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListClusterSnapshots")
    )
    input_: capo_docdb_elastic.types.list_cluster_snapshots_input.ListClusterSnapshotsInput = {}
    if cluster_arn is not None:
        input_["cluster_arn"] = cluster_arn
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results
    if snapshot_type is not None:
        input_["snapshot_type"] = snapshot_type

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