azure.mgmt.advisor.operations module¶
-
class
azure.mgmt.advisor.operations.
ConfigurationsOperations
(*args, **kwargs)[source]¶ Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
AdvisorManagementClient
’sconfigurations
attribute.-
create_in_resource_group
(configuration_name: Union[str, _models.ConfigurationName], resource_group: str, config_contract: _models.ConfigData, *, content_type: str = "'application/json'", **kwargs: Any) → _models.ConfigData[source]¶ -
create_in_resource_group
(configuration_name: Union[str, _models.ConfigurationName], resource_group: str, config_contract: IO, *, content_type: str = "'application/json'", **kwargs: Any) → _models.ConfigData Create/Overwrite Azure Advisor configuration.
Create/Overwrite Azure Advisor configuration.
- Parameters
configuration_name (str or ConfigurationName) – Advisor configuration name. Value must be ‘default’. “default” Required.
resource_group (str) – The name of the Azure resource group. Required.
config_contract (ConfigData or IO) – The Azure Advisor configuration data structure. Is either a model type or a IO type. Required.
- Keyword Arguments
- Returns
ConfigData or the result of cls(response)
- Return type
- Raises
-
create_in_subscription
(configuration_name: Union[str, _models.ConfigurationName], config_contract: _models.ConfigData, *, content_type: str = "'application/json'", **kwargs: Any) → _models.ConfigData[source]¶ -
create_in_subscription
(configuration_name: Union[str, _models.ConfigurationName], config_contract: IO, *, content_type: str = "'application/json'", **kwargs: Any) → _models.ConfigData Create/Overwrite Azure Advisor configuration.
Create/Overwrite Azure Advisor configuration and also delete all configurations of contained resource groups.
- Parameters
configuration_name (str or ConfigurationName) – Advisor configuration name. Value must be ‘default’. “default” Required.
config_contract (ConfigData or IO) – The Azure Advisor configuration data structure. Is either a model type or a IO type. Required.
- Keyword Arguments
- Returns
ConfigData or the result of cls(response)
- Return type
- Raises
-
list_by_resource_group
(resource_group: str, **kwargs: Any) → Iterable[azure.mgmt.advisor.models._models_py3.ConfigData][source]¶ Retrieve Azure Advisor configurations.
Retrieve Azure Advisor configurations.
-
list_by_subscription
(**kwargs: Any) → Iterable[azure.mgmt.advisor.models._models_py3.ConfigData][source]¶ Retrieve Azure Advisor configurations.
Retrieve Azure Advisor configurations and also retrieve configurations of contained resource groups.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either ConfigData or the result of cls(response)
- Return type
- Raises
-
models
= <module 'azure.mgmt.advisor.models' from '/mnt/vss/_work/1/s/sdk/advisor/azure-mgmt-advisor/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/advisor/models/__init__.py'>¶
-
-
class
azure.mgmt.advisor.operations.
Operations
(*args, **kwargs)[source]¶ Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
AdvisorManagementClient
’soperations
attribute.-
list
(**kwargs: Any) → Iterable[azure.mgmt.advisor.models._models_py3.OperationEntity][source]¶ Lists all the available Advisor REST API operations.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either OperationEntity or the result of cls(response)
- Return type
- Raises
-
models
= <module 'azure.mgmt.advisor.models' from '/mnt/vss/_work/1/s/sdk/advisor/azure-mgmt-advisor/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/advisor/models/__init__.py'>¶
-
-
class
azure.mgmt.advisor.operations.
RecommendationMetadataOperations
(*args, **kwargs)[source]¶ Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
AdvisorManagementClient
’srecommendation_metadata
attribute.-
get
(name: str, **kwargs: Any) → azure.mgmt.advisor.models._models_py3.MetadataEntity[source]¶ Gets the metadata entity.
Gets the metadata entity.
-
list
(**kwargs: Any) → Iterable[azure.mgmt.advisor.models._models_py3.MetadataEntity][source]¶ Gets the list of metadata entities.
Gets the list of metadata entities.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either MetadataEntity or the result of cls(response)
- Return type
- Raises
-
models
= <module 'azure.mgmt.advisor.models' from '/mnt/vss/_work/1/s/sdk/advisor/azure-mgmt-advisor/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/advisor/models/__init__.py'>¶
-
-
class
azure.mgmt.advisor.operations.
RecommendationsOperations
(*args, **kwargs)[source]¶ Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
AdvisorManagementClient
’srecommendations
attribute.-
generate
(**kwargs: Any) → None[source]¶ 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.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
None or the result of cls(response)
- Return type
- Raises
-
get
(resource_uri: str, recommendation_id: str, **kwargs: Any) → azure.mgmt.advisor.models._models_py3.ResourceRecommendationBase[source]¶ Obtains details of a cached recommendation.
- Parameters
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
ResourceRecommendationBase or the result of cls(response)
- Return type
- Raises
-
get_generate_status
(operation_id: str, **kwargs: Any) → None[source]¶ 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
operation_id (str) – The operation ID, which can be found from the Location field in the generate recommendation response header. Required.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
None or the result of cls(response)
- Return type
- Raises
-
list
(filter: Optional[str] = None, top: Optional[int] = None, skip_token: Optional[str] = None, **kwargs: Any) → Iterable[azure.mgmt.advisor.models._models_py3.ResourceRecommendationBase][source]¶ Obtains cached recommendations for a subscription. The recommendations are generated or computed by invoking generateRecommendations.
- Parameters
filter (str) – The filter to apply to the recommendations.:code:<br>`Filter can be applied to properties [‘ResourceId’, ‘ResourceGroup’, ‘RecommendationTypeGuid’, ‘`Category‘] with operators [‘eq’, ‘and’, ‘or’].:code:<br>`Example::code:`<br>- $filter=Category eq ‘Cost’ and ResourceGroup eq ‘MyResourceGroup’. Default value is None.
top (int) – The number of recommendations per page if a paged version of this API is being used. Default value is None.
skip_token (str) – The page-continuation token to use with a paged version of this API. Default value is None.
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either ResourceRecommendationBase or the result of cls(response)
- Return type
- Raises
-
models
= <module 'azure.mgmt.advisor.models' from '/mnt/vss/_work/1/s/sdk/advisor/azure-mgmt-advisor/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/advisor/models/__init__.py'>¶
-
-
class
azure.mgmt.advisor.operations.
SuppressionsOperations
(*args, **kwargs)[source]¶ Bases:
object
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
AdvisorManagementClient
’ssuppressions
attribute.-
create
(resource_uri: str, recommendation_id: str, name: str, suppression_contract: _models.SuppressionContract, *, content_type: str = "'application/json'", **kwargs: Any) → _models.SuppressionContract[source]¶ -
create
(resource_uri: str, recommendation_id: str, name: str, suppression_contract: IO, *, content_type: str = "'application/json'", **kwargs: Any) → _models.SuppressionContract Enables the snoozed or dismissed attribute of a recommendation. The snoozed or dismissed attribute is referred to as a suppression. Use this API to create or update the snoozed or dismissed status of a recommendation.
- Parameters
resource_uri (str) – The fully qualified Azure Resource Manager identifier of the resource to which the recommendation applies. Required.
recommendation_id (str) – The recommendation ID. Required.
name (str) – The name of the suppression. Required.
suppression_contract (SuppressionContract or IO) – The snoozed or dismissed attribute; for example, the snooze duration. Is either a model type or a IO type. Required.
- Keyword Arguments
- Returns
SuppressionContract or the result of cls(response)
- Return type
- Raises
-
delete
(resource_uri: str, recommendation_id: str, name: str, **kwargs: Any) → None[source]¶ Enables the activation of a snoozed or dismissed recommendation. The snoozed or dismissed attribute of a recommendation is referred to as a suppression.
- Parameters
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
None or the result of cls(response)
- Return type
- Raises
-
get
(resource_uri: str, recommendation_id: str, name: str, **kwargs: Any) → azure.mgmt.advisor.models._models_py3.SuppressionContract[source]¶ Obtains the details of a suppression.
- Parameters
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
SuppressionContract or the result of cls(response)
- Return type
- Raises
-
list
(top: Optional[int] = None, skip_token: Optional[str] = None, **kwargs: Any) → Iterable[azure.mgmt.advisor.models._models_py3.SuppressionContract][source]¶ Retrieves the list of snoozed or dismissed suppressions for a subscription. The snoozed or dismissed attribute of a recommendation is referred to as a suppression.
- Parameters
- Keyword Arguments
cls (callable) – A custom type or function that will be passed the direct response
- Returns
An iterator like instance of either SuppressionContract or the result of cls(response)
- Return type
- Raises
-
models
= <module 'azure.mgmt.advisor.models' from '/mnt/vss/_work/1/s/sdk/advisor/azure-mgmt-advisor/.tox/sphinx/lib/python3.9/site-packages/azure/mgmt/advisor/models/__init__.py'>¶
-