Class ResourceManagerThrottlingInfo
- java.lang.Object
-
- com.azure.resourcemanager.resources.fluentcore.utils.ResourceManagerThrottlingInfo
-
public class ResourceManagerThrottlingInfo extends Object
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
Constructors Constructor Description ResourceManagerThrottlingInfo(com.azure.core.http.HttpHeaders headers)Creates the throttling info class from response headers
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ResourceManagerThrottlingInfofromHeaders(com.azure.core.http.HttpHeaders headers)Creates the throttling info class from response headersOptional<Integer>getRateLimit()Map<String,String>getRateLimits()refer https://docs.microsoft.com/azure/azure-resource-manager/management/request-limits-and-throttlingStringgetResourceRateLimit()refer https://docs.microsoft.com/azure/virtual-machines/troubleshooting/troubleshooting-throttling-errors
-
-
-
Method Detail
-
fromHeaders
public static ResourceManagerThrottlingInfo fromHeaders(com.azure.core.http.HttpHeaders headers)
Creates the throttling info class from response headers- Parameters:
headers- the response headers- Returns:
- the ResourceManagerThrottlingInfo class
-
getRateLimit
public Optional<Integer> getRateLimit()
- Returns:
- the smallest rate limit or empty if none of the headers are valid
-
getRateLimits
public Map<String,String> getRateLimits()
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()
refer https://docs.microsoft.com/azure/virtual-machines/troubleshooting/troubleshooting-throttling-errors- Returns:
- a specific rate limit header value from compute
-
-