【发布时间】:2019-12-30 12:46:38
【问题描述】:
伙计们 我有实例的特定名称,我需要使用 boto3 按名称获取可用/停止状态 RDS 实例。示例我可以列出所有具有 InstanceId 和状态的实例
rds = boto3.client('rds')
response = client.describe_db_instances()
for resp in response['DBInstances']:
db_instance_id = resp['DBInstanceIdentifier']
db_instance_status = resp['DBInstanceStatus']
但我有实例名称,例如 d2-pipeline 或 d4-pipeline,我只想在没有任何循环的情况下获得它们的状态
【问题讨论】:
-
你是什么意思,
without any cycle?
标签: python amazon-web-services boto3 amazon-rds rds