Amazon ElastiCache
用户指南 (API Version 2015-02-02)
AWS 服务或AWS文档中描述的功能,可能因地区/位置而异。请点击 Amazon AWS 入门,可查看中国地区的具体差异

(AWS CLI) 查看群集的详细信息

您可以使用 AWS CLI describe-cache-clusters 命令查看集群的详细信息。如果省略 --cache-cluster-id 参数,则会返回多个集群(最多 --max-items 个)的详细信息。如果包含 --cache-cluster-id 参数,则将返回指定的集群的详细信息。您可以使用 --max-items 参数限制返回的记录数。

以下代码列出了 myCluster 的详细信息。

Copy
aws elasticache describe-cache-clusters --cache-cluster-id myCluster

以下代码列出了最多 25 个集群的详细信息。

Copy
aws elasticache describe-cache-clusters --max-items 25

使用命令 describe-cache-cluster 显示群集的节点列表,如以下示例所示,然后记下要移除的节点的标识符。

对于 Linux, OS X, or Unix:

Copy
aws elasticache describe-cache-clusters \ --cache-cluster-id my-memcached-cluster \ --show-cache-node-info

对于 Windows:

Copy
aws elasticache describe-cache-clusters ^ --cache-cluster-id my-memcached-cluster ^ --show-cache-node-info

此操作生成类似于下述信息的输出 (JSON 格式):

{
    "CacheClusters": [
        {
            "Engine": "memcached", 
            "CacheNodes": [
                {
                    "CacheNodeId": "0001", 
                    "Endpoint": {
                        "Port": 11211, 
                        "Address": "my-memcached-cluster.7ef-example.0001.usw2.cache.amazonaws.com"
                    }, 
                    "CacheNodeStatus": "available", 
                    "ParameterGroupStatus": "in-sync", 
                    "CacheNodeCreateTime": "2016-09-21T16:28:28.973Z", 
                    "CustomerAvailabilityZone": "us-west-2b"
                }, 
                {
                    "CacheNodeId": "0002", 
                    "Endpoint": {
                        "Port": 11211, 
                        "Address": "my-memcached-cluster.7ef-example.0002.usw2.cache.amazonaws.com"
                    }, 
                    "CacheNodeStatus": "available", 
                    "ParameterGroupStatus": "in-sync", 
                    "CacheNodeCreateTime": "2016-09-21T16:28:28.973Z", 
                    "CustomerAvailabilityZone": "us-west-2b"
                }, 
                {
                    "CacheNodeId": "0003", 
                    "Endpoint": {
                        "Port": 11211, 
                        "Address": "my-memcached-cluster.7ef-example.0003.usw2.cache.amazonaws.com"
                    }, 
                    "CacheNodeStatus": "available", 
                    "ParameterGroupStatus": "in-sync", 
                    "CacheNodeCreateTime": "2016-09-21T16:28:28.973Z", 
                    "CustomerAvailabilityZone": "us-west-2b"
                }
            ], 
            "CacheParameterGroup": {
                "CacheNodeIdsToReboot": [], 
                "CacheParameterGroupName": "default.memcached1.4", 
                "ParameterApplyStatus": "in-sync"
            }, 
            "CacheClusterId": "my-memcached-cluster", 
            "PreferredAvailabilityZone": "us-west-2b", 
            "ConfigurationEndpoint": {
                "Port": 11211, 
                "Address": "my-memcached-cluster.7ef-example.cfg.usw2.cache.amazonaws.com"
            }, 
            "CacheSecurityGroups": [], 
            "CacheClusterCreateTime": "2016-09-21T16:28:28.973Z", 
            "AutoMinorVersionUpgrade": true, 
            "CacheClusterStatus": "available", 
            "NumCacheNodes": 3, 
            "ClientDownloadLandingPage": "https://console.aws.amazon.com/elasticache/home#client-download:", 
            "SecurityGroups": [
                {
                    "Status": "active", 
                    "SecurityGroupId": "sg-dbe93fa2"
                }
            ], 
            "CacheSubnetGroupName": "default", 
            "EngineVersion": "1.4.24", 
            "PendingModifiedValues": {}, 
            "PreferredMaintenanceWindow": "sat:09:00-sat:10:00", 
            "CacheNodeType": "cache.m3.medium"
        }
    ]
}

有关更多信息,请转至 ElastiCache 的 AWS CLI 主题 describe-cache-clusters