RecommendationsOperations Class

RecommendationsOperations async operations.

You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.

Inheritance
builtins.object
RecommendationsOperations

Constructor

RecommendationsOperations(client, config, serializer, deserializer)

Parameters

client
Required

Client for service requests.

config
Required

Configuration of service client.

serializer
Required

An object model serializer.

deserializer
Required

An object model deserializer.

Variables

models

Alias to model classes used in this operation group.

Methods

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.

get

Obtains details of a cached recommendation.

get_generate_status

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.

list

Obtains cached recommendations for a subscription. The recommendations are generated or computed by invoking generateRecommendations.

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.

async generate(**kwargs) -> None

Parameters

cls
callable

A custom type or function that will be passed the direct response

Returns

None, or the result of cls(response)

Return type

Exceptions

get

Obtains details of a cached recommendation.

async get(resource_uri: str, recommendation_id: str, **kwargs) -> azure.mgmt.advisor.models._models_py3.ResourceRecommendationBase

Parameters

resource_uri
str
Required

The fully qualified Azure Resource Manager identifier of the resource to which the recommendation applies.

recommendation_id
str
Required

The recommendation ID.

cls
callable

A custom type or function that will be passed the direct response

Returns

ResourceRecommendationBase, or the result of cls(response)

Return type

Exceptions

get_generate_status

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.

async get_generate_status(operation_id: str, **kwargs) -> None

Parameters

operation_id
str
Required

The operation ID, which can be found from the Location field in the generate recommendation response header.

cls
callable

A custom type or function that will be passed the direct response

Returns

None, or the result of cls(response)

Return type

Exceptions

list

Obtains cached recommendations for a subscription. The recommendations are generated or computed by invoking generateRecommendations.

list(filter: Optional[str] = None, top: Optional[int] = None, skip_token: Optional[str] = None, **kwargs) -> AsyncIterable[azure.mgmt.advisor.models._models_py3.ResourceRecommendationBaseListResult]

Parameters

filter
str
default value: None

The filter to apply to the recommendations.:code:<xref:category>'] with operators ['eq', 'and', 'or'].:code:
Example::code:
- $filter=Category eq 'Cost' and ResourceGroup eq 'MyResourceGroup'.

top
int
default value: None

The number of recommendations per page if a paged version of this API is being used.

skip_token
str
default value: None

The page-continuation token to use with a paged version of this API.

cls
callable

A custom type or function that will be passed the direct response

Returns

An iterator like instance of either ResourceRecommendationBaseListResult or the result of cls(response)

Return type

Exceptions

Attributes

models

models = <module 'azure.mgmt.advisor.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.9.13\\x64\\lib\\site-packages\\azure\\mgmt\\advisor\\models\\__init__.py'>