Returns a list of the available cache engines and their versions.
Parameters:
-
engine
(Optional[String], default:
None
)
–
The cache engine to return. Valid values: memcached | redis
-
engine_version
(Optional[String], default:
None
)
–
The cache engine version to return.
Example: 1.4.14
-
cache_parameter_group_family
(Optional[String], default:
None
)
–
The name of a specific cache parameter group family to return details for.
Valid values are: memcached1.4 | memcached1.5 | memcached1.6 | redis2.6 | redis2.8 | redis3.2 | redis4.0 | redis5.0 | redis6.x | redis6.2 | redis7 | valkey7
Constraints:
-
Must be 1 to 255 alphanumeric characters
-
First character must be a letter
-
Cannot end with a hyphen or contain two consecutive hyphens
-
max_records
(Optional[IntegerOptional], default:
None
)
–
The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a marker is included in the response so that the remaining results can be retrieved.
Default: 100
Constraints: minimum 20; maximum 100.
-
marker
(Optional[String], default:
None
)
–
An optional marker returned from a prior request. Use this marker for 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 MaxRecords.
-
default_only
(Optional[Boolean], default:
None
)
–
If true, specifies that only the default version of the specified engine or engine and major version combination is to be returned.
Raises:
Examples:
DescribeCacheEngineVersions
Lists the details for up to 25 Memcached and Redis cache engine versions.
>>> client.describe_cache_engine_versions()
DescribeCacheEngineVersions
Lists the details for up to 50 Redis cache engine versions.
>>> client.describe_cache_engine_versions(engine='redis', max_records=50, default_only=False)
Source code in docs_src/capo_elasticache/_services/elasti_cache.py
| def describe_cache_engine_versions(
self,
*,
config_overrides: Optional[ElastiCacheClientConfig] = None,
engine: Optional["capo_elasticache.types.string.String"] = None,
engine_version: Optional["capo_elasticache.types.string.String"] = None,
cache_parameter_group_family: Optional[
"capo_elasticache.types.string.String"
] = None,
max_records: Optional[
"capo_elasticache.types.integer_optional.IntegerOptional"
] = None,
marker: Optional["capo_elasticache.types.string.String"] = None,
default_only: Optional["capo_elasticache.types.boolean.Boolean"] = None,
) -> (
"capo_elasticache.types.cache_engine_version_message.CacheEngineVersionMessage"
):
"""<p>Returns a list of the available cache engines and their versions.</p>
Args:
engine: <p>The cache engine to return. Valid values: <code>memcached</code> | <code>redis</code> </p>
engine_version: <p>The cache engine version to return.</p> <p>Example: <code>1.4.14</code> </p>
cache_parameter_group_family: <p>The name of a specific cache parameter group family to return details for.</p> <p>Valid values are: <code>memcached1.4</code> | <code>memcached1.5</code> | <code>memcached1.6</code> | <code>redis2.6</code> | <code>redis2.8</code> | <code>redis3.2</code> | <code>redis4.0</code> | <code>redis5.0</code> | <code>redis6.x</code> | <code>redis6.2</code> | <code>redis7</code> | <code>valkey7</code> </p> <p>Constraints:</p> <ul> <li> <p>Must be 1 to 255 alphanumeric characters</p> </li> <li> <p>First character must be a letter</p> </li> <li> <p>Cannot end with a hyphen or contain two consecutive hyphens</p> </li> </ul>
max_records: <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a marker is included in the response so that the remaining results can be retrieved.</p> <p>Default: 100</p> <p>Constraints: minimum 20; maximum 100.</p>
marker: <p>An optional marker returned from a prior request. Use this marker for 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 <code>MaxRecords</code>.</p>
default_only: <p>If <code>true</code>, specifies that only the default version of the specified engine or engine and major version combination is to be returned.</p>
Raises:
capo_elasticache.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
DescribeCacheEngineVersions
Lists the details for up to 25 Memcached and Redis cache engine versions.
>>> client.describe_cache_engine_versions()
DescribeCacheEngineVersions
Lists the details for up to 50 Redis cache engine versions.
>>> client.describe_cache_engine_versions(engine='redis', max_records=50, default_only=False)
"""
def _handler(
req: "OperationRequest[capo_elasticache.types.describe_cache_engine_versions_message.DescribeCacheEngineVersionsMessage]",
) -> OperationResponse[
"capo_elasticache.types.cache_engine_version_message.CacheEngineVersionMessage"
]:
import capo_elasticache._operations.amazon_elasti_cache_v9.describe_cache_engine_versions
output, http_response = (
capo_elasticache._operations.amazon_elasti_cache_v9.describe_cache_engine_versions.describe_cache_engine_versions(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DescribeCacheEngineVersions")
)
input_: capo_elasticache.types.describe_cache_engine_versions_message.DescribeCacheEngineVersionsMessage = {}
if engine is not None:
input_["engine"] = engine
if engine_version is not None:
input_["engine_version"] = engine_version
if cache_parameter_group_family is not None:
input_["cache_parameter_group_family"] = cache_parameter_group_family
if max_records is not None:
input_["max_records"] = max_records
if marker is not None:
input_["marker"] = marker
if default_only is not None:
input_["default_only"] = default_only
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|