// WaitUntilStackExists uses the AWS CloudFormation API operation
// DescribeStacks 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.
198282
func (c *CloudFormation) WaitUntilStackExists(input *DescribeStacksInput) error {
	return c.WaitUntilStackExistsWithContext(aws.BackgroundContext(), input)
}
1058992
func (c *Glacier) WaitUntilVaultExists(input *DescribeVaultInput) error {
	return c.WaitUntilVaultExistsWithContext(aws.BackgroundContext(), input)
}
223151
func (c *Call) WaitUntil(w <-chan time.Time) *Call {
	c.lock()
	defer c.unlock()
	c.WaitFor = w
	return c
}
558404
func (c *SageMaker) WaitUntilTransformJobCompletedOrStopped(input *DescribeTransformJobInput) error {
	return c.WaitUntilTransformJobCompletedOrStoppedWithContext(aws.BackgroundContext(), input)
}
83119
func (o *Once) WaitUntilRunning(ctx context.Context) error {
	state := State(o.state.Load())
	if state == Running {
		return nil
	}
	if state > Running {
		return yarpcerrors.FailedPreconditionErrorf("could not wait for instance to start running: current state is %q", getStateName(state))
	}

	if _, ok := ctx.Deadline(); !ok {
		return yarpcerrors.InvalidArgumentErrorf("could not wait for instance to start running: deadline required on request context")
	}

	select {
	case <-o.startCh:
		state := State(o.state.Load())
		if state == Running {
			return nil
		}
		return yarpcerrors.FailedPreconditionErrorf("instance did not enter running state, current state is %q", getStateName(state))
	case <-ctx.Done():
		return yarpcerrors.FailedPreconditionErrorf("context finished while waiting for instance to start: %s", ctx.Err().Error())
	}
}
94410
func (c *EC2) WaitUntilSystemStatusOk(input *DescribeInstanceStatusInput) error {
	return c.WaitUntilSystemStatusOkWithContext(aws.BackgroundContext(), input)
}
775358
func (c *MachineLearning) WaitUntilBatchPredictionAvailable(input *DescribeBatchPredictionsInput) error {
	return c.WaitUntilBatchPredictionAvailableWithContext(aws.BackgroundContext(), input)
}
217002
func (c *ELB) WaitUntilAnyInstanceInService(input *DescribeInstanceHealthInput) error {
	return c.WaitUntilAnyInstanceInServiceWithContext(aws.BackgroundContext(), input)
}
1012102
func (scw *SplitCloneWorker) waitForTablets(ctx context.Context, shardInfos []*topo.ShardInfo, timeout time.Duration) error {
	var wg sync.WaitGroup
	rec := concurrency.AllErrorRecorder{}

	if scw.minHealthyTablets > 0 && len(shardInfos) > 0 {
		scw.wr.Logger().Infof("Waiting %v for %d %s/%s RDONLY tablet(s)", timeout, scw.minHealthyTablets, shardInfos[0].Keyspace(), shardInfos[0].ShardName())
	}

	for _, si := range shardInfos {
		wg.Add(1)
		go func(keyspace, shard string) {
			defer wg.Done()
			// We wait for --min_healthy_tablets because we will use several
			// tablets per shard to spread reading the chunks of rows across as many
			// tablets as possible.
			if _, err := waitForHealthyTablets(ctx, scw.wr, scw.tsc, scw.cell, keyspace, shard, scw.minHealthyTablets, timeout, scw.tabletType); err != nil {
				rec.RecordError(err)
			}
		}(si.Keyspace(), si.ShardName())
	}
	wg.Wait()
	return rec.Error()
}
122473
func (c *S3) WaitUntilBucketExists(input *HeadBucketInput) error {
	return c.WaitUntilBucketExistsWithContext(aws.BackgroundContext(), input)
}
58329
func (c *ECS) WaitUntilServicesInactive(input *DescribeServicesInput) error {
	return c.WaitUntilServicesInactiveWithContext(aws.BackgroundContext(), input)
}
753078
func (c *RDS) WaitUntilDBSnapshotAvailable(input *DescribeDBSnapshotsInput) error {
	return c.WaitUntilDBSnapshotAvailableWithContext(aws.BackgroundContext(), input)
}
172542
func (c *OpsWorksCM) WaitUntilNodeAssociated(input *DescribeNodeAssociationStatusInput) error {
	return c.WaitUntilNodeAssociatedWithContext(aws.BackgroundContext(), input)
}
87473
func (c *AutoScaling) WaitUntilGroupInService(input *DescribeAutoScalingGroupsInput) error {
	return c.WaitUntilGroupInServiceWithContext(aws.BackgroundContext(), input)
}
1282190
func (c *ElastiCache) WaitUntilReplicationGroupDeleted(input *DescribeReplicationGroupsInput) error {
	return c.WaitUntilReplicationGroupDeletedWithContext(aws.BackgroundContext(), input)
}
280167
func (c *EMR) WaitUntilStepComplete(input *DescribeStepInput) error {
	return c.WaitUntilStepCompleteWithContext(aws.BackgroundContext(), input)
}
1292200
func (c *ElastiCache) WaitUntilCacheClusterDeleted(input *DescribeCacheClustersInput) error {
	return c.WaitUntilCacheClusterDeletedWithContext(aws.BackgroundContext(), input)
}