canonical: https://jentic.com/apis/azure.com/azure-maintenancemanagementclient

# Microsoft Azure MaintenanceManagementClient

Jentic publishes the only available OpenAPI specification for MaintenanceManagementClient, keeping it validated and agent-ready. MaintenanceManagementClient is the Azure Resource Manager surface for the Microsoft.Maintenance provider - Azure Maintenance Configurations. It defines maintenance windows, assigns those configurations to virtual machines and other resources, and tracks the status of pending or applied platform updates. It does not patch operating systems or install application updates.

## For AI agents

Define Azure maintenance windows, assign them to resources, and apply or track platform updates through Azure Resource Manager. Use for maintenance configuration and update tracking, not for OS patching or guest software updates.

## Scope

Does not patch guest operating systems, install application updates, or schedule VM reboots outside Azure's platform fabric - use only for Microsoft.Maintenance configurations and platform-update orchestration.

## Capabilities

- Create and manage maintenance configuration resources defining recurring windows
- Assign maintenance configurations to virtual machines and other supported resources via ConfigurationAssignments
- Apply pending platform updates to a resource on demand using ApplyUpdates
- Track the status of platform updates per resource through the Updates and ApplyUpdates resources
- List available platform updates for a target resource before triggering apply
- Patch a maintenance configuration to change cadence, scope, or window timing

## Use cases

### Scheduled Platform Maintenance Windows

Operations teams running production virtual machines need predictable platform-update windows so unplanned reboots do not disrupt customer traffic. MaintenanceManagementClient creates a MaintenanceConfiguration resource with a recurring schedule (for example, every Sunday 02:00-06:00 UTC), and ConfigurationAssignments bind that window to specific VMs. Azure platform updates are then deferred to the configured window rather than the default reboot policy.

Example prompt: PUT a MaintenanceConfiguration named 'sunday-02-utc' with maintenanceScope 'Host' and a weekly Sunday 02:00 UTC window, then create ConfigurationAssignments binding it to each VM in the 'app-prod' availability set.

### On-Demand Update Apply

When a critical platform update is announced, operators apply pending updates to specific VMs without waiting for the next scheduled window. ApplyUpdates POST against /providers/Microsoft.Maintenance/applyUpdates/default triggers the update immediately, and the response includes a status the agent can poll until the update completes. The Updates list endpoint surfaces what is pending before the trigger.

Example prompt: List Updates for VM 'app-vm-01', then if any update has impactType=Restart and is approved, call applyUpdates/default and poll the resulting ApplyUpdates resource until status=Completed.

### Subscription-Wide Maintenance Audit

Compliance teams confirm every VM in scope has a maintenance configuration assigned. MaintenanceConfigurations_List returns every defined window in the subscription, and ConfigurationAssignments_List per resource returns the bindings. An agent can join these and flag VMs without an assignment for follow-up.

Example prompt: List MaintenanceConfigurations in the subscription, list ConfigurationAssignments for each VM in the 'prod' resource group, and produce a CSV of VM names without an assigned configuration.

### AI Agent Patch Orchestration

SRE agents handling patch coordination use Jentic to discover the right Microsoft.Maintenance operation. Searching for 'apply azure platform updates' returns the schema; the agent loads it and executes against management.azure.com using a token retrieved from your Jentic One instance, so no ARM SDK install is needed.

Example prompt: Use Jentic to search 'apply azure platform updates to a virtual machine', load the ApplyUpdates schema, and POST against the target VM's applyUpdates/default sub-resource.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| PUT | /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Maintenance/maintenanceConfigurations/{resourceName} | Create or update a maintenance configuration |
| GET | /subscriptions/{subscriptionId}/providers/Microsoft.Maintenance/maintenanceConfigurations | List maintenance configurations in a subscription |
| DELETE | /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Maintenance/maintenanceConfigurations/{resourceName} | Delete a maintenance configuration |
| PUT | /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceParentType}/{resourceParentName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/applyUpdates/default | Apply pending platform updates to a resource |
| GET | /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{providerName}/{resourceParentType}/{resourceParentName}/{resourceType}/{resourceName}/providers/Microsoft.Maintenance/applyUpdates/{applyUpdateName} | Track an apply-updates operation |

## Key resources

- **MaintenanceConfigurations** — Define recurring maintenance windows with scope (Host, OSImage, Extension).
- **ConfigurationAssignments** — Bind a maintenance configuration to a specific resource (VM, VMSS, or other supported type).
- **ApplyUpdates** — Trigger immediate apply of pending platform updates on a target resource and inspect status.
- **Updates** — List pending and available platform updates for a target resource.
- **Operations** — Operations catalog for the Microsoft.Maintenance resource provider.

## Why Jentic

- **Setup:** Wiring the Azure Maintenance management API by hand means registering an Azure AD app, negotiating OAuth 2.0 tokens for management.azure.com, and threading subscription and resource-group scope through every maintenance-configuration call. Through Jentic you install once, import MaintenanceManagementClient from the API Directory, store the Azure AD credential once, and your agent calls it.
- **Permission scoping:** This API puts the maintenance configuration in the URL path (/providers/Microsoft.Maintenance/maintenanceConfigurations/{resourceName}), so a rule can pin your agent to reading configurations and their apply-update records: it can list configurations and read apply-update state. You choose the operations it may call, so creating, deleting, or applying an update is not included unless you add it.
- **Credential handling:** Your Azure AD credential for the Maintenance control plane is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'list Azure maintenance configurations' or 'read a maintenance apply-update record', and Jentic returns the matching Maintenance operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **MonitorManagementClient** — Configure alerts on platform-update events emitted by maintenance operations.
- **PolicyClient** — Enforce that all production VMs must have a maintenance configuration assigned.
- **AdvisorManagementClient** — Surface Advisor recommendations including missing maintenance configurations.

## FAQ

### Why is there no official OpenAPI spec for MaintenanceManagementClient?

Microsoft Azure does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call MaintenanceManagementClient via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the MaintenanceManagementClient use?

AAD OAuth 2.0 bearer tokens scoped to https://management.azure.com/. With Jentic, AAD client credentials are stored encrypted in the vault and a short-lived bearer token is injected into the Authorization header at call time.

### Does this API patch the operating system inside a VM?

No. This API schedules and applies Azure platform updates (host fabric, image, and extension level). For guest OS patching use Azure Update Management (Microsoft.OperationalInsights/Automation) or VM extensions; this client controls when the platform is allowed to disrupt the resource.

### What are the rate limits for the MaintenanceManagementClient?

Standard Azure Resource Manager throttling - roughly 12,000 reads and 1,200 writes per hour per subscription per region. ApplyUpdates calls are asynchronous and the resulting ApplyUpdates resource exposes its progress.

### How do I assign a maintenance window to a VM through Jentic?

Run pip install jentic, then search Jentic for 'assign azure maintenance configuration to a vm'. Jentic returns the ConfigurationAssignments_CreateOrUpdate operation; load it, supply the VM resource path and the maintenance configuration ID, and PUT the assignment.

### What scope values does a maintenance configuration accept?

Common values include Host (Azure host fabric updates), OSImage (image-level updates for VMs in a scale set), and Extension (VM extension updates). The exact set is enumerated in the maintenanceScope property of the MaintenanceConfiguration body schema.

### Can I limit what my agent is allowed to do with the Azure Maintenance API?

Yes. Because you run Jentic One yourself, your own rules decide which Maintenance operations and which Azure AD credential the agent may use. Since the maintenance configuration sits in the URL path, you can pin the agent to read-only work, such as listing maintenance configurations and reading apply-update records, while withholding create, delete, and apply-update calls. Those write operations run only if you explicitly add them to the agent's allowed set.
