Skip to main content

git_repository_links

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

Overview

Namegit_repository_links
TypeResource
Idgoogle.developerconnect.git_repository_links

Fields

NameDatatypeDescription
namestringIdentifier. Resource name of the repository, in the format projects/*/locations/*/connections/*/gitRepositoryLinks/*.
annotationsobjectOptional. Allows clients to store small amounts of arbitrary data.
cloneUristringRequired. Git Clone URI.
createTimestringOutput only. [Output only] Create timestamp
deleteTimestringOutput only. [Output only] Delete timestamp
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.
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, gitRepositoryLinksId, locationsId, projectsIdGets details of a single GitRepositoryLink.
listSELECTconnectionsId, locationsId, projectsIdLists GitRepositoryLinks in a given project, location, and connection.
createINSERTconnectionsId, locationsId, projectsIdCreates a GitRepositoryLink. Upon linking a Git Repository, Developer Connect will configure the Git Repository to send webhook events to Developer Connect. Connections that use Firebase GitHub Application will have events forwarded to the Firebase service. All other Connections will have events forwarded to Cloud Build.
deleteDELETEconnectionsId, gitRepositoryLinksId, locationsId, projectsIdDeletes a single GitRepositoryLink.

SELECT examples

Lists GitRepositoryLinks in a given project, location, and connection.

SELECT
name,
annotations,
cloneUri,
createTime,
deleteTime,
etag,
labels,
reconciling,
uid,
updateTime
FROM google.developerconnect.git_repository_links
WHERE connectionsId = '{{ connectionsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

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

/*+ create */
INSERT INTO google.developerconnect.git_repository_links (
connectionsId,
locationsId,
projectsId,
name,
cloneUri,
labels,
etag,
annotations
)
SELECT
'{{ connectionsId }}',
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ cloneUri }}',
'{{ labels }}',
'{{ etag }}',
'{{ annotations }}'
;

DELETE example

Deletes the specified git_repository_links resource.

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