MetricAlertsOperations Class
MetricAlertsOperations 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.objectMetricAlertsOperations
Constructor
MetricAlertsOperations(client, config, serializer, deserializer)
Parameters
- client
Client for service requests.
- config
Configuration of service client.
- serializer
An object model serializer.
- deserializer
An object model deserializer.
Variables
- models
Alias to model classes used in this operation group.
Methods
| create_or_update |
Create or update an metric alert definition. |
| delete |
Delete an alert rule definition. |
| get |
Retrieve an alert rule definition. |
| list_by_resource_group |
Retrieve alert rule definitions in a resource group. |
| list_by_subscription |
Retrieve alert rule definitions in a subscription. |
| update |
Update an metric alert definition. |
create_or_update
Create or update an metric alert definition.
async create_or_update(resource_group_name: str, rule_name: str, parameters: azure.mgmt.monitor.v2018_03_01.models._models_py3.MetricAlertResource, **kwargs: Any) -> azure.mgmt.monitor.v2018_03_01.models._models_py3.MetricAlertResource
Parameters
- parameters
- <xref:$>(<xref:python-base-namespace>)MetricAlertResource
The parameters of the rule to create or update.
- cls
- callable
A custom type or function that will be passed the direct response
Returns
MetricAlertResource, or the result of cls(response)
Return type
Exceptions
delete
Delete an alert rule definition.
async delete(resource_group_name: str, rule_name: str, **kwargs: Any) -> 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
Retrieve an alert rule definition.
async get(resource_group_name: str, rule_name: str, **kwargs: Any) -> azure.mgmt.monitor.v2018_03_01.models._models_py3.MetricAlertResource
Parameters
- cls
- callable
A custom type or function that will be passed the direct response
Returns
MetricAlertResource, or the result of cls(response)
Return type
Exceptions
list_by_resource_group
Retrieve alert rule definitions in a resource group.
list_by_resource_group(resource_group_name: str, **kwargs: Any) -> AsyncIterable[azure.mgmt.monitor.v2018_03_01.models._models_py3.MetricAlertResourceCollection]
Parameters
- cls
- callable
A custom type or function that will be passed the direct response
Returns
An iterator like instance of either MetricAlertResourceCollection or the result of cls(response)
Return type
Exceptions
list_by_subscription
Retrieve alert rule definitions in a subscription.
list_by_subscription(**kwargs: Any) -> AsyncIterable[azure.mgmt.monitor.v2018_03_01.models._models_py3.MetricAlertResourceCollection]
Parameters
- cls
- callable
A custom type or function that will be passed the direct response
Returns
An iterator like instance of either MetricAlertResourceCollection or the result of cls(response)
Return type
Exceptions
update
Update an metric alert definition.
async update(resource_group_name: str, rule_name: str, parameters: azure.mgmt.monitor.v2018_03_01.models._models_py3.MetricAlertResourcePatch, **kwargs: Any) -> azure.mgmt.monitor.v2018_03_01.models._models_py3.MetricAlertResource
Parameters
- parameters
- <xref:$>(<xref:python-base-namespace>)MetricAlertResourcePatch
The parameters of the rule to update.
- cls
- callable
A custom type or function that will be passed the direct response
Returns
MetricAlertResource, or the result of cls(response)
Return type
Exceptions
Attributes
models
models = <module 'azure.mgmt.monitor.v2018_03_01.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.9.13\\x64\\lib\\site-packages\\azure\\mgmt\\monitor\\v2018_03_01\\models\\__init__.py'>
Feedback
Submit and view feedback for