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 |
---|---|---|---|---|
smart
|
path | True |
string |
Smart group unique id. |
subscription
|
path | True |
string |
The ID of the target subscription. |
api-version
|
query | True |
client API version |
|
new
|
query | True |
New state of the alert. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK. Smart Group state updated. Headers x-ms-request-id: string |
|
Other Status Codes |
Error response describing why the operation failed. |
Examples
changestate
Sample Request
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 |
---|---|
Alert |
New state of the alert. |
api-version |
client API version |
error |
An error response from the service. |
error |
Details of error response. |
Severity |
Severity of smart group is the highest(Sev0 >... > Sev4) severity of all the alerts in the group. |
smart |
Set of related alerts grouped together smartly by AMS. |
smart |
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 |
Details of error response. |
errorResponseBody
Details of error response.
Name | Type | Description |
---|---|---|
code |
string |
Error code, intended to be consumed programmatically. |
details |
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 |
Summary of alertSeverities in the smart group |
|
properties.alertStates |
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 |
Summary of monitorConditions in the smart group |
|
properties.monitorServices |
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 |
Summary of target resource groups in the smart group |
|
properties.resourceTypes |
Summary of target resource types in the smart group |
|
properties.resources |
Summary of target resources in the smart group |
|
properties.severity |
Severity of smart group is the highest(Sev0 >... > Sev4) severity of all the alerts in the group. |
|
properties.smartGroupState |
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 |