waiters.go 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. package autoscaling
  3. import (
  4. "github.com/aws/aws-sdk-go/private/waiter"
  5. )
  6. func (c *AutoScaling) WaitUntilGroupExists(input *DescribeAutoScalingGroupsInput) error {
  7. waiterCfg := waiter.Config{
  8. Operation: "DescribeAutoScalingGroups",
  9. Delay: 5,
  10. MaxAttempts: 10,
  11. Acceptors: []waiter.WaitAcceptor{
  12. {
  13. State: "success",
  14. Matcher: "path",
  15. Argument: "length(AutoScalingGroups) > `0`",
  16. Expected: true,
  17. },
  18. {
  19. State: "retry",
  20. Matcher: "path",
  21. Argument: "length(AutoScalingGroups) > `0`",
  22. Expected: false,
  23. },
  24. },
  25. }
  26. w := waiter.Waiter{
  27. Client: c,
  28. Input: input,
  29. Config: waiterCfg,
  30. }
  31. return w.Wait()
  32. }
  33. func (c *AutoScaling) WaitUntilGroupInService(input *DescribeAutoScalingGroupsInput) error {
  34. waiterCfg := waiter.Config{
  35. Operation: "DescribeAutoScalingGroups",
  36. Delay: 15,
  37. MaxAttempts: 40,
  38. Acceptors: []waiter.WaitAcceptor{
  39. {
  40. State: "success",
  41. Matcher: "path",
  42. Argument: "contains(AutoScalingGroups[].[length(Instances[?LifecycleState=='InService']) >= MinSize][], `false`)",
  43. Expected: false,
  44. },
  45. {
  46. State: "retry",
  47. Matcher: "path",
  48. Argument: "contains(AutoScalingGroups[].[length(Instances[?LifecycleState=='InService']) >= MinSize][], `false`)",
  49. Expected: true,
  50. },
  51. },
  52. }
  53. w := waiter.Waiter{
  54. Client: c,
  55. Input: input,
  56. Config: waiterCfg,
  57. }
  58. return w.Wait()
  59. }
  60. func (c *AutoScaling) WaitUntilGroupNotExists(input *DescribeAutoScalingGroupsInput) error {
  61. waiterCfg := waiter.Config{
  62. Operation: "DescribeAutoScalingGroups",
  63. Delay: 15,
  64. MaxAttempts: 40,
  65. Acceptors: []waiter.WaitAcceptor{
  66. {
  67. State: "success",
  68. Matcher: "path",
  69. Argument: "length(AutoScalingGroups) > `0`",
  70. Expected: false,
  71. },
  72. {
  73. State: "retry",
  74. Matcher: "path",
  75. Argument: "length(AutoScalingGroups) > `0`",
  76. Expected: true,
  77. },
  78. },
  79. }
  80. w := waiter.Waiter{
  81. Client: c,
  82. Input: input,
  83. Config: waiterCfg,
  84. }
  85. return w.Wait()
  86. }