repositories
Creates, updates, deletes, gets or lists a repositories resource.
Overview
| Name | repositories |
| Type | Resource |
| Id | google.cloudbuild.repositories |
Fields
The following fields are returned by SELECT queries:
- projects_locations_connections_repositories_get
- projects_locations_connections_repositories_list
| 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 (google-datetime) | 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 (google-datetime) | Output only. Server assigned timestamp for when the connection was updated. |
webhookId | string | Output only. External ID of the webhook created for the repository. |
| Name | Datatype | Description |
|---|
Methods
The following methods are available for this resource:
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 | |
locationsId | string | |
projectsId | string | |
repositoriesId | string | |
etag | string | |
filter | string | |
pageSize | integer (int32) | |
pageToken | string | |
repositoryId | string | |
returnPartialSuccess | boolean | |
validateOnly | boolean |
SELECT examples
- projects_locations_connections_repositories_get
- projects_locations_connections_repositories_list
Gets details of a single repository.
SELECT
name,
annotations,
createTime,
etag,
remoteUri,
updateTime,
webhookId
FROM google.cloudbuild.repositories
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND connectionsId = '{{ connectionsId }}' -- required
AND repositoriesId = '{{ repositoriesId }}' -- required
;
Lists Repositories in a given connection.
SELECT
*
FROM google.cloudbuild.repositories
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND connectionsId = '{{ connectionsId }}' -- required
AND returnPartialSuccess = '{{ returnPartialSuccess }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND pageSize = '{{ pageSize }}'
;
INSERT examples
- projects_locations_connections_repositories_create
- projects_locations_connections_repositories_batch_create
- Manifest
Creates a Repository.
INSERT INTO google.cloudbuild.repositories (
data__remoteUri,
data__name,
data__etag,
data__annotations,
projectsId,
locationsId,
connectionsId,
repositoryId
)
SELECT
'{{ remoteUri }}',
'{{ name }}',
'{{ etag }}',
'{{ annotations }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ connectionsId }}',
'{{ repositoryId }}'
RETURNING
name,
done,
error,
metadata,
response
;
Creates multiple repositories inside a connection.
INSERT INTO google.cloudbuild.repositories (
data__requests,
projectsId,
locationsId,
connectionsId
)
SELECT
'{{ requests }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ connectionsId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: repositories
props:
- name: projectsId
value: "{{ projectsId }}"
description: Required parameter for the repositories resource.
- name: locationsId
value: "{{ locationsId }}"
description: Required parameter for the repositories resource.
- name: connectionsId
value: "{{ connectionsId }}"
description: Required parameter for the repositories resource.
- name: remoteUri
value: "{{ remoteUri }}"
description: |
Required. Git Clone HTTPS URI.
- name: name
value: "{{ name }}"
description: |
Immutable. Resource name of the repository, in the format `projects/*/locations/*/connections/*/repositories/*`.
- name: etag
value: "{{ etag }}"
description: |
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: "{{ annotations }}"
description: |
Optional. Allows clients to store small amounts of arbitrary data.
- name: requests
description: |
Required. The request messages specifying the repositories to create.
value:
- repository:
remoteUri: "{{ remoteUri }}"
name: "{{ name }}"
webhookId: "{{ webhookId }}"
createTime: "{{ createTime }}"
etag: "{{ etag }}"
updateTime: "{{ updateTime }}"
annotations: "{{ annotations }}"
repositoryId: "{{ repositoryId }}"
parent: "{{ parent }}"
- name: repositoryId
value: "{{ repositoryId }}"
DELETE examples
- projects_locations_connections_repositories_delete
Deletes a single repository.
DELETE FROM google.cloudbuild.repositories
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND connectionsId = '{{ connectionsId }}' --required
AND repositoriesId = '{{ repositoriesId }}' --required
AND etag = '{{ etag }}'
AND validateOnly = '{{ validateOnly }}'
;
Lifecycle Methods
- projects_locations_connections_repositories_access_read_token
- projects_locations_connections_repositories_access_read_write_token
Fetches read token of a given repository.
EXEC google.cloudbuild.repositories.projects_locations_connections_repositories_access_read_token
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@connectionsId='{{ connectionsId }}' --required,
@repositoriesId='{{ repositoriesId }}' --required
;
Fetches read/write token of a given repository.
EXEC google.cloudbuild.repositories.projects_locations_connections_repositories_access_read_write_token
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@connectionsId='{{ connectionsId }}' --required,
@repositoriesId='{{ repositoriesId }}' --required
;