Google Cloud Artifact Registry V1 Client - Class DockerImage (1.0.0-RC1)

Reference documentation and code samples for the Google Cloud Artifact Registry V1 Client class DockerImage.

DockerImage represents a docker artifact.

The following fields are returned as untyped metadata in the Version resource, using camelcase keys (i.e. metadata.imageSizeBytes):

  • imageSizeBytes
  • mediaType
  • buildTime

Generated from protobuf message google.devtools.artifactregistry.v1.DockerImage

Namespace

Google \ Cloud \ ArtifactRegistry \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ name string

Required. registry_location, project_id, repository_name and image id forms a unique image name:projects/<project_id>/locations/<location>/repository/<repository_name>/dockerImages/<docker_image>. 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.

↳ uri string

Required. URL to access the image. Example: us-west4-docker.pkg.dev/test-project/test-repo/nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf

↳ tags array

Tags attached to this image.

↳ image_size_bytes int|string

Calculated size of the image. This field is returned as the 'metadata.imageSizeBytes' field in the Version resource.

↳ upload_time Google\Protobuf\Timestamp

Time the image was uploaded.

↳ media_type 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.

↳ build_time Google\Protobuf\Timestamp

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.

↳ update_time Google\Protobuf\Timestamp

Output only. The time when the docker image was last updated.

getName

Required. registry_location, project_id, repository_name and image id forms a unique image name:projects/<project_id>/locations/<location>/repository/<repository_name>/dockerImages/<docker_image>.

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.

Returns
Type Description
string

setName

Required. registry_location, project_id, repository_name and image id forms a unique image name:projects/<project_id>/locations/<location>/repository/<repository_name>/dockerImages/<docker_image>.

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.

Parameter
Name Description
var string
Returns
Type Description
$this

getUri

Required. URL to access the image.

Example: us-west4-docker.pkg.dev/test-project/test-repo/nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf

Returns
Type Description
string

setUri

Required. URL to access the image.

Example: us-west4-docker.pkg.dev/test-project/test-repo/nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf

Parameter
Name Description
var string
Returns
Type Description
$this

getTags

Tags attached to this image.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setTags

Tags attached to this image.

Parameter
Name Description
var string[]
Returns
Type Description
$this

getImageSizeBytes

Calculated size of the image.

This field is returned as the 'metadata.imageSizeBytes' field in the Version resource.

Returns
Type Description
int|string

setImageSizeBytes

Calculated size of the image.

This field is returned as the 'metadata.imageSizeBytes' field in the Version resource.

Parameter
Name Description
var int|string
Returns
Type Description
$this

getUploadTime

Time the image was uploaded.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasUploadTime

clearUploadTime

setUploadTime

Time the image was uploaded.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getMediaType

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.

Returns
Type Description
string

setMediaType

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.

Parameter
Name Description
var string
Returns
Type Description
$this

getBuildTime

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.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasBuildTime

clearBuildTime

setBuildTime

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.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getUpdateTime

Output only. The time when the docker image was last updated.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasUpdateTime

clearUpdateTime

setUpdateTime

Output only. The time when the docker image was last updated.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this