Returns information about a specific serverless cache. If no identifier is specified, then the API returns information on all the serverless caches belonging to this Amazon Web Services account.
Parameters:
-
serverless_cache_name
(Optional[String], default:
None
)
–
The identifier for the serverless cache. If this parameter is specified, only information about that specific serverless cache is returned. Default: NULL
-
max_results
(Optional[IntegerOptional], default:
None
)
–
The maximum number of records in the response. If more records exist than the specified max-records value, the next token is included in the response so that remaining results can be retrieved. The default is 50.
-
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 MaxResults.
Raises:
Source code in docs_src/capo_elasticache/_services/async_elasti_cache.py
| async def describe_serverless_caches(
self,
*,
config_overrides: Optional[AsyncElastiCacheClientConfig] = None,
serverless_cache_name: Optional["capo_elasticache.types.string.String"] = None,
max_results: Optional[
"capo_elasticache.types.integer_optional.IntegerOptional"
] = None,
next_token: Optional["capo_elasticache.types.string.String"] = None,
) -> "capo_elasticache.types.describe_serverless_caches_response.DescribeServerlessCachesResponse":
"""<p>Returns information about a specific serverless cache. If no identifier is specified, then the API returns information on all the serverless caches belonging to this Amazon Web Services account.</p>
Args:
serverless_cache_name: <p>The identifier for the serverless cache. If this parameter is specified, only information about that specific serverless cache is returned. Default: NULL</p>
max_results: <p>The maximum number of records in the response. If more records exist than the specified max-records value, the next token is included in the response so that remaining results can be retrieved. The default is 50.</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 MaxResults.</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.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_elasticache.types.describe_serverless_caches_request.DescribeServerlessCachesRequest]",
) -> AsyncOperationResponse[
"capo_elasticache.types.describe_serverless_caches_response.DescribeServerlessCachesResponse"
]:
import capo_elasticache._operations.amazon_elasti_cache_v9.describe_serverless_caches
(
output,
http_response,
) = await capo_elasticache._operations.amazon_elasti_cache_v9.describe_serverless_caches.async_describe_serverless_caches(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DescribeServerlessCaches")
)
input_: capo_elasticache.types.describe_serverless_caches_request.DescribeServerlessCachesRequest = {}
if serverless_cache_name is not None:
input_["serverless_cache_name"] = serverless_cache_name
if max_results is not None:
input_["max_results"] = max_results
if next_token is not None:
input_["next_token"] = next_token
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|