本文整理汇总了Golang中github.com/aws/aws-sdk-go/service/cloudformation.CloudFormation.DeleteStack方法的典型用法代码示例。如果您正苦于以下问题:Golang CloudFormation.DeleteStack方法的具体用法?Golang CloudFormation.DeleteStack怎么用?Golang CloudFormation.DeleteStack使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/aws/aws-sdk-go/service/cloudformation.CloudFormation
的用法示例。
在下文中一共展示了CloudFormation.DeleteStack方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: destroyStack
func destroyStack(svc *cloudformation.CloudFormation, name string) error {
dreq := &cloudformation.DeleteStackInput{
StackName: aws.String(name),
}
_, err := svc.DeleteStack(dreq)
return err
}
示例2: deleteStack
func deleteStack(s Stack, distinctId string, CF *cloudformation.CloudFormation) error {
deleteAttempts[s.StackName] += 1
switch deleteAttempts[s.StackName] {
case 1:
fmt.Printf("Deleting %s...\n", s.Name)
default:
fmt.Printf("Retrying deleting %s...\n", s.Name)
}
_, err := CF.DeleteStack(&cloudformation.DeleteStackInput{
StackName: aws.String(s.StackName),
})
return err
}
示例3: delStack
func delStack(svc *awscf.CloudFormation, stackName string) {
input := &awscf.DeleteStackInput{
StackName: aws.String(stackName),
}
_, err := svc.DeleteStack(input)
if err != nil {
log.Fatal(err)
}
// the log.Println ends up looking like
// 2015/06/04 16:55:36 {
//
// }
//
// log.Println(awsutil.StringValue(resp))
}