Skip to content

[Doc Gap] azurebackup policy create / protecteditem protect — AKS options moved between commands but docs not updated (PR #2888) #2938

Description

@github-actions

Documentation Gap

Server: Azure.Mcp.Server
Tool directory: tools/Azure.Mcp.Tools.AzureBackup
Triggered by: commit 648071d (PR #2888) by @alzimmermsft
Changed files:

  • tools/Azure.Mcp.Tools.AzureBackup/src/Commands/Policy/PolicyCreateCommand.cs
  • tools/Azure.Mcp.Tools.AzureBackup/src/Commands/ProtectedItem/ProtectedItemProtectCommand.cs
  • tools/Azure.Mcp.Tools.AzureBackup/src/Options/AzureBackupOptionDefinitions.cs
  • tools/Azure.Mcp.Tools.AzureBackup/src/Options/Policy/PolicyCreateOptions.cs
  • tools/Azure.Mcp.Tools.AzureBackup/src/Options/ProtectedItem/ProtectedItemProtectOptions.cs

What Changed

PR #2888 migrated Azure Backup tools to the new tool design where options are bound via [Option] attributes on properties instead of explicit Option<T> static fields. As part of this migration, the AKS backup options were moved from PolicyCreateOptions to ProtectedItemProtectOptions — they no longer exist on the policy create command, but now exist on the protect command.

The azmcp-commands.md documentation file was not updated (the checklist item was left unchecked in the PR).

Gaps Found

Files to Update

  • servers/Azure.Mcp.Server/docs/azmcp-commands.md

Context

Removed from PolicyCreateOptions (no longer accepted by policy create):

# in azmcp-commands.md — policy create section (around line 946-950)
-                                [--aks-snapshot-resource-group <resource-group>] \
-                                [--aks-included-namespaces <ns[,ns...]>] \
-                                [--aks-excluded-namespaces <ns[,ns...]>] \
-                                [--aks-label-selectors <selector[,selector...]>] \
-                                [--aks-include-cluster-scope-resources <true|false>]

Added to ProtectedItemProtectOptions (now accepted by protecteditem protect):

# in azmcp-commands.md — protecteditem protect section (around line 985-992)
 azmcp azurebackup protecteditem protect --subscription <subscription> \
                                         --resource-group <resource-group> \
                                         --vault <vault> \
                                         --datasource-id <datasource-id> \
                                         --policy <policy> \
                                         [--vault-type <vault-type>] \
                                         [--container <container>] \
                                         [--datasource-type <datasource-type>] \
+                                        [--aks-snapshot-resource-group <resource-group>] \
+                                        [--aks-included-namespaces <ns[,ns...]>] \
+                                        [--aks-excluded-namespaces <ns[,ns...]>] \
+                                        [--aks-label-selectors <selector[,selector...]>] \
+                                        [--aks-include-cluster-scope-resources <true|false>]

Confirmed by inspecting current source:

  • tools/Azure.Mcp.Tools.AzureBackup/src/Options/Policy/PolicyCreateOptions.cs — does not contain any AKS properties
  • tools/Azure.Mcp.Tools.AzureBackup/src/Options/ProtectedItem/ProtectedItemProtectOptions.csdoes contain: AksSnapshotResourceGroup, AksIncludedNamespaces, AksExcludedNamespaces, AksLabelSelectors, AksIncludeClusterScopeResources
📐 Implementation Guide

This section contains step-by-step instructions for a coding agent to implement the changes described above.

Step 1: Modify files

File: servers/Azure.Mcp.Server/docs/azmcp-commands.md
Action: Edit (two locations)

Location 1 — azurebackup policy create (around line 946-950):

Remove these five lines from the policy create command signature (they are no longer valid options):

                                [--aks-snapshot-resource-group <resource-group>] \
                                [--aks-included-namespaces <ns[,ns...]>] \
                                [--aks-excluded-namespaces <ns[,ns...]>] \
                                [--aks-label-selectors <selector[,selector...]>] \
                                [--aks-include-cluster-scope-resources <true|false>]

Also update the comment # --- Stage 2: smart tiering / snapshot / vault-tier copy / backup mode / PITR / tags / AKS --- to remove the / AKS suffix since AKS options are no longer part of policy create.

Location 2 — azurebackup protecteditem protect (around line 985-992):

Replace:

azmcp azurebackup protecteditem protect --subscription <subscription> \
                                        --resource-group <resource-group> \
                                        --vault <vault> \
                                        --datasource-id <datasource-id> \
                                        --policy <policy> \
                                        [--vault-type <vault-type>] \
                                        [--container <container>] \
                                        [--datasource-type <datasource-type>]

With:

azmcp azurebackup protecteditem protect --subscription <subscription> \
                                        --resource-group <resource-group> \
                                        --vault <vault> \
                                        --datasource-id <datasource-id> \
                                        --policy <policy> \
                                        [--vault-type <vault-type>] \
                                        [--container <container>] \
                                        [--datasource-type <datasource-type>] \
                                        [--aks-snapshot-resource-group <resource-group>] \
                                        [--aks-included-namespaces <ns[,ns...]>] \
                                        [--aks-excluded-namespaces <ns[,ns...]>] \
                                        [--aks-label-selectors <selector[,selector...]>] \
                                        [--aks-include-cluster-scope-resources <true|false>]

Step 2: Verify documentation structure

servers/Azure.Mcp.Server/docs/azmcp-commands.md — confirm the azurebackup policy create and azurebackup protecteditem protect command blocks are consistent with the rest of the Azure Backup section.

Step 3: Validate

Run these commands in order. Each must succeed before proceeding to the next:

  1. dotnet build servers/Azure.Mcp.Server/ — confirms the server project compiles cleanly
  2. dotnet build tools/Azure.Mcp.Tools.AzureBackup/src/ — confirms the affected toolset compiles
  3. dotnet test tools/Azure.Mcp.Tools.AzureBackup/tests/Azure.Mcp.Tools.AzureBackup.Tests/ --filter "TestType!=Live" — runs unit tests for the affected toolset
  4. .\eng\common\spelling\Invoke-Cspell.ps1 — checks spelling in new or modified documentation

Next Steps

Tip

Ready for automated implementation? Assign this issue to @copilot to have Copilot coding agent implement the changes described in the Implementation Guide above

Generated by Documentation Updater · ● 17.7M ·

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions