Skip to content

Commit 21a10c9

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 21a10c9

11 files changed

Lines changed: 4071 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: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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+
is_preview=True,
17+
)
18+
class __CMDGroup(AAZCommandGroup):
19+
"""Manage Service Level Indicators (SLIs) in Azure Monitor.
20+
21+
Identity model: SLIs only support user-assigned managed identities (UAMIs).
22+
System-assigned identity is not supported by the service. A UAMI must be
23+
referenced in three places that the service keeps in sync:
24+
25+
1. The ARM identity block (`identity.userAssignedIdentities`).
26+
2. Each destination AMW (`properties.destinationAmwAccounts[].identity`).
27+
3. Each signal source (`properties.sliProperties.{signals|goodSignals|
28+
totalSignals}.signalSources[].sourceAmwAccountManagedIdentity`).
29+
30+
The service rejects PUTs where these three sets disagree. To rotate a UAMI,
31+
update all three surfaces in a single `az monitor sli update` call so the
32+
PUT is atomic. See `az monitor sli update --help` for worked rotation
33+
examples. Run `az monitor sli show` first to confirm the actual indices
34+
and which signal slot (`signals` for window-based, `goodSignals` +
35+
`totalSignals` for request-based) is populated.
36+
"""
37+
pass
38+
39+
40+
__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)