Smart Groups - Change State

Change the state of a Smart Group.

POST https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/smartGroups/{smartGroupId}/changeState?api-version=2019-05-05-preview&newState={newState}

URI Parameters

Name In Required Type Description
smartGroupId
path True

string

Smart group unique id.

subscriptionId
path True

string

The ID of the target subscription.

api-version
query True

api-version

client API version

newState
query True

AlertState

New state of the alert.

Responses

Name Type Description
200 OK

smartGroup

OK. Smart Group state updated.

Headers

x-ms-request-id: string

Other Status Codes

errorResponse

Error response describing why the operation failed.

Examples

changestate

Sample Request

POST https://management.azure.com/subscriptions/dd91de05-d791-4ceb-b6dc-988682dc7d72/providers/Microsoft.AlertsManagement/smartGroups/a808445e-bb38-4751-85c2-1b109ccc1059/changeState?api-version=2019-05-05-preview&newState=Acknowledged

Sample Response

{
  "properties": {
    "alertsCount": 1942,
    "smartGroupState": "Acknowledged",
    "severity": "Sev3",
    "startDateTime": "2018-06-06T12:35:09Z",
    "lastModifiedDateTime": "2018-06-13T06:30:09Z",
    "lastModifiedUserName": "System",
    "resources": [
      {
        "name": "/subscriptions/dd91de05-d791-4ceb-b6dc-988682dc7d72/resourcegroups/alertscorrelationrg/providers/microsoft.insights/components/alertscorrelationworkerrole_int",
        "count": 1942
      }
    ],
    "resourceTypes": [
      {
        "name": "components",
        "count": 1942
      }
    ],
    "resourceGroups": [
      {
        "name": "alertscorrelationrg",
        "count": 1942
      }
    ],
    "monitorServices": [
      {
        "name": "Application Insights",
        "count": 1942
      }
    ],
    "monitorConditions": [
      {
        "name": "Fired",
        "count": 1942
      }
    ],
    "alertStates": [
      {
        "name": "New",
        "count": 1941
      },
      {
        "name": "Acknowledged",
        "count": 1
      }
    ],
    "alertSeverities": [
      {
        "name": "Sev3",
        "count": 1942
      }
    ]
  },
  "id": "/subscriptions/dd91de05-d791-4ceb-b6dc-988682dc7d72/providers/Microsoft.AlertsManagement/smartGroups/a808445e-bb38-4751-85c2-1b109ccc1059",
  "type": "Microsoft.AlertsManagement/smartGroups",
  "name": "cpu alert"
}

Definitions

Name Description
AlertState

New state of the alert.

api-version

client API version

errorResponse

An error response from the service.

errorResponseBody

Details of error response.

Severity

Severity of smart group is the highest(Sev0 >... > Sev4) severity of all the alerts in the group.

smartGroup

Set of related alerts grouped together smartly by AMS.

smartGroupAggregatedProperty

Aggregated property of each type

State

Smart group state

AlertState

New state of the alert.

Name Type Description
Acknowledged

string

Closed

string

New

string

api-version

client API version

Name Type Description
2019-05-05-preview

string

errorResponse

An error response from the service.

Name Type Description
error

errorResponseBody

Details of error response.

errorResponseBody

Details of error response.

Name Type Description
code

string

Error code, intended to be consumed programmatically.

details

errorResponseBody[]

A list of additional details about the error.

message

string

Description of the error, intended for display in user interface.

target

string

Target of the particular error, for example name of the property.

Severity

Severity of smart group is the highest(Sev0 >... > Sev4) severity of all the alerts in the group.

Name Type Description
Sev0

string

Sev1

string

Sev2

string

Sev3

string

Sev4

string

smartGroup

Set of related alerts grouped together smartly by AMS.

Name Type Description
id

string

Azure resource Id

name

string

Azure resource name

properties.alertSeverities

smartGroupAggregatedProperty[]

Summary of alertSeverities in the smart group

properties.alertStates

smartGroupAggregatedProperty[]

Summary of alertStates in the smart group

properties.alertsCount

integer

Total number of alerts in smart group

properties.lastModifiedDateTime

string

Last updated time of smart group. Date-Time in ISO-8601 format.

properties.lastModifiedUserName

string

Last modified by user name.

properties.monitorConditions

smartGroupAggregatedProperty[]

Summary of monitorConditions in the smart group

properties.monitorServices

smartGroupAggregatedProperty[]

Summary of monitorServices in the smart group

properties.nextLink

string

The URI to fetch the next page of alerts. Call ListNext() with this URI to fetch the next page alerts.

properties.resourceGroups

smartGroupAggregatedProperty[]

Summary of target resource groups in the smart group

properties.resourceTypes

smartGroupAggregatedProperty[]

Summary of target resource types in the smart group

properties.resources

smartGroupAggregatedProperty[]

Summary of target resources in the smart group

properties.severity

Severity

Severity of smart group is the highest(Sev0 >... > Sev4) severity of all the alerts in the group.

properties.smartGroupState

State

Smart group state

properties.startDateTime

string

Creation time of smart group. Date-Time in ISO-8601 format.

type

string

Azure resource type

smartGroupAggregatedProperty

Aggregated property of each type

Name Type Description
count

integer

Total number of items of type.

name

string

Name of the type.

State

Smart group state

Name Type Description
Acknowledged

string

Closed

string

New

string