Required. Project and location where the connection will be created. Format: projects/*/locations/*.
Query parameters
Parameters
connectionId
string
Required. The ID to use for the Connection, which will become the final component of the Connection's resource name. Names must be unique per-project per-location. Allows alphanumeric characters and any of -._~%!$&'()*+,;=@.
Request body
The request body contains an instance of Connection.
Response body
If successful, the response body contains a newly created 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-07-17 UTC."],[[["\u003cp\u003eThis page details the process of creating a Connection via an HTTP POST request to a specific Google Cloud Build API endpoint.\u003c/p\u003e\n"],["\u003cp\u003eThe creation of a Connection requires specifying a project and location as path parameters, and a unique ID for the connection as a query parameter.\u003c/p\u003e\n"],["\u003cp\u003eThe request body must include an instance of the \u003ccode\u003eConnection\u003c/code\u003e resource, and the successful response will return an \u003ccode\u003eOperation\u003c/code\u003e instance.\u003c/p\u003e\n"],["\u003cp\u003eCreating a Connection requires OAuth scope \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e and the IAM permission \u003ccode\u003ecloudbuild.connections.create\u003c/code\u003e on the parent resource.\u003c/p\u003e\n"]]],[],null,["# Method: projects.locations.connections.create\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [IAM Permissions](#body.aspect_1)\n- [Try it!](#try-it)\n\nCreates a Connection.\n\n### HTTP request\n\n`POST https://cloudbuild.googleapis.com/v2/{parent=projects/*/locations/*}/connections`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Query parameters\n\n### Request body\n\nThe request body contains an instance of [Connection](/build/docs/api/reference/rest/v2/projects.locations.connections#Connection).\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [Operation](/build/docs/api/reference/rest/Shared.Types/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](https://cloud.google.com/docs/authentication/).\n\n### IAM Permissions\n\nRequires the following [IAM](https://cloud.google.com/iam/docs) permission on the `parent` resource:\n\n- `cloudbuild.connections.create`\n\nFor more information, see the [IAM documentation](https://cloud.google.com/iam/docs)."]]