Skip to content

describe_serverless_cache_snapshots async

describe_serverless_cache_snapshots(
    *,
    config_overrides: Optional[AsyncElastiCacheClientConfig] = None,
    serverless_cache_name: Optional[String] = None,
    serverless_cache_snapshot_name: Optional[String] = None,
    snapshot_type: Optional[String] = None,
    next_token: Optional[String] = None,
    max_results: Optional[IntegerOptional] = None,
) -> DescribeServerlessCacheSnapshotsResponse

Returns information about serverless cache snapshots. By default, this API lists all of the customer’s serverless cache snapshots. It can also describe a single serverless cache snapshot, or the snapshots associated with a particular serverless cache. Available for Valkey, Redis OSS and Serverless Memcached only.

Parameters:

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

    The identifier of serverless cache. If this parameter is specified, only snapshots associated with that specific serverless cache are described. Available for Valkey, Redis OSS and Serverless Memcached only.

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

    The identifier of the serverless cache’s snapshot. If this parameter is specified, only this snapshot is described. Available for Valkey, Redis OSS and Serverless Memcached only.

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

    The type of snapshot that is being described. Available for Valkey, Redis OSS and Serverless Memcached only.

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

    An optional marker returned from a prior request to support pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by max-results. Available for Valkey, Redis OSS and Serverless Memcached only.

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

    The maximum number of records to include in the response. If more records exist than the specified max-results value, a market is included in the response so that remaining results can be retrieved. Available for Valkey, Redis OSS and Serverless Memcached only.The default is 50. The Validation Constraints are a maximum of 50.

Raises:

Source code in docs_src/capo_elasticache/_services/async_elasti_cache.py
async def describe_serverless_cache_snapshots(
    self,
    *,
    config_overrides: Optional[AsyncElastiCacheClientConfig] = None,
    serverless_cache_name: Optional["capo_elasticache.types.string.String"] = None,
    serverless_cache_snapshot_name: Optional[
        "capo_elasticache.types.string.String"
    ] = None,
    snapshot_type: Optional["capo_elasticache.types.string.String"] = None,
    next_token: Optional["capo_elasticache.types.string.String"] = None,
    max_results: Optional[
        "capo_elasticache.types.integer_optional.IntegerOptional"
    ] = None,
) -> "capo_elasticache.types.describe_serverless_cache_snapshots_response.DescribeServerlessCacheSnapshotsResponse":
    """<p>Returns information about serverless cache snapshots. By default, this API lists all of the customer’s serverless cache snapshots. It can also describe a single serverless cache snapshot, or the snapshots associated with a particular serverless cache. Available for Valkey, Redis OSS and Serverless Memcached only.</p>

    Args:
        serverless_cache_name: <p>The identifier of serverless cache. If this parameter is specified, only snapshots associated with that specific serverless cache are described. Available for Valkey, Redis OSS and Serverless Memcached only.</p>
        serverless_cache_snapshot_name: <p>The identifier of the serverless cache’s snapshot. If this parameter is specified, only this snapshot is described. Available for Valkey, Redis OSS and Serverless Memcached only.</p>
        snapshot_type: <p>The type of snapshot that is being described. Available for Valkey, Redis OSS and Serverless Memcached only.</p>
        next_token: <p>An optional marker returned from a prior request to support pagination of results from this operation. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by max-results. Available for Valkey, Redis OSS and Serverless Memcached only.</p>
        max_results: <p>The maximum number of records to include in the response. If more records exist than the specified max-results value, a market is included in the response so that remaining results can be retrieved. Available for Valkey, Redis OSS and Serverless Memcached only.The default is 50. The Validation Constraints are a maximum of 50.</p>

    Raises:
        capo_elasticache.errors.invalid_parameter_combination_exception.InvalidParameterCombinationException: <p>Two or more incompatible parameters were specified.</p>
        capo_elasticache.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>The value for a parameter is invalid.</p>
        capo_elasticache.errors.serverless_cache_not_found_fault.ServerlessCacheNotFoundFault: <p>The serverless cache was not found or does not exist.</p>
        capo_elasticache.errors.serverless_cache_snapshot_not_found_fault.ServerlessCacheSnapshotNotFoundFault: <p>This serverless cache snapshot could not be found or does not exist. Available for Valkey, Redis OSS and Serverless Memcached only.</p>
        capo_elasticache.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_elasticache.types.describe_serverless_cache_snapshots_request.DescribeServerlessCacheSnapshotsRequest]",
    ) -> AsyncOperationResponse[
        "capo_elasticache.types.describe_serverless_cache_snapshots_response.DescribeServerlessCacheSnapshotsResponse"
    ]:
        import capo_elasticache._operations.amazon_elasti_cache_v9.describe_serverless_cache_snapshots

        (
            output,
            http_response,
        ) = await capo_elasticache._operations.amazon_elasti_cache_v9.describe_serverless_cache_snapshots.async_describe_serverless_cache_snapshots(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeServerlessCacheSnapshots")
    )
    input_: capo_elasticache.types.describe_serverless_cache_snapshots_request.DescribeServerlessCacheSnapshotsRequest = {}
    if serverless_cache_name is not None:
        input_["serverless_cache_name"] = serverless_cache_name
    if serverless_cache_snapshot_name is not None:
        input_["serverless_cache_snapshot_name"] = serverless_cache_snapshot_name
    if snapshot_type is not None:
        input_["snapshot_type"] = snapshot_type
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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