AlertRulesOperations Class

AlertRulesOperations 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
AlertRulesOperations

Constructor

AlertRulesOperations(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

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.

async create_or_update(resource_group_name: str, rule_name: str, parameters: azure.mgmt.monitor.v2015_07_01.models._models_py3.AlertRuleResource, **kwargs: Any) -> azure.mgmt.monitor.v2015_07_01.models._models_py3.AlertRuleResource

Parameters

resource_group_name
str
Required

The name of the resource group. The name is case insensitive.

rule_name
str
Required

The name of the rule.

parameters
<xref:$>(<xref:python-base-namespace>)AlertRuleResource
Required

The parameters of the rule to create or update.

cls
callable

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

Returns

AlertRuleResource, or the result of cls(response)

Return type

<xref:$>(<xref:python-base-namespace>)AlertRuleResource

Exceptions

delete

Deletes a classic metric alert rule.

async delete(resource_group_name: str, rule_name: str, **kwargs: Any) -> None

Parameters

resource_group_name
str
Required

The name of the resource group. The name is case insensitive.

rule_name
str
Required

The name of the rule.

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

Gets a classic metric alert rule.

async get(resource_group_name: str, rule_name: str, **kwargs: Any) -> azure.mgmt.monitor.v2015_07_01.models._models_py3.AlertRuleResource

Parameters

resource_group_name
str
Required

The name of the resource group. The name is case insensitive.

rule_name
str
Required

The name of the rule.

cls
callable

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

Returns

AlertRuleResource, or the result of cls(response)

Return type

<xref:$>(<xref:python-base-namespace>)AlertRuleResource

Exceptions

list_by_resource_group

List the classic metric alert rules within a resource group.

list_by_resource_group(resource_group_name: str, **kwargs: Any) -> AsyncIterable[azure.mgmt.monitor.v2015_07_01.models._models_py3.AlertRuleResourceCollection]

Parameters

resource_group_name
str
Required

The name of the resource group. The name is case insensitive.

cls
callable

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

Returns

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

Return type

AsyncItemPaged[<xref:$>(<xref:python-base-namespace>)AlertRuleResourceCollection]

Exceptions

list_by_subscription

List the classic metric alert rules within a subscription.

list_by_subscription(**kwargs: Any) -> AsyncIterable[azure.mgmt.monitor.v2015_07_01.models._models_py3.AlertRuleResourceCollection]

Parameters

cls
callable

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

Returns

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

Return type

AsyncItemPaged[<xref:$>(<xref:python-base-namespace>)AlertRuleResourceCollection]

Exceptions

update

Updates an existing classic metric AlertRuleResource. To update other fields use the CreateOrUpdate method.

async update(resource_group_name: str, rule_name: str, alert_rules_resource: azure.mgmt.monitor.v2015_07_01.models._models_py3.AlertRuleResourcePatch, **kwargs: Any) -> azure.mgmt.monitor.v2015_07_01.models._models_py3.AlertRuleResource

Parameters

resource_group_name
str
Required

The name of the resource group. The name is case insensitive.

rule_name
str
Required

The name of the rule.

alert_rules_resource
<xref:$>(<xref:python-base-namespace>)AlertRuleResourcePatch
Required

Parameters supplied to the operation.

cls
callable

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

Returns

AlertRuleResource, or the result of cls(response)

Return type

<xref:$>(<xref:python-base-namespace>)AlertRuleResource

Exceptions

Attributes

models

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