Skip to content

Commit 5bf3fac

Browse files
saleelpkCopilot
andcommitted
{Monitor} az monitor sli: Onboard SLI CRUD command group (Microsoft.Monitor 2025-03-01-preview)
Adds new 'az monitor sli' command group (create/show/list/update/delete) targeting the tenant-scoped Microsoft.Monitor SLI resource under serviceGroups, generated from typespec via aaz-dev. Notes: - Only user-assigned managed identity is supported; system-assigned is not exposed. - The peer sli-signal-preview operation in the same swagger tag is intentionally not exposed via CLI. - For future regenerations of monitoringservice, prefer the aaz-dev workspace flow ('aaz-dev run') over 'command-model generate-from-swagger' so peer resources (pipeline-group, signal-preview) aren't re-touched. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent f22ad42 commit 5bf3fac

11 files changed

Lines changed: 4065 additions & 0 deletions

File tree

src/azure-cli/HISTORY.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33
Release History
44
===============
55

6+
Upcoming Release
7+
++++++++++++++++
8+
9+
**Monitor**
10+
11+
* `az monitor sli`: Add command group with `create`, `show`, `list`, `update`, and `delete` using `Microsoft.Monitor` preview API `2025-03-01-preview`. Only user-assigned managed identity is supported; system-assigned identity is not. Identity rotation is performed via `az monitor sli update --set 'identity.userAssignedIdentities={"<arm-id>":{}}'` plus matching `--set` updates on `destinationAmwAccounts[*].identity` and each `signalSources[*].sourceAmwAccountManagedIdentity`; see `az monitor sli update --help` for the full recipe.
12+
613
2.86.0
714
++++++
815

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
#
5+
# Code generated by aaz-dev-tools
6+
# --------------------------------------------------------------------------------------------
7+
8+
# pylint: skip-file
9+
# flake8: noqa
10+
11+
from azure.cli.core.aaz import *
12+
13+
14+
@register_command_group(
15+
"monitor sli",
16+
)
17+
class __CMDGroup(AAZCommandGroup):
18+
"""Manage Service Level Indicators (SLIs) in Azure Monitor.
19+
20+
Identity model: SLIs only support user-assigned managed identities (UAMIs).
21+
System-assigned identity is not supported by the service. A UAMI must be
22+
referenced in three places that the service keeps in sync:
23+
24+
1. The ARM identity block (`identity.userAssignedIdentities`).
25+
2. Each destination AMW (`properties.destinationAmwAccounts[].identity`).
26+
3. Each signal source (`properties.sliProperties.{signals|goodSignals|
27+
totalSignals}.signalSources[].sourceAmwAccountManagedIdentity`).
28+
29+
The service rejects PUTs where these three sets disagree. To rotate a UAMI,
30+
update all three surfaces in a single `az monitor sli update` call so the
31+
PUT is atomic. See `az monitor sli update --help` for worked rotation
32+
examples. Run `az monitor sli show` first to confirm the actual indices
33+
and which signal slot (`signals` for window-based, `goodSignals` +
34+
`totalSignals` for request-based) is populated.
35+
"""
36+
pass
37+
38+
39+
__all__ = ["__CMDGroup"]
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
#
5+
# Code generated by aaz-dev-tools
6+
# --------------------------------------------------------------------------------------------
7+
8+
# pylint: skip-file
9+
# flake8: noqa

0 commit comments

Comments
 (0)