// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. package autoscaling import ( "github.com/aws/aws-sdk-go/private/waiter" ) func (c *AutoScaling) WaitUntilGroupExists(input *DescribeAutoScalingGroupsInput) error { waiterCfg := waiter.Config{ Operation: "DescribeAutoScalingGroups", Delay: 5, MaxAttempts: 10, Acceptors: []waiter.WaitAcceptor{ { State: "success", Matcher: "pathAll", Argument: "length(AutoScalingGroups)", Expected: 1, }, { State: "retry", Matcher: "pathAll", Argument: "length(AutoScalingGroups)", Expected: 0, }, }, } w := waiter.Waiter{ Client: c, Input: input, Config: waiterCfg, } return w.Wait() } func (c *AutoScaling) WaitUntilGroupInService(input *DescribeAutoScalingGroupsInput) error { waiterCfg := waiter.Config{ Operation: "DescribeAutoScalingGroups", Delay: 15, MaxAttempts: 40, Acceptors: []waiter.WaitAcceptor{ { State: "success", Matcher: "pathAll", Argument: "contains(AutoScalingGroups[].[length(Instances[?LifecycleState=='InService']) >= MinSize][], `false`)", Expected: false, }, { State: "retry", Matcher: "pathAll", Argument: "contains(AutoScalingGroups[].[length(Instances[?LifecycleState=='InService']) >= MinSize][], `false`)", Expected: true, }, }, } w := waiter.Waiter{ Client: c, Input: input, Config: waiterCfg, } return w.Wait() } func (c *AutoScaling) WaitUntilGroupNotExists(input *DescribeAutoScalingGroupsInput) error { waiterCfg := waiter.Config{ Operation: "DescribeAutoScalingGroups", Delay: 15, MaxAttempts: 40, Acceptors: []waiter.WaitAcceptor{ { State: "success", Matcher: "pathAll", Argument: "length(AutoScalingGroups)", Expected: 0, }, { State: "retry", Matcher: "pathAll", Argument: "length(AutoScalingGroups)", Expected: 1, }, }, } w := waiter.Waiter{ Client: c, Input: input, Config: waiterCfg, } return w.Wait() }