SmartGroupsOperations Class
SmartGroupsOperations 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.objectSmartGroupsOperations
Constructor
SmartGroupsOperations(client, config, serializer, deserializer)
Parameters
- client
Client for service requests.
- config
Configuration of service client.
- serializer
An object model serializer.
- deserializer
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.
change_state(smart_group_id: str, new_state: Union[str, _models.AlertState], **kwargs: Any) -> _models.SmartGroup
Parameters
- 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, _models.MonitorService]] = None, monitor_condition: Optional[Union[str, _models.MonitorCondition]] = None, severity: Optional[Union[str, _models.Severity]] = None, smart_group_state: Optional[Union[str, _models.AlertState]] = None, time_range: Optional[Union[str, _models.TimeRange]] = None, page_count: Optional[int] = None, sort_by: Optional[Union[str, _models.SmartGroupsSortByFields]] = None, sort_order: Optional[Union[str, _models.Enum11]] = None, **kwargs: Any) -> Iterable[_models.SmartGroupsList]
Parameters
- target_resource
- str
Filter by target resource( which is full ARM ID) Default value is select all.
- target_resource_group
- str
Filter by target resource group name. Default value is select all.
- target_resource_type
- str
Filter by target resource type. Default value is select all.
- monitor_service
- str or MonitorService
Filter by monitor service which generates the alert instance. Default value is select all.
- monitor_condition
- str or MonitorCondition
Filter by monitor condition which is either 'Fired' or 'Resolved'. Default value is to select all.
- smart_group_state
- str or AlertState
Filter by state of the smart group. Default value is to select all.
Filter by time range by below listed values. Default value is 1 day.
- page_count
- int
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
Sort the query results by input field. Default value is sort by 'lastModifiedDateTime'.
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.
get_by_id(smart_group_id: str, **kwargs: Any) -> _models.SmartGroup
Parameters
- 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) .
get_history(smart_group_id: str, **kwargs: Any) -> _models.SmartGroupModification
Parameters
- 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'>
Feedback
Submit and view feedback for