Class 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 Detail

      • ResourceManagerThrottlingInfo

        public ResourceManagerThrottlingInfo​(com.azure.core.http.HttpHeaders headers)
        Creates the throttling info class from response headers
        Parameters:
        headers - the response headers
    • 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