docker_images
Creates, updates, deletes, gets or lists a docker_images resource.
Overview
| Name | docker_images |
| Type | Resource |
| Id | google.artifactregistry.docker_images |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Required. registry_location, project_id, repository_name and image id forms a unique image name:projects//locations//repositories//dockerImages/. For example, "projects/test-project/locations/us-west4/repositories/test-repo/dockerImages/ nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf", where "us-west4" is the registry_location, "test-project" is the project_id, "test-repo" is the repository_name and "nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf" is the image's digest. |
artifactType | string | ArtifactType of this image, e.g. "application/vnd.example+type". If the subject_digest is set and no artifact_type is given, the media_type will be considered as the artifact_type. This field is returned as the metadata.artifactType field in the Version resource. |
buildTime | string (google-datetime) | The time this image was built. This field is returned as the 'metadata.buildTime' field in the Version resource. The build time is returned to the client as an RFC 3339 string, which can be easily used with the JavaScript Date constructor. |
imageManifests | array | Optional. For multi-arch images (manifest lists), this field contains the list of image manifests. |
imageSizeBytes | string (int64) | Calculated size of the image. This field is returned as the 'metadata.imageSizeBytes' field in the Version resource. |
mediaType | string | Media type of this image, e.g. "application/vnd.docker.distribution.manifest.v2+json". This field is returned as the 'metadata.mediaType' field in the Version resource. |
tags | array | Tags attached to this image. |
updateTime | string (google-datetime) | Output only. The time when the docker image was last updated. |
uploadTime | string (google-datetime) | Time the image was uploaded. |
uri | string | Required. URL to access the image. Example: us-west4-docker.pkg.dev/test-project/test-repo/nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf |
| Name | Datatype | Description |
|---|---|---|
name | string | Required. registry_location, project_id, repository_name and image id forms a unique image name:projects//locations//repositories//dockerImages/. For example, "projects/test-project/locations/us-west4/repositories/test-repo/dockerImages/ nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf", where "us-west4" is the registry_location, "test-project" is the project_id, "test-repo" is the repository_name and "nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf" is the image's digest. |
artifactType | string | ArtifactType of this image, e.g. "application/vnd.example+type". If the subject_digest is set and no artifact_type is given, the media_type will be considered as the artifact_type. This field is returned as the metadata.artifactType field in the Version resource. |
buildTime | string (google-datetime) | The time this image was built. This field is returned as the 'metadata.buildTime' field in the Version resource. The build time is returned to the client as an RFC 3339 string, which can be easily used with the JavaScript Date constructor. |
imageManifests | array | Optional. For multi-arch images (manifest lists), this field contains the list of image manifests. |
imageSizeBytes | string (int64) | Calculated size of the image. This field is returned as the 'metadata.imageSizeBytes' field in the Version resource. |
mediaType | string | Media type of this image, e.g. "application/vnd.docker.distribution.manifest.v2+json". This field is returned as the 'metadata.mediaType' field in the Version resource. |
tags | array | Tags attached to this image. |
updateTime | string (google-datetime) | Output only. The time when the docker image was last updated. |
uploadTime | string (google-datetime) | Time the image was uploaded. |
uri | string | Required. URL to access the image. Example: us-west4-docker.pkg.dev/test-project/test-repo/nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, locationsId, repositoriesId, dockerImagesId | Gets a docker image. | |
list | select | projectsId, locationsId, repositoriesId | pageSize, pageToken, orderBy | Lists docker images. |
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 |
|---|---|---|
dockerImagesId | string | |
locationsId | string | |
projectsId | string | |
repositoriesId | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string |
SELECT examples
- get
- list
Gets a docker image.
SELECT
name,
artifactType,
buildTime,
imageManifests,
imageSizeBytes,
mediaType,
tags,
updateTime,
uploadTime,
uri
FROM google.artifactregistry.docker_images
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND repositoriesId = '{{ repositoriesId }}' -- required
AND dockerImagesId = '{{ dockerImagesId }}' -- required
;
Lists docker images.
SELECT
name,
artifactType,
buildTime,
imageManifests,
imageSizeBytes,
mediaType,
tags,
updateTime,
uploadTime,
uri
FROM google.artifactregistry.docker_images
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND repositoriesId = '{{ repositoriesId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND orderBy = '{{ orderBy }}'
;