---
title: "PATCH /v2/{+name}"
method: PATCH
path: "/v2/{+name}"
tags: ["projects"]
---

# PATCH /v2/{+name}

`PATCH /v2/{+name}`

Updates a single connection.

## Path parameters

- `name` string, required

## Query parameters

- `allowMissing` boolean
- `etag` string
- `updateMask` string

## Request body

- Connection — A connection to a SCM like GitHub, GitHub Enterprise, Bitbucket Data Center, Bitbucket Cloud or GitLab.
  - `disabled` boolean — Optional. If disabled is set to true, functionality is disabled for this connection. Repository based API methods and webhooks processing for repositories in this connection will be disabled.
  - `bitbucketCloudConfig` BitbucketCloudConfig — Configuration for connections to Bitbucket Cloud.
    - `webhookSecretSecretVersion` string — Required. SecretManager resource containing the webhook secret used to verify webhook events, formatted as `projects/*/secrets/*/versions/*`.
    - `authorizerCredential` UserCredential — Represents a personal access token that authorized the Connection, and associated metadata.
      - `userTokenSecretVersion` string — Required. A SecretManager resource containing the user token that authorizes the Cloud Build connection. Format: `projects/*/secrets/*/versions/*`.
      - `username` string — Output only. The username associated to this token.
    - `workspace` string — Required. The Bitbucket Cloud Workspace ID to be connected to Google Cloud Platform.
    - `readAuthorizerCredential` UserCredential — Represents a personal access token that authorized the Connection, and associated metadata.
      - `userTokenSecretVersion` string — Required. A SecretManager resource containing the user token that authorizes the Cloud Build connection. Format: `projects/*/secrets/*/versions/*`.
      - `username` string — Output only. The username associated to this token.
  - `bitbucketDataCenterConfig` BitbucketDataCenterConfig — Configuration for connections to Bitbucket Data Center.
    - `readAuthorizerCredential` UserCredential — Represents a personal access token that authorized the Connection, and associated metadata.
      - `userTokenSecretVersion` string — Required. A SecretManager resource containing the user token that authorizes the Cloud Build connection. Format: `projects/*/secrets/*/versions/*`.
      - `username` string — Output only. The username associated to this token.
    - `serverVersion` string — Output only. Version of the Bitbucket Data Center running on the `host_uri`.
    - `sslCa` string — Optional. SSL certificate to use for requests to the Bitbucket Data Center.
    - `webhookSecretSecretVersion` string — Required. Immutable. SecretManager resource containing the webhook secret used to verify webhook events, formatted as `projects/*/secrets/*/versions/*`.
    - `serviceDirectoryConfig` GoogleDevtoolsCloudbuildV2ServiceDirectoryConfig — ServiceDirectoryConfig represents Service Directory configuration for a connection.
      - `service` string — Required. The Service Directory service name. Format: projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}.
    - `hostUri` string — Required. The URI of the Bitbucket Data Center instance or cluster this connection is for.
    - `authorizerCredential` UserCredential — Represents a personal access token that authorized the Connection, and associated metadata.
      - `userTokenSecretVersion` string — Required. A SecretManager resource containing the user token that authorizes the Cloud Build connection. Format: `projects/*/secrets/*/versions/*`.
      - `username` string — Output only. The username associated to this token.
  - `gitlabConfig` GoogleDevtoolsCloudbuildV2GitLabConfig — Configuration for connections to gitlab.com or an instance of GitLab Enterprise.
    - `authorizerCredential` UserCredential — Represents a personal access token that authorized the Connection, and associated metadata.
      - `userTokenSecretVersion` string — Required. A SecretManager resource containing the user token that authorizes the Cloud Build connection. Format: `projects/*/secrets/*/versions/*`.
      - `username` string — Output only. The username associated to this token.
    - `hostUri` string — Optional. The URI of the GitLab Enterprise host this connection is for. If not specified, the default value is https://gitlab.com.
    - `webhookSecretSecretVersion` string — Required. Immutable. SecretManager resource containing the webhook secret of a GitLab Enterprise project, formatted as `projects/*/secrets/*/versions/*`.
    - `serviceDirectoryConfig` GoogleDevtoolsCloudbuildV2ServiceDirectoryConfig — ServiceDirectoryConfig represents Service Directory configuration for a connection.
      - `service` string — Required. The Service Directory service name. Format: projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}.
    - `sslCa` string — Optional. SSL certificate to use for requests to GitLab Enterprise.
    - `readAuthorizerCredential` UserCredential — Represents a personal access token that authorized the Connection, and associated metadata.
      - `userTokenSecretVersion` string — Required. A SecretManager resource containing the user token that authorizes the Cloud Build connection. Format: `projects/*/secrets/*/versions/*`.
      - `username` string — Output only. The username associated to this token.
    - `serverVersion` string — Output only. Version of the GitLab Enterprise server running on the `host_uri`.
  - `githubEnterpriseConfig` GoogleDevtoolsCloudbuildV2GitHubEnterpriseConfig — Configuration for connections to an instance of GitHub Enterprise.
    - `apiKey` string — Required. API Key used for authentication of webhook events.
    - `webhookSecretSecretVersion` string — Optional. SecretManager resource containing the webhook secret of the GitHub App, formatted as `projects/*/secrets/*/versions/*`.
    - `appSlug` string — Optional. The URL-friendly name of the GitHub App.
    - `sslCa` string — Optional. SSL certificate to use for requests to GitHub Enterprise.
    - `serverVersion` string — Output only. GitHub Enterprise version installed at the host_uri.
    - `serviceDirectoryConfig` GoogleDevtoolsCloudbuildV2ServiceDirectoryConfig — ServiceDirectoryConfig represents Service Directory configuration for a connection.
      - `service` string — Required. The Service Directory service name. Format: projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}.
    - `privateKeySecretVersion` string — Optional. SecretManager resource containing the private key of the GitHub App, formatted as `projects/*/secrets/*/versions/*`.
    - `appId` string, int64 — Optional. Id of the GitHub App created from the manifest.
    - `appInstallationId` string, int64 — Optional. ID of the installation of the GitHub App.
    - `hostUri` string — Required. The URI of the GitHub Enterprise host this connection is for.
  - `installationState` InstallationState — Describes stage and necessary actions to be taken by the user to complete the installation. Used for GitHub and GitHub Enterprise based connections.
    - `stage` 'STAGE_UNSPECIFIED' | 'PENDING_CREATE_APP' | 'PENDING_USER_OAUTH' | 'PENDING_INSTALL_APP' | 'COMPLETE' — Output only. Current step of the installation process.
    - `message` string — Output only. Message of what the user should do next to continue the installation. Empty string if the installation is already complete.
    - `actionUri` string — Output only. Link to follow for next action. Empty string if the installation is already complete.
  - `reconciling` boolean — Output only. Set to true when the connection is being set up or updated in the background.
  - `name` string — Immutable. The resource name of the connection, in the format `projects/{project}/locations/{location}/connections/{connection_id}`.
  - `annotations` object — Optional. Allows clients to store small amounts of arbitrary data.
  - `updateTime` string, google-datetime — Output only. Server assigned timestamp for when the connection was updated.
  - `createTime` string, google-datetime — Output only. Server assigned timestamp for when the connection was created.
  - `githubConfig` GitHubConfig — Configuration for connections to github.com.
    - `authorizerCredential` OAuthCredential — Represents an OAuth token of the account that authorized the Connection, and associated metadata.
      - `oauthTokenSecretVersion` string — Optional. A SecretManager resource containing the OAuth token that authorizes the Cloud Build connection. Format: `projects/*/secrets/*/versions/*`.
      - `username` string — Output only. The username associated to this token.
    - `appInstallationId` string, int64 — Optional. GitHub App installation id.
  - `etag` string — This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.

## Response `200`

Successful response

---

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