Skip to main content

connections

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

Overview

Nameconnections
TypeResource
Idgoogle.developerconnect.connections

Fields

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.
createTimestringOutput only. [Output only] Create timestamp
deleteTimestringOutput 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.
githubConfigobjectConfiguration for connections to github.com.
installationStateobjectDescribes stage and necessary actions to be taken by the user to complete the installation. Used for GitHub and GitHub Enterprise based connections.
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 a the GitRepositoryLink.
updateTimestringOutput only. [Output only] Update timestamp

Methods

NameAccessible byRequired ParamsDescription
getSELECTconnectionsId, locationsId, projectsIdGets details of a single Connection.
listSELECTlocationsId, projectsIdLists Connections in a given project and location.
createINSERTlocationsId, projectsIdCreates a new Connection in a given project and location.
deleteDELETEconnectionsId, locationsId, projectsIdDeletes a single Connection.
patchUPDATEconnectionsId, locationsId, projectsIdUpdates the parameters of a single Connection.

SELECT examples

Lists Connections in a given project and location.

SELECT
name,
annotations,
createTime,
deleteTime,
disabled,
etag,
githubConfig,
installationState,
labels,
reconciling,
uid,
updateTime
FROM google.developerconnect.connections
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new connections resource.

/*+ create */
INSERT INTO google.developerconnect.connections (
locationsId,
projectsId,
githubConfig,
name,
labels,
disabled,
annotations,
etag
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ githubConfig }}',
'{{ name }}',
'{{ labels }}',
{{ disabled }},
'{{ annotations }}',
'{{ etag }}'
;

UPDATE example

Updates a connections resource.

/*+ update */
UPDATE google.developerconnect.connections
SET
githubConfig = '{{ githubConfig }}',
name = '{{ name }}',
labels = '{{ labels }}',
disabled = true|false,
annotations = '{{ annotations }}',
etag = '{{ etag }}'
WHERE
connectionsId = '{{ connectionsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified connections resource.

/*+ delete */
DELETE FROM google.developerconnect.connections
WHERE connectionsId = '{{ connectionsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';