python - AWS ElastiCache 描述 CacheClusters

标签 python amazon-web-services amazon-elasticache

我正在尝试运行 describe_cache_clusters使用 boto3 在 Python 上执行命令。当我的 ElastiCache 集群只有一个节点时,此命令有效,但当有多个节点时,它不起作用。当我使用 AWS CLI 命令时,我也遇到了同样的错误,即找不到集群。

    client = boto3.client('elasticache')
    paginator = client.get_paginator('describe_cache_clusters')
    response = paginator.paginate(
    CacheClusterId='xxxxx',
    ShowCacheNodeInfo=True,
    ShowCacheClustersNotInReplicationGroups=False,)

这是功能本身的缺点吗?我试图在不使用 UI 的情况下获取 cachecluster 端点。

以下是一些 ElastiCache 配置:

Redis: 3.2.4
NodeType cache.r3.large
1 Shard, 3 Nodes

最佳答案

我想出了我的问题。由于有多个节点,我需要在 cachecluseterid 中有一个 -001 (or2,3,)。然后函数就起作用了

关于python - AWS ElastiCache 描述 CacheClusters,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45551263/

相关文章:

amazon-web-services - 从对等 VPC 连接到 Elasticache Redis 集群

python - BAM 文件 : getting all reads on certain position with pysam

amazon-web-services - 允许从 Beanstalk 安全组访问 EC2 安全组

java - 如何通过仅编辑一个类文件中的一些硬编码 key 来重新编译Java程序?

java - 如何使用 Android Studio 在 Amazon Rekognition AWS 中检测人脸?

.net-core - 使用 StackExchange.Redis 到 ElastiCache Redis 的 Lambda : RedisConnectionException - No connection is active/available to service this operation

redis - Spring data Redis集群Lettuce连接设置

python - to_excel() 没有索引布局

python - 如何从数据框中删除任何行中包含特定值的列

python - 使用selenium python从不同的html中获取href标签下的链接