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
Successful response
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. (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) |
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. |
uid | string | Output only. A system-assigned unique identifier for the Connection. |
updateTime | string (google-datetime) | Output only. [Output only] Update timestamp |
Successful response
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. (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) |
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. |
uid | string | Output only. A system-assigned unique identifier for the Connection. |
updateTime | string (google-datetime) | Output only. [Output only] Update timestamp |
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 | pageSize , pageToken , filter , orderBy | Lists Connections in a given project and location. |
create | insert | projectsId , locationsId | connectionId , requestId , validateOnly | Creates a new Connection in a given project and location. |
patch | update | projectsId , locationsId , connectionsId | updateMask , requestId , allowMissing , validateOnly | Updates the parameters of a single Connection. |
delete | delete | projectsId , locationsId , connectionsId | requestId , validateOnly , etag | 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,
installationState,
labels,
reconciling,
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
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 pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}';
INSERT
examples
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: connections
props:
- name: projectsId
value: string
description: Required parameter for the connections resource.
- name: locationsId
value: string
description: Required parameter for the connections resource.
- name: githubConfig
value: object
description: >
Configuration for connections to github.com.
- name: githubEnterpriseConfig
value: object
description: >
Configuration for connections to an instance of GitHub Enterprise.
- name: gitlabConfig
value: object
description: >
Configuration for connections to gitlab.com.
- name: gitlabEnterpriseConfig
value: object
description: >
Configuration for connections to an instance of GitLab Enterprise.
- name: bitbucketDataCenterConfig
value: object
description: >
Configuration for connections to an instance of Bitbucket Data Center.
- name: bitbucketCloudConfig
value: object
description: >
Configuration for connections to an instance of Bitbucket Clouds.
- name: name
value: string
description: >
Identifier. The resource name of the connection, in the format `projects/{project}/locations/{location}/connections/{connection_id}`.
- name: labels
value: object
description: >
Optional. Labels as key value pairs
- name: disabled
value: boolean
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: annotations
value: object
description: >
Optional. Allows clients to store small amounts of arbitrary data.
- name: etag
value: string
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: cryptoKeyConfig
value: object
description: >
Optional. The crypto key configuration. This field is used by the Customer-Managed Encryption Keys (CMEK) feature.
- name: gitProxyConfig
value: object
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.
- name: connectionId
value: string
- name: requestId
value: string
- name: validateOnly
value: boolean
UPDATE
examples
- patch
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
- delete
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
- 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 }}"
}';