123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 |
- // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
- package rds
- import (
- "github.com/aws/aws-sdk-go/private/waiter"
- )
- // WaitUntilDBInstanceAvailable uses the Amazon RDS API operation
- // DescribeDBInstances 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 *RDS) WaitUntilDBInstanceAvailable(input *DescribeDBInstancesInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeDBInstances",
- Delay: 30,
- MaxAttempts: 60,
- Acceptors: []waiter.WaitAcceptor{
- {
- State: "success",
- Matcher: "pathAll",
- Argument: "DBInstances[].DBInstanceStatus",
- Expected: "available",
- },
- {
- State: "failure",
- Matcher: "pathAny",
- Argument: "DBInstances[].DBInstanceStatus",
- Expected: "deleted",
- },
- {
- State: "failure",
- Matcher: "pathAny",
- Argument: "DBInstances[].DBInstanceStatus",
- Expected: "deleting",
- },
- {
- State: "failure",
- Matcher: "pathAny",
- Argument: "DBInstances[].DBInstanceStatus",
- Expected: "failed",
- },
- {
- State: "failure",
- Matcher: "pathAny",
- Argument: "DBInstances[].DBInstanceStatus",
- Expected: "incompatible-restore",
- },
- {
- State: "failure",
- Matcher: "pathAny",
- Argument: "DBInstances[].DBInstanceStatus",
- Expected: "incompatible-parameters",
- },
- },
- }
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
- }
- // WaitUntilDBInstanceDeleted uses the Amazon RDS API operation
- // DescribeDBInstances 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 *RDS) WaitUntilDBInstanceDeleted(input *DescribeDBInstancesInput) error {
- waiterCfg := waiter.Config{
- Operation: "DescribeDBInstances",
- Delay: 30,
- MaxAttempts: 60,
- Acceptors: []waiter.WaitAcceptor{
- {
- State: "success",
- Matcher: "pathAll",
- Argument: "DBInstances[].DBInstanceStatus",
- Expected: "deleted",
- },
- {
- State: "success",
- Matcher: "error",
- Argument: "",
- Expected: "DBInstanceNotFound",
- },
- {
- State: "failure",
- Matcher: "pathAny",
- Argument: "DBInstances[].DBInstanceStatus",
- Expected: "creating",
- },
- {
- State: "failure",
- Matcher: "pathAny",
- Argument: "DBInstances[].DBInstanceStatus",
- Expected: "modifying",
- },
- {
- State: "failure",
- Matcher: "pathAny",
- Argument: "DBInstances[].DBInstanceStatus",
- Expected: "rebooting",
- },
- {
- State: "failure",
- Matcher: "pathAny",
- Argument: "DBInstances[].DBInstanceStatus",
- Expected: "resetting-master-credentials",
- },
- },
- }
- w := waiter.Waiter{
- Client: c,
- Input: input,
- Config: waiterCfg,
- }
- return w.Wait()
- }
|