2024-09-24 08:38:50 发布
网友
我们有一堆auroramysql集群,需要使用boto3确定哪些实例是主实例,哪些是读取副本。集群端点的副本名称中有“-ro-”。这是唯一的办法吗? 抱歉,如果这已经得到答复
终于找到了。。。需要使用“describe\u db\u cluster\u endpoints”方法
import boto3 client = boto3.client('rds', 'my-region') my_cluster = client.describe_db_cluster_endpoints(DBClusterIdentifier='my-aurora-cluster') print my_cluster
如果查找“EndpointType”,则会有“WRITER”或“READER”
终于找到了。。。需要使用“describe\u db\u cluster\u endpoints”方法
如果查找“EndpointType”,则会有“WRITER”或“READER”
相关问题 更多 >
编程相关推荐