如何通过 aws cli‘elasticache describe-cache-clusters’找出 redis 集群节点的端点 url?

如何通过 aws cli‘elasticache describe-cache-clusters’找出 redis 集群节点的端点 url?

如果我运行,aws elasticache describe-cache-clusters我会得到如下结果:

    {
        "CacheClusterId": "dev-001",
        "ClientDownloadLandingPage": "https://console.aws.amazon.com/elasticache/home#client-download:",
        "CacheNodeType": "cache.t2.small",
        "Engine": "redis",
        "EngineVersion": "5.0.0",
        "CacheClusterStatus": "available",
        "NumCacheNodes": 1,
        "PreferredAvailabilityZone": "us-west-1a",
        "CacheClusterCreateTime": "2019-01-04T03:12:23.477000+00:00",
        "PreferredMaintenanceWindow": "sat:07:00-sat:08:00",
        "PendingModifiedValues": {},
        "CacheSecurityGroups": [],
        "CacheParameterGroup": {
            "CacheParameterGroupName": "default.redis5.0",
            "ParameterApplyStatus": "in-sync",
            "CacheNodeIdsToReboot": []
        },
        "CacheSubnetGroupName": "dev-redis-subnets",
        "AutoMinorVersionUpgrade": true,
        "SecurityGroups": [
            {
                "SecurityGroupId": "sg-0600888999884b1",
                "Status": "active"
            }
        ],
        "ReplicationGroupId": "dev",
        "SnapshotRetentionLimit": 1,
        "SnapshotWindow": "06:00-07:00",
        "AuthTokenEnabled": true,
        "TransitEncryptionEnabled": true,
        "AtRestEncryptionEnabled": true
    }

但是它没有显示每个节点的端点(以 的形式dev-0001-001.dev.cbbxt9.use1.cache.amazonaws.com

哪个 aws cli 允许我检索 redis clusteR 的节点级信息?

答案1

要确定缓存节点端点和端口号,请使用带有 --show-cache-node-info 参数的 describe-cache-clusters 命令。

aws elasticache describe-cache-clusters --show-cache-node-info

完全限定的 DNS 名称和端口号位于输出的 Endpoint 部分。

参考

查找节点端点和端口

相关内容