Interface RecommendationsClient


public interface RecommendationsClient
An instance of this class provides access to all the operations defined in RecommendationsClient.
  • Method Details

    • generateWithResponse

      RecommendationsGenerateResponse generateWithResponse(com.azure.core.util.Context context)
      Initiates the recommendation generation or computation process for a subscription. This operation is asynchronous. The generated recommendations are stored in a cache in the Advisor service.
      Parameters:
      context - The context to associate with this operation.
      Returns:
      the response.
      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.
    • generate

      void generate()
      Initiates the recommendation generation or computation process for a subscription. This operation is asynchronous. The generated recommendations are stored in a cache in the Advisor service.
      Throws:
      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.
    • getGenerateStatusWithResponse

      com.azure.core.http.rest.Response<Void> getGenerateStatusWithResponse(UUID operationId, com.azure.core.util.Context context)
      Retrieves the status of the recommendation computation or generation process. Invoke this API after calling the generation recommendation. The URI of this API is returned in the Location field of the response header.
      Parameters:
      operationId - The operation ID, which can be found from the Location field in the generate recommendation response header.
      context - The context to associate with this operation.
      Returns:
      the Response.
      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.
    • getGenerateStatus

      void getGenerateStatus(UUID operationId)
      Retrieves the status of the recommendation computation or generation process. Invoke this API after calling the generation recommendation. The URI of this API is returned in the Location field of the response header.
      Parameters:
      operationId - The operation ID, which can be found from the Location field in the generate recommendation response header.
      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<ResourceRecommendationBaseInner> list()
      Obtains cached recommendations for a subscription. The recommendations are generated or computed by invoking generateRecommendations.
      Returns:
      the list of Advisor recommendations as paginated response with PagedIterable.
      Throws:
      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<ResourceRecommendationBaseInner> list(String filter, Integer top, String skipToken, com.azure.core.util.Context context)
      Obtains cached recommendations for a subscription. The recommendations are generated or computed by invoking generateRecommendations.
      Parameters:
      filter - The filter to apply to the recommendations.<br>Filter can be applied to properties ['ResourceId', 'ResourceGroup', 'RecommendationTypeGuid', '[Category](#category)'] with operators ['eq', 'and', 'or'].<br>Example:<br>- $filter=Category eq 'Cost' and ResourceGroup eq 'MyResourceGroup'.
      top - The number of recommendations per page if a paged version of this API is being used.
      skipToken - The page-continuation token to use with a paged version of this API.
      context - The context to associate with this operation.
      Returns:
      the list of Advisor recommendations as paginated response with PagedIterable.
      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<ResourceRecommendationBaseInner> getWithResponse(String resourceUri, String recommendationId, com.azure.core.util.Context context)
      Obtains details of a cached recommendation.
      Parameters:
      resourceUri - The fully qualified Azure Resource Manager identifier of the resource to which the recommendation applies.
      recommendationId - The recommendation ID.
      context - The context to associate with this operation.
      Returns:
      advisor Recommendation along with Response.
      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.
    • get

      ResourceRecommendationBaseInner get(String resourceUri, String recommendationId)
      Obtains details of a cached recommendation.
      Parameters:
      resourceUri - The fully qualified Azure Resource Manager identifier of the resource to which the recommendation applies.
      recommendationId - The recommendation ID.
      Returns:
      advisor Recommendation.
      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.