---
title: "POST /v1/{+name}:setAutoscaling"
method: POST
path: "/v1/{+name}:setAutoscaling"
tags: ["projects"]
---

# POST /v1/{+name}:setAutoscaling

`POST /v1/{+name}:setAutoscaling`

Sets the autoscaling settings for the specified node pool.

## Path parameters

- `name` string, required

## Request body

- SetNodePoolAutoscalingRequest — SetNodePoolAutoscalingRequest sets the autoscaler settings of a node pool.
  - `projectId` string — Deprecated. The Google Developers Console [project ID or project number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). This field has been deprecated and replaced by the name field.
  - `clusterId` string — Deprecated. The name of the cluster to upgrade. This field has been deprecated and replaced by the name field.
  - `name` string — The name (project, location, cluster, node pool) of the node pool to set autoscaler settings. Specified in the format `projects/*/locations/*/clusters/*/nodePools/*`.
  - `autoscaling` NodePoolAutoscaling — NodePoolAutoscaling contains information required by cluster autoscaler to adjust the size of the node pool to the current cluster usage.
    - `locationPolicy` 'LOCATION_POLICY_UNSPECIFIED' | 'BALANCED' | 'ANY' — Location policy used when scaling up a node pool.
    - `enabled` boolean — Is autoscaling enabled for this node pool.
    - `totalMinNodeCount` integer — Minimum number of nodes in the node pool. Must be greater than or equal to 0 and less than or equal to total_max_node_count. The total_*_node_count fields are mutually exclusive with the *_node_count fields.
    - `minNodeCount` integer — Minimum number of nodes for one location in the node pool. Must be greater than or equal to 0 and less than or equal to max_node_count.
    - `totalMaxNodeCount` integer — Maximum number of nodes in the node pool. Must be greater than or equal to total_min_node_count. There has to be enough quota to scale up the cluster. The total_*_node_count fields are mutually exclusive with the *_node_count fields.
    - `autoprovisioned` boolean — Can this node pool be deleted automatically.
    - `maxNodeCount` integer — Maximum number of nodes for one location in the node pool. Must be >= min_node_count. There has to be enough quota to scale up the cluster.
  - `nodePoolId` string — Deprecated. The name of the node pool to upgrade. This field has been deprecated and replaced by the name field.
  - `zone` string — Deprecated. The name of the Google Compute Engine [zone](https://cloud.google.com/compute/docs/zones#available) in which the cluster resides. This field has been deprecated and replaced by the name field.

## Response `200`

Successful response

---

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