connections
Creates, updates, deletes, gets or lists a connections
resource.
Overview
Name | connections |
Type | Resource |
Id | google.cloudbuild.connections |
Fields
The following fields are returned by SELECT
queries:
- projects_locations_connections_get
- projects_locations_connections_list
Successful response
Name | Datatype | Description |
---|---|---|
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. |
bitbucketCloudConfig | object | Configuration for connections to Bitbucket Cloud. (id: BitbucketCloudConfig) |
bitbucketDataCenterConfig | object | Configuration for connections to Bitbucket Data Center. (id: BitbucketDataCenterConfig) |
createTime | string (google-datetime) | Output only. Server assigned timestamp for when the connection was created. |
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 | 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. |
githubConfig | object | Configuration for connections to github.com. (id: GitHubConfig) |
githubEnterpriseConfig | object | Configuration for connections to an instance of GitHub Enterprise. (id: GoogleDevtoolsCloudbuildV2GitHubEnterpriseConfig) |
gitlabConfig | object | Configuration for connections to gitlab.com or an instance of GitLab Enterprise. (id: GoogleDevtoolsCloudbuildV2GitLabConfig) |
installationState | object | Output only. Installation state of the Connection. (id: InstallationState) |
reconciling | boolean | Output only. Set to true when the connection is being set up or updated in the background. |
updateTime | string (google-datetime) | Output only. Server assigned timestamp for when the connection was updated. |
Successful response
Name | Datatype | Description |
---|---|---|
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. |
bitbucketCloudConfig | object | Configuration for connections to Bitbucket Cloud. (id: BitbucketCloudConfig) |
bitbucketDataCenterConfig | object | Configuration for connections to Bitbucket Data Center. (id: BitbucketDataCenterConfig) |
createTime | string (google-datetime) | Output only. Server assigned timestamp for when the connection was created. |
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 | 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. |
githubConfig | object | Configuration for connections to github.com. (id: GitHubConfig) |
githubEnterpriseConfig | object | Configuration for connections to an instance of GitHub Enterprise. (id: GoogleDevtoolsCloudbuildV2GitHubEnterpriseConfig) |
gitlabConfig | object | Configuration for connections to gitlab.com or an instance of GitLab Enterprise. (id: GoogleDevtoolsCloudbuildV2GitLabConfig) |
installationState | object | Output only. Installation state of the Connection. (id: InstallationState) |
reconciling | boolean | Output only. Set to true when the connection is being set up or updated in the background. |
updateTime | string (google-datetime) | Output only. Server assigned timestamp for when the connection was updated. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
projects_locations_connections_get | select | projectsId , locationsId , connectionsId | Gets details of a single connection. | |
projects_locations_connections_list | select | projectsId , locationsId | pageSize , pageToken , returnPartialSuccess | Lists Connections in a given project and location. |
projects_locations_connections_create | insert | projectsId , locationsId | connectionId | Creates a Connection. |
projects_locations_connections_patch | update | projectsId , locationsId , connectionsId | updateMask , allowMissing , etag | Updates a single connection. |
projects_locations_connections_delete | delete | projectsId , locationsId , connectionsId | etag , validateOnly | Deletes a single connection. |
projects_locations_connections_process_webhook | exec | projectsId , locationsId | webhookKey | ProcessWebhook is called by the external SCM for notifying of 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 | |
pageSize | integer (int32) | |
pageToken | string | |
returnPartialSuccess | boolean | |
updateMask | string (google-fieldmask) | |
validateOnly | boolean | |
webhookKey | string |
SELECT
examples
- projects_locations_connections_get
- projects_locations_connections_list
Gets details of a single connection.
SELECT
name,
annotations,
bitbucketCloudConfig,
bitbucketDataCenterConfig,
createTime,
disabled,
etag,
githubConfig,
githubEnterpriseConfig,
gitlabConfig,
installationState,
reconciling,
updateTime
FROM google.cloudbuild.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,
disabled,
etag,
githubConfig,
githubEnterpriseConfig,
gitlabConfig,
installationState,
reconciling,
updateTime
FROM google.cloudbuild.connections
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND returnPartialSuccess = '{{ returnPartialSuccess }}';
INSERT
examples
- projects_locations_connections_create
- Manifest
Creates a Connection.
INSERT INTO google.cloudbuild.connections (
data__name,
data__githubConfig,
data__githubEnterpriseConfig,
data__gitlabConfig,
data__bitbucketDataCenterConfig,
data__bitbucketCloudConfig,
data__disabled,
data__annotations,
data__etag,
projectsId,
locationsId,
connectionId
)
SELECT
'{{ name }}',
'{{ githubConfig }}',
'{{ githubEnterpriseConfig }}',
'{{ gitlabConfig }}',
'{{ bitbucketDataCenterConfig }}',
'{{ bitbucketCloudConfig }}',
{{ disabled }},
'{{ annotations }}',
'{{ etag }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ connectionId }}'
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: name
value: string
description: >
Immutable. The resource name of the connection, in the format `projects/{project}/locations/{location}/connections/{connection_id}`.
- 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 or an instance of GitLab Enterprise.
- name: bitbucketDataCenterConfig
value: object
description: >
Configuration for connections to Bitbucket Data Center.
- name: bitbucketCloudConfig
value: object
description: >
Configuration for connections to Bitbucket Cloud.
- 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: >
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: connectionId
value: string
UPDATE
examples
- projects_locations_connections_patch
Updates a single connection.
UPDATE google.cloudbuild.connections
SET
data__name = '{{ name }}',
data__githubConfig = '{{ githubConfig }}',
data__githubEnterpriseConfig = '{{ githubEnterpriseConfig }}',
data__gitlabConfig = '{{ gitlabConfig }}',
data__bitbucketDataCenterConfig = '{{ bitbucketDataCenterConfig }}',
data__bitbucketCloudConfig = '{{ bitbucketCloudConfig }}',
data__disabled = {{ disabled }},
data__annotations = '{{ annotations }}',
data__etag = '{{ etag }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND connectionsId = '{{ connectionsId }}' --required
AND updateMask = '{{ updateMask}}'
AND allowMissing = {{ allowMissing}}
AND etag = '{{ etag}}'
RETURNING
name,
done,
error,
metadata,
response;
DELETE
examples
- projects_locations_connections_delete
Deletes a single connection.
DELETE FROM google.cloudbuild.connections
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND connectionsId = '{{ connectionsId }}' --required
AND etag = '{{ etag }}'
AND validateOnly = '{{ validateOnly }}';
Lifecycle Methods
- projects_locations_connections_process_webhook
ProcessWebhook is called by the external SCM for notifying of events.
EXEC google.cloudbuild.connections.projects_locations_connections_process_webhook
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@webhookKey='{{ webhookKey }}'
@@json=
'{
"contentType": "{{ contentType }}",
"data": "{{ data }}",
"extensions": "{{ extensions }}"
}';