ResourceManagerThrottlingInfo Class

  • java.lang.Object
    • com.azure.resourcemanager.resources.fluentcore.utils.ResourceManagerThrottlingInfo

public class ResourceManagerThrottlingInfo

The class to collect all throttling info from response header. Some service has different rate limit but not visible in response header, like network/storage.

Constructor Summary

Constructor Description
ResourceManagerThrottlingInfo(HttpHeaders headers)

Creates the throttling info class from response headers

Method Summary

Modifier and Type Method and Description
static ResourceManagerThrottlingInfo fromHeaders(HttpHeaders headers)

Creates the throttling info class from response headers

Optional<Integer> getRateLimit()

Gets the rate limit.

Map<String,String> getRateLimits()

Gets all headers associated with rate limit.

String getResourceRateLimit()

Gets a specific rate limit header value from compute.

Methods inherited from java.lang.Object

Constructor Details

ResourceManagerThrottlingInfo

public ResourceManagerThrottlingInfo(HttpHeaders headers)

Creates the throttling info class from response headers

Parameters:

headers - the response headers

Method Details

fromHeaders

public static ResourceManagerThrottlingInfo fromHeaders(HttpHeaders headers)

Creates the throttling info class from response headers

Parameters:

headers - the response headers

Returns:

the ResourceManagerThrottlingInfo class

getRateLimit

public Optional<Integer> getRateLimit()

Gets the rate limit.

Returns:

the smallest rate limit or empty if none of the headers are valid

getRateLimits

public Map<String,String> getRateLimits()

Gets all headers associated with rate limit. refer https://docs.microsoft.com/azure/azure-resource-manager/management/request-limits-and-throttling

Returns:

all headers associated with rate limit

getResourceRateLimit

public String getResourceRateLimit()

Gets a specific rate limit header value from compute. refer https://docs.microsoft.com/azure/virtual-machines/troubleshooting/troubleshooting-throttling-errors

Returns:

a specific rate limit header value from compute

Applies to