// WaitUntilCustomerGatewayAvailable uses the Amazon EC2 API operation
// DescribeCustomerGateways 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.
428209
func (c *EC2) WaitUntilCustomerGatewayAvailable(input *DescribeCustomerGatewaysInput) error {
	return c.WaitUntilCustomerGatewayAvailableWithContext(aws.BackgroundContext(), input)
}
140166
func (t *Template) GetAllAWSEC2TransitGatewayRouteTableAssociationResources() map[string]*resources.AWSEC2TransitGatewayRouteTableAssociation {
	results := map[string]*resources.AWSEC2TransitGatewayRouteTableAssociation{}
	for name, untyped := range t.Resources {
		switch resource := untyped.(type) {
		case *resources.AWSEC2TransitGatewayRouteTableAssociation:
			results[name] = resource
		}
	}
	return results
}
35544
func (c *Conn) WaitUntilReady(ctx context.Context) error {
	err := c.waitForPreviousCancelQuery(ctx)
	if err != nil {
		return err
	}
	return c.ensureConnectionReadyForQuery()
}
4575
func (c *ACMPCA) WaitUntilAuditReportCreated(input *DescribeCertificateAuthorityAuditReportInput) error {
	return c.WaitUntilAuditReportCreatedWithContext(aws.BackgroundContext(), input)
}
542397
func (c *AppStream) WaitUntilFleetStopped(input *DescribeFleetsInput) error {
	return c.WaitUntilFleetStoppedWithContext(aws.BackgroundContext(), input)
}
159973
func (t *Template) GetAllAWSEC2TransitGatewayResources() map[string]*resources.AWSEC2TransitGateway {
	results := map[string]*resources.AWSEC2TransitGateway{}
	for name, untyped := range t.Resources {
		switch resource := untyped.(type) {
		case *resources.AWSEC2TransitGateway:
			results[name] = resource
		}
	}
	return results
}
1071549
func (api *Client) GetAndOrderAvailableNumbers(numberType AvailableNumberType, query *GetAvailableNumberQuery) ([]*OrderedNumber, error) {
	path := fmt.Sprintf("%s/%s", availableNumbersPath, numberType)
	result, _, err := api.makeRequest(http.MethodPost, path, &[]*OrderedNumber{}, query, true)
	if err != nil {
		return nil, err
	}
	list := *(result.(*[]*OrderedNumber))
	for _, item := range list {
		if item.Location != "" {
			item.ID = getIDFromLocation(item.Location)
		}
	}
	return list, nil
}
1253341
func (c *ECS) WaitUntilServicesStable(input *DescribeServicesInput) error {
	return c.WaitUntilServicesStableWithContext(aws.BackgroundContext(), input)
}
963736
func (s *Server) getRemoteGateway(name string) *gatewayCfg {
	s.gateway.RLock()
	cfg := s.gateway.remotes[name]
	s.gateway.RUnlock()
	return cfg
}
460655
func (c *EC2) WaitUntilVpcExists(input *DescribeVpcsInput) error {
	return c.WaitUntilVpcExistsWithContext(aws.BackgroundContext(), input)
}
61802
func (f *fundingManager) waitUntilChannelOpen(targetChan lnwire.ChannelID,
	quit <-chan struct{}) error {

	f.barrierMtx.RLock()
	barrier, ok := f.newChanBarriers[targetChan]
	f.barrierMtx.RUnlock()
	if ok {
		fndgLog.Tracef("waiting for chan barrier signal for ChanID(%v)",
			targetChan)

		select {
		case <-barrier:
		case <-quit:
			return ErrFundingManagerShuttingDown
		case <-f.quit:
			return ErrFundingManagerShuttingDown
		}

		fndgLog.Tracef("barrier for ChanID(%v) closed", targetChan)
		return nil
	}

	return nil
}
750137
func (c *OpsWorks) WaitUntilAppExists(input *DescribeAppsInput) error {
	return c.WaitUntilAppExistsWithContext(aws.BackgroundContext(), input)
}
931242
func (c *AppStream) WaitUntilFleetStarted(input *DescribeFleetsInput) error {
	return c.WaitUntilFleetStartedWithContext(aws.BackgroundContext(), input)
}
730266
func (c *Client) ClusterAvailable() (bool, error) {
	_, err := c.GetClusterStatus()
	if err != nil {
		return false, err
	}
	return true, nil
}
897462
func (client *Client) WaitForVSwitchAvailable(vpcId string, vswitchId string, timeout int) error {
	if timeout <= 0 {
		timeout = DefaultTimeout
	}
	args := DescribeVSwitchesArgs{
		VpcId:     vpcId,
		VSwitchId: vswitchId,
	}
	for {
		vswitches, _, err := client.DescribeVSwitches(&args)
		if err != nil {
			return err
		}
		if len(vswitches) == 0 {
			return common.GetClientErrorFromString("Not found")
		}
		if vswitches[0].Status == VSwitchStatusAvailable {
			break
		}
		timeout = timeout - DefaultWaitForInterval
		if timeout <= 0 {
			return common.GetClientErrorFromString("Timeout")
		}
		time.Sleep(DefaultWaitForInterval * time.Second)
	}
	return nil
}
1058992
func (c *Glacier) WaitUntilVaultExists(input *DescribeVaultInput) error {
	return c.WaitUntilVaultExistsWithContext(aws.BackgroundContext(), input)
}
836303
func (c *EC2) WaitUntilSubnetAvailable(input *DescribeSubnetsInput) error {
	return c.WaitUntilSubnetAvailableWithContext(aws.BackgroundContext(), input)
}