按名称列出参数组 - Amazon ElastiCache
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

按名称列出参数组

您可以使用 ElastiCache 控制台 Amazon CLI、或 ElastiCache API 列出参数组。

按名称列出参数组(控制台)

以下过程说明如何使用ElastiCache 控制台查看参数组列表。

使用 ElastiCache 控制台列出参数组
  1. 登录 Amazon Web Services Management Console 并打开 ElastiCache 控制台,网址为 https://console.aws.amazon.com/elasticache/

  2. 要查看所有可用的参数组列表,请在导航窗格左侧选择Parameter Groups

按名称列出参数组 (Amazon CLI)

要使用生成参数组列表 Amazon CLI,请使用命令describe-cache-parameter-groups。如果提供了参数组的名称,将只会列出该参数组。如果未提供参数组的名称,将列出最多 --max-records 个参数组。在任一情况下,都会列出参数组的名称、系列和描述。

以下示例代码列出了参数组 myMem14

对于 Linux、macOS 或 Unix:

aws elasticache describe-cache-parameter-groups \ --cache-parameter-group-name myMem14

对于 Windows:

aws elasticache describe-cache-parameter-groups ^ --cache-parameter-group-name myMem14

该命令的输出内容将类似如下所示,列出参数组的名称、系列和描述。

{ "CacheParameterGroups": [ { "CacheParameterGroupName": "myMem14", "CacheParameterGroupFamily": "memcached1.4", "Description": "My first parameter group" } ] }

以下示例代码列出最多 10 个参数组。

aws elasticache describe-cache-parameter-groups --max-records 10

该命令的 JSON 输出将类似如下所示,列出每个参数组的名称、系列和描述,如果是 redis5.6,还会列出该参数组是否属于全局数据存储 (isGlobal)。

{ "CacheParameterGroups": [ { "CacheParameterGroupName": "custom-redis32", "CacheParameterGroupFamily": "redis3.2", "Description": "custom parameter group with reserved-memory > 0" }, { "CacheParameterGroupName": "default.memcached1.4", "CacheParameterGroupFamily": "memcached1.4", "Description": "Default parameter group for memcached1.4" }, { "CacheParameterGroupName": "default.redis2.6", "CacheParameterGroupFamily": "redis2.6", "Description": "Default parameter group for redis2.6" }, { "CacheParameterGroupName": "default.redis2.8", "CacheParameterGroupFamily": "redis2.8", "Description": "Default parameter group for redis2.8" }, { "CacheParameterGroupName": "default.redis3.2", "CacheParameterGroupFamily": "redis3.2", "Description": "Default parameter group for redis3.2" }, { "CacheParameterGroupName": "default.redis3.2.cluster.on", "CacheParameterGroupFamily": "redis3.2", "Description": "Customized default parameter group for redis3.2 with cluster mode on" }, { "CacheParameterGroupName": "default.redis5.6.cluster.on", "CacheParameterGroupFamily": "redis5.0", "Description": "Customized default parameter group for redis5.6 with cluster mode on", "isGlobal": "yes" }, ] }

有关更多信息,请参阅 describe-cache-parameter-groups

按名称列出参数组 (ElastiCache API)

要使用 ElastiCache API 生成参数组列表,请使用DescribeCacheParameterGroups操作。如果提供了参数组的名称,将只会列出该参数组。如果未提供参数组的名称,将列出最多 MaxRecords 个参数组。在任一情况下,都会列出参数组的名称、系列和描述。

以下示例代码列出了参数组 myMem14

https://elasticache.us-west-2.amazonaws.com/ ?Action=DescribeCacheParameterGroups &CacheParameterGroupName=myMem14 &SignatureVersion=4 &SignatureMethod=HmacSHA256 &Timestamp=20150202T192317Z &Version=2015-02-02 &X-Amz-Credential=<credential>

来自此操作的响应应类似如下所示,列出每个参数组的名称、系列和描述。

<DescribeCacheParameterGroupsResponse xmlns="http://elasticache.amazonaws.com/doc/2013-06-15/"> <DescribeCacheParameterGroupsResult> <CacheParameterGroups> <CacheParameterGroup> <CacheParameterGroupName>myMem14</CacheParameterGroupName> <CacheParameterGroupFamily>memcached1.4</CacheParameterGroupFamily> <Description>My custom Memcached 1.4 parameter group</Description> </CacheParameterGroup> </CacheParameterGroups> </DescribeCacheParameterGroupsResult> <ResponseMetadata> <RequestId>3540cc3d-af48-11e0-97f9-279771c4477e</RequestId> </ResponseMetadata> </DescribeCacheParameterGroupsResponse>

以下示例代码列出最多 10 个参数组。

https://elasticache.us-west-2.amazonaws.com/ ?Action=DescribeCacheParameterGroups &MaxRecords=10 &SignatureVersion=4 &SignatureMethod=HmacSHA256 &Timestamp=20150202T192317Z &Version=2015-02-02 &X-Amz-Credential=<credential>

此操作所得到的响应将类似如下所示,列出每个参数组的名称、系列和描述,如果是 redis5.6,还会列出该参数组是否属于全局数据存储 (isGlobal)。

<DescribeCacheParameterGroupsResponse xmlns="http://elasticache.amazonaws.com/doc/2013-06-15/"> <DescribeCacheParameterGroupsResult> <CacheParameterGroups> <CacheParameterGroup> <CacheParameterGroupName>myRedis28</CacheParameterGroupName> <CacheParameterGroupFamily>redis2.8</CacheParameterGroupFamily> <Description>My custom Redis 2.8 parameter group</Description> </CacheParameterGroup> <CacheParameterGroup> <CacheParameterGroupName>myMem14</CacheParameterGroupName> <CacheParameterGroupFamily>memcached1.4</CacheParameterGroupFamily> <Description>My custom Memcached 1.4 parameter group</Description> </CacheParameterGroup> <CacheParameterGroup> <CacheParameterGroupName>myRedis56</CacheParameterGroupName> <CacheParameterGroupFamily>redis5.0</CacheParameterGroupFamily> <Description>My custom redis 5.6 parameter group</Description> <isGlobal>yes</isGlobal> </CacheParameterGroup> </CacheParameterGroups> </DescribeCacheParameterGroupsResult> <ResponseMetadata> <RequestId>3540cc3d-af48-11e0-97f9-279771c4477e</RequestId> </ResponseMetadata> </DescribeCacheParameterGroupsResponse>

有关更多信息,请参阅 DescribeCacheParameterGroups