Skip to main content

repositories

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

Overview

Namerepositories
TypeResource
Idgoogle.securesourcemanager.repositories

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringOptional. A unique identifier for a repository. The name should be of the format: projects/{project}/locations/{location_id}/repositories/{repository_id}
createTimestring (google-datetime)Output only. Create timestamp.
descriptionstringOptional. Description of the repository, which cannot exceed 500 characters.
etagstringOptional. 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.
initialConfigobjectInput only. Initial configurations for the repository. (id: InitialConfig)
instancestringOptional. The name of the instance in which the repository is hosted, formatted as projects/{project_number}/locations/{location_id}/instances/{instance_id} When creating repository via securesourcemanager.googleapis.com, this field is used as input. When creating repository via *.sourcemanager.dev, this field is output only.
uidstringOutput only. Unique identifier of the repository.
updateTimestring (google-datetime)Output only. Update timestamp.
urisobjectOutput only. URIs for the repository. (id: URIs)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, repositoriesIdGets metadata of a repository.
listselectprojectsId, locationsIdpageSize, pageToken, filter, instanceLists Repositories in a given project and location. The instance field is required in the query parameter for requests using the securesourcemanager.googleapis.com endpoint.
createinsertprojectsId, locationsIdrepositoryIdCreates a new repository in a given project and location. The Repository.Instance field is required in the request body for requests using the securesourcemanager.googleapis.com endpoint.
patchupdateprojectsId, locationsId, repositoriesIdupdateMask, validateOnlyUpdates the metadata of a repository.
deletedeleteprojectsId, locationsId, repositoriesIdallowMissingDeletes a Repository.

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.

NameDatatypeDescription
locationsIdstring
projectsIdstring
repositoriesIdstring
allowMissingboolean
filterstring
instancestring
pageSizeinteger (int32)
pageTokenstring
repositoryIdstring
updateMaskstring (google-fieldmask)
validateOnlyboolean

SELECT examples

Gets metadata of a repository.

SELECT
name,
createTime,
description,
etag,
initialConfig,
instance,
uid,
updateTime,
uris
FROM google.securesourcemanager.repositories
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND repositoriesId = '{{ repositoriesId }}' -- required;

INSERT examples

Creates a new repository in a given project and location. The Repository.Instance field is required in the request body for requests using the securesourcemanager.googleapis.com endpoint.

INSERT INTO google.securesourcemanager.repositories (
data__name,
data__description,
data__instance,
data__etag,
data__initialConfig,
projectsId,
locationsId,
repositoryId
)
SELECT
'{{ name }}',
'{{ description }}',
'{{ instance }}',
'{{ etag }}',
'{{ initialConfig }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ repositoryId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Updates the metadata of a repository.

UPDATE google.securesourcemanager.repositories
SET
data__name = '{{ name }}',
data__description = '{{ description }}',
data__instance = '{{ instance }}',
data__etag = '{{ etag }}',
data__initialConfig = '{{ initialConfig }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND repositoriesId = '{{ repositoriesId }}' --required
AND updateMask = '{{ updateMask}}'
AND validateOnly = {{ validateOnly}}
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples

Deletes a Repository.

DELETE FROM google.securesourcemanager.repositories
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND repositoriesId = '{{ repositoriesId }}' --required
AND allowMissing = '{{ allowMissing }}';