func (c *Client) List(ctx context.Context, resourceGroupName string) ([]compute.VirtualMachine, *retry.Error) {
	mc := metrics.NewMetricContext("vm", "list", resourceGroupName, c.subscriptionID, "")

	// Report errors if the client is rate limited.
	if !c.rateLimiterReader.TryAccept() {
		mc.RateLimitedCount()
		return nil, retry.GetRateLimitError(false, "VMList")
	}

	// Report errors if the client is throttled.
	if c.RetryAfterReader.After(time.Now()) {
		mc.ThrottledCount()
		rerr := retry.GetThrottlingError("VMList", "client throttled", c.RetryAfterReader)
		return nil, rerr
	}

	result, rerr := c.listVM(ctx, resourceGroupName)
	mc.Observe(rerr.Error())
	if rerr != nil {
		if rerr.IsThrottled() {
			// Update RetryAfterReader so that no more requests would be sent until RetryAfter expires.
			c.RetryAfterReader = rerr.RetryAfter
		}

		return result, rerr
	}

	return result, nil
}
// List gets a list of VirtualMachine in the resourceGroupName.
List gets a list of VirtualMachine in the resourceGroupName.
// List gets a list of VirtualMachine in the resourceGroupName .
func (c *Client) List(ctx context.Context, resourceGroupName string) ([]compute.VirtualMachine, *retry.Error) {
	mc := metrics.NewMetricContext("vm", "list", resourceGroupName, c.subscriptionID, "")
	if !c.rateLimiterReader.TryAccept() {
		mc.RateLimitedCount()
		return nil, retry.GetRateLimitError(false, "VMList")
	}
	if c.RetryAfterReader.After(time.Now()) {
		mc.ThrottledCount()
		rerr := retry.GetThrottlingError("VMList", "client throttled", c.RetryAfterReader)
		return nil, rerr
	}
	result, rerr := c.listVM(ctx, resourceGroupName)
	mc.Observe(rerr.Error())
	if rerr != nil {
		if rerr.IsThrottled() {
			c.RetryAfterReader = rerr.RetryAfter
		}
		return result, rerr
	}
	return result, nil
}
func ( c * Client ) List ( ctx context . Context , resourceGroupName string ) ( [ ] compute . VirtualMachine , * retry . Error ) { mc := metrics . NewMetricContext ( " " , " " , resourceGroupName , c . subscriptionID , " " ) if ! c . rateLimiterReader . TryAccept ( ) { mc . RateLimitedCount ( ) return nil , retry . GetRateLimitError ( false , " " ) } if c . RetryAfterReader . After ( time . Now ( ) ) { mc . ThrottledCount ( ) rerr := retry . GetThrottlingError ( " " , " " , c . RetryAfterReader ) return nil , rerr } result , rerr := c . listVM ( ctx , resourceGroupName ) mc . Observe ( rerr . Error ( ) ) if rerr != nil { if rerr . IsThrottled ( ) { c . RetryAfterReader = rerr . RetryAfter } return result , rerr } return result , nil }
List gets a list of VirtualMachine in the resourceGroupName.
List gets a list of VirtualMachine in the resourceGroupName .
// Report errors if the client is rate limited. // Report errors if the client is throttled. // Update RetryAfterReader so that no more requests would be sent until RetryAfter expires.