本文整理汇总了Golang中github.com/aws/aws-sdk-go/service/cloudformation.CloudFormation.UpdateStack方法的典型用法代码示例。如果您正苦于以下问题:Golang CloudFormation.UpdateStack方法的具体用法?Golang CloudFormation.UpdateStack怎么用?Golang CloudFormation.UpdateStack使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/aws/aws-sdk-go/service/cloudformation.CloudFormation
的用法示例。
在下文中一共展示了CloudFormation.UpdateStack方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: updateStack
func updateStack(svc *cloudformation.CloudFormation, stackName, stackBody string) (string, error) {
input := &cloudformation.UpdateStackInput{
Capabilities: []*string{aws.String(cloudformation.CapabilityCapabilityIam)},
StackName: aws.String(stackName),
TemplateBody: aws.String(stackBody),
}
updateOutput, err := svc.UpdateStack(input)
if err != nil {
return "", fmt.Errorf("Error updating cloudformation stack: %v", err)
}
return updateOutput.String(), waitForStackUpdateComplete(svc, *updateOutput.StackId)
}
示例2: runUpdate
func (r *Run) runUpdate(client *cf.CloudFormation, d tacks.Document, stack string) error {
e := d.Environment
tacks.Logger().Infof("Updating stack %s", e.StackName)
var (
capabilities []*string
)
if d.IsIamCapabilitiesRequired() {
capabilities = append(capabilities, aws.String("CAPABILITY_IAM"))
}
_, err := client.UpdateStack(&cf.UpdateStackInput{
Capabilities: capabilities,
StackName: aws.String(e.StackName),
TemplateBody: aws.String(stack),
})
return err
}
示例3:
})
AfterEach(func() {
if fakeServer != nil {
fakeServer.Close()
}
})
It("should properly parse nested structs in the input", func() {
client.UpdateStack(
&cloudformation.UpdateStackInput{
StackName: aws.String("some-stack-name"),
Parameters: []*cloudformation.Parameter{
&cloudformation.Parameter{
ParameterKey: aws.String("some-key-0"),
ParameterValue: aws.String("some-value-0"),
},
&cloudformation.Parameter{
ParameterKey: aws.String("some-key-1"),
ParameterValue: aws.String("some-value-1"),
},
},
})
Expect(fakeBackend.UpdateStackCall.Receives).NotTo(BeNil())
Expect(fakeBackend.UpdateStackCall.Receives.StackName).To(Equal(aws.String("some-stack-name")))
Expect(fakeBackend.UpdateStackCall.Receives.Parameters).To(Equal(
[]*cloudformation.Parameter{
&cloudformation.Parameter{
ParameterKey: aws.String("some-key-0"),
ParameterValue: aws.String("some-value-0"),
},