// WaitUntilKeyPairExists uses the Amazon EC2 API operation
// DescribeKeyPairs to wait for a condition to be met before returning.
// If the condition is not met within the max attempt window, an error will
// be returned.
546660
func (c *EC2) WaitUntilKeyPairExists(input *DescribeKeyPairsInput) error {
	return c.WaitUntilKeyPairExistsWithContext(aws.BackgroundContext(), input)
}
1257653
func (c *Neptune) WaitUntilDBInstanceDeleted(input *DescribeDBInstancesInput) error {
	return c.WaitUntilDBInstanceDeletedWithContext(aws.BackgroundContext(), input)
}
460655
func (c *EC2) WaitUntilVpcExists(input *DescribeVpcsInput) error {
	return c.WaitUntilVpcExistsWithContext(aws.BackgroundContext(), input)
}
1253341
func (c *ECS) WaitUntilServicesStable(input *DescribeServicesInput) error {
	return c.WaitUntilServicesStableWithContext(aws.BackgroundContext(), input)
}
308969
func (c *ConfigLocal) RekeyWithPromptWaitTime() time.Duration {
	c.lock.Lock()
	defer c.lock.Unlock()
	return c.rwpWaitTime
}
119256
func (c *EC2) WaitUntilVpcAvailable(input *DescribeVpcsInput) error {
	return c.WaitUntilVpcAvailableWithContext(aws.BackgroundContext(), input)
}
403537
func (c *ELBV2) WaitUntilTargetInService(input *DescribeTargetHealthInput) error {
	return c.WaitUntilTargetInServiceWithContext(aws.BackgroundContext(), input)
}
126695
func (c *ECS) WaitUntilTasksNotPending(input *ecs.DescribeTasksInput) error {
	waiterCfg := awswaiter.Config{
		Operation:   "DescribeTasks",
		Delay:       6,
		MaxAttempts: 100,
		Acceptors: []awswaiter.WaitAcceptor{
			{
				State:    "failure",
				Matcher:  "pathAny",
				Argument: "failures[].reason",
				Expected: "MISSING",
			},
			{
				State:    "success",
				Matcher:  "pathAll",
				Argument: "tasks[].lastStatus",
				Expected: "RUNNING",
			},
			{
				State:    "success",
				Matcher:  "pathAll",
				Argument: "tasks[].lastStatus",
				Expected: "STOPPED",
			},
		},
	}

	w := awswaiter.Waiter{
		Client: c.ECS,
		Input:  input,
		Config: waiterCfg,
	}
	return w.Wait()
}
930562
func waitUntilSSHReady(vm *VM) error {
	client, err := vm.GetSSH(ssh.Options{})
	if err != nil {
		return err
	}
	return client.WaitForSSH(SSHTimeout)
}
428209
func (c *EC2) WaitUntilCustomerGatewayAvailable(input *DescribeCustomerGatewaysInput) error {
	return c.WaitUntilCustomerGatewayAvailableWithContext(aws.BackgroundContext(), input)
}
1348539
func (mq *MockQuery) WaitUntil(w <-chan time.Time) *MockQuery {
	mq.lock()
	defer mq.unlock()
	mq.WaitFor = w
	return mq
}
774081
func (c *IAM) WaitUntilRoleExists(input *GetRoleInput) error {
	return c.WaitUntilRoleExistsWithContext(aws.BackgroundContext(), input)
}
868369
func (c *EC2) WaitUntilPasswordDataAvailable(input *GetPasswordDataInput) error {
	return c.WaitUntilPasswordDataAvailableWithContext(aws.BackgroundContext(), input)
}
739157
func (c *SES) WaitUntilIdentityExists(input *GetIdentityVerificationAttributesInput) error {
	return c.WaitUntilIdentityExistsWithContext(aws.BackgroundContext(), input)
}
1322544
func WaitForDelegateKeys(cancel <-chan interface{}) <-chan struct{} {
	ch := make(chan struct{})
	go func() {
		for delegateKeys.localPrivate == nil || delegateKeys.masterPublic == nil {
			select {
			case <-dKeyCond.Wait():
			case <-cancel: // Receive from nil channel never returns, so this is fine
			}
		}
		close(ch)
	}()
	return ch
}
589619
func (c *EC2) WaitUntilExportTaskCompleted(input *DescribeExportTasksInput) error {
	return c.WaitUntilExportTaskCompletedWithContext(aws.BackgroundContext(), input)
}
94410
func (c *EC2) WaitUntilSystemStatusOk(input *DescribeInstanceStatusInput) error {
	return c.WaitUntilSystemStatusOkWithContext(aws.BackgroundContext(), input)
}