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

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

依名稱列出 ElastiCache 參數群組

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

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

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

使用 ElastiCache 主控台列出參數群組
  1. 登入 AWS Management Console ,並在 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" } ] }

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

若為 Linux、macOS 或 Unix:

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

針對 Windows:

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

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

{ "CacheParameterGroups": [ { "CacheParameterGroupName": "myRed28", "CacheParameterGroupFamily": "redis2.8", "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-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 參數群組 (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>

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

https://elasticache.us-west-2.amazonaws.com/ ?Action=DescribeCacheParameterGroups &CacheParameterGroupName=myRed28 &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>myRed28</CacheParameterGroupName> <CacheParameterGroupFamily>redis2.8</CacheParameterGroupFamily> <Description>My custom Redis 2.8 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