Google Cloud Artifact Registry V1 Client - Class DockerImage (0.5.1)

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
NameDescription
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
TypeDescription
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
NameDescription
var string
Returns
TypeDescription
$this

getUri

Required. URL to access the image.

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

Returns
TypeDescription
string

setUri

Required. URL to access the image.

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

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getTags

Tags attached to this image.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setTags

Tags attached to this image.

Parameter
NameDescription
var string[]
Returns
TypeDescription
$this

getImageSizeBytes

Calculated size of the image.

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

Returns
TypeDescription
int|string

setImageSizeBytes

Calculated size of the image.

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

Parameter
NameDescription
var int|string
Returns
TypeDescription
$this

getUploadTime

Time the image was uploaded.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasUploadTime

clearUploadTime

setUploadTime

Time the image was uploaded.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$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
TypeDescription
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
NameDescription
var string
Returns
TypeDescription
$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
TypeDescription
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
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getUpdateTime

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

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasUpdateTime

clearUpdateTime

setUpdateTime

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

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this