檢視複寫群組詳細資訊 (AWS CLI) - Amazon ElastiCache (雷迪OSS斯)

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

檢視複寫群組詳細資訊 (AWS CLI)

您可以使用 AWS CLI describe-replication-groups 命令來檢視複寫群組的詳細資訊。使用以下選用參數來縮小清單的搜尋範圍。忽略參數會傳回最多 100 個複寫群組的詳細資訊。

選用的參數
  • --replication-group-id - 使用此參數來列出特定複寫群組的詳細資訊。若指定複寫群組擁有超過一個節點群組,結果會以節點群組做為群組傳回。

  • --max-items - 使用此參數來限制列出的複寫群組數量。--max-items 的值不可小於 20 或大於 100。

以下程式碼清單會列出最多 100 個複寫群組的詳細資訊。

aws elasticache describe-replication-groups

以下程式碼會列出 sample-repl-group 的詳細資訊。

aws elasticache describe-replication-groups --replication-group-id sample-repl-group

以下程式碼會列出 sample-repl-group 的詳細資訊。

aws elasticache describe-replication-groups --replication-group-id sample-repl-group

以下程式碼清單會列出最多 25 個複寫群組的詳細資訊。

aws elasticache describe-replication-groups --max-items 25

此操作的輸出看起來應會與以下內容相似 (JSON 格式)。

{ "ReplicationGroups": [ { "Status": "available", "Description": "test", "NodeGroups": [ { "Status": "available", "NodeGroupMembers": [ { "CurrentRole": "primary", "PreferredAvailabilityZone": "us-west-2a", "CacheNodeId": "0001", "ReadEndpoint": { "Port": 6379, "Address": "rg-name-001.1abc4d.0001.usw2.cache.amazonaws.com" }, "CacheClusterId": "rg-name-001" }, { "CurrentRole": "replica", "PreferredAvailabilityZone": "us-west-2b", "CacheNodeId": "0001", "ReadEndpoint": { "Port": 6379, "Address": "rg-name-002.1abc4d.0001.usw2.cache.amazonaws.com" }, "CacheClusterId": "rg-name-002" }, { "CurrentRole": "replica", "PreferredAvailabilityZone": "us-west-2c", "CacheNodeId": "0001", "ReadEndpoint": { "Port": 6379, "Address": "rg-name-003.1abc4d.0001.usw2.cache.amazonaws.com" }, "CacheClusterId": "rg-name-003" } ], "NodeGroupId": "0001", "PrimaryEndpoint": { "Port": 6379, "Address": "rg-name.1abc4d.ng.0001.usw2.cache.amazonaws.com" } } ], "ReplicationGroupId": "rg-name", "AutomaticFailover": "enabled", "SnapshottingClusterId": "rg-name-002", "MemberClusters": [ "rg-name-001", "rg-name-002", "rg-name-003" ], "PendingModifiedValues": {} }, { ... some output omitted for brevity } ] }

如需詳細資訊,請參閱 ElastiCache 的 AWS CLI 主題 describe-replication-groups。