ActivityLogAlertsOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

MonitorManagementClient's

<xref:activity_log_alerts> attribute.

Constructor

ActivityLogAlertsOperations(*args, **kwargs)

Methods

create_or_update

Create a new Activity Log Alert rule or update an existing one.

delete

Delete an Activity Log Alert rule.

get

Get an Activity Log Alert rule.

list_by_resource_group

Get a list of all Activity Log Alert rules in a resource group.

list_by_subscription_id

Get a list of all Activity Log Alert rules in a subscription.

update

Updates 'tags' and 'enabled' fields in an existing Alert rule. This method is used to update the Alert rule tags, and to enable or disable the Alert rule. To update other fields use CreateOrUpdate operation.

create_or_update

Create a new Activity Log Alert rule or update an existing one.

create_or_update(resource_group_name: str, activity_log_alert_name: str, activity_log_alert_rule: _models.ActivityLogAlertResource, *, content_type: str = 'application/json', **kwargs: Any) -> _models.ActivityLogAlertResource

Parameters

Name Description
resource_group_name
Required
str

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

activity_log_alert_name
Required
str

The name of the Activity Log Alert rule. Required.

activity_log_alert_rule
Required

The Activity Log Alert rule to create or use for the update. Is either a ActivityLogAlertResource type or a IO[bytes] type. Required.

Returns

Type Description

ActivityLogAlertResource or the result of cls(response)

Exceptions

Type Description

delete

Delete an Activity Log Alert rule.

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

Parameters

Name Description
resource_group_name
Required
str

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

activity_log_alert_name
Required
str

The name of the Activity Log Alert rule. Required.

Returns

Type Description

None or the result of cls(response)

Exceptions

Type Description

get

Get an Activity Log Alert rule.

get(resource_group_name: str, activity_log_alert_name: str, **kwargs: Any) -> ActivityLogAlertResource

Parameters

Name Description
resource_group_name
Required
str

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

activity_log_alert_name
Required
str

The name of the Activity Log Alert rule. Required.

Returns

Type Description

ActivityLogAlertResource or the result of cls(response)

Exceptions

Type Description

list_by_resource_group

Get a list of all Activity Log Alert rules in a resource group.

list_by_resource_group(resource_group_name: str, **kwargs: Any) -> ItemPaged[ActivityLogAlertResource]

Parameters

Name Description
resource_group_name
Required
str

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

Returns

Type Description

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

Exceptions

Type Description

list_by_subscription_id

Get a list of all Activity Log Alert rules in a subscription.

list_by_subscription_id(**kwargs: Any) -> ItemPaged[ActivityLogAlertResource]

Returns

Type Description

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

Exceptions

Type Description

update

Updates 'tags' and 'enabled' fields in an existing Alert rule. This method is used to update the Alert rule tags, and to enable or disable the Alert rule. To update other fields use CreateOrUpdate operation.

update(resource_group_name: str, activity_log_alert_name: str, activity_log_alert_rule_patch: _models.AlertRulePatchObject, *, content_type: str = 'application/json', **kwargs: Any) -> _models.ActivityLogAlertResource

Parameters

Name Description
resource_group_name
Required
str

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

activity_log_alert_name
Required
str

The name of the Activity Log Alert rule. Required.

activity_log_alert_rule_patch
Required

Parameters supplied to the operation. Is either a AlertRulePatchObject type or a IO[bytes] type. Required.

Returns

Type Description

ActivityLogAlertResource or the result of cls(response)

Exceptions

Type Description

Attributes

models

models = <module 'azure.mgmt.monitor.models' from 'C:\\ToolCache\\Python\\3.12.10\\x64\\Lib\\site-packages\\py2docfx\\venv\\venv181\\Lib\\site-packages\\azure\\mgmt\\monitor\\models\\__init__.py'>