Skip to content

describe_snapshots async

describe_snapshots(
    *,
    config_overrides: Optional[AsyncMemoryDBClientConfig] = None,
    cluster_name: Optional[String] = None,
    snapshot_name: Optional[String] = None,
    source: Optional[String] = None,
    next_token: Optional[String] = None,
    max_results: Optional[IntegerOptional] = None,
    show_detail: Optional[BooleanOptional] = None,
) -> DescribeSnapshotsResponse

Returns information about cluster snapshots. By default, DescribeSnapshots lists all of your snapshots; it can optionally describe a single snapshot, or just the snapshots associated with a particular cluster.

Parameters:

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

    A user-supplied cluster identifier. If this parameter is specified, only snapshots associated with that specific cluster are described.

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

    A user-supplied name of the snapshot. If this parameter is specified, only this named snapshot is described.

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

    If set to system, the output shows snapshots that were automatically created by MemoryDB. If set to user the output shows snapshots that were manually created. If omitted, the output shows both automatically and manually created snapshots.

  • 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.

  • 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.

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

    A Boolean value which if true, the shard configuration is included in the snapshot description.

Raises:

Source code in docs_src/capo_memorydb/_services/async_memory_db.py
async def describe_snapshots(
    self,
    *,
    config_overrides: Optional[AsyncMemoryDBClientConfig] = None,
    cluster_name: Optional["capo_memorydb.types.string.String"] = None,
    snapshot_name: Optional["capo_memorydb.types.string.String"] = None,
    source: Optional["capo_memorydb.types.string.String"] = None,
    next_token: Optional["capo_memorydb.types.string.String"] = None,
    max_results: Optional[
        "capo_memorydb.types.integer_optional.IntegerOptional"
    ] = None,
    show_detail: Optional[
        "capo_memorydb.types.boolean_optional.BooleanOptional"
    ] = None,
) -> "capo_memorydb.types.describe_snapshots_response.DescribeSnapshotsResponse":
    """<p>Returns information about cluster snapshots. By default, DescribeSnapshots lists all of your snapshots; it can optionally describe a single snapshot, or just the snapshots associated with a particular cluster.</p>

    Args:
        cluster_name: <p>A user-supplied cluster identifier. If this parameter is specified, only snapshots associated with that specific cluster are described.</p>
        snapshot_name: <p>A user-supplied name of the snapshot. If this parameter is specified, only this named snapshot is described.</p>
        source: <p>If set to system, the output shows snapshots that were automatically created by MemoryDB. If set to user the output shows snapshots that were manually created. If omitted, the output shows both automatically and manually created snapshots.</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>
        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>
        show_detail: <p>A Boolean value which if true, the shard configuration is included in the snapshot description.</p>

    Raises:
        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.snapshot_not_found_fault.SnapshotNotFoundFault: <p>The specified snapshot does not exist.</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_snapshots_request.DescribeSnapshotsRequest]",
    ) -> AsyncOperationResponse[
        "capo_memorydb.types.describe_snapshots_response.DescribeSnapshotsResponse"
    ]:
        import capo_memorydb._operations.amazon_memory_db.describe_snapshots

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeSnapshots")
    )
    input_: capo_memorydb.types.describe_snapshots_request.DescribeSnapshotsRequest = {}
    if cluster_name is not None:
        input_["cluster_name"] = cluster_name
    if snapshot_name is not None:
        input_["snapshot_name"] = snapshot_name
    if source is not None:
        input_["source"] = source
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results
    if show_detail is not None:
        input_["show_detail"] = show_detail

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