waiters.go 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. package machinelearning
  3. import (
  4. "github.com/aws/aws-sdk-go/private/waiter"
  5. )
  6. func (c *MachineLearning) WaitUntilBatchPredictionAvailable(input *DescribeBatchPredictionsInput) error {
  7. waiterCfg := waiter.Config{
  8. Operation: "DescribeBatchPredictions",
  9. Delay: 30,
  10. MaxAttempts: 60,
  11. Acceptors: []waiter.WaitAcceptor{
  12. {
  13. State: "success",
  14. Matcher: "pathAll",
  15. Argument: "Results[].Status",
  16. Expected: "COMPLETED",
  17. },
  18. {
  19. State: "failure",
  20. Matcher: "pathAny",
  21. Argument: "Results[].Status",
  22. Expected: "FAILED",
  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 *MachineLearning) WaitUntilDataSourceAvailable(input *DescribeDataSourcesInput) error {
  34. waiterCfg := waiter.Config{
  35. Operation: "DescribeDataSources",
  36. Delay: 30,
  37. MaxAttempts: 60,
  38. Acceptors: []waiter.WaitAcceptor{
  39. {
  40. State: "success",
  41. Matcher: "pathAll",
  42. Argument: "Results[].Status",
  43. Expected: "COMPLETED",
  44. },
  45. {
  46. State: "failure",
  47. Matcher: "pathAny",
  48. Argument: "Results[].Status",
  49. Expected: "FAILED",
  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 *MachineLearning) WaitUntilEvaluationAvailable(input *DescribeEvaluationsInput) error {
  61. waiterCfg := waiter.Config{
  62. Operation: "DescribeEvaluations",
  63. Delay: 30,
  64. MaxAttempts: 60,
  65. Acceptors: []waiter.WaitAcceptor{
  66. {
  67. State: "success",
  68. Matcher: "pathAll",
  69. Argument: "Results[].Status",
  70. Expected: "COMPLETED",
  71. },
  72. {
  73. State: "failure",
  74. Matcher: "pathAny",
  75. Argument: "Results[].Status",
  76. Expected: "FAILED",
  77. },
  78. },
  79. }
  80. w := waiter.Waiter{
  81. Client: c,
  82. Input: input,
  83. Config: waiterCfg,
  84. }
  85. return w.Wait()
  86. }
  87. func (c *MachineLearning) WaitUntilMLModelAvailable(input *DescribeMLModelsInput) error {
  88. waiterCfg := waiter.Config{
  89. Operation: "DescribeMLModels",
  90. Delay: 30,
  91. MaxAttempts: 60,
  92. Acceptors: []waiter.WaitAcceptor{
  93. {
  94. State: "success",
  95. Matcher: "pathAll",
  96. Argument: "Results[].Status",
  97. Expected: "COMPLETED",
  98. },
  99. {
  100. State: "failure",
  101. Matcher: "pathAny",
  102. Argument: "Results[].Status",
  103. Expected: "FAILED",
  104. },
  105. },
  106. }
  107. w := waiter.Waiter{
  108. Client: c,
  109. Input: input,
  110. Config: waiterCfg,
  111. }
  112. return w.Wait()
  113. }