AlertRulesOperations Class
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
<xref:alert_rules> attribute.
- Inheritance
-
builtins.objectAlertRulesOperations
Constructor
AlertRulesOperations(*args, **kwargs)
Methods
create_or_update |
Creates or updates a classic metric alert rule. |
delete |
Deletes a classic metric alert rule. |
get |
Gets a classic metric alert rule. |
list_by_resource_group |
List the classic metric alert rules within a resource group. |
list_by_subscription |
List the classic metric alert rules within a subscription. |
update |
Updates an existing classic metric AlertRuleResource. To update other fields use the CreateOrUpdate method. |
create_or_update
Creates or updates a classic metric alert rule.
create_or_update(resource_group_name: str, rule_name: str, parameters: _models.AlertRuleResource, *, content_type: str = 'application/json', **kwargs: Any) -> _models.AlertRuleResource
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
rule_name
Required
|
The name of the rule. Required. |
parameters
Required
|
The parameters of the rule to create or update. Is either a AlertRuleResource type or a IO type. Required. |
Keyword-Only Parameters
Name | Description |
---|---|
content_type
|
Body Parameter content-type. Known values are: 'application/json'. Default value is None. |
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
AlertRuleResource or the result of cls(response) |
Exceptions
Type | Description |
---|---|
delete
Deletes a classic metric alert rule.
delete(resource_group_name: str, rule_name: str, **kwargs: Any) -> None
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
rule_name
Required
|
The name of the rule. Required. |
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
Gets a classic metric alert rule.
get(resource_group_name: str, rule_name: str, **kwargs: Any) -> AlertRuleResource
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
rule_name
Required
|
The name of the rule. Required. |
Keyword-Only Parameters
Name | Description |
---|---|
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
AlertRuleResource or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list_by_resource_group
List the classic metric alert rules within a resource group.
list_by_resource_group(resource_group_name: str, **kwargs: Any) -> Iterable[AlertRuleResource]
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
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 AlertRuleResource or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list_by_subscription
List the classic metric alert rules within a subscription.
list_by_subscription(**kwargs: Any) -> Iterable[AlertRuleResource]
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 AlertRuleResource or the result of cls(response) |
Exceptions
Type | Description |
---|---|
update
Updates an existing classic metric AlertRuleResource. To update other fields use the CreateOrUpdate method.
update(resource_group_name: str, rule_name: str, alert_rules_resource: _models.AlertRuleResourcePatch, *, content_type: str = 'application/json', **kwargs: Any) -> _models.AlertRuleResource
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
rule_name
Required
|
The name of the rule. Required. |
alert_rules_resource
Required
|
Parameters supplied to the operation. Is either a AlertRuleResourcePatch type or a IO type. Required. |
Keyword-Only Parameters
Name | Description |
---|---|
content_type
|
Body Parameter content-type. Known values are: 'application/json'. Default value is None. |
cls
|
A custom type or function that will be passed the direct response |
Returns
Type | Description |
---|---|
AlertRuleResource or the result of cls(response) |
Exceptions
Type | Description |
---|---|
Attributes
models
models = <module 'azure.mgmt.monitor.v2016_03_01.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\site-packages\\azure\\mgmt\\monitor\\v2016_03_01\\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