github.com/aavshr/aws-sdk-go@v1.41.3/service/databasemigrationservice/waiters.go (about)

     1  // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
     2  
     3  package databasemigrationservice
     4  
     5  import (
     6  	"time"
     7  
     8  	"github.com/aavshr/aws-sdk-go/aws"
     9  	"github.com/aavshr/aws-sdk-go/aws/request"
    10  )
    11  
    12  // WaitUntilEndpointDeleted uses the AWS Database Migration Service API operation
    13  // DescribeEndpoints to wait for a condition to be met before returning.
    14  // If the condition is not met within the max attempt window, an error will
    15  // be returned.
    16  func (c *DatabaseMigrationService) WaitUntilEndpointDeleted(input *DescribeEndpointsInput) error {
    17  	return c.WaitUntilEndpointDeletedWithContext(aws.BackgroundContext(), input)
    18  }
    19  
    20  // WaitUntilEndpointDeletedWithContext is an extended version of WaitUntilEndpointDeleted.
    21  // With the support for passing in a context and options to configure the
    22  // Waiter and the underlying request options.
    23  //
    24  // The context must be non-nil and will be used for request cancellation. If
    25  // the context is nil a panic will occur. In the future the SDK may create
    26  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
    27  // for more information on using Contexts.
    28  func (c *DatabaseMigrationService) WaitUntilEndpointDeletedWithContext(ctx aws.Context, input *DescribeEndpointsInput, opts ...request.WaiterOption) error {
    29  	w := request.Waiter{
    30  		Name:        "WaitUntilEndpointDeleted",
    31  		MaxAttempts: 60,
    32  		Delay:       request.ConstantWaiterDelay(5 * time.Second),
    33  		Acceptors: []request.WaiterAcceptor{
    34  			{
    35  				State:    request.SuccessWaiterState,
    36  				Matcher:  request.ErrorWaiterMatch,
    37  				Expected: "ResourceNotFoundFault",
    38  			},
    39  			{
    40  				State:   request.FailureWaiterState,
    41  				Matcher: request.PathAnyWaiterMatch, Argument: "Endpoints[].Status",
    42  				Expected: "active",
    43  			},
    44  			{
    45  				State:   request.FailureWaiterState,
    46  				Matcher: request.PathAnyWaiterMatch, Argument: "Endpoints[].Status",
    47  				Expected: "creating",
    48  			},
    49  		},
    50  		Logger: c.Config.Logger,
    51  		NewRequest: func(opts []request.Option) (*request.Request, error) {
    52  			var inCpy *DescribeEndpointsInput
    53  			if input != nil {
    54  				tmp := *input
    55  				inCpy = &tmp
    56  			}
    57  			req, _ := c.DescribeEndpointsRequest(inCpy)
    58  			req.SetContext(ctx)
    59  			req.ApplyOptions(opts...)
    60  			return req, nil
    61  		},
    62  	}
    63  	w.ApplyOptions(opts...)
    64  
    65  	return w.WaitWithContext(ctx)
    66  }
    67  
    68  // WaitUntilReplicationInstanceAvailable uses the AWS Database Migration Service API operation
    69  // DescribeReplicationInstances to wait for a condition to be met before returning.
    70  // If the condition is not met within the max attempt window, an error will
    71  // be returned.
    72  func (c *DatabaseMigrationService) WaitUntilReplicationInstanceAvailable(input *DescribeReplicationInstancesInput) error {
    73  	return c.WaitUntilReplicationInstanceAvailableWithContext(aws.BackgroundContext(), input)
    74  }
    75  
    76  // WaitUntilReplicationInstanceAvailableWithContext is an extended version of WaitUntilReplicationInstanceAvailable.
    77  // With the support for passing in a context and options to configure the
    78  // Waiter and the underlying request options.
    79  //
    80  // The context must be non-nil and will be used for request cancellation. If
    81  // the context is nil a panic will occur. In the future the SDK may create
    82  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
    83  // for more information on using Contexts.
    84  func (c *DatabaseMigrationService) WaitUntilReplicationInstanceAvailableWithContext(ctx aws.Context, input *DescribeReplicationInstancesInput, opts ...request.WaiterOption) error {
    85  	w := request.Waiter{
    86  		Name:        "WaitUntilReplicationInstanceAvailable",
    87  		MaxAttempts: 60,
    88  		Delay:       request.ConstantWaiterDelay(60 * time.Second),
    89  		Acceptors: []request.WaiterAcceptor{
    90  			{
    91  				State:   request.SuccessWaiterState,
    92  				Matcher: request.PathAllWaiterMatch, Argument: "ReplicationInstances[].ReplicationInstanceStatus",
    93  				Expected: "available",
    94  			},
    95  			{
    96  				State:   request.FailureWaiterState,
    97  				Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationInstances[].ReplicationInstanceStatus",
    98  				Expected: "deleting",
    99  			},
   100  			{
   101  				State:   request.FailureWaiterState,
   102  				Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationInstances[].ReplicationInstanceStatus",
   103  				Expected: "incompatible-credentials",
   104  			},
   105  			{
   106  				State:   request.FailureWaiterState,
   107  				Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationInstances[].ReplicationInstanceStatus",
   108  				Expected: "incompatible-network",
   109  			},
   110  			{
   111  				State:   request.FailureWaiterState,
   112  				Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationInstances[].ReplicationInstanceStatus",
   113  				Expected: "inaccessible-encryption-credentials",
   114  			},
   115  		},
   116  		Logger: c.Config.Logger,
   117  		NewRequest: func(opts []request.Option) (*request.Request, error) {
   118  			var inCpy *DescribeReplicationInstancesInput
   119  			if input != nil {
   120  				tmp := *input
   121  				inCpy = &tmp
   122  			}
   123  			req, _ := c.DescribeReplicationInstancesRequest(inCpy)
   124  			req.SetContext(ctx)
   125  			req.ApplyOptions(opts...)
   126  			return req, nil
   127  		},
   128  	}
   129  	w.ApplyOptions(opts...)
   130  
   131  	return w.WaitWithContext(ctx)
   132  }
   133  
   134  // WaitUntilReplicationInstanceDeleted uses the AWS Database Migration Service API operation
   135  // DescribeReplicationInstances to wait for a condition to be met before returning.
   136  // If the condition is not met within the max attempt window, an error will
   137  // be returned.
   138  func (c *DatabaseMigrationService) WaitUntilReplicationInstanceDeleted(input *DescribeReplicationInstancesInput) error {
   139  	return c.WaitUntilReplicationInstanceDeletedWithContext(aws.BackgroundContext(), input)
   140  }
   141  
   142  // WaitUntilReplicationInstanceDeletedWithContext is an extended version of WaitUntilReplicationInstanceDeleted.
   143  // With the support for passing in a context and options to configure the
   144  // Waiter and the underlying request options.
   145  //
   146  // The context must be non-nil and will be used for request cancellation. If
   147  // the context is nil a panic will occur. In the future the SDK may create
   148  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   149  // for more information on using Contexts.
   150  func (c *DatabaseMigrationService) WaitUntilReplicationInstanceDeletedWithContext(ctx aws.Context, input *DescribeReplicationInstancesInput, opts ...request.WaiterOption) error {
   151  	w := request.Waiter{
   152  		Name:        "WaitUntilReplicationInstanceDeleted",
   153  		MaxAttempts: 60,
   154  		Delay:       request.ConstantWaiterDelay(15 * time.Second),
   155  		Acceptors: []request.WaiterAcceptor{
   156  			{
   157  				State:   request.FailureWaiterState,
   158  				Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationInstances[].ReplicationInstanceStatus",
   159  				Expected: "available",
   160  			},
   161  			{
   162  				State:    request.SuccessWaiterState,
   163  				Matcher:  request.ErrorWaiterMatch,
   164  				Expected: "ResourceNotFoundFault",
   165  			},
   166  		},
   167  		Logger: c.Config.Logger,
   168  		NewRequest: func(opts []request.Option) (*request.Request, error) {
   169  			var inCpy *DescribeReplicationInstancesInput
   170  			if input != nil {
   171  				tmp := *input
   172  				inCpy = &tmp
   173  			}
   174  			req, _ := c.DescribeReplicationInstancesRequest(inCpy)
   175  			req.SetContext(ctx)
   176  			req.ApplyOptions(opts...)
   177  			return req, nil
   178  		},
   179  	}
   180  	w.ApplyOptions(opts...)
   181  
   182  	return w.WaitWithContext(ctx)
   183  }
   184  
   185  // WaitUntilReplicationTaskDeleted uses the AWS Database Migration Service API operation
   186  // DescribeReplicationTasks to wait for a condition to be met before returning.
   187  // If the condition is not met within the max attempt window, an error will
   188  // be returned.
   189  func (c *DatabaseMigrationService) WaitUntilReplicationTaskDeleted(input *DescribeReplicationTasksInput) error {
   190  	return c.WaitUntilReplicationTaskDeletedWithContext(aws.BackgroundContext(), input)
   191  }
   192  
   193  // WaitUntilReplicationTaskDeletedWithContext is an extended version of WaitUntilReplicationTaskDeleted.
   194  // With the support for passing in a context and options to configure the
   195  // Waiter and the underlying request options.
   196  //
   197  // The context must be non-nil and will be used for request cancellation. If
   198  // the context is nil a panic will occur. In the future the SDK may create
   199  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   200  // for more information on using Contexts.
   201  func (c *DatabaseMigrationService) WaitUntilReplicationTaskDeletedWithContext(ctx aws.Context, input *DescribeReplicationTasksInput, opts ...request.WaiterOption) error {
   202  	w := request.Waiter{
   203  		Name:        "WaitUntilReplicationTaskDeleted",
   204  		MaxAttempts: 60,
   205  		Delay:       request.ConstantWaiterDelay(15 * time.Second),
   206  		Acceptors: []request.WaiterAcceptor{
   207  			{
   208  				State:   request.FailureWaiterState,
   209  				Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status",
   210  				Expected: "ready",
   211  			},
   212  			{
   213  				State:   request.FailureWaiterState,
   214  				Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status",
   215  				Expected: "creating",
   216  			},
   217  			{
   218  				State:   request.FailureWaiterState,
   219  				Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status",
   220  				Expected: "stopped",
   221  			},
   222  			{
   223  				State:   request.FailureWaiterState,
   224  				Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status",
   225  				Expected: "running",
   226  			},
   227  			{
   228  				State:   request.FailureWaiterState,
   229  				Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status",
   230  				Expected: "failed",
   231  			},
   232  			{
   233  				State:    request.SuccessWaiterState,
   234  				Matcher:  request.ErrorWaiterMatch,
   235  				Expected: "ResourceNotFoundFault",
   236  			},
   237  		},
   238  		Logger: c.Config.Logger,
   239  		NewRequest: func(opts []request.Option) (*request.Request, error) {
   240  			var inCpy *DescribeReplicationTasksInput
   241  			if input != nil {
   242  				tmp := *input
   243  				inCpy = &tmp
   244  			}
   245  			req, _ := c.DescribeReplicationTasksRequest(inCpy)
   246  			req.SetContext(ctx)
   247  			req.ApplyOptions(opts...)
   248  			return req, nil
   249  		},
   250  	}
   251  	w.ApplyOptions(opts...)
   252  
   253  	return w.WaitWithContext(ctx)
   254  }
   255  
   256  // WaitUntilReplicationTaskReady uses the AWS Database Migration Service API operation
   257  // DescribeReplicationTasks to wait for a condition to be met before returning.
   258  // If the condition is not met within the max attempt window, an error will
   259  // be returned.
   260  func (c *DatabaseMigrationService) WaitUntilReplicationTaskReady(input *DescribeReplicationTasksInput) error {
   261  	return c.WaitUntilReplicationTaskReadyWithContext(aws.BackgroundContext(), input)
   262  }
   263  
   264  // WaitUntilReplicationTaskReadyWithContext is an extended version of WaitUntilReplicationTaskReady.
   265  // With the support for passing in a context and options to configure the
   266  // Waiter and the underlying request options.
   267  //
   268  // The context must be non-nil and will be used for request cancellation. If
   269  // the context is nil a panic will occur. In the future the SDK may create
   270  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   271  // for more information on using Contexts.
   272  func (c *DatabaseMigrationService) WaitUntilReplicationTaskReadyWithContext(ctx aws.Context, input *DescribeReplicationTasksInput, opts ...request.WaiterOption) error {
   273  	w := request.Waiter{
   274  		Name:        "WaitUntilReplicationTaskReady",
   275  		MaxAttempts: 60,
   276  		Delay:       request.ConstantWaiterDelay(15 * time.Second),
   277  		Acceptors: []request.WaiterAcceptor{
   278  			{
   279  				State:   request.SuccessWaiterState,
   280  				Matcher: request.PathAllWaiterMatch, Argument: "ReplicationTasks[].Status",
   281  				Expected: "ready",
   282  			},
   283  			{
   284  				State:   request.FailureWaiterState,
   285  				Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status",
   286  				Expected: "starting",
   287  			},
   288  			{
   289  				State:   request.FailureWaiterState,
   290  				Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status",
   291  				Expected: "running",
   292  			},
   293  			{
   294  				State:   request.FailureWaiterState,
   295  				Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status",
   296  				Expected: "stopping",
   297  			},
   298  			{
   299  				State:   request.FailureWaiterState,
   300  				Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status",
   301  				Expected: "stopped",
   302  			},
   303  			{
   304  				State:   request.FailureWaiterState,
   305  				Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status",
   306  				Expected: "failed",
   307  			},
   308  			{
   309  				State:   request.FailureWaiterState,
   310  				Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status",
   311  				Expected: "modifying",
   312  			},
   313  			{
   314  				State:   request.FailureWaiterState,
   315  				Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status",
   316  				Expected: "testing",
   317  			},
   318  			{
   319  				State:   request.FailureWaiterState,
   320  				Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status",
   321  				Expected: "deleting",
   322  			},
   323  		},
   324  		Logger: c.Config.Logger,
   325  		NewRequest: func(opts []request.Option) (*request.Request, error) {
   326  			var inCpy *DescribeReplicationTasksInput
   327  			if input != nil {
   328  				tmp := *input
   329  				inCpy = &tmp
   330  			}
   331  			req, _ := c.DescribeReplicationTasksRequest(inCpy)
   332  			req.SetContext(ctx)
   333  			req.ApplyOptions(opts...)
   334  			return req, nil
   335  		},
   336  	}
   337  	w.ApplyOptions(opts...)
   338  
   339  	return w.WaitWithContext(ctx)
   340  }
   341  
   342  // WaitUntilReplicationTaskRunning uses the AWS Database Migration Service API operation
   343  // DescribeReplicationTasks to wait for a condition to be met before returning.
   344  // If the condition is not met within the max attempt window, an error will
   345  // be returned.
   346  func (c *DatabaseMigrationService) WaitUntilReplicationTaskRunning(input *DescribeReplicationTasksInput) error {
   347  	return c.WaitUntilReplicationTaskRunningWithContext(aws.BackgroundContext(), input)
   348  }
   349  
   350  // WaitUntilReplicationTaskRunningWithContext is an extended version of WaitUntilReplicationTaskRunning.
   351  // With the support for passing in a context and options to configure the
   352  // Waiter and the underlying request options.
   353  //
   354  // The context must be non-nil and will be used for request cancellation. If
   355  // the context is nil a panic will occur. In the future the SDK may create
   356  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   357  // for more information on using Contexts.
   358  func (c *DatabaseMigrationService) WaitUntilReplicationTaskRunningWithContext(ctx aws.Context, input *DescribeReplicationTasksInput, opts ...request.WaiterOption) error {
   359  	w := request.Waiter{
   360  		Name:        "WaitUntilReplicationTaskRunning",
   361  		MaxAttempts: 60,
   362  		Delay:       request.ConstantWaiterDelay(15 * time.Second),
   363  		Acceptors: []request.WaiterAcceptor{
   364  			{
   365  				State:   request.SuccessWaiterState,
   366  				Matcher: request.PathAllWaiterMatch, Argument: "ReplicationTasks[].Status",
   367  				Expected: "running",
   368  			},
   369  			{
   370  				State:   request.FailureWaiterState,
   371  				Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status",
   372  				Expected: "ready",
   373  			},
   374  			{
   375  				State:   request.FailureWaiterState,
   376  				Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status",
   377  				Expected: "creating",
   378  			},
   379  			{
   380  				State:   request.FailureWaiterState,
   381  				Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status",
   382  				Expected: "stopping",
   383  			},
   384  			{
   385  				State:   request.FailureWaiterState,
   386  				Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status",
   387  				Expected: "stopped",
   388  			},
   389  			{
   390  				State:   request.FailureWaiterState,
   391  				Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status",
   392  				Expected: "failed",
   393  			},
   394  			{
   395  				State:   request.FailureWaiterState,
   396  				Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status",
   397  				Expected: "modifying",
   398  			},
   399  			{
   400  				State:   request.FailureWaiterState,
   401  				Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status",
   402  				Expected: "testing",
   403  			},
   404  			{
   405  				State:   request.FailureWaiterState,
   406  				Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status",
   407  				Expected: "deleting",
   408  			},
   409  		},
   410  		Logger: c.Config.Logger,
   411  		NewRequest: func(opts []request.Option) (*request.Request, error) {
   412  			var inCpy *DescribeReplicationTasksInput
   413  			if input != nil {
   414  				tmp := *input
   415  				inCpy = &tmp
   416  			}
   417  			req, _ := c.DescribeReplicationTasksRequest(inCpy)
   418  			req.SetContext(ctx)
   419  			req.ApplyOptions(opts...)
   420  			return req, nil
   421  		},
   422  	}
   423  	w.ApplyOptions(opts...)
   424  
   425  	return w.WaitWithContext(ctx)
   426  }
   427  
   428  // WaitUntilReplicationTaskStopped uses the AWS Database Migration Service API operation
   429  // DescribeReplicationTasks to wait for a condition to be met before returning.
   430  // If the condition is not met within the max attempt window, an error will
   431  // be returned.
   432  func (c *DatabaseMigrationService) WaitUntilReplicationTaskStopped(input *DescribeReplicationTasksInput) error {
   433  	return c.WaitUntilReplicationTaskStoppedWithContext(aws.BackgroundContext(), input)
   434  }
   435  
   436  // WaitUntilReplicationTaskStoppedWithContext is an extended version of WaitUntilReplicationTaskStopped.
   437  // With the support for passing in a context and options to configure the
   438  // Waiter and the underlying request options.
   439  //
   440  // The context must be non-nil and will be used for request cancellation. If
   441  // the context is nil a panic will occur. In the future the SDK may create
   442  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   443  // for more information on using Contexts.
   444  func (c *DatabaseMigrationService) WaitUntilReplicationTaskStoppedWithContext(ctx aws.Context, input *DescribeReplicationTasksInput, opts ...request.WaiterOption) error {
   445  	w := request.Waiter{
   446  		Name:        "WaitUntilReplicationTaskStopped",
   447  		MaxAttempts: 60,
   448  		Delay:       request.ConstantWaiterDelay(15 * time.Second),
   449  		Acceptors: []request.WaiterAcceptor{
   450  			{
   451  				State:   request.SuccessWaiterState,
   452  				Matcher: request.PathAllWaiterMatch, Argument: "ReplicationTasks[].Status",
   453  				Expected: "stopped",
   454  			},
   455  			{
   456  				State:   request.FailureWaiterState,
   457  				Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status",
   458  				Expected: "ready",
   459  			},
   460  			{
   461  				State:   request.FailureWaiterState,
   462  				Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status",
   463  				Expected: "creating",
   464  			},
   465  			{
   466  				State:   request.FailureWaiterState,
   467  				Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status",
   468  				Expected: "starting",
   469  			},
   470  			{
   471  				State:   request.FailureWaiterState,
   472  				Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status",
   473  				Expected: "failed",
   474  			},
   475  			{
   476  				State:   request.FailureWaiterState,
   477  				Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status",
   478  				Expected: "modifying",
   479  			},
   480  			{
   481  				State:   request.FailureWaiterState,
   482  				Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status",
   483  				Expected: "testing",
   484  			},
   485  			{
   486  				State:   request.FailureWaiterState,
   487  				Matcher: request.PathAnyWaiterMatch, Argument: "ReplicationTasks[].Status",
   488  				Expected: "deleting",
   489  			},
   490  		},
   491  		Logger: c.Config.Logger,
   492  		NewRequest: func(opts []request.Option) (*request.Request, error) {
   493  			var inCpy *DescribeReplicationTasksInput
   494  			if input != nil {
   495  				tmp := *input
   496  				inCpy = &tmp
   497  			}
   498  			req, _ := c.DescribeReplicationTasksRequest(inCpy)
   499  			req.SetContext(ctx)
   500  			req.ApplyOptions(opts...)
   501  			return req, nil
   502  		},
   503  	}
   504  	w.ApplyOptions(opts...)
   505  
   506  	return w.WaitWithContext(ctx)
   507  }
   508  
   509  // WaitUntilTestConnectionSucceeds uses the AWS Database Migration Service API operation
   510  // DescribeConnections to wait for a condition to be met before returning.
   511  // If the condition is not met within the max attempt window, an error will
   512  // be returned.
   513  func (c *DatabaseMigrationService) WaitUntilTestConnectionSucceeds(input *DescribeConnectionsInput) error {
   514  	return c.WaitUntilTestConnectionSucceedsWithContext(aws.BackgroundContext(), input)
   515  }
   516  
   517  // WaitUntilTestConnectionSucceedsWithContext is an extended version of WaitUntilTestConnectionSucceeds.
   518  // With the support for passing in a context and options to configure the
   519  // Waiter and the underlying request options.
   520  //
   521  // The context must be non-nil and will be used for request cancellation. If
   522  // the context is nil a panic will occur. In the future the SDK may create
   523  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   524  // for more information on using Contexts.
   525  func (c *DatabaseMigrationService) WaitUntilTestConnectionSucceedsWithContext(ctx aws.Context, input *DescribeConnectionsInput, opts ...request.WaiterOption) error {
   526  	w := request.Waiter{
   527  		Name:        "WaitUntilTestConnectionSucceeds",
   528  		MaxAttempts: 60,
   529  		Delay:       request.ConstantWaiterDelay(5 * time.Second),
   530  		Acceptors: []request.WaiterAcceptor{
   531  			{
   532  				State:   request.SuccessWaiterState,
   533  				Matcher: request.PathAllWaiterMatch, Argument: "Connections[].Status",
   534  				Expected: "successful",
   535  			},
   536  			{
   537  				State:   request.FailureWaiterState,
   538  				Matcher: request.PathAnyWaiterMatch, Argument: "Connections[].Status",
   539  				Expected: "failed",
   540  			},
   541  		},
   542  		Logger: c.Config.Logger,
   543  		NewRequest: func(opts []request.Option) (*request.Request, error) {
   544  			var inCpy *DescribeConnectionsInput
   545  			if input != nil {
   546  				tmp := *input
   547  				inCpy = &tmp
   548  			}
   549  			req, _ := c.DescribeConnectionsRequest(inCpy)
   550  			req.SetContext(ctx)
   551  			req.ApplyOptions(opts...)
   552  			return req, nil
   553  		},
   554  	}
   555  	w.ApplyOptions(opts...)
   556  
   557  	return w.WaitWithContext(ctx)
   558  }