---
title: "POST /projects/{project}/zones/{zone}/instances/{instance}/setMachineResources"
method: POST
path: "/projects/{project}/zones/{zone}/instances/{instance}/setMachineResources"
tags: ["instances"]
---

# POST /projects/{project}/zones/{zone}/instances/{instance}/setMachineResources

`POST /projects/{project}/zones/{zone}/instances/{instance}/setMachineResources`

Changes the number and/or type of accelerator for a stopped instance to the
values specified in the request.

## Path parameters

- `project` string, required
- `zone` string, required
- `instance` string, required

## Query parameters

- `requestId` string

## Request body

- InstancesSetMachineResourcesRequest
  - `guestAccelerators` AcceleratorConfig[] — A list of the type and count of accelerator cards attached to the instance.
    - `acceleratorType` string — Full or partial URL of the accelerator type resource to attach to this instance. For example:projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.
    - `acceleratorCount` integer — The number of the guest accelerator cards exposed to this instance.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/compute.md) · [All operations](https://skmtc.net/google/apis/compute/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/compute/versions/6120ed8969d4/schema)
