packages
Creates, updates, deletes, gets or lists a packages resource.
Overview
| Name | packages |
| Type | Resource |
| Id | google.artifactregistry.packages |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the package, for example: projects/p1/locations/us-central1/repositories/repo1/packages/pkg1. If the package ID part contains slashes, the slashes are escaped. |
annotations | object | Optional. Client specified annotations. |
createTime | string (google-datetime) | The time when the package was created. |
displayName | string | The display name of the package. |
updateTime | string (google-datetime) | The time when the package was last updated. This includes publishing a new version of the package. |
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the package, for example: projects/p1/locations/us-central1/repositories/repo1/packages/pkg1. If the package ID part contains slashes, the slashes are escaped. |
annotations | object | Optional. Client specified annotations. |
createTime | string (google-datetime) | The time when the package was created. |
displayName | string | The display name of the package. |
updateTime | string (google-datetime) | The time when the package was last updated. This includes publishing a new version of the package. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, locationsId, repositoriesId, packagesId | Gets a package. | |
list | select | projectsId, locationsId, repositoriesId | pageSize, pageToken, filter, orderBy | Lists packages. |
patch | update | projectsId, locationsId, repositoriesId, packagesId | updateMask | Updates a package. |
delete | delete | projectsId, locationsId, repositoriesId, packagesId | Deletes a package and all of its versions and tags. The returned operation will complete once the package has 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 | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT examples
- get
- list
Gets a package.
SELECT
name,
annotations,
createTime,
displayName,
updateTime
FROM google.artifactregistry.packages
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND repositoriesId = '{{ repositoriesId }}' -- required
AND packagesId = '{{ packagesId }}' -- required
;
Lists packages.
SELECT
name,
annotations,
createTime,
displayName,
updateTime
FROM google.artifactregistry.packages
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND repositoriesId = '{{ repositoriesId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}'
;
UPDATE examples
- patch
Updates a package.
UPDATE google.artifactregistry.packages
SET
data__name = '{{ name }}',
data__displayName = '{{ displayName }}',
data__createTime = '{{ createTime }}',
data__updateTime = '{{ updateTime }}',
data__annotations = '{{ annotations }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND repositoriesId = '{{ repositoriesId }}' --required
AND packagesId = '{{ packagesId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
annotations,
createTime,
displayName,
updateTime;
DELETE examples
- delete
Deletes a package and all of its versions and tags. The returned operation will complete once the package has been deleted.
DELETE FROM google.artifactregistry.packages
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND repositoriesId = '{{ repositoriesId }}' --required
AND packagesId = '{{ packagesId }}' --required
;