versions
Creates, updates, deletes, gets or lists a versions
resource.
Overview
Name | versions |
Type | Resource |
Id | google.artifactregistry.versions |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | The name of the version, for example: projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/art1 . If the package or version ID parts contain slashes, the slashes are escaped. |
annotations | object | Optional. Client specified annotations. |
createTime | string (google-datetime) | The time when the version was created. |
description | string | Optional. Description of the version, as specified in its metadata. |
metadata | object | Output only. Repository-specific Metadata stored against this version. The fields returned are defined by the underlying repository-specific resource. Currently, the resources could be: DockerImage MavenArtifact |
relatedTags | array | Output only. A list of related tags. Will contain up to 100 tags that reference this version. |
updateTime | string (google-datetime) | The time when the version was last updated. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | The name of the version, for example: projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/art1 . If the package or version ID parts contain slashes, the slashes are escaped. |
annotations | object | Optional. Client specified annotations. |
createTime | string (google-datetime) | The time when the version was created. |
description | string | Optional. Description of the version, as specified in its metadata. |
metadata | object | Output only. Repository-specific Metadata stored against this version. The fields returned are defined by the underlying repository-specific resource. Currently, the resources could be: DockerImage MavenArtifact |
relatedTags | array | Output only. A list of related tags. Will contain up to 100 tags that reference this version. |
updateTime | string (google-datetime) | The time when the version was last updated. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , repositoriesId , packagesId , versionsId | view | Gets a version |
list | select | projectsId , locationsId , repositoriesId , packagesId | pageSize , pageToken , view , orderBy , filter | Lists versions. |
patch | update | projectsId , locationsId , repositoriesId , packagesId , versionsId | updateMask | Updates a version. |
delete | delete | projectsId , locationsId , repositoriesId , packagesId , versionsId | force | Deletes a version and all of its content. The returned operation will complete once the version has been deleted. |
batch_delete | delete | projectsId , locationsId , repositoriesId , packagesId | Deletes multiple versions across a repository. The returned operation will complete once the versions have been deleted. |
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 |
---|---|---|
locationsId | string | |
packagesId | string | |
projectsId | string | |
repositoriesId | string | |
versionsId | string | |
filter | string | |
force | boolean | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) | |
view | string |
SELECT
examples
- get
- list
Gets a version
SELECT
name,
annotations,
createTime,
description,
metadata,
relatedTags,
updateTime
FROM google.artifactregistry.versions
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND repositoriesId = '{{ repositoriesId }}' -- required
AND packagesId = '{{ packagesId }}' -- required
AND versionsId = '{{ versionsId }}' -- required
AND view = '{{ view }}';
Lists versions.
SELECT
name,
annotations,
createTime,
description,
metadata,
relatedTags,
updateTime
FROM google.artifactregistry.versions
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND repositoriesId = '{{ repositoriesId }}' -- required
AND packagesId = '{{ packagesId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND view = '{{ view }}'
AND orderBy = '{{ orderBy }}'
AND filter = '{{ filter }}';
UPDATE
examples
- patch
Updates a version.
UPDATE google.artifactregistry.versions
SET
data__name = '{{ name }}',
data__description = '{{ description }}',
data__createTime = '{{ createTime }}',
data__updateTime = '{{ updateTime }}',
data__relatedTags = '{{ relatedTags }}',
data__annotations = '{{ annotations }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND repositoriesId = '{{ repositoriesId }}' --required
AND packagesId = '{{ packagesId }}' --required
AND versionsId = '{{ versionsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
annotations,
createTime,
description,
metadata,
relatedTags,
updateTime;
DELETE
examples
- delete
- batch_delete
Deletes a version and all of its content. The returned operation will complete once the version has been deleted.
DELETE FROM google.artifactregistry.versions
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND repositoriesId = '{{ repositoriesId }}' --required
AND packagesId = '{{ packagesId }}' --required
AND versionsId = '{{ versionsId }}' --required
AND force = '{{ force }}';
Deletes multiple versions across a repository. The returned operation will complete once the versions have been deleted.
DELETE FROM google.artifactregistry.versions
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND repositoriesId = '{{ repositoriesId }}' --required
AND packagesId = '{{ packagesId }}' --required;