connections
Creates, updates, deletes, gets or lists a connections
resource.
Overview
Name | connections |
Type | Resource |
Id | google.cloudbuild.connections |
Fields
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. |
bitbucketDataCenterConfig | object | Configuration for connections to Bitbucket Data Center. |
createTime | string | 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. |
githubEnterpriseConfig | object | Configuration for connections to an instance of GitHub Enterprise. |
gitlabConfig | object | Configuration for connections to gitlab.com or an instance of GitLab Enterprise. |
installationState | object | Describes stage and necessary actions to be taken by the user to complete the installation. Used for GitHub and GitHub Enterprise based connections. |
reconciling | boolean | Output only. Set to true when the connection is being set up or updated in the background. |
updateTime | string | Output only. Server assigned timestamp for when the connection was updated. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
projects_locations_connections_get | SELECT | connectionsId, locationsId, projectsId | Gets details of a single connection. |
projects_locations_connections_list | SELECT | locationsId, projectsId | Lists Connections in a given project and location. |
projects_locations_connections_create | INSERT | locationsId, projectsId | Creates a Connection. |
projects_locations_connections_delete | DELETE | connectionsId, locationsId, projectsId | Deletes a single connection. |
projects_locations_connections_patch | UPDATE | connectionsId, locationsId, projectsId | Updates a single connection. |
projects_locations_connections_process_webhook | EXEC | locationsId, projectsId | ProcessWebhook is called by the external SCM for notifying of events. |
SELECT
examples
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 locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new connections
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.cloudbuild.connections (
locationsId,
projectsId,
githubConfig,
etag,
bitbucketDataCenterConfig,
gitlabConfig,
annotations,
name,
githubEnterpriseConfig,
bitbucketCloudConfig,
disabled
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ githubConfig }}',
'{{ etag }}',
'{{ bitbucketDataCenterConfig }}',
'{{ gitlabConfig }}',
'{{ annotations }}',
'{{ name }}',
'{{ githubEnterpriseConfig }}',
'{{ bitbucketCloudConfig }}',
true|false
;
updateTime: string
githubConfig:
authorizerCredential:
username: string
oauthTokenSecretVersion: string
appInstallationId: string
etag: string
bitbucketDataCenterConfig:
serviceDirectoryConfig:
service: string
authorizerCredential:
username: string
userTokenSecretVersion: string
hostUri: string
sslCa: string
webhookSecretSecretVersion: string
serverVersion: string
gitlabConfig:
webhookSecretSecretVersion: string
sslCa: string
serverVersion: string
hostUri: string
annotations: object
name: string
reconciling: boolean
githubEnterpriseConfig:
appSlug: string
sslCa: string
apiKey: string
webhookSecretSecretVersion: string
appId: string
serverVersion: string
privateKeySecretVersion: string
appInstallationId: string
hostUri: string
bitbucketCloudConfig:
webhookSecretSecretVersion: string
workspace: string
createTime: string
installationState:
actionUri: string
message: string
stage: string
disabled: boolean
UPDATE
example
Updates a connections
resource.
/*+ update */
UPDATE google.cloudbuild.connections
SET
githubConfig = '{{ githubConfig }}',
etag = '{{ etag }}',
bitbucketDataCenterConfig = '{{ bitbucketDataCenterConfig }}',
gitlabConfig = '{{ gitlabConfig }}',
annotations = '{{ annotations }}',
name = '{{ name }}',
githubEnterpriseConfig = '{{ githubEnterpriseConfig }}',
bitbucketCloudConfig = '{{ bitbucketCloudConfig }}',
disabled = true|false
WHERE
connectionsId = '{{ connectionsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
DELETE
example
Deletes the specified connections
resource.
/*+ delete */
DELETE FROM google.cloudbuild.connections
WHERE connectionsId = '{{ connectionsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';