Required. The number of running instances for the node group to maintain. The group adds or removes instances to maintain the number of instances specified by this parameter.
requestId
string
Optional. A unique ID used to identify the request. If the server receives two ResizeNodeGroupRequest with the same ID, the second request is ignored and the first google.longrunning.Operation created and stored in the backend is returned.
Optional. Timeout for graceful YARN decommissioning. Graceful decommissioning allows the removal of nodes from the Compute Engine node group without interrupting jobs in progress. This timeout specifies how long to wait for jobs in progress to finish before forcefully removing nodes (and potentially interrupting jobs). Default timeout is 0 (for forceful decommission), and the maximum allowed timeout is 1 day. (see JSON representation of Duration).
Only supported on Dataproc image versions 1.2 and higher.
parentOperationId
string
Optional. operation id of the parent operation sending the resize request
Response body
If successful, the response body contains an instance of Operation.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-20 UTC."],[[["\u003cp\u003eThis API endpoint resizes a node group within a cluster, identified by its unique \u003ccode\u003ename\u003c/code\u003e in the request URL.\u003c/p\u003e\n"],["\u003cp\u003eThe request body requires an integer \u003ccode\u003esize\u003c/code\u003e parameter indicating the desired number of running instances to maintain in the node group.\u003c/p\u003e\n"],["\u003cp\u003eAn optional \u003ccode\u003erequestId\u003c/code\u003e parameter can be included to prevent duplicate operations and must be a unique identifier of up to 40 characters, consisting of letters, numbers, underscores, or hyphens.\u003c/p\u003e\n"],["\u003cp\u003eAn optional \u003ccode\u003egracefulDecommissionTimeout\u003c/code\u003e parameter, in Duration format, allows for a time period to gracefully decommission nodes, with a maximum duration of 1 day.\u003c/p\u003e\n"],["\u003cp\u003eSuccessful requests return an \u003ccode\u003eOperation\u003c/code\u003e instance, and the operation requires the OAuth scope \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Method: projects.regions.clusters.nodeGroups.resize\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nResizes a node group in a cluster. The returned [Operation.metadata](/dataproc/docs/reference/rest/v1/projects.locations.operations#Operation.FIELDS.metadata) is [NodeGroupOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#nodegroupoperationmetadata).\n\n### HTTP request\n\n`POST https://dataproc.googleapis.com/v1/{name=projects/*/regions/*/clusters/*/nodeGroups/*}:resize`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Request body\n\nThe request body contains data with the following structure:\n\n### Response body\n\nIf successful, the response body contains an instance of [Operation](/dataproc/docs/reference/rest/v1/projects.locations.operations#Operation).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp)."]]