connections
Creates, updates, deletes, gets or lists a connections resource.
Overview
| Name | connections |
| Type | Resource |
| Id | google.developerconnect.connections |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Identifier. 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. |
bitbucketCloudConfig | object | Configuration for connections to an instance of Bitbucket Clouds. (id: BitbucketCloudConfig) |
bitbucketDataCenterConfig | object | Configuration for connections to an instance of Bitbucket Data Center. (id: BitbucketDataCenterConfig) |
createTime | string (google-datetime) | Output only. [Output only] Create timestamp |
cryptoKeyConfig | object | Optional. The crypto key configuration. This field is used by the Customer-Managed Encryption Keys (CMEK) feature. (id: CryptoKeyConfig) |
deleteTime | string (google-datetime) | Output only. [Output only] Delete timestamp |
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. |
etag | string | Optional. 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. |
gitProxyConfig | object | Optional. Configuration for the git proxy feature. Enabling the git proxy allows clients to perform git operations on the repositories linked in the connection. Learn more. (id: GitProxyConfig) |
githubConfig | object | Configuration for connections to github.com. (id: GitHubConfig) |
githubEnterpriseConfig | object | Configuration for connections to an instance of GitHub Enterprise. (id: GitHubEnterpriseConfig) |
gitlabConfig | object | Configuration for connections to gitlab.com. (id: GitLabConfig) |
gitlabEnterpriseConfig | object | Configuration for connections to an instance of GitLab Enterprise. (id: GitLabEnterpriseConfig) |
httpConfig | object | Optional. Configuration for connections to an HTTP service provider. (id: GenericHTTPEndpointConfig) |
installationState | object | Output only. Installation state of the Connection. (id: InstallationState) |
labels | object | Optional. Labels as key value pairs |
reconciling | boolean | Output only. Set to true when the connection is being set up or updated in the background. |
secureSourceManagerInstanceConfig | object | Configuration for connections to an instance of Secure Source Manager. (id: SecureSourceManagerInstanceConfig) |
uid | string | Output only. A system-assigned unique identifier for the Connection. |
updateTime | string (google-datetime) | Output only. [Output only] Update timestamp |
| Name | Datatype | Description |
|---|
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, locationsId, connectionsId | Gets details of a single Connection. | |
list | select | projectsId, locationsId | filter, pageToken, pageSize, orderBy | Lists Connections in a given project and location. |
create | insert | projectsId, locationsId | validateOnly, requestId, connectionId | Creates a new Connection in a given project and location. |
patch | update | projectsId, locationsId, connectionsId | allowMissing, validateOnly, updateMask, requestId | Updates the parameters of a single Connection. |
delete | delete | projectsId, locationsId, connectionsId | etag, validateOnly, requestId | Deletes a single Connection. |
processgithub_enterprise_webhook | exec | projectsId, locationsId | ProcessGitHubEnterpriseWebhook is called by the external GitHub Enterprise instances for notifying events. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
connectionsId | string | |
locationsId | string | |
projectsId | string | |
allowMissing | boolean | |
connectionId | string | |
etag | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
requestId | string | |
updateMask | string (google-fieldmask) | |
validateOnly | boolean |
SELECT examples
- get
- list
Gets details of a single Connection.
SELECT
name,
annotations,
bitbucketCloudConfig,
bitbucketDataCenterConfig,
createTime,
cryptoKeyConfig,
deleteTime,
disabled,
etag,
gitProxyConfig,
githubConfig,
githubEnterpriseConfig,
gitlabConfig,
gitlabEnterpriseConfig,
httpConfig,
installationState,
labels,
reconciling,
secureSourceManagerInstanceConfig,
uid,
updateTime
FROM google.developerconnect.connections
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND connectionsId = '{{ connectionsId }}' -- required
;
Lists Connections in a given project and location.
SELECT
*
FROM google.developerconnect.connections
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND filter = '{{ filter }}'
AND pageToken = '{{ pageToken }}'
AND pageSize = '{{ pageSize }}'
AND orderBy = '{{ orderBy }}'
;
INSERT examples
- create
- Manifest
Creates a new Connection in a given project and location.
INSERT INTO google.developerconnect.connections (
data__disabled,
data__gitProxyConfig,
data__githubEnterpriseConfig,
data__httpConfig,
data__githubConfig,
data__secureSourceManagerInstanceConfig,
data__cryptoKeyConfig,
data__gitlabEnterpriseConfig,
data__bitbucketCloudConfig,
data__name,
data__labels,
data__etag,
data__gitlabConfig,
data__bitbucketDataCenterConfig,
data__annotations,
projectsId,
locationsId,
validateOnly,
requestId,
connectionId
)
SELECT
{{ disabled }},
'{{ gitProxyConfig }}',
'{{ githubEnterpriseConfig }}',
'{{ httpConfig }}',
'{{ githubConfig }}',
'{{ secureSourceManagerInstanceConfig }}',
'{{ cryptoKeyConfig }}',
'{{ gitlabEnterpriseConfig }}',
'{{ bitbucketCloudConfig }}',
'{{ name }}',
'{{ labels }}',
'{{ etag }}',
'{{ gitlabConfig }}',
'{{ bitbucketDataCenterConfig }}',
'{{ annotations }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ validateOnly }}',
'{{ requestId }}',
'{{ connectionId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: connections
props:
- name: projectsId
value: "{{ projectsId }}"
description: Required parameter for the connections resource.
- name: locationsId
value: "{{ locationsId }}"
description: Required parameter for the connections resource.
- name: disabled
value: {{ disabled }}
description: |
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.
- name: gitProxyConfig
description: |
Optional. Configuration for the git proxy feature. Enabling the git proxy allows clients to perform git operations on the repositories linked in the connection. [Learn more](https://docs.cloud.google.com/developer-connect/docs/configure-git-proxy).
value:
httpProxyBaseUri: "{{ httpProxyBaseUri }}"
enabled: {{ enabled }}
- name: githubEnterpriseConfig
description: |
Configuration for connections to an instance of GitHub Enterprise.
value:
installationUri: "{{ installationUri }}"
appSlug: "{{ appSlug }}"
serverVersion: "{{ serverVersion }}"
sslCaCertificate: "{{ sslCaCertificate }}"
appId: "{{ appId }}"
privateKeySecretVersion: "{{ privateKeySecretVersion }}"
organization: "{{ organization }}"
hostUri: "{{ hostUri }}"
webhookSecretSecretVersion: "{{ webhookSecretSecretVersion }}"
appInstallationId: "{{ appInstallationId }}"
serviceDirectoryConfig:
service: "{{ service }}"
- name: httpConfig
description: |
Optional. Configuration for connections to an HTTP service provider.
value:
hostUri: "{{ hostUri }}"
basicAuthentication:
username: "{{ username }}"
passwordSecretVersion: "{{ passwordSecretVersion }}"
bearerTokenAuthentication:
tokenSecretVersion: "{{ tokenSecretVersion }}"
serviceDirectoryConfig:
service: "{{ service }}"
sslCaCertificate: "{{ sslCaCertificate }}"
- name: githubConfig
description: |
Configuration for connections to github.com.
value:
appInstallationId: "{{ appInstallationId }}"
installationUri: "{{ installationUri }}"
githubApp: "{{ githubApp }}"
authorizerCredential:
username: "{{ username }}"
oauthTokenSecretVersion: "{{ oauthTokenSecretVersion }}"
- name: secureSourceManagerInstanceConfig
description: |
Configuration for connections to an instance of Secure Source Manager.
value:
instance: "{{ instance }}"
- name: cryptoKeyConfig
description: |
Optional. The crypto key configuration. This field is used by the Customer-Managed Encryption Keys (CMEK) feature.
value:
keyReference: "{{ keyReference }}"
- name: gitlabEnterpriseConfig
description: |
Configuration for connections to an instance of GitLab Enterprise.
value:
sslCaCertificate: "{{ sslCaCertificate }}"
serverVersion: "{{ serverVersion }}"
authorizerCredential:
userTokenSecretVersion: "{{ userTokenSecretVersion }}"
username: "{{ username }}"
serviceDirectoryConfig:
service: "{{ service }}"
hostUri: "{{ hostUri }}"
webhookSecretSecretVersion: "{{ webhookSecretSecretVersion }}"
readAuthorizerCredential:
userTokenSecretVersion: "{{ userTokenSecretVersion }}"
username: "{{ username }}"
- name: bitbucketCloudConfig
description: |
Configuration for connections to an instance of Bitbucket Clouds.
value:
workspace: "{{ workspace }}"
webhookSecretSecretVersion: "{{ webhookSecretSecretVersion }}"
readAuthorizerCredential:
userTokenSecretVersion: "{{ userTokenSecretVersion }}"
username: "{{ username }}"
authorizerCredential:
userTokenSecretVersion: "{{ userTokenSecretVersion }}"
username: "{{ username }}"
- name: name
value: "{{ name }}"
description: |
Identifier. The resource name of the connection, in the format `projects/{project}/locations/{location}/connections/{connection_id}`.
- name: labels
value: "{{ labels }}"
description: |
Optional. Labels as key value pairs
- name: etag
value: "{{ etag }}"
description: |
Optional. 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.
- name: gitlabConfig
description: |
Configuration for connections to gitlab.com.
value:
webhookSecretSecretVersion: "{{ webhookSecretSecretVersion }}"
readAuthorizerCredential:
userTokenSecretVersion: "{{ userTokenSecretVersion }}"
username: "{{ username }}"
authorizerCredential:
userTokenSecretVersion: "{{ userTokenSecretVersion }}"
username: "{{ username }}"
- name: bitbucketDataCenterConfig
description: |
Configuration for connections to an instance of Bitbucket Data Center.
value:
authorizerCredential:
userTokenSecretVersion: "{{ userTokenSecretVersion }}"
username: "{{ username }}"
serviceDirectoryConfig:
service: "{{ service }}"
sslCaCertificate: "{{ sslCaCertificate }}"
serverVersion: "{{ serverVersion }}"
webhookSecretSecretVersion: "{{ webhookSecretSecretVersion }}"
readAuthorizerCredential:
userTokenSecretVersion: "{{ userTokenSecretVersion }}"
username: "{{ username }}"
hostUri: "{{ hostUri }}"
- name: annotations
value: "{{ annotations }}"
description: |
Optional. Allows clients to store small amounts of arbitrary data.
- name: validateOnly
value: {{ validateOnly }}
- name: requestId
value: "{{ requestId }}"
- name: connectionId
value: "{{ connectionId }}"
UPDATE examples
- patch
Updates the parameters of a single Connection.
UPDATE google.developerconnect.connections
SET
data__disabled = {{ disabled }},
data__gitProxyConfig = '{{ gitProxyConfig }}',
data__githubEnterpriseConfig = '{{ githubEnterpriseConfig }}',
data__httpConfig = '{{ httpConfig }}',
data__githubConfig = '{{ githubConfig }}',
data__secureSourceManagerInstanceConfig = '{{ secureSourceManagerInstanceConfig }}',
data__cryptoKeyConfig = '{{ cryptoKeyConfig }}',
data__gitlabEnterpriseConfig = '{{ gitlabEnterpriseConfig }}',
data__bitbucketCloudConfig = '{{ bitbucketCloudConfig }}',
data__name = '{{ name }}',
data__labels = '{{ labels }}',
data__etag = '{{ etag }}',
data__gitlabConfig = '{{ gitlabConfig }}',
data__bitbucketDataCenterConfig = '{{ bitbucketDataCenterConfig }}',
data__annotations = '{{ annotations }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND connectionsId = '{{ connectionsId }}' --required
AND allowMissing = {{ allowMissing}}
AND validateOnly = {{ validateOnly}}
AND updateMask = '{{ updateMask}}'
AND requestId = '{{ requestId}}'
RETURNING
name,
done,
error,
metadata,
response;
DELETE examples
- delete
Deletes a single Connection.
DELETE FROM google.developerconnect.connections
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND connectionsId = '{{ connectionsId }}' --required
AND etag = '{{ etag }}'
AND validateOnly = '{{ validateOnly }}'
AND requestId = '{{ requestId }}'
;
Lifecycle Methods
- processgithub_enterprise_webhook
ProcessGitHubEnterpriseWebhook is called by the external GitHub Enterprise instances for notifying events.
EXEC google.developerconnect.connections.processgithub_enterprise_webhook
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required
@@json=
'{
"body": "{{ body }}"
}'
;