RDS故障切换API问题

0

【以下的问题经过翻译处理】 当我使用Python boto3 API执行failover_db_cluster操作时,传递了writer DB实例标识符,但是它给我以下错误。但是,我能够成功使用其他API,比如describe_db_clusters。

注意:我是从EC2实例运行代码的。

以下是示例代码 -

import boto3
session = boto3.Session()
client = session.client('rds')
response = client.failover_db_cluster(DBClusterIdentifier="test-instance-2")
print(response)

botocore.errorfactory.DBClusterNotFoundFault: An error occurred (DBClusterNotFoundFault) when calling the FailoverDBCluster operation: The source cluster could not be found or cannot be accessed: test-instance-2

请问为什么我会遇到这个问题,应该怎么解决?

profile picture
EXPERTO
preguntada hace 9 meses26 visualizaciones
1 Respuesta
0

【以下的回答经过翻译处理】 那个集群标识符看起来像是一个实例“test-instance-2”。你确定输入了正确的标识符吗?

profile picture
EXPERTO
respondido hace 9 meses

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas