SmartGroupsOperations Class

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

Constructor

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

change_state

Change the state of a Smart Group.

get_all

Get all Smart Groups within a specified subscription.

List all the Smart Groups within a specified subscription.

get_by_id

Get information related to a specific Smart Group.

Get information related to a specific Smart Group.

get_history

Get the history a smart group, which captures any Smart Group state changes (New/Acknowledged/Closed) .

change_state

Change the state of a Smart Group.

async change_state(smart_group_id: str, new_state: Union[str, azure.mgmt.alertsmanagement.models._alerts_management_client_enums.AlertState], **kwargs) -> azure.mgmt.alertsmanagement.models._models_py3.SmartGroup

Parameters

smart_group_id
str
Required

Smart group unique id.

new_state
str or AlertState
Required

New state of the alert.

cls
callable

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

Returns

SmartGroup, or the result of cls(response)

Return type

Exceptions

get_all

Get all Smart Groups within a specified subscription.

List all the Smart Groups within a specified subscription.

get_all(target_resource: Optional[str] = None, target_resource_group: Optional[str] = None, target_resource_type: Optional[str] = None, monitor_service: Optional[Union[str, azure.mgmt.alertsmanagement.models._alerts_management_client_enums.MonitorService]] = None, monitor_condition: Optional[Union[str, azure.mgmt.alertsmanagement.models._alerts_management_client_enums.MonitorCondition]] = None, severity: Optional[Union[str, azure.mgmt.alertsmanagement.models._alerts_management_client_enums.Severity]] = None, smart_group_state: Optional[Union[str, azure.mgmt.alertsmanagement.models._alerts_management_client_enums.AlertState]] = None, time_range: Optional[Union[str, azure.mgmt.alertsmanagement.models._alerts_management_client_enums.TimeRange]] = None, page_count: Optional[int] = None, sort_by: Optional[Union[str, azure.mgmt.alertsmanagement.models._alerts_management_client_enums.SmartGroupsSortByFields]] = None, sort_order: Optional[Union[str, azure.mgmt.alertsmanagement.models._alerts_management_client_enums.Enum11]] = None, **kwargs) -> AsyncIterable[azure.mgmt.alertsmanagement.models._models_py3.SmartGroupsList]

Parameters

target_resource
str
default value: None

Filter by target resource( which is full ARM ID) Default value is select all.

target_resource_group
str
default value: None

Filter by target resource group name. Default value is select all.

target_resource_type
str
default value: None

Filter by target resource type. Default value is select all.

monitor_service
str or MonitorService
default value: None

Filter by monitor service which generates the alert instance. Default value is select all.

monitor_condition
str or MonitorCondition
default value: None

Filter by monitor condition which is either 'Fired' or 'Resolved'. Default value is to select all.

severity
str or Severity
default value: None

Filter by severity. Default value is select all.

smart_group_state
str or AlertState
default value: None

Filter by state of the smart group. Default value is to select all.

time_range
str or TimeRange
default value: None

Filter by time range by below listed values. Default value is 1 day.

page_count
int
default value: None

Determines number of alerts returned per page in response. Permissible value is between 1 to 250. When the "includeContent" filter is selected, maximum value allowed is 25. Default value is 25.

sort_by
str or SmartGroupsSortByFields
default value: None

Sort the query results by input field. Default value is sort by 'lastModifiedDateTime'.

sort_order
str or Enum11
default value: None

Sort the query results order in either ascending or descending. Default value is 'desc' for time fields and 'asc' for others.

cls
callable

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

Returns

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

Return type

Exceptions

get_by_id

Get information related to a specific Smart Group.

Get information related to a specific Smart Group.

async get_by_id(smart_group_id: str, **kwargs) -> azure.mgmt.alertsmanagement.models._models_py3.SmartGroup

Parameters

smart_group_id
str
Required

Smart group unique id.

cls
callable

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

Returns

SmartGroup, or the result of cls(response)

Return type

Exceptions

get_history

Get the history a smart group, which captures any Smart Group state changes (New/Acknowledged/Closed) .

async get_history(smart_group_id: str, **kwargs) -> azure.mgmt.alertsmanagement.models._models_py3.SmartGroupModification

Parameters

smart_group_id
str
Required

Smart group unique id.

cls
callable

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

Returns

SmartGroupModification, or the result of cls(response)

Return type

Exceptions

Attributes

models

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