Ids of capacity commitments to merge. These capacity commitments must exist under admin project and location specified in the parent. ID is the last portion of capacity commitment name e.g., 'abc' for projects/myproject/locations/US/capacityCommitments/abc
capacityCommitmentId
string
Optional. The optional resulting capacity commitment ID. Capacity commitment name will be generated automatically if this field is empty. This field must only contain lower case alphanumeric characters or dashes. The first and last character cannot be a dash. Max length is 64 characters.
Response body
If successful, the response body contains an instance of CapacityCommitment.
[[["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-07-02 UTC."],[[["\u003cp\u003eMerges multiple capacity commitments of the same plan into a single commitment with the latest commitment end time.\u003c/p\u003e\n"],["\u003cp\u003eMerging capacity commitments of different plans will result in a \u003ccode\u003egoogle.rpc.Code.FAILED_PRECONDITION\u003c/code\u003e error.\u003c/p\u003e\n"],["\u003cp\u003eThe HTTP request uses the \u003ccode\u003ePOST\u003c/code\u003e method to the specified URL, which includes path parameters to identify the admin project and location.\u003c/p\u003e\n"],["\u003cp\u003eThe request body requires a JSON structure containing an array of \u003ccode\u003ecapacityCommitmentIds\u003c/code\u003e, representing the IDs of the commitments to be merged.\u003c/p\u003e\n"],["\u003cp\u003eSuccessful requests return a \u003ccode\u003eCapacityCommitment\u003c/code\u003e instance in the response body, and authorization requires specific OAuth scopes.\u003c/p\u003e\n"]]],[],null,["# Method: projects.locations.capacityCommitments.merge\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\nMerges capacity commitments of the same plan into a single commitment.\n\nThe resulting capacity commitment has the greater commitmentEndTime out of the to-be-merged capacity commitments.\n\nAttempting to merge capacity commitments of different plan will fail with the error code `google.rpc.Code.FAILED_PRECONDITION`.\n\n### HTTP request\n\n`POST https://bigqueryreservation.googleapis.com/v1/{parent=projects/*/locations/*}/capacityCommitments:merge`\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 [CapacityCommitment](/bigquery/docs/reference/reservations/rest/v1/projects.locations.capacityCommitments#CapacityCommitment).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/bigquery`\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp)."]]