View a markdown version of this page

依名稱列出 ElastiCache 參數群組 - Amazon ElastiCache

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

依名稱列出 ElastiCache 參數群組

您可以使用 ElastiCache 主控台、 AWS CLI或 ElastiCache API 列出參數群組。

依名稱列出參數群組 (主控台)

下列程序說明如何使用 ElastiCache 主控台檢視參數群組清單。

使用 ElastiCache 主控台列出參數群組
  1. 登入 AWS 管理主控台 並開啟位於 https://https://console.aws.amazon.com/elasticache/ 的 ElastiCache 主控台。

  2. 若要查看所有可用參數群組的清單,請從左側的導覽窗格中,選擇 Parameter Groups (參數群組)

依名稱列出 ElastiCache 參數群組 (AWS CLI)

若要使用 產生參數群組清單 AWS 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" } ] }
範例

下列範例程式碼列出參數群組 myRed7

針對 Linux、macOS 或 Unix:

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

針對 Windows:

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

此命令的輸出看起來會與以下內容相似,列出參數群組的名稱、系列和描述。

{ "CacheParameterGroups": [ { "CacheParameterGroupName": "myRed7", "CacheParameterGroupFamily": "redis7", "Description": "My first parameter group" } ] }
範例

下列範例程式碼列出在 Redis OSS 引擎版本 myRed5656。如果參數組是 使用全域資料存放區跨 AWS 區域複寫 的一部分,則在輸出中傳回的 IsGlobal 屬性值將是 Yes

針對 Linux、macOS 或 Unix:

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

針對 Windows:

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

此命令的輸出看起來會與以下內容相似,列出參數群組的名稱、系列、isGlobal 和描述。

{ "CacheParameterGroups": [ { "CacheParameterGroupName": "myRed56", "CacheParameterGroupFamily": "redis5.0", "Description": "My first parameter group", "IsGlobal": "yes" } ] }
範例

以下範本程式碼會列出最多 10 個參數群組。

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

此命令的 JSON 輸出看起來像這樣:列出每個參數群組的名稱、系列、描述,以及在使用 redis5.6 的情況下,參數群組是否為全域資料存放區 (isGlobal) 的一部分。

{ "CacheParameterGroups": [ { "CacheParameterGroupName": "custom-redis7", "CacheParameterGroupFamily": "redis7", "Description": "custom parameter group with reserved-memory > 0" }, { "CacheParameterGroupName": "default.memcached1.6", "CacheParameterGroupFamily": "memcached1.6", "Description": "Default parameter group for memcached1.6" }, { "CacheParameterGroupName": "default.redis6.x", "CacheParameterGroupFamily": "redis6.x", "Description": "Default parameter group for redis6.x" }, { "CacheParameterGroupName": "default.redis7", "CacheParameterGroupFamily": "redis7", "Description": "Default parameter group for redis7" }, { "CacheParameterGroupName": "default.redis7.cluster.on", "CacheParameterGroupFamily": "redis7", "Description": "Customized default parameter group for redis7 with cluster mode on", "isGlobal": "yes" } ] }

如需詳細資訊,請參閱describe-cache-parameter-groups

依名稱列出 ElastiCache 參數群組 (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>myRed7</CacheParameterGroupName> <CacheParameterGroupFamily>redis7</CacheParameterGroupFamily> <Description>My custom Redis OSS 7 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>
範例

下列範例程式碼列出參數群組 myRed7

https://elasticache.us-west-2.amazonaws.com/ ?Action=DescribeCacheParameterGroups &CacheParameterGroupName=myRed7 &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>myRed7</CacheParameterGroupName> <CacheParameterGroupFamily>redis7</CacheParameterGroupFamily> <Description>My custom Redis OSS 7 parameter group</Description> </CacheParameterGroup> </CacheParameterGroups> </DescribeCacheParameterGroupsResult> <ResponseMetadata> <RequestId>3540cc3d-af48-11e0-97f9-279771c4477e</RequestId> </ResponseMetadata> </DescribeCacheParameterGroupsResponse>
範例

以下範本程式碼會列出 myRed56 參數群組。

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

此動作的回應看起來像這樣:列出名稱、系列、描述以及參數群組是否為全域資料存放區 (isGlobal) 的一部分。

<DescribeCacheParameterGroupsResponse xmlns="http://elasticache.amazonaws.com/doc/2013-06-15/"> <DescribeCacheParameterGroupsResult> <CacheParameterGroups> <CacheParameterGroup> <CacheParameterGroupName>myRed56</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