AWS命令行提供API以读取弹性beantalk环境信息:
aws elasticbeanstalk describe-environments --environment-ids 'e-438kcmnae5'
但是,我没有找到文档来从API读取详细的数据库配置(如下面的浏览器控制台所示)。
答案 0 :(得分:1)
您正在寻找的是DescribeEnvironmentResources
Beanstalk API:
aws elasticbeanstalk describe-environment-resources --environment-name <environment-name>
结果:
{
"EnvironmentResources": {
...
"Resources": [
...
{
"Type": "AWS::RDS::DBInstance",
"LogicalResourceId": "...",
"PhysicalResourceId": "...",
"Properties": [
{
"Name": "Endpoint",
"Value": "..."
},
{
"Name": "Port",
"Value": "3306"
}
}
]
},
...
}