Compartilhar via


AlertsOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

AuthorizationManagementClient's

<xref:alerts> attribute.

Inheritance
builtins.object
AlertsOperations

Constructor

AlertsOperations(*args, **kwargs)

Methods

begin_refresh

Refresh an alert.

begin_refresh_all

Refresh all alerts for a resource scope.

get

Get the specified alert.

list_for_scope

Gets alerts for a resource scope.

update

Update an alert.

begin_refresh

Refresh an alert.

begin_refresh(scope: str, alert_id: str, **kwargs: Any) -> LROPoller[AlertOperationResult]

Parameters

Name Description
scope
Required
str

The scope of the alert. Required.

alert_id
Required
str

The name of the alert to refresh. Required.

Keyword-Only Parameters

Name Description
cls

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

continuation_token
str

A continuation token to restart a poller from a saved state.

polling

By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

Type Description

An instance of LROPoller that returns either AlertOperationResult or the result of cls(response)

Exceptions

Type Description

begin_refresh_all

Refresh all alerts for a resource scope.

begin_refresh_all(scope: str, **kwargs: Any) -> LROPoller[AlertOperationResult]

Parameters

Name Description
scope
Required
str

The scope of the alert. Required.

Keyword-Only Parameters

Name Description
cls

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

continuation_token
str

A continuation token to restart a poller from a saved state.

polling

By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

Type Description

An instance of LROPoller that returns either AlertOperationResult or the result of cls(response)

Exceptions

Type Description

get

Get the specified alert.

get(scope: str, alert_id: str, **kwargs: Any) -> Alert

Parameters

Name Description
scope
Required
str

The scope of the alert. The scope can be any REST resource instance. For example, use '/providers/Microsoft.Subscription/subscriptions/{subscription-id}/' for a subscription, '/providers/Microsoft.Subscription/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for a resource group, and '/providers/Microsoft.Subscription/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}' for a resource. Required.

alert_id
Required
str

The name of the alert to get. Required.

Keyword-Only Parameters

Name Description
cls

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

Returns

Type Description

Alert or the result of cls(response)

Exceptions

Type Description

list_for_scope

Gets alerts for a resource scope.

list_for_scope(scope: str, **kwargs: Any) -> Iterable[Alert]

Parameters

Name Description
scope
Required
str

The scope of the alert. 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 Alert or the result of cls(response)

Exceptions

Type Description

update

Update an alert.

update(scope: str, alert_id: str, parameters: _models.Alert, *, content_type: str = 'application/json', **kwargs: Any) -> None

Parameters

Name Description
scope
Required
str

The scope of the alert. Required.

alert_id
Required
str

The name of the alert to dismiss. Required.

parameters
Required
Alert or IO

Parameters for the alert. Is either a Alert type or a IO type. Required.

Keyword-Only Parameters

Name Description
content_type
str

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

None or the result of cls(response)

Exceptions

Type Description

Attributes

models

models = <module 'azure.mgmt.authorization.v2022_08_01_preview.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\site-packages\\azure\\mgmt\\authorization\\v2022_08_01_preview\\models\\__init__.py'>