當前位置: 首頁>>代碼示例>>Golang>>正文


Golang CloudFormation.UpdateStack方法代碼示例

本文整理匯總了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)
}
開發者ID:colhom,項目名稱:coreos-kubernetes,代碼行數:16,代碼來源:stack.go

示例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

}
開發者ID:inka,項目名稱:tacks,代碼行數:23,代碼來源:run.go

示例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"),
				},
開發者ID:rosenhouse,項目名稱:awsfaker,代碼行數:32,代碼來源:cloudformation_test.go


注:本文中的github.com/aws/aws-sdk-go/service/cloudformation.CloudFormation.UpdateStack方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。