Skip to content

Commit a373b13

Browse files
authored
Merge pull request #1015 from saleelpk/monitor-sli
{Monitor} az monitor sli: Add SLI command group models (2025-03-01-preview)
2 parents ec320d5 + 5d1e892 commit a373b13

11 files changed

Lines changed: 2877 additions & 0 deletions

File tree

Commands/monitor/readme.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,8 @@ Manage the Azure Monitor Service.
4343
- [private-link-scope](/Commands/monitor/private-link-scope/readme.md)
4444
: Manage monitor private link scope resource.
4545

46+
- [sli](/Commands/monitor/sli/readme.md)
47+
: Manage Service Level Indicators (SLIs) in Azure Monitor.
48+
4649
- [tenant-action-group](/Commands/monitor/tenant-action-group/readme.md)
4750
: monitor tenant-action-group

Commands/monitor/sli/_create.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# [Command] _monitor sli create_
2+
3+
Create an SLI resource.
4+
5+
## Versions
6+
7+
### [2025-03-01-preview](/Resources/mgmt-plane/L3Byb3ZpZGVycy9taWNyb3NvZnQubWFuYWdlbWVudC9zZXJ2aWNlZ3JvdXBzL3t9L3Byb3ZpZGVycy9taWNyb3NvZnQubW9uaXRvci9zbGlzL3t9/2025-03-01-preview.xml) **Stable**
8+
9+
<!-- mgmt-plane /providers/microsoft.management/servicegroups/{}/providers/microsoft.monitor/slis/{} 2025-03-01-preview -->
10+
11+
#### examples
12+
13+
- CreateSli
14+
```bash
15+
monitor sli create --service-group-name testSG --sli-name testSli --description Measures the performance characteristics of the GetContosoUsers() API. --category Latency --evaluation-type WindowBased --enable-alert True --destination-amw-accounts "[{resource-id:/subscriptions/<subId>/resourcegroups/<rgId>/providers/microsoft.monitor/accounts/<dest>,identity:/subscriptions/<subId>/resourcegroups/<rgId>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/<idName>}]" --baseline-properties "{baseline:{value:99,evaluation-period-days:30,evaluation-calculation-type:CalendarDays}}" --sli-properties "{window-uptime-criteria:{target:95,comparator:gte},signals:{signalSources:[{signalSourceId:A,sourceAmwAccountManagedIdentity:/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity,sourceAmwAccountResourceId:/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/microsoft.monitor/accounts/myAccount,metricNamespace:ContosoMetricsWest,metricName:Stamp1Latency,filters:[{dimensionName:ApiName,operator:eq,value:GetContosoUsers}],spatialAggregation:{type:Average,dimensions:[Region,ResponseCode]},temporalAggregation:{type:Average,windowSizeMinutes:5}},{signalSourceId:B,sourceAmwAccountManagedIdentity:/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity,sourceAmwAccountResourceId:/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/microsoft.monitor/accounts/myAccount,metricNamespace:ContosoMetricsEast,metricName:Stamp2Latency,filters:[{dimensionName:ApiName,operator:eq,value:GetContosoUsers}],spatialAggregation:{type:Average,dimensions:[Region,ResponseCode]},temporalAggregation:{type:Average,windowSizeMinutes:5}}],signalFormula:'(A + B) /2'}}"
16+
```

Commands/monitor/sli/_delete.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# [Command] _monitor sli delete_
2+
3+
Delete an SLI resource.
4+
5+
## Versions
6+
7+
### [2025-03-01-preview](/Resources/mgmt-plane/L3Byb3ZpZGVycy9taWNyb3NvZnQubWFuYWdlbWVudC9zZXJ2aWNlZ3JvdXBzL3t9L3Byb3ZpZGVycy9taWNyb3NvZnQubW9uaXRvci9zbGlzL3t9/2025-03-01-preview.xml) **Stable**
8+
9+
<!-- mgmt-plane /providers/microsoft.management/servicegroups/{}/providers/microsoft.monitor/slis/{} 2025-03-01-preview -->
10+
11+
#### examples
12+
13+
- DeleteSli
14+
```bash
15+
monitor sli delete --service-group-name testSG --sli-name testSli
16+
```

Commands/monitor/sli/_list.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# [Command] _monitor sli list_
2+
3+
List all SLI resources under a parent resource.
4+
5+
## Versions
6+
7+
### [2025-03-01-preview](/Resources/mgmt-plane/L3Byb3ZpZGVycy9taWNyb3NvZnQubWFuYWdlbWVudC9zZXJ2aWNlZ3JvdXBzL3t9L3Byb3ZpZGVycy9taWNyb3NvZnQubW9uaXRvci9zbGlz/2025-03-01-preview.xml) **Stable**
8+
9+
<!-- mgmt-plane /providers/microsoft.management/servicegroups/{}/providers/microsoft.monitor/slis 2025-03-01-preview -->
10+
11+
#### examples
12+
13+
- SlisListByParent
14+
```bash
15+
monitor sli list --service-group-name testSG
16+
```

Commands/monitor/sli/_show.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# [Command] _monitor sli show_
2+
3+
Get an SLI resource.
4+
5+
## Versions
6+
7+
### [2025-03-01-preview](/Resources/mgmt-plane/L3Byb3ZpZGVycy9taWNyb3NvZnQubWFuYWdlbWVudC9zZXJ2aWNlZ3JvdXBzL3t9L3Byb3ZpZGVycy9taWNyb3NvZnQubW9uaXRvci9zbGlzL3t9/2025-03-01-preview.xml) **Stable**
8+
9+
<!-- mgmt-plane /providers/microsoft.management/servicegroups/{}/providers/microsoft.monitor/slis/{} 2025-03-01-preview -->
10+
11+
#### examples
12+
13+
- GetSli
14+
```bash
15+
monitor sli show --service-group-name testSG --sli-name testSli
16+
```

Commands/monitor/sli/_update.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# [Command] _monitor sli update_
2+
3+
Update an SLI resource.
4+
5+
## Versions
6+
7+
### [2025-03-01-preview](/Resources/mgmt-plane/L3Byb3ZpZGVycy9taWNyb3NvZnQubWFuYWdlbWVudC9zZXJ2aWNlZ3JvdXBzL3t9L3Byb3ZpZGVycy9taWNyb3NvZnQubW9uaXRvci9zbGlzL3t9/2025-03-01-preview.xml) **Stable**
8+
9+
<!-- mgmt-plane /providers/microsoft.management/servicegroups/{}/providers/microsoft.monitor/slis/{} 2025-03-01-preview -->
10+
11+
#### examples
12+
13+
- CreateSli
14+
```bash
15+
monitor sli update --service-group-name testSG --sli-name testSli
16+
```

Commands/monitor/sli/readme.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# [Group] _monitor sli_
2+
3+
Manage Service Level Indicators (SLIs) in Azure Monitor.
4+
5+
Only user-assigned managed identities (UAMIs) are supported. System-assigned identity is not supported by the SLI service. The service requires the same set of UAMIs to be referenced consistently in three places (`identity.userAssignedIdentities`, every `destinationAmwAccounts[].identity`, and every signal source's `sourceAmwAccountManagedIdentity`); they must be updated together in a single `az monitor sli update` invocation using `--set/--add/--remove`. See `az monitor sli --help` for the rotation recipe.
6+
7+
## Commands
8+
9+
- [create](/Commands/monitor/sli/_create.md)
10+
: Create an SLI resource.
11+
12+
- [delete](/Commands/monitor/sli/_delete.md)
13+
: Delete an SLI resource.
14+
15+
- [list](/Commands/monitor/sli/_list.md)
16+
: List all SLI resources under a parent resource.
17+
18+
- [show](/Commands/monitor/sli/_show.md)
19+
: Get an SLI resource.
20+
21+
- [update](/Commands/monitor/sli/_update.md)
22+
: Update an SLI resource.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"plane": "mgmt-plane", "resources": [{"id": "/providers/microsoft.management/servicegroups/{}/providers/microsoft.monitor/slis", "version": "2025-03-01-preview", "swagger": "mgmt-plane/monitoringservice/ResourceProviders/Microsoft.Monitor/Paths/L3Byb3ZpZGVycy9NaWNyb3NvZnQuTWFuYWdlbWVudC9zZXJ2aWNlR3JvdXBzL3tzZXJ2aWNlR3JvdXBOYW1lfS9wcm92aWRlcnMvTWljcm9zb2Z0Lk1vbml0b3Ivc2xpcw==/V/MjAyNS0wMy0wMS1wcmV2aWV3"}], "commandGroups": [{"name": "monitor sli", "commands": [{"name": "list", "version": "2025-03-01-preview", "resources": [{"id": "/providers/microsoft.management/servicegroups/{}/providers/microsoft.monitor/slis", "version": "2025-03-01-preview", "swagger": "mgmt-plane/monitoringservice/ResourceProviders/Microsoft.Monitor/Paths/L3Byb3ZpZGVycy9NaWNyb3NvZnQuTWFuYWdlbWVudC9zZXJ2aWNlR3JvdXBzL3tzZXJ2aWNlR3JvdXBOYW1lfS9wcm92aWRlcnMvTWljcm9zb2Z0Lk1vbml0b3Ivc2xpcw==/V/MjAyNS0wMy0wMS1wcmV2aWV3"}], "argGroups": [{"name": "", "args": [{"type": "string", "var": "$Path.serviceGroupName", "options": ["service-group-name"], "required": true, "help": {"short": "The name of the service group."}, "format": {"pattern": "^[A-Za-z0-9._()~-]{1,250}$"}}]}], "operations": [{"operationId": "Slis_ListByParent", "http": {"path": "/providers/Microsoft.Management/serviceGroups/{serviceGroupName}/providers/Microsoft.Monitor/slis", "request": {"method": "get", "path": {"params": [{"type": "string", "name": "serviceGroupName", "arg": "$Path.serviceGroupName", "required": true, "format": {"pattern": "^[A-Za-z0-9._()~-]{1,250}$"}}]}, "query": {"consts": [{"readOnly": true, "const": true, "default": {"value": "2025-03-01-preview"}, "type": "string", "name": "api-version", "required": true, "format": {"minLength": 1}}]}}, "responses": [{"statusCode": [200], "body": {"json": {"var": "$Instance", "schema": {"type": "object", "props": [{"type": "string", "name": "nextLink"}, {"type": "array<object>", "name": "value", "required": true, "item": {"type": "object", "props": [{"readOnly": true, "type": "ResourceId", "name": "id", "format": {"template": "/providers/Microsoft.Management/serviceGroups/{}/providers/Microsoft.Monitor/slis/{}"}}, {"type": "IdentityObject", "name": "identity", "props": [{"readOnly": true, "type": "uuid", "name": "principalId"}, {"readOnly": true, "type": "uuid", "name": "tenantId"}, {"type": "string", "name": "type", "required": true, "enum": {"items": [{"value": "None"}, {"value": "SystemAssigned"}, {"value": "SystemAssigned,UserAssigned"}, {"value": "UserAssigned"}]}}, {"type": "object", "name": "userAssignedIdentities", "additionalProps": {"item": {"nullable": true, "type": "object", "props": [{"readOnly": true, "type": "uuid", "name": "clientId"}, {"readOnly": true, "type": "uuid", "name": "principalId"}]}}}]}, {"readOnly": true, "type": "string", "name": "name"}, {"type": "object", "name": "properties", "props": [{"type": "object", "name": "baselineProperties", "required": true, "props": [{"type": "object", "name": "baseline", "required": true, "props": [{"type": "string", "name": "evaluationCalculationType", "required": true, "enum": {"items": [{"value": "CalendarDays"}, {"value": "RollingDays"}]}}, {"type": "integer32", "name": "evaluationPeriodDays", "required": true, "format": {"maximum": 90, "minimum": 1}}, {"type": "float32", "name": "value", "required": true, "format": {"maximum": 100.0, "minimum": 0}}]}]}, {"type": "string", "name": "category", "required": true, "enum": {"items": [{"value": "Availability"}, {"value": "Latency"}]}}, {"type": "string", "name": "description", "required": true, "format": {"pattern": "^[\\s\\S]{0,1000}$"}}, {"type": "array<object>", "name": "destinationAmwAccounts", "required": true, "item": {"type": "object", "props": [{"type": "ResourceId", "name": "identity", "required": true}, {"type": "ResourceId", "name": "resourceId", "required": true}]}, "identifiers": ["resourceId"]}, {"readOnly": true, "type": "array<object>", "name": "destinationMetrics", "item": {"type": "object", "props": [{"type": "string", "name": "metricName", "required": true}, {"type": "string", "name": "metricNamespace", "required": true}]}, "identifiers": ["metricName", "metricNamespace"]}, {"type": "boolean", "name": "enableAlert", "required": true}, {"type": "string", "name": "evaluationType", "required": true, "enum": {"items": [{"value": "RequestBased"}, {"value": "WindowBased"}]}}, {"readOnly": true, "type": "object", "name": "executionState", "props": [{"type": "string", "name": "message"}, {"type": "string", "name": "state", "required": true}]}, {"readOnly": true, "type": "string", "name": "provisioningState", "enum": {"items": [{"value": "Canceled"}, {"value": "Failed"}, {"value": "Succeeded"}]}}, {"type": "object", "name": "sliProperties", "required": true, "props": [{"type": "object", "name": "goodSignals", "props": [{"type": "string", "name": "signalFormula", "required": true}, {"type": "array<object>", "name": "signalSources", "required": true, "item": {"type": "object", "props": [{"type": "array<object>", "name": "filters", "required": true, "item": {"type": "object", "props": [{"type": "string", "name": "dimensionName"}, {"type": "string", "name": "operator", "required": true, "enum": {"items": [{"value": "contains"}, {"value": "eq"}, {"value": "gt"}, {"value": "gte"}, {"value": "in"}, {"value": "lt"}, {"value": "lte"}, {"value": "ne"}, {"value": "notcontains"}, {"value": "notin"}, {"value": "notstartswith"}, {"value": "startswith"}]}}, {"type": "string", "name": "samplingType", "enum": {"items": [{"value": "Average"}, {"value": "Count"}, {"value": "Max"}, {"value": "Min"}, {"value": "Sum"}]}}, {"type": "string", "name": "scalarFunction", "enum": {"items": [{"value": "avg"}, {"value": "max"}, {"value": "min"}, {"value": "sum"}]}}, {"type": "string", "name": "value", "required": true}]}, "identifiers": ["value", "operator", "samplingType", "dimensionName", "scalarFunction"]}, {"type": "string", "name": "metricName", "required": true}, {"type": "string", "name": "metricNamespace", "required": true}, {"type": "string", "name": "signalSourceId", "required": true}, {"type": "ResourceId", "name": "sourceAmwAccountManagedIdentity", "required": true}, {"type": "ResourceId", "name": "sourceAmwAccountResourceId", "required": true}, {"type": "object", "name": "spatialAggregation", "required": true, "props": [{"type": "array<string>", "name": "dimensions", "required": true, "item": {"type": "string"}}, {"type": "string", "name": "type", "required": true, "enum": {"items": [{"value": "Average"}, {"value": "Count"}, {"value": "Max"}, {"value": "Min"}, {"value": "Sum"}]}}]}, {"type": "object", "name": "temporalAggregation", "required": true, "props": [{"type": "string", "name": "type", "required": true, "enum": {"items": [{"value": "Average"}, {"value": "Delta"}, {"value": "IDelta"}, {"value": "IRate"}, {"value": "Increase"}, {"value": "Max"}, {"value": "Min"}, {"value": "Rate"}, {"value": "Sum"}]}}, {"type": "integer32", "name": "windowSizeMinutes"}]}]}, "identifiers": ["signalSourceId"]}], "cls": "Signal_read"}, {"type": "@Signal_read", "name": "signals"}, {"type": "@Signal_read", "name": "totalSignals"}, {"type": "object", "name": "windowUptimeCriteria", "props": [{"type": "string", "name": "comparator", "required": true, "enum": {"items": [{"value": "gt"}, {"value": "gte"}, {"value": "lt"}, {"value": "lte"}]}}, {"type": "float32", "name": "target", "required": true}]}]}, {"readOnly": true, "type": "string", "name": "streamingRuleId"}, {"readOnly": true, "type": "dateTime", "name": "streamingRuleLastUpdatedTimestamp", "format": {"protocol": "iso"}}]}, {"readOnly": true, "type": "object", "name": "systemData", "props": [{"type": "dateTime", "name": "createdAt", "format": {"protocol": "iso"}}, {"type": "string", "name": "createdBy"}, {"type": "string", "name": "createdByType", "enum": {"items": [{"value": "Application"}, {"value": "Key"}, {"value": "ManagedIdentity"}, {"value": "User"}]}}, {"type": "dateTime", "name": "lastModifiedAt", "format": {"protocol": "iso"}}, {"type": "string", "name": "lastModifiedBy"}, {"type": "string", "name": "lastModifiedByType", "enum": {"items": [{"value": "Application"}, {"value": "Key"}, {"value": "ManagedIdentity"}, {"value": "User"}]}}]}, {"readOnly": true, "type": "string", "name": "type"}]}}]}}}}, {"isError": true, "body": {"json": {"schema": {"type": "@MgmtErrorFormat"}}}}]}}], "outputs": [{"type": "array", "ref": "$Instance.value", "clientFlatten": true, "nextLink": "$Instance.nextLink"}]}]}]}

0 commit comments

Comments
 (0)