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
Successful response
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. |
Successful response
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. |
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
name,
annotations,
createTime,
etag,
remoteUri,
updateTime,
webhookId
FROM google.cloudbuild.repositories
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND connectionsId = '{{ connectionsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND returnPartialSuccess = '{{ returnPartialSuccess }}';
INSERT
examples
- projects_locations_connections_repositories_create
- projects_locations_connections_repositories_batch_create
- Manifest
Creates a Repository.
INSERT INTO google.cloudbuild.repositories (
data__name,
data__remoteUri,
data__annotations,
data__etag,
projectsId,
locationsId,
connectionsId,
repositoryId
)
SELECT
'{{ name }}',
'{{ remoteUri }}',
'{{ annotations }}',
'{{ etag }}',
'{{ 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: string
description: Required parameter for the repositories resource.
- name: locationsId
value: string
description: Required parameter for the repositories resource.
- name: connectionsId
value: string
description: Required parameter for the repositories resource.
- name: name
value: string
description: >
Immutable. Resource name of the repository, in the format `projects/*/locations/*/connections/*/repositories/*`.
- name: remoteUri
value: string
description: >
Required. Git Clone HTTPS URI.
- name: annotations
value: object
description: >
Optional. Allows clients to store small amounts of arbitrary data.
- name: etag
value: string
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: requests
value: array
description: >
Required. The request messages specifying the repositories to create.
- name: repositoryId
value: string
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_write_token
- projects_locations_connections_repositories_access_read_token
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;
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;