Interface Usages


  • public interface Usages
    Resource collection API of Usages.
    • Method Detail

      • get

        CurrentUsagesBase get​(String resourceName,
                              String scope)
        Get the current usage of a resource.
        Parameters:
        resourceName - Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
        scope - The target Azure resource URI. For example, `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. This is the target Azure resource URI for the List GET operation. If a `{resourceName}` is added after `/quotas`, then it's the target Azure resource URI in the GET operation for the specific resource.
        Returns:
        the current usage of a resource.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • getWithResponse

        com.azure.core.http.rest.Response<CurrentUsagesBase> getWithResponse​(String resourceName,
                                                                             String scope,
                                                                             com.azure.core.util.Context context)
        Get the current usage of a resource.
        Parameters:
        resourceName - Resource name for a given resource provider. For example: - SKU name for Microsoft.Compute - SKU or TotalLowPriorityCores for Microsoft.MachineLearningServices For Microsoft.Network PublicIPAddresses.
        scope - The target Azure resource URI. For example, `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. This is the target Azure resource URI for the List GET operation. If a `{resourceName}` is added after `/quotas`, then it's the target Azure resource URI in the GET operation for the specific resource.
        context - The context to associate with this operation.
        Returns:
        the current usage of a resource.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • list

        com.azure.core.http.rest.PagedIterable<CurrentUsagesBase> list​(String scope)
        Get a list of current usage for all resources for the scope specified.
        Parameters:
        scope - The target Azure resource URI. For example, `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. This is the target Azure resource URI for the List GET operation. If a `{resourceName}` is added after `/quotas`, then it's the target Azure resource URI in the GET operation for the specific resource.
        Returns:
        a list of current usage for all resources for the scope specified.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
      • list

        com.azure.core.http.rest.PagedIterable<CurrentUsagesBase> list​(String scope,
                                                                       com.azure.core.util.Context context)
        Get a list of current usage for all resources for the scope specified.
        Parameters:
        scope - The target Azure resource URI. For example, `/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qms-test/providers/Microsoft.Batch/batchAccounts/testAccount/`. This is the target Azure resource URI for the List GET operation. If a `{resourceName}` is added after `/quotas`, then it's the target Azure resource URI in the GET operation for the specific resource.
        context - The context to associate with this operation.
        Returns:
        a list of current usage for all resources for the scope specified.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation.
        com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent.