canonical: https://jentic.com/apis/googleapis.com/osconfig

# Google OS Config API

The OS Config API manages patch deployments, OS policy assignments, and inventory across Compute Engine VM fleets. It schedules patch jobs (with maintenance windows, reboot behaviour, and rollout strategies), declares desired OS state via OS Policies, and surfaces inventory and patch compliance per instance. Use it to keep Linux and Windows VM fleets compliant with security baselines and to drive scheduled patch rollouts. The spec exposes 17 endpoints.

## For AI agents

Manage VM patch deployments, OS policy assignments, and inventory across Google Cloud Compute Engine fleets.

## Scope

Does not provision VMs, run ad-hoc shell commands, or scan container images - use for declarative VM patching, OS policy assignment, and inventory only.

## Capabilities

- Schedule patch deployments with maintenance windows and reboot policies
- Declare desired OS state via OS policy assignments and roll them out across zones
- Pause and resume patch deployments and OS policy assignments mid-rollout
- Read inventory of installed packages and detected vulnerabilities per VM
- List revisions of an OS policy assignment to support rollback decisions
- Cancel patch operations that are no longer wanted

## Use cases

### Scheduled patch rollouts with maintenance windows

Schedule patch deployments that target a labelled fleet of VMs, restrict execution to defined maintenance windows, and choose whether to reboot. The OS Config API lets platform teams roll patches out in waves - for example dev first, then prod - and pause if early indicators look bad. This replaces ad-hoc SSH-and-apt scripts with a managed rollout plane.

Example prompt: Create a patch deployment named monthly-linux-prod that targets instances with label tier=prod and runs the third Sunday of the month between 02:00 and 04:00 UTC.

### Desired-state OS policy management

Declare OS policies that assert package presence, file content, and shell-script execution on Linux and Windows VMs, then bind them to zones and instance filters via os policy assignments. The API tracks revisions so you can roll back to the prior policy if a change breaks workloads. Useful for fleets that need configuration drift detection without a separate config-management tool.

Example prompt: Create an OS policy assignment that ensures the package fail2ban is present on all Linux VMs in zone europe-west1-b, then list revisions to confirm the rollout.

### Inventory and compliance reporting

Pull VM inventory - installed packages, configured services, and detected vulnerabilities - to feed compliance dashboards or security review tooling. The OS Config API surfaces inventories per instance plus aggregate patch compliance views, so an automation can produce a compliance score across thousands of VMs without remote command execution.

Example prompt: List inventory for every VM in zone us-central1-a, write the package list per instance to a Cloud Storage bucket, and flag any instance reporting a CRITICAL vulnerability.

### Agent-driven patch operations via Jentic

An ops agent reacting to a CVE can use Jentic to schedule a patch deployment that closes the gap and watch the rollout via the operations endpoint. Credentials stay in your Jentic One instance, so the agent runs under a scoped service-account token with audit trail. Useful for incident-response bots that need to mass-patch a fleet quickly.

Example prompt: Use Jentic to find the create-patch-deployment operation, load its schema, and schedule a one-off patch for tier=prod Linux VMs targeting CVE-2026-0001 within the next 4 hours.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /v1/{+parent}/patchDeployments | Create a patch deployment |
| POST | /v1/{+name}:pause | Pause a patch deployment |
| POST | /v1/{+name}:resume | Resume a paused patch deployment |
| POST | /v1/{+parent}/osPolicyAssignments | Create an OS policy assignment |
| GET | /v1/{+name}:listRevisions | List OS policy assignment revisions |
| GET | /v1/{+parent}/inventories | List VM inventory |
| GET | /v1/{+parent}/instanceDetails | List per-instance compliance details |

## Key resources

- **patchDeployments** — Recurring or one-off patch deployment plans
- **patchJobs** — Individual patch executions kicked off by a deployment
- **osPolicyAssignments** — Bindings of OS policies to zones and instance filters
- **inventories** — Per-VM inventory of packages, services, and vulnerabilities
- **instanceDetails** — Per-instance compliance details for OS policy assignments

## Why Jentic

- **Setup:** Wiring the OS Config API by hand means setting up Google OAuth 2.0 from a service account, minting scoped tokens, and managing patch-deployment and policy-assignment resource paths against osconfig.googleapis.com yourself. Through Jentic you install once, import the OS Config API from the API Directory, store the OAuth credential once, and your agent calls it.
- **Permission scoping:** The OS Config API puts the resource in the URL path (/v1/{+parent}/patchDeployments, /v1/{+name}:pause), so a rule can pin your agent to one parent project: it can create patch deployments and read inventory there and nothing else. You choose the operations it may call, so you can allow pause and resume while leaving OS policy assignment out of the allowed set.
- **Credential handling:** Your Google OAuth credential for the OS Config API 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 'schedule a patch deployment' or 'apply an OS policy', and Jentic returns the matching OS Config operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Compute Engine API** — Compute Engine owns the VM instances that OS Config patches and configures
- **On-Demand Scanning API** — On-Demand Scanning surfaces container CVEs that can drive OS Config patch decisions for hosts
- **Container Analysis API** — Container Analysis offers vulnerability data on artefacts rather than running VMs

## FAQ

### What authentication does the OS Config API use?

The API uses Google OAuth 2.0 with the cloud-platform scope. Through Jentic, tokens are minted from a service account stored in your Jentic One instance so agents never see raw credentials.

### Can I target VMs by label with patch deployments?

Yes. The patch deployment instanceFilter accepts label selectors and zone filters, so you can scope a deployment to tier=prod or env=staging across selected zones.

### What are the rate limits for the OS Config API?

Google Cloud applies per-project quotas on patch and OS policy mutations. Treat large rollouts as long-running - patch jobs and OS policy assignments return operations that need polling rather than retry on failure.

### How do I pause a patch deployment through Jentic?

Search Jentic for pause patch deployment, load the schema for POST /v1/{+name}:pause, and execute it with the deployment resource name. Resume later with the matching :resume call.

### Does this API run arbitrary commands on a VM?

Only via OS policy resources of type ExecResource and only as part of a declared policy. Ad-hoc command execution belongs in different products (SSH, IAP) - this API is for declarative state and patch orchestration.

### How do I check patch compliance for a project?

Call GET /v1/{+parent}/instanceDetails for an OS policy assignment to see per-instance compliance, or pull patchJob status for the latest patch deployment run to see fleet-level results.

### Can I limit what my agent is allowed to do with the OS Config API?

Yes. Because you run Jentic One yourself, your own rules decide which OS Config operations and credentials the agent may use. Since the API carries the resource in the URL path (for example /v1/{+parent}/patchDeployments and /v1/{+name}:pause), you can pin the agent to a single parent project so it creates patch deployments and reads inventory there and nowhere else. You also pick the exact operations it can call, so you can allow pause and resume while leaving OS policy assignment creation out of the allowed set.
