repositories
Creates, updates, deletes, gets or lists a repositories
resource.
Overview
Name | repositories |
Type | Resource |
Id | google.cloudbuild.repositories |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Immutable. Resource name of the repository, in the format projects/*/locations/*/connections/*/repositories/* . |
annotations | object | Optional. Allows clients to store small amounts of arbitrary data. |
createTime | string | Output only. Server assigned timestamp for when the connection was created. |
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. |
remoteUri | string | Required. Git Clone HTTPS URI. |
updateTime | string | Output only. Server assigned timestamp for when the connection was updated. |
webhookId | string | Output only. External ID of the webhook created for the repository. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
projects_locations_connections_repositories_get | SELECT | connectionsId, locationsId, projectsId, repositoriesId | Gets details of a single repository. |
projects_locations_connections_repositories_list | SELECT | connectionsId, locationsId, projectsId | Lists Repositories in a given connection. |
projects_locations_connections_repositories_batch_create | INSERT | connectionsId, locationsId, projectsId | Creates multiple repositories inside a connection. |
projects_locations_connections_repositories_create | INSERT | connectionsId, locationsId, projectsId | Creates a Repository. |
projects_locations_connections_repositories_delete | DELETE | connectionsId, locationsId, projectsId, repositoriesId | Deletes a single repository. |
projects_locations_connections_repositories_access_read_token | EXEC | connectionsId, locationsId, projectsId, repositoriesId | Fetches read token of a given repository. |
projects_locations_connections_repositories_access_read_write_token | EXEC | connectionsId, locationsId, projectsId, repositoriesId | Fetches 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.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.cloudbuild.repositories (
connectionsId,
locationsId,
projectsId,
requests
)
SELECT
'{{ connectionsId }}',
'{{ locationsId }}',
'{{ projectsId }}',
'{{ requests }}'
;
- name: your_resource_model_name
props:
- name: requests
value:
- - name: repositoryId
value: string
- name: repository
value:
- name: updateTime
value: string
- name: name
value: string
- name: annotations
value: object
- name: etag
value: string
- name: webhookId
value: string
- name: createTime
value: string
- name: remoteUri
value: string
- name: parent
value: string
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 }}';