waiters.go 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. package cloudfront
  3. import (
  4. "github.com/aws/aws-sdk-go/private/waiter"
  5. )
  6. func (c *CloudFront) WaitUntilDistributionDeployed(input *GetDistributionInput) error {
  7. waiterCfg := waiter.Config{
  8. Operation: "GetDistribution",
  9. Delay: 60,
  10. MaxAttempts: 25,
  11. Acceptors: []waiter.WaitAcceptor{
  12. {
  13. State: "success",
  14. Matcher: "path",
  15. Argument: "Distribution.Status",
  16. Expected: "Deployed",
  17. },
  18. },
  19. }
  20. w := waiter.Waiter{
  21. Client: c,
  22. Input: input,
  23. Config: waiterCfg,
  24. }
  25. return w.Wait()
  26. }
  27. func (c *CloudFront) WaitUntilInvalidationCompleted(input *GetInvalidationInput) error {
  28. waiterCfg := waiter.Config{
  29. Operation: "GetInvalidation",
  30. Delay: 20,
  31. MaxAttempts: 30,
  32. Acceptors: []waiter.WaitAcceptor{
  33. {
  34. State: "success",
  35. Matcher: "path",
  36. Argument: "Invalidation.Status",
  37. Expected: "Completed",
  38. },
  39. },
  40. }
  41. w := waiter.Waiter{
  42. Client: c,
  43. Input: input,
  44. Config: waiterCfg,
  45. }
  46. return w.Wait()
  47. }
  48. func (c *CloudFront) WaitUntilStreamingDistributionDeployed(input *GetStreamingDistributionInput) error {
  49. waiterCfg := waiter.Config{
  50. Operation: "GetStreamingDistribution",
  51. Delay: 60,
  52. MaxAttempts: 25,
  53. Acceptors: []waiter.WaitAcceptor{
  54. {
  55. State: "success",
  56. Matcher: "path",
  57. Argument: "StreamingDistribution.Status",
  58. Expected: "Deployed",
  59. },
  60. },
  61. }
  62. w := waiter.Waiter{
  63. Client: c,
  64. Input: input,
  65. Config: waiterCfg,
  66. }
  67. return w.Wait()
  68. }