waiters.go 782 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. package elastictranscoder
  3. import (
  4. "github.com/aws/aws-sdk-go/private/waiter"
  5. )
  6. func (c *ElasticTranscoder) WaitUntilJobComplete(input *ReadJobInput) error {
  7. waiterCfg := waiter.Config{
  8. Operation: "ReadJob",
  9. Delay: 30,
  10. MaxAttempts: 120,
  11. Acceptors: []waiter.WaitAcceptor{
  12. {
  13. State: "success",
  14. Matcher: "path",
  15. Argument: "Job.Status",
  16. Expected: "Complete",
  17. },
  18. {
  19. State: "failure",
  20. Matcher: "path",
  21. Argument: "Job.Status",
  22. Expected: "Canceled",
  23. },
  24. {
  25. State: "failure",
  26. Matcher: "path",
  27. Argument: "Job.Status",
  28. Expected: "Error",
  29. },
  30. },
  31. }
  32. w := waiter.Waiter{
  33. Client: c,
  34. Input: input,
  35. Config: waiterCfg,
  36. }
  37. return w.Wait()
  38. }