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.objectRecommendationsOperations
Constructor
RecommendationsOperations(client, config, serializer, deserializer)
Parameters
Name | Description |
---|---|
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
Name | Description |
---|---|
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
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
None, or the result of cls(response) |
Exceptions
Type | Description |
---|---|
get
Obtains details of a cached recommendation.
async get(resource_uri: str, recommendation_id: str, **kwargs) -> ResourceRecommendationBase
Parameters
Name | Description |
---|---|
resource_uri
Required
|
The fully qualified Azure Resource Manager identifier of the resource to which the recommendation applies. |
recommendation_id
Required
|
The recommendation ID. |
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
ResourceRecommendationBase, or the result of cls(response) |
Exceptions
Type | Description |
---|---|
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
Name | Description |
---|---|
operation_id
Required
|
The operation ID, which can be found from the Location field in the generate recommendation response header. |
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
None, or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list
Obtains cached recommendations for a subscription. The recommendations are generated or computed by invoking generateRecommendations.
list(filter: str | None = None, top: int | None = None, skip_token: str | None = None, **kwargs) -> AsyncIterable[ResourceRecommendationBaseListResult]
Parameters
Name | Description |
---|---|
filter
|
The filter to apply to the recommendations.:code:<xref:category>'] with operators ['eq', 'and', 'or'].:code: Default value: None
|
top
|
The number of recommendations per page if a paged version of this API is being used. Default value: None
|
skip_token
|
The page-continuation token to use with a paged version of this API. Default value: None
|
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
An iterator like instance of either ResourceRecommendationBaseListResult or the result of cls(response) |
Exceptions
Type | Description |
---|---|
Attributes
models
models = <module 'azure.mgmt.advisor.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\site-packages\\azure\\mgmt\\advisor\\models\\__init__.py'>
Azure SDK for Python
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for