func (c *Client) Get(ctx context.Context, resourceGroupName string, VMName string, expand compute.InstanceViewTypes) (compute.VirtualMachine, *retry.Error) {
	mc := metrics.NewMetricContext("vm", "get", resourceGroupName, c.subscriptionID, "")

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

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

	result, rerr := c.getVM(ctx, resourceGroupName, VMName, expand)
	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
}
// Get gets a VirtualMachine.
Get gets a VirtualMachine.
// Get gets a VirtualMachine .
func (c *Client) Get(ctx context.Context, resourceGroupName string, VMName string, expand compute.InstanceViewTypes) (compute.VirtualMachine, *retry.Error) {
	mc := metrics.NewMetricContext("vm", "get", resourceGroupName, c.subscriptionID, "")
	if !c.rateLimiterReader.TryAccept() {
		mc.RateLimitedCount()
		return compute.VirtualMachine{}, retry.GetRateLimitError(false, "VMGet")
	}
	if c.RetryAfterReader.After(time.Now()) {
		mc.ThrottledCount()
		rerr := retry.GetThrottlingError("VMGet", "client throttled", c.RetryAfterReader)
		return compute.VirtualMachine{}, rerr
	}
	result, rerr := c.getVM(ctx, resourceGroupName, VMName, expand)
	mc.Observe(rerr.Error())
	if rerr != nil {
		if rerr.IsThrottled() {
			c.RetryAfterReader = rerr.RetryAfter
		}
		return result, rerr
	}
	return result, nil
}
func ( c * Client ) Get ( ctx context . Context , resourceGroupName string , VMName string , expand compute . InstanceViewTypes ) ( compute . VirtualMachine , * retry . Error ) { mc := metrics . NewMetricContext ( " " , " " , resourceGroupName , c . subscriptionID , " " ) if ! c . rateLimiterReader . TryAccept ( ) { mc . RateLimitedCount ( ) return compute . VirtualMachine { } , retry . GetRateLimitError ( false , " " ) } if c . RetryAfterReader . After ( time . Now ( ) ) { mc . ThrottledCount ( ) rerr := retry . GetThrottlingError ( " " , " " , c . RetryAfterReader ) return compute . VirtualMachine { } , rerr } result , rerr := c . getVM ( ctx , resourceGroupName , VMName , expand ) mc . Observe ( rerr . Error ( ) ) if rerr != nil { if rerr . IsThrottled ( ) { c . RetryAfterReader = rerr . RetryAfter } return result , rerr } return result , nil }
Get gets a VirtualMachine.
Get gets a VirtualMachine .
// 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.