---
title: "Set maintenance window for the VM"
method: POST
path: "/project/{project_id}/location/{location}/vm/{vm_reference}/set-maintenance-window"
tags: ["Virtual Machine"]
---

# Set maintenance window for the VM

`POST /project/{project_id}/location/{location}/vm/{vm_reference}/set-maintenance-window`

## Request

- Base URL: `https://api.ubicloud.com`
- URL: `https://api.ubicloud.com/project/{project_id}/location/{location}/vm/{vm_reference}/set-maintenance-window`
- Auth: HTTP bearer

## Path parameters

- `project_id` string, required
- `location` string, required
- `vm_reference` string, required: Resource ID or name

## Request body

- object
  - `maintenance_window_start_at` integer, nullable, required

## Response `200`

A VM

- object
  - `boot_image` string, required: Boot image of the VM
  - `id` string, required: ID of the VM
  - `ip4` string, ipv4, nullable, required: IPv4 address
  - `ip4_enabled` boolean, required: Whether IPv4 is enabled
  - `ip6` string, ipv6, nullable, required: IPv6 address
  - `location` string, required: Location of the VM
  - `maintenance_window_start_at` integer, nullable, required: Maintenance window start time
  - `name` string, required: Name of the VM
  - `size` string, required: Size of the underlying VM
  - `state` string, required: State of the VM
  - `storage_size_gib` integer, required: Storage size in GiB
  - `unix_user` string, required: Unix user of the VM
  - `firewalls` Firewall[], required: List of firewalls
    - `description` string, required: Description of the firewall
    - `firewall_rules` FirewallRule[], required: List of firewall rules
      - `cidr` string, required: CIDR of the firewall rule
      - `id` string, required: ID of the firewall rule
      - `port_range` string, required: Port range of the firewall rule
      - `protocol` 'tcp' | 'udp', required: Protocol of the firewall rule (tcp or udp)
      - `description` string, required: Description of the firewall rule
    - `id` string, required: ID of the firewall
    - `location` string, required: Location of the firewall
    - `name` string, required: Name of the firewall
  - `private_ipv4` string, ipv4, required: Private IPv4 address
  - `private_ipv6` string, ipv6, required: Private IPv6 address
  - `subnet` string, required: Subnet of the VM
  - `gpu` string: GPU configuration

## Other responses

- `default`: An error response

## Changes

- **2026-09-25** `69e3a1f69304`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/ubicloud/apis/clover-api/changes/project/:project_id/location/:location/vm/:vm_reference/set-maintenance-window/post.md)

---

[API](https://skmtc.dev/ubicloud/apis/clover-api.md) - [All operations](https://skmtc.dev/ubicloud/apis/clover-api/llms.txt) - [OpenAPI document](https://skmtc.dev/ubicloud/apis/clover-api/revisions/462f7432deb2?raw)
