Skip to main content

connections

Creates, updates, deletes, gets or lists a connections resource.

Overview

Nameconnections
TypeResource
Idgoogle.developerconnect.connections

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringIdentifier. The resource name of the connection, in the format projects/{project}/locations/{location}/connections/{connection_id}.
annotationsobjectOptional. Allows clients to store small amounts of arbitrary data.
bitbucketCloudConfigobjectConfiguration for connections to an instance of Bitbucket Clouds. (id: BitbucketCloudConfig)
bitbucketDataCenterConfigobjectConfiguration for connections to an instance of Bitbucket Data Center. (id: BitbucketDataCenterConfig)
createTimestring (google-datetime)Output only. [Output only] Create timestamp
cryptoKeyConfigobjectOptional. The crypto key configuration. This field is used by the Customer-Managed Encryption Keys (CMEK) feature. (id: CryptoKeyConfig)
deleteTimestring (google-datetime)Output only. [Output only] Delete timestamp
disabledbooleanOptional. 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.
etagstringOptional. 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.
gitProxyConfigobjectOptional. Configuration for the git proxy feature. Enabling the git proxy allows clients to perform git operations on the repositories linked in the connection. (id: GitProxyConfig)
githubConfigobjectConfiguration for connections to github.com. (id: GitHubConfig)
githubEnterpriseConfigobjectConfiguration for connections to an instance of GitHub Enterprise. (id: GitHubEnterpriseConfig)
gitlabConfigobjectConfiguration for connections to gitlab.com. (id: GitLabConfig)
gitlabEnterpriseConfigobjectConfiguration for connections to an instance of GitLab Enterprise. (id: GitLabEnterpriseConfig)
installationStateobjectOutput only. Installation state of the Connection. (id: InstallationState)
labelsobjectOptional. Labels as key value pairs
reconcilingbooleanOutput only. Set to true when the connection is being set up or updated in the background.
uidstringOutput only. A system-assigned unique identifier for the Connection.
updateTimestring (google-datetime)Output only. [Output only] Update timestamp

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, connectionsIdGets details of a single Connection.
listselectprojectsId, locationsIdpageSize, pageToken, filter, orderByLists Connections in a given project and location.
createinsertprojectsId, locationsIdconnectionId, requestId, validateOnlyCreates a new Connection in a given project and location.
patchupdateprojectsId, locationsId, connectionsIdupdateMask, requestId, allowMissing, validateOnlyUpdates the parameters of a single Connection.
deletedeleteprojectsId, locationsId, connectionsIdrequestId, validateOnly, etagDeletes a single Connection.
processgithub_enterprise_webhookexecprojectsId, locationsIdProcessGitHubEnterpriseWebhook 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.

NameDatatypeDescription
connectionsIdstring
locationsIdstring
projectsIdstring
allowMissingboolean
connectionIdstring
etagstring
filterstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
requestIdstring
updateMaskstring (google-fieldmask)
validateOnlyboolean

SELECT examples

Gets details of a single Connection.

SELECT
name,
annotations,
bitbucketCloudConfig,
bitbucketDataCenterConfig,
createTime,
cryptoKeyConfig,
deleteTime,
disabled,
etag,
gitProxyConfig,
githubConfig,
githubEnterpriseConfig,
gitlabConfig,
gitlabEnterpriseConfig,
installationState,
labels,
reconciling,
uid,
updateTime
FROM google.developerconnect.connections
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND connectionsId = '{{ connectionsId }}' -- required;

INSERT examples

Creates a new Connection in a given project and location.

INSERT INTO google.developerconnect.connections (
data__githubConfig,
data__githubEnterpriseConfig,
data__gitlabConfig,
data__gitlabEnterpriseConfig,
data__bitbucketDataCenterConfig,
data__bitbucketCloudConfig,
data__name,
data__labels,
data__disabled,
data__annotations,
data__etag,
data__cryptoKeyConfig,
data__gitProxyConfig,
projectsId,
locationsId,
connectionId,
requestId,
validateOnly
)
SELECT
'{{ githubConfig }}',
'{{ githubEnterpriseConfig }}',
'{{ gitlabConfig }}',
'{{ gitlabEnterpriseConfig }}',
'{{ bitbucketDataCenterConfig }}',
'{{ bitbucketCloudConfig }}',
'{{ name }}',
'{{ labels }}',
{{ disabled }},
'{{ annotations }}',
'{{ etag }}',
'{{ cryptoKeyConfig }}',
'{{ gitProxyConfig }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ connectionId }}',
'{{ requestId }}',
'{{ validateOnly }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Updates the parameters of a single Connection.

UPDATE google.developerconnect.connections
SET
data__githubConfig = '{{ githubConfig }}',
data__githubEnterpriseConfig = '{{ githubEnterpriseConfig }}',
data__gitlabConfig = '{{ gitlabConfig }}',
data__gitlabEnterpriseConfig = '{{ gitlabEnterpriseConfig }}',
data__bitbucketDataCenterConfig = '{{ bitbucketDataCenterConfig }}',
data__bitbucketCloudConfig = '{{ bitbucketCloudConfig }}',
data__name = '{{ name }}',
data__labels = '{{ labels }}',
data__disabled = {{ disabled }},
data__annotations = '{{ annotations }}',
data__etag = '{{ etag }}',
data__cryptoKeyConfig = '{{ cryptoKeyConfig }}',
data__gitProxyConfig = '{{ gitProxyConfig }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND connectionsId = '{{ connectionsId }}' --required
AND updateMask = '{{ updateMask}}'
AND requestId = '{{ requestId}}'
AND allowMissing = {{ allowMissing}}
AND validateOnly = {{ validateOnly}}
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples

Deletes a single Connection.

DELETE FROM google.developerconnect.connections
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND connectionsId = '{{ connectionsId }}' --required
AND requestId = '{{ requestId }}'
AND validateOnly = '{{ validateOnly }}'
AND etag = '{{ etag }}';

Lifecycle Methods

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 }}"
}';