canonical: https://jentic.com/apis/azure.com/guest-diagnostic-settings-association

# Microsoft Azure Guest Diagnostic Settings Association

Jentic publishes the only available OpenAPI specification for Guest Diagnostic Settings Association, keeping it validated and agent-ready. The Azure Guest Diagnostic Settings Association API binds a previously defined guest diagnostic settings resource to a specific target - typically a VM, scale set, or Arc-managed server - so that the configured event logs and perf counters are actually collected from that machine. Operators use it together with the Guest Diagnostic Settings API: the settings define the what, the association defines the where. The API runs against Azure Resource Manager with Azure AD OAuth2 across six list, get, create-or-update, update, and delete operations.

## For AI agents

Attach a defined guest diagnostic settings resource to a specific Azure resource so its event logs and perf counters are collected. Manage these bindings across a subscription.

## Scope

Does not define which event logs or perf counters to collect, query telemetry, or onboard VM Insights agents - use for binding existing settings to target resources only.

## Capabilities

- Bind a guest diagnostic settings resource to a specific VM or Arc resource
- List all diagnostic settings associations across a subscription or resource group
- Retrieve the association linking a target resource to its diagnostic settings
- Update an existing association to point at a different settings profile
- Remove an association so the target resource stops collecting that profile's telemetry
- Audit which Azure resources currently have guest diagnostics enabled

## Use cases

### Roll out a baseline collection profile to a VM fleet

After defining a baseline guest diagnostic settings resource, attach it to every VM in scope by creating an association per resource URI. The PUT on /{resourceUri}/providers/microsoft.insights/guestDiagnosticSettingsAssociation/{associationName} binds the profile to that target. Suitable for fleet-wide telemetry standardisation campaigns.

Example prompt: Create a guestDiagnosticSettingsAssociation named 'default' on VM '/subscriptions/.../web01' that references the 'baseline' guestDiagnosticSettings resource.

### Audit which resources collect diagnostics

List every guest diagnostic settings association in a subscription or resource group to identify VMs that are not yet onboarded. The List endpoints return both the target resource URIs and the referenced settings, allowing a single pass to compare the fleet against policy. Useful for monthly compliance reporting.

Example prompt: List all GuestDiagnosticsSettingsAssociation resources in subscription 'sub-prod' and report any VMs in the same subscription with no association.

### Switch a VM to a different collection profile

Update an existing association so a single VM uses a stricter profile, for example switching from 'baseline' to 'security' before a sensitive workload migration. The PATCH operation modifies the association in place without disrupting the underlying VM. Useful for one-off compliance escalations.

Example prompt: Patch the 'default' guestDiagnosticSettingsAssociation on VM 'db-prod' to reference the 'security' guestDiagnosticSettings resource.

### AI agent compliance enforcement via Jentic

A compliance agent walks the subscription, checks each VM via the Get-by-resourceUri pattern, and creates or updates associations for any VM missing the required profile. Jentic resolves the agent's natural-language intent to the right ARM operation and injects the bearer token at execution time.

Example prompt: Use Jentic to search for 'attach diagnostic settings to azure vm', load GuestDiagnosticsSettingsAssociation_CreateOrUpdate, and apply 'baseline' to every VM in resource group 'web-rg' that lacks an association.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /subscriptions/{subscriptionId}/providers/microsoft.insights/guestDiagnosticSettingsAssociations | List all associations in a subscription |
| GET | /{resourceUri}/providers/microsoft.insights/guestDiagnosticSettingsAssociation/{associationName} | Get an association on a specific resource |
| PUT | /{resourceUri}/providers/microsoft.insights/guestDiagnosticSettingsAssociation/{associationName} | Create or update an association on a target resource |
| PATCH | /{resourceUri}/providers/microsoft.insights/guestDiagnosticSettingsAssociation/{associationName} | Patch an existing association |
| DELETE | /{resourceUri}/providers/microsoft.insights/guestDiagnosticSettingsAssociation/{associationName} | Delete an association |

## Key resources

- **GuestDiagnosticsSettingsAssociation** — Create, list, get, update, and delete bindings between guest diagnostic settings and specific target resources.

## Why Jentic

- **Setup:** Wiring the Guest Diagnostic Settings Association API by hand means minting Azure AD OAuth 2.0 tokens against management.azure.com, composing the microsoft.insights association path against each target resource URI, choosing idempotent association names, and backing off on ARM throttling during fleet-wide onboarding. Through Jentic you install once, import Guest Diagnostic Settings Association from the API Directory, store the Azure AD client credentials once, and your agent calls it.
- **Permission scoping:** The association is keyed on the target resource URI and association name in the URL path (/{resourceUri}/providers/microsoft.insights/guestDiagnosticSettingsAssociation/{associationName}), so a rule can pin your agent to one target VM or Arc machine. You choose the operations it may call, so the destructive delete of an association is not included unless you add it, leaving the agent with the list, get, and create-or-update operations.
- **Credential handling:** Your Azure AD client credentials are stored once, encrypted, by your own Jentic One instance and injected at execution time as a scoped bearer token. The service principal secret never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'attach a guest diagnostic settings profile to an Azure VM' or 'list diagnostic associations in a subscription', and Jentic returns the matching GuestDiagnosticsSettingsAssociation operation with its input schema so the agent targets the right resource URI without reading Microsoft Learn.

## Related APIs

- **Guest Diagnostic Settings** — Defines the reusable diagnostic profile that this API attaches to specific resources.
- **Azure Monitor** — Manages diagnostic settings for platform logs and metrics on any Azure resource.
- **VM Insights Onboarding** — Onboard VMs to Azure Monitor for VMs solution with the Dependency and Log agents.

## FAQ

### Why is there no official OpenAPI spec for Guest Diagnostic Settings Association?

Microsoft Azure does not publish a stand-alone OpenAPI specification for the Guest Diagnostic Settings Association API. Jentic generates and maintains this spec from the microsoft.insights ARM surface so that AI agents and developers can call Guest Diagnostic Settings Association 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 this API use?

It uses Azure AD OAuth2 against management.azure.com, declared as the azure_auth security scheme. Through Jentic, your service principal credentials sit in the encrypted vault and are exchanged for a scoped bearer token at execution.

### Does this API define what gets collected?

No. The list of event logs and perf counters lives in the companion Guest Diagnostic Settings API (azure.com/guest-diagnostic-settings). This Association API only binds an existing settings resource to a target VM or Arc machine via PUT on /{resourceUri}/providers/microsoft.insights/guestDiagnosticSettingsAssociation/{associationName}.

### What are the rate limits?

Standard ARM throttles apply at the subscription level - roughly 12,000 reads and 1,200 writes per hour. Bulk onboarding scripts that attach a profile to many VMs should batch and back off on 429 responses.

### How do I attach a diagnostic profile to a VM through Jentic?

Run jentic.search('attach guest diagnostic settings to azure vm'), load the GuestDiagnosticsSettingsAssociation_CreateOrUpdate schema, and execute it with the VM's resource URI, an association name such as 'default', and a body referencing the guestDiagnosticSettings resource ID.

### Can I limit what my agent is allowed to do with the Guest Diagnostic Settings Association API?

Yes. Because you run Jentic One yourself, your own rules decide which operations and credentials your agent may use with this API. Since every association is keyed on the target resource URI and association name in the path, you can pin the agent to a single VM or Arc machine, and you choose which operations it may call, so you can leave it with the list, get, and create-or-update operations while withholding the destructive delete. Your Azure AD client credentials stay in your instance and are injected as a scoped bearer token, never reaching the agent's prompt or logs.
