Skip to main content

repositories

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

Overview

Namerepositories
TypeResource
Idgoogle.cloudbuild.repositories

Fields

NameDatatypeDescription
namestringImmutable. Resource name of the repository, in the format projects/*/locations/*/connections/*/repositories/*.
annotationsobjectOptional. Allows clients to store small amounts of arbitrary data.
createTimestringOutput only. Server assigned timestamp for when the connection was created.
etagstringThis 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.
remoteUristringRequired. Git Clone HTTPS URI.
updateTimestringOutput only. Server assigned timestamp for when the connection was updated.
webhookIdstringOutput only. External ID of the webhook created for the repository.

Methods

NameAccessible byRequired ParamsDescription
projects_locations_connections_repositories_getSELECTconnectionsId, locationsId, projectsId, repositoriesIdGets details of a single repository.
projects_locations_connections_repositories_listSELECTconnectionsId, locationsId, projectsIdLists Repositories in a given connection.
projects_locations_connections_repositories_batch_createINSERTconnectionsId, locationsId, projectsIdCreates multiple repositories inside a connection.
projects_locations_connections_repositories_createINSERTconnectionsId, locationsId, projectsIdCreates a Repository.
projects_locations_connections_repositories_deleteDELETEconnectionsId, locationsId, projectsId, repositoriesIdDeletes a single repository.
projects_locations_connections_repositories_access_read_tokenEXECconnectionsId, locationsId, projectsId, repositoriesIdFetches read token of a given repository.
projects_locations_connections_repositories_access_read_write_tokenEXECconnectionsId, locationsId, projectsId, repositoriesIdFetches read/write token of a given repository.

SELECT examples

Lists Repositories in a given connection.

SELECT
name,
annotations,
createTime,
etag,
remoteUri,
updateTime,
webhookId
FROM google.cloudbuild.repositories
WHERE connectionsId = '{{ connectionsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

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

/*+ create */
INSERT INTO google.cloudbuild.repositories (
connectionsId,
locationsId,
projectsId,
requests
)
SELECT
'{{ connectionsId }}',
'{{ locationsId }}',
'{{ projectsId }}',
'{{ requests }}'
;

DELETE example

Deletes the specified repositories resource.

/*+ delete */
DELETE FROM google.cloudbuild.repositories
WHERE connectionsId = '{{ connectionsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND repositoriesId = '{{ repositoriesId }}';