문제

I am making a describeCacheClusters request as follows and get a valid response but the getCacheClusters() method returns null even though that cluster has available nodes. Is there another request I should be using or a missing parameter?

DescribeCacheClustersResult result = awsClient
        .describeCacheClusters(new DescribeCacheClustersRequest()
        .withCacheClusterId(ELASTICACHE_CLUSTER_ID));
도움이 되었습니까?

해결책

You are missing a parameter indeed due to a somewhat confusing API design resp. documentation issue with Amazon ElastiCache:

You need to add setShowCacheNodeInfo() to your DescribeCacheClustersRequest and call getCacheNodes() for each CacheCluster retrieved via getCacheClusters() from the DescribeCacheClustersResult - see my answer to the semantic duplicate Finding AWS ElastiCache endpoints with Java for details and code samples.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top