git_repository_links
Creates, updates, deletes, gets or lists a git_repository_links
resource.
Overview
Name | git_repository_links |
Type | Resource |
Id | google.developerconnect.git_repository_links |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. Resource name of the repository, in the format projects/*/locations/*/connections/*/gitRepositoryLinks/* . |
annotations | object | Optional. Allows clients to store small amounts of arbitrary data. |
cloneUri | string | Required. Git Clone URI. |
createTime | string (google-datetime) | Output only. [Output only] Create timestamp |
deleteTime | string (google-datetime) | Output only. [Output only] Delete timestamp |
etag | string | Optional. 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. |
gitProxyUri | string | Output only. URI to access the linked repository through the Git Proxy. This field is only populated if the git proxy is enabled for the connection. |
labels | object | Optional. Labels as key value pairs |
reconciling | boolean | Output only. Set to true when the connection is being set up or updated in the background. |
uid | string | Output only. A system-assigned unique identifier for the GitRepositoryLink. |
updateTime | string (google-datetime) | Output only. [Output only] Update timestamp |
webhookId | string | Output only. External ID of the webhook created for the repository. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. Resource name of the repository, in the format projects/*/locations/*/connections/*/gitRepositoryLinks/* . |
annotations | object | Optional. Allows clients to store small amounts of arbitrary data. |
cloneUri | string | Required. Git Clone URI. |
createTime | string (google-datetime) | Output only. [Output only] Create timestamp |
deleteTime | string (google-datetime) | Output only. [Output only] Delete timestamp |
etag | string | Optional. 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. |
gitProxyUri | string | Output only. URI to access the linked repository through the Git Proxy. This field is only populated if the git proxy is enabled for the connection. |
labels | object | Optional. Labels as key value pairs |
reconciling | boolean | Output only. Set to true when the connection is being set up or updated in the background. |
uid | string | Output only. A system-assigned unique identifier for the GitRepositoryLink. |
updateTime | string (google-datetime) | Output only. [Output only] Update timestamp |
webhookId | string | Output only. External ID of the webhook created for the repository. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , connectionsId , gitRepositoryLinksId | Gets details of a single GitRepositoryLink. | |
list | select | projectsId , locationsId , connectionsId | pageSize , pageToken , filter , orderBy | Lists GitRepositoryLinks in a given project, location, and connection. |
create | insert | projectsId , locationsId , connectionsId | gitRepositoryLinkId , requestId , validateOnly | Creates 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. |
delete | delete | projectsId , locationsId , connectionsId , gitRepositoryLinksId | requestId , validateOnly , etag | Deletes a single GitRepositoryLink. |
processgitlab_enterprise_webhook | exec | projectsId , locationsId , connectionsId , gitRepositoryLinksId | ProcessGitLabEnterpriseWebhook is called by the external GitLab Enterprise instances for notifying events. | |
processgitlab_webhook | exec | projectsId , locationsId , connectionsId , gitRepositoryLinksId | ProcessGitLabWebhook is called by the GitLab.com for notifying events. | |
process_bitbucket_data_center_webhook | exec | projectsId , locationsId , connectionsId , gitRepositoryLinksId | ProcessBitbucketDataCenterWebhook is called by the external Bitbucket Data Center instances for notifying events. | |
process_bitbucket_cloud_webhook | exec | projectsId , locationsId , connectionsId , gitRepositoryLinksId | ProcessBitbucketCloudWebhook is called by the external Bitbucket Cloud instances for notifying 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 | |
gitRepositoryLinksId | string | |
locationsId | string | |
projectsId | string | |
etag | string | |
filter | string | |
gitRepositoryLinkId | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
requestId | string | |
validateOnly | boolean |
SELECT
examples
- get
- list
Gets details of a single GitRepositoryLink.
SELECT
name,
annotations,
cloneUri,
createTime,
deleteTime,
etag,
gitProxyUri,
labels,
reconciling,
uid,
updateTime,
webhookId
FROM google.developerconnect.git_repository_links
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND connectionsId = '{{ connectionsId }}' -- required
AND gitRepositoryLinksId = '{{ gitRepositoryLinksId }}' -- required;
Lists GitRepositoryLinks in a given project, location, and connection.
SELECT
name,
annotations,
cloneUri,
createTime,
deleteTime,
etag,
gitProxyUri,
labels,
reconciling,
uid,
updateTime,
webhookId
FROM google.developerconnect.git_repository_links
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND connectionsId = '{{ connectionsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}';
INSERT
examples
- create
- Manifest
Creates 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.
INSERT INTO google.developerconnect.git_repository_links (
data__name,
data__cloneUri,
data__labels,
data__etag,
data__annotations,
projectsId,
locationsId,
connectionsId,
gitRepositoryLinkId,
requestId,
validateOnly
)
SELECT
'{{ name }}',
'{{ cloneUri }}',
'{{ labels }}',
'{{ etag }}',
'{{ annotations }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ connectionsId }}',
'{{ gitRepositoryLinkId }}',
'{{ requestId }}',
'{{ validateOnly }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: git_repository_links
props:
- name: projectsId
value: string
description: Required parameter for the git_repository_links resource.
- name: locationsId
value: string
description: Required parameter for the git_repository_links resource.
- name: connectionsId
value: string
description: Required parameter for the git_repository_links resource.
- name: name
value: string
description: >
Identifier. Resource name of the repository, in the format `projects/*/locations/*/connections/*/gitRepositoryLinks/*`.
- name: cloneUri
value: string
description: >
Required. Git Clone URI.
- name: labels
value: object
description: >
Optional. Labels as key value pairs
- name: etag
value: string
description: >
Optional. 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: annotations
value: object
description: >
Optional. Allows clients to store small amounts of arbitrary data.
- name: gitRepositoryLinkId
value: string
- name: requestId
value: string
- name: validateOnly
value: boolean
DELETE
examples
- delete
Deletes a single GitRepositoryLink.
DELETE FROM google.developerconnect.git_repository_links
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND connectionsId = '{{ connectionsId }}' --required
AND gitRepositoryLinksId = '{{ gitRepositoryLinksId }}' --required
AND requestId = '{{ requestId }}'
AND validateOnly = '{{ validateOnly }}'
AND etag = '{{ etag }}';
Lifecycle Methods
- processgitlab_enterprise_webhook
- processgitlab_webhook
- process_bitbucket_data_center_webhook
- process_bitbucket_cloud_webhook
ProcessGitLabEnterpriseWebhook is called by the external GitLab Enterprise instances for notifying events.
EXEC google.developerconnect.git_repository_links.processgitlab_enterprise_webhook
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@connectionsId='{{ connectionsId }}' --required,
@gitRepositoryLinksId='{{ gitRepositoryLinksId }}' --required
@@json=
'{
"body": "{{ body }}"
}';
ProcessGitLabWebhook is called by the GitLab.com for notifying events.
EXEC google.developerconnect.git_repository_links.processgitlab_webhook
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@connectionsId='{{ connectionsId }}' --required,
@gitRepositoryLinksId='{{ gitRepositoryLinksId }}' --required
@@json=
'{
"body": "{{ body }}"
}';
ProcessBitbucketDataCenterWebhook is called by the external Bitbucket Data Center instances for notifying events.
EXEC google.developerconnect.git_repository_links.process_bitbucket_data_center_webhook
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@connectionsId='{{ connectionsId }}' --required,
@gitRepositoryLinksId='{{ gitRepositoryLinksId }}' --required
@@json=
'{
"body": "{{ body }}"
}';
ProcessBitbucketCloudWebhook is called by the external Bitbucket Cloud instances for notifying events.
EXEC google.developerconnect.git_repository_links.process_bitbucket_cloud_webhook
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@connectionsId='{{ connectionsId }}' --required,
@gitRepositoryLinksId='{{ gitRepositoryLinksId }}' --required
@@json=
'{
"body": "{{ body }}"
}';