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,
githubEnterpriseConfig,
bitbucketDataCenterConfig,
bitbucketCloudConfig,
annotations,
etag,
githubConfig,
disabled,
name,
gitlabConfig
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ githubEnterpriseConfig }}',
'{{ bitbucketDataCenterConfig }}',
'{{ bitbucketCloudConfig }}',
'{{ annotations }}',
'{{ etag }}',
'{{ githubConfig }}',
{{ disabled }},
'{{ name }}',
'{{ gitlabConfig }}'
;
- name: your_resource_model_name
props:
- name: githubEnterpriseConfig
value:
- name: hostUri
value: string
- name: appId
value: string
- name: privateKeySecretVersion
value: string
- name: webhookSecretSecretVersion
value: string
- name: appInstallationId
value: string
- name: appSlug
value: string
- name: serverVersion
value: string
- name: apiKey
value: string
- name: serviceDirectoryConfig
value:
- name: service
value: string
- name: sslCa
value: string
- name: updateTime
value: string
- name: bitbucketDataCenterConfig
value:
- name: readAuthorizerCredential
value:
- name: userTokenSecretVersion
value: string
- name: username
value: string
- name: hostUri
value: string
- name: webhookSecretSecretVersion
value: string
- name: serverVersion
value: string
- name: sslCa
value: string
- name: bitbucketCloudConfig
value:
- name: webhookSecretSecretVersion
value: string
- name: workspace
value: string
- name: annotations
value: object
- name: etag
value: string
- name: githubConfig
value:
- name: appInstallationId
value: string
- name: authorizerCredential
value:
- name: oauthTokenSecretVersion
value: string
- name: username
value: string
- name: disabled
value: boolean
- name: installationState
value:
- name: stage
value: string
- name: actionUri
value: string
- name: message
value: string
- name: name
value: string
- name: reconciling
value: boolean
- name: createTime
value: string
- name: gitlabConfig
value:
- name: serverVersion
value: string
- name: webhookSecretSecretVersion
value: string
- name: sslCa
value: string
- name: hostUri
value: string
UPDATE
example
Updates a connections
resource.
/*+ update */
UPDATE google.cloudbuild.connections
SET
githubEnterpriseConfig = '{{ githubEnterpriseConfig }}',
bitbucketDataCenterConfig = '{{ bitbucketDataCenterConfig }}',
bitbucketCloudConfig = '{{ bitbucketCloudConfig }}',
annotations = '{{ annotations }}',
etag = '{{ etag }}',
githubConfig = '{{ githubConfig }}',
disabled = true|false,
name = '{{ name }}',
gitlabConfig = '{{ gitlabConfig }}'
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 }}';