[英]CreateStackInput() with parameters
我正在從使用aws cli命令轉換為使用aws go api。 在弄清楚如何將參數傳遞到CreateStackInput調用時遇到麻煩。
這是我嘗試使用aws api復制的命令行:
aws cloudformation create-stack --stack-name "poc1841" --template-url "https://s3-us-west-2.amazonaws.com/<path_removed>/cfn-cl-template.json" --parameters file:///params/poc1841.json
params文件如下所示:
[
{
"ParameterKey":"CNAMEPrefix",
"ParameterValue":"poc1841001"
}]
這是我正在使用的api調用:
input := &cloudformation.CreateStackInput{
TemplateBody: aws.String(templateBody),
StackName: aws.String(stackName),
OnFailure: aws.String("ROLLBACK"),
TimeoutInMinutes: &timeoutInMins }
CreateStackInput確實具有類型為Parameters的Parameters屬性。 我需要將params json文件進行哪些特殊處理,才能將這些值傳遞到Parameter字段中?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.