假设我的应用程序配置中有一个托管配置版本:
{
"configs": [
{
"A": 1,
"B": 2
},
{
"C": 3,
"D": 4
}
]
}
现在,我想将此版本更新为新版本:
{
"configs": [
{
"A": 1,
"B": 2
},
{
"C": 3,
"D": 4
},
{
"E": 5,
"F": 6
}
]
}
我们怎样才能实现这一目标? 就文档而言,我们可以使用
CreateHostedConfigurationVersion
创建新版本,但无法更新现有版本。还有其他办法吗?
只需重新创建它即可:
content=$(cat foo.json | base64)
aws appconfig create-hosted-configuration-version \
--application-id APPID \
--configuration-profile-id PROFILEID \
--content $content \
--content-type application/json \
out.json
将创建新版本的 AppConfig 配置文件。