waiters.go 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. package dynamodb
  3. import (
  4. "github.com/aws/aws-sdk-go/private/waiter"
  5. )
  6. func (c *DynamoDB) WaitUntilTableExists(input *DescribeTableInput) error {
  7. waiterCfg := waiter.Config{
  8. Operation: "DescribeTable",
  9. Delay: 20,
  10. MaxAttempts: 25,
  11. Acceptors: []waiter.WaitAcceptor{
  12. {
  13. State: "success",
  14. Matcher: "path",
  15. Argument: "Table.TableStatus",
  16. Expected: "ACTIVE",
  17. },
  18. {
  19. State: "retry",
  20. Matcher: "error",
  21. Argument: "",
  22. Expected: "ResourceNotFoundException",
  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 *DynamoDB) WaitUntilTableNotExists(input *DescribeTableInput) error {
  34. waiterCfg := waiter.Config{
  35. Operation: "DescribeTable",
  36. Delay: 20,
  37. MaxAttempts: 25,
  38. Acceptors: []waiter.WaitAcceptor{
  39. {
  40. State: "success",
  41. Matcher: "error",
  42. Argument: "",
  43. Expected: "ResourceNotFoundException",
  44. },
  45. },
  46. }
  47. w := waiter.Waiter{
  48. Client: c,
  49. Input: input,
  50. Config: waiterCfg,
  51. }
  52. return w.Wait()
  53. }