123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199 |
- // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
- package elasticache
- import (
- "github.com/aws/aws-sdk-go/private/waiter"
- )
- // WaitUntilCacheClusterAvailable uses the Amazon ElastiCache API operation
- // DescribeCacheClusters to wait for a condition to be met before returning.
- // If the condition is not meet within the max attempt window an error will
- // be returned.
- func (c *ElastiCache) WaitUntilCacheClusterAvailable(input *DescribeCacheClustersInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeCacheClusters",
- Delay: 15,
- MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
- {
- State: "success",
- Matcher: "pathAll",
- Argument: "CacheClusters[].CacheClusterStatus",
- Expected: "available",
- },
- {
- State: "failure",
- Matcher: "pathAny",
- Argument: "CacheClusters[].CacheClusterStatus",
- Expected: "deleted",
- },
- {
- State: "failure",
- Matcher: "pathAny",
- Argument: "CacheClusters[].CacheClusterStatus",
- Expected: "deleting",
- },
- {
- State: "failure",
- Matcher: "pathAny",
- Argument: "CacheClusters[].CacheClusterStatus",
- Expected: "incompatible-network",
- },
- {
- State: "failure",
- Matcher: "pathAny",
- Argument: "CacheClusters[].CacheClusterStatus",
- Expected: "restore-failed",
- },
- },
- }
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
- }
- // WaitUntilCacheClusterDeleted uses the Amazon ElastiCache API operation
- // DescribeCacheClusters to wait for a condition to be met before returning.
- // If the condition is not meet within the max attempt window an error will
- // be returned.
- func (c *ElastiCache) WaitUntilCacheClusterDeleted(input *DescribeCacheClustersInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeCacheClusters",
- Delay: 15,
- MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
- {
- State: "success",
- Matcher: "pathAll",
- Argument: "CacheClusters[].CacheClusterStatus",
- Expected: "deleted",
- },
- {
- State: "success",
- Matcher: "error",
- Argument: "",
- Expected: "CacheClusterNotFound",
- },
- {
- State: "failure",
- Matcher: "pathAny",
- Argument: "CacheClusters[].CacheClusterStatus",
- Expected: "available",
- },
- {
- State: "failure",
- Matcher: "pathAny",
- Argument: "CacheClusters[].CacheClusterStatus",
- Expected: "creating",
- },
- {
- State: "failure",
- Matcher: "pathAny",
- Argument: "CacheClusters[].CacheClusterStatus",
- Expected: "incompatible-network",
- },
- {
- State: "failure",
- Matcher: "pathAny",
- Argument: "CacheClusters[].CacheClusterStatus",
- Expected: "modifying",
- },
- {
- State: "failure",
- Matcher: "pathAny",
- Argument: "CacheClusters[].CacheClusterStatus",
- Expected: "restore-failed",
- },
- {
- State: "failure",
- Matcher: "pathAny",
- Argument: "CacheClusters[].CacheClusterStatus",
- Expected: "snapshotting",
- },
- },
- }
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
- }
- // WaitUntilReplicationGroupAvailable uses the Amazon ElastiCache API operation
- // DescribeReplicationGroups to wait for a condition to be met before returning.
- // If the condition is not meet within the max attempt window an error will
- // be returned.
- func (c *ElastiCache) WaitUntilReplicationGroupAvailable(input *DescribeReplicationGroupsInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeReplicationGroups",
- Delay: 15,
- MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
- {
- State: "success",
- Matcher: "pathAll",
- Argument: "ReplicationGroups[].Status",
- Expected: "available",
- },
- {
- State: "failure",
- Matcher: "pathAny",
- Argument: "ReplicationGroups[].Status",
- Expected: "deleted",
- },
- },
- }
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
- }
- // WaitUntilReplicationGroupDeleted uses the Amazon ElastiCache API operation
- // DescribeReplicationGroups to wait for a condition to be met before returning.
- // If the condition is not meet within the max attempt window an error will
- // be returned.
- func (c *ElastiCache) WaitUntilReplicationGroupDeleted(input *DescribeReplicationGroupsInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeReplicationGroups",
- Delay: 15,
- MaxAttempts: 40,
- Acceptors: []waiter.WaitAcceptor{
- {
- State: "success",
- Matcher: "pathAll",
- Argument: "ReplicationGroups[].Status",
- Expected: "deleted",
- },
- {
- State: "failure",
- Matcher: "pathAny",
- Argument: "ReplicationGroups[].Status",
- Expected: "available",
- },
- {
- State: "success",
- Matcher: "error",
- Argument: "",
- Expected: "ReplicationGroupNotFoundFault",
- },
- },
- }
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
- }
|