SmartGroups Interface

public interface SmartGroups

Resource collection API of SmartGroups.

Method Summary

Modifier and Type Method and Description
abstract SmartGroup changeState(String smartGroupId, AlertState newState)

Change the state of a Smart Group.

abstract Response<SmartGroup> changeStateWithResponse(String smartGroupId, AlertState newState, Context context)

Change the state of a Smart Group.

abstract SmartGroup getById(String smartGroupId)

Get information related to a specific Smart Group.

abstract Response<SmartGroup> getByIdWithResponse(String smartGroupId, Context context)

Get information related to a specific Smart Group.

abstract SmartGroupModification getHistory(String smartGroupId)

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

abstract Response<SmartGroupModification> getHistoryWithResponse(String smartGroupId, Context context)

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

abstract PagedIterable<SmartGroup> list()

Get all Smart Groups within a specified subscription List all the Smart Groups within a specified subscription.

abstract PagedIterable<SmartGroup> list(String targetResource, String targetResourceGroup, String targetResourceType, MonitorService monitorService, MonitorCondition monitorCondition, Severity severity, AlertState smartGroupState, TimeRange timeRange, Long pageCount, SmartGroupsSortByFields sortBy, SortOrder sortOrder, Context context)

Get all Smart Groups within a specified subscription List all the Smart Groups within a specified subscription.

Method Details

changeState

public abstract SmartGroup changeState(String smartGroupId, AlertState newState)

Change the state of a Smart Group.

Parameters:

smartGroupId - Smart group unique id.
newState - New state of the alert.

Returns:

set of related alerts grouped together smartly by AMS.

changeStateWithResponse

public abstract Response<SmartGroup> changeStateWithResponse(String smartGroupId, AlertState newState, Context context)

Change the state of a Smart Group.

Parameters:

smartGroupId - Smart group unique id.
newState - New state of the alert.
context - The context to associate with this operation.

Returns:

set of related alerts grouped together smartly by AMS.

getById

public abstract SmartGroup getById(String smartGroupId)

Get information related to a specific Smart Group.

Parameters:

smartGroupId - Smart group unique id.

Returns:

information related to a specific Smart Group.

getByIdWithResponse

public abstract Response<SmartGroup> getByIdWithResponse(String smartGroupId, Context context)

Get information related to a specific Smart Group.

Parameters:

smartGroupId - Smart group unique id.
context - The context to associate with this operation.

Returns:

information related to a specific Smart Group.

getHistory

public abstract SmartGroupModification getHistory(String smartGroupId)

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

Parameters:

smartGroupId - Smart group unique id.

Returns:

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

getHistoryWithResponse

public abstract Response<SmartGroupModification> getHistoryWithResponse(String smartGroupId, Context context)

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

Parameters:

smartGroupId - Smart group unique id.
context - The context to associate with this operation.

Returns:

the history a smart group, which captures any Smart Group state changes (New/Acknowledged/Closed) along with Response<T>.

list

public abstract PagedIterable<SmartGroup> list()

Get all Smart Groups within a specified subscription List all the Smart Groups within a specified subscription.

Returns:

list the alerts as paginated response with PagedIterable<T>.

list

public abstract PagedIterable<SmartGroup> list(String targetResource, String targetResourceGroup, String targetResourceType, MonitorService monitorService, MonitorCondition monitorCondition, Severity severity, AlertState smartGroupState, TimeRange timeRange, Long pageCount, SmartGroupsSortByFields sortBy, SortOrder sortOrder, Context context)

Get all Smart Groups within a specified subscription List all the Smart Groups within a specified subscription.

Parameters:

targetResource - Filter by target resource( which is full ARM ID) Default value is select all.
targetResourceGroup - Filter by target resource group name. Default value is select all.
targetResourceType - Filter by target resource type. Default value is select all.
monitorService - Filter by monitor service which generates the alert instance. Default value is select all.
monitorCondition - Filter by monitor condition which is either 'Fired' or 'Resolved'. Default value is to select all.
severity - Filter by severity. Default value is select all.
smartGroupState - Filter by state of the smart group. Default value is to select all.
timeRange - Filter by time range by below listed values. Default value is 1 day.
pageCount - 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.
sortBy - Sort the query results by input field. Default value is sort by 'lastModifiedDateTime'.
sortOrder - Sort the query results order in either ascending or descending. Default value is 'desc' for time fields and 'asc' for others.
context - The context to associate with this operation.

Returns:

list the alerts as paginated response with PagedIterable<T>.

Applies to