1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. artifactregistry
  5. getDockerImages
Google Cloud v8.41.1 published on Monday, Aug 25, 2025 by Pulumi

gcp.artifactregistry.getDockerImages

Explore with Pulumi AI

gcp logo
Google Cloud v8.41.1 published on Monday, Aug 25, 2025 by Pulumi

    Get information about Artifact Registry Docker images. See the official documentation and API.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const myImages = gcp.artifactregistry.getDockerImages({
        location: "us-central1",
        repositoryId: "example-repo",
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    my_images = gcp.artifactregistry.get_docker_images(location="us-central1",
        repository_id="example-repo")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/artifactregistry"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := artifactregistry.GetDockerImages(ctx, &artifactregistry.GetDockerImagesArgs{
    			Location:     "us-central1",
    			RepositoryId: "example-repo",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var myImages = Gcp.ArtifactRegistry.GetDockerImages.Invoke(new()
        {
            Location = "us-central1",
            RepositoryId = "example-repo",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.artifactregistry.ArtifactregistryFunctions;
    import com.pulumi.gcp.artifactregistry.inputs.GetDockerImagesArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var myImages = ArtifactregistryFunctions.getDockerImages(GetDockerImagesArgs.builder()
                .location("us-central1")
                .repositoryId("example-repo")
                .build());
    
        }
    }
    
    variables:
      myImages:
        fn::invoke:
          function: gcp:artifactregistry:getDockerImages
          arguments:
            location: us-central1
            repositoryId: example-repo
    

    Using getDockerImages

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getDockerImages(args: GetDockerImagesArgs, opts?: InvokeOptions): Promise<GetDockerImagesResult>
    function getDockerImagesOutput(args: GetDockerImagesOutputArgs, opts?: InvokeOptions): Output<GetDockerImagesResult>
    def get_docker_images(location: Optional[str] = None,
                          project: Optional[str] = None,
                          repository_id: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetDockerImagesResult
    def get_docker_images_output(location: Optional[pulumi.Input[str]] = None,
                          project: Optional[pulumi.Input[str]] = None,
                          repository_id: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetDockerImagesResult]
    func GetDockerImages(ctx *Context, args *GetDockerImagesArgs, opts ...InvokeOption) (*GetDockerImagesResult, error)
    func GetDockerImagesOutput(ctx *Context, args *GetDockerImagesOutputArgs, opts ...InvokeOption) GetDockerImagesResultOutput

    > Note: This function is named GetDockerImages in the Go SDK.

    public static class GetDockerImages 
    {
        public static Task<GetDockerImagesResult> InvokeAsync(GetDockerImagesArgs args, InvokeOptions? opts = null)
        public static Output<GetDockerImagesResult> Invoke(GetDockerImagesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDockerImagesResult> getDockerImages(GetDockerImagesArgs args, InvokeOptions options)
    public static Output<GetDockerImagesResult> getDockerImages(GetDockerImagesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: gcp:artifactregistry/getDockerImages:getDockerImages
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Location string
    The location of the Artifact Registry repository.
    RepositoryId string
    The last part of the repository name to fetch from.
    Project string
    The project ID in which the resource belongs. If it is not provided, the provider project is used.
    Location string
    The location of the Artifact Registry repository.
    RepositoryId string
    The last part of the repository name to fetch from.
    Project string
    The project ID in which the resource belongs. If it is not provided, the provider project is used.
    location String
    The location of the Artifact Registry repository.
    repositoryId String
    The last part of the repository name to fetch from.
    project String
    The project ID in which the resource belongs. If it is not provided, the provider project is used.
    location string
    The location of the Artifact Registry repository.
    repositoryId string
    The last part of the repository name to fetch from.
    project string
    The project ID in which the resource belongs. If it is not provided, the provider project is used.
    location str
    The location of the Artifact Registry repository.
    repository_id str
    The last part of the repository name to fetch from.
    project str
    The project ID in which the resource belongs. If it is not provided, the provider project is used.
    location String
    The location of the Artifact Registry repository.
    repositoryId String
    The last part of the repository name to fetch from.
    project String
    The project ID in which the resource belongs. If it is not provided, the provider project is used.

    getDockerImages Result

    The following output properties are available:

    DockerImages List<GetDockerImagesDockerImage>
    A list of all retrieved Artifact Registry Docker images. Structure is defined below.
    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    RepositoryId string
    Project string
    DockerImages []GetDockerImagesDockerImage
    A list of all retrieved Artifact Registry Docker images. Structure is defined below.
    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    RepositoryId string
    Project string
    dockerImages List<GetDockerImagesDockerImage>
    A list of all retrieved Artifact Registry Docker images. Structure is defined below.
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    repositoryId String
    project String
    dockerImages GetDockerImagesDockerImage[]
    A list of all retrieved Artifact Registry Docker images. Structure is defined below.
    id string
    The provider-assigned unique ID for this managed resource.
    location string
    repositoryId string
    project string
    docker_images Sequence[GetDockerImagesDockerImage]
    A list of all retrieved Artifact Registry Docker images. Structure is defined below.
    id str
    The provider-assigned unique ID for this managed resource.
    location str
    repository_id str
    project str
    dockerImages List<Property Map>
    A list of all retrieved Artifact Registry Docker images. Structure is defined below.
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    repositoryId String
    project String

    Supporting Types

    GetDockerImagesDockerImage

    BuildTime string
    The time, as a RFC 3339 string, this image was built.
    ImageName string
    Extracted short name of the image (last part of name, without tag or digest). For example, from .../nginx@sha256:...nginx.
    ImageSizeBytes string
    Calculated size of the image in bytes.
    MediaType string
    Media type of this image, e.g. application/vnd.docker.distribution.manifest.v2+json.
    Name string
    The fully qualified name of the fetched image. This name has the form: projects/{{project}}/locations/{{location}}/repository/{{repository_id}}/dockerImages/{{docker_image}}. For example, projects/test-project/locations/us-west4/repositories/test-repo/dockerImages/nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf
    SelfLink string
    The URI to access the image. For example, us-west4-docker.pkg.dev/test-project/test-repo/nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf
    Tags List<string>
    A list of all tags associated with the image.
    UpdateTime string
    The time, as a RFC 3339 string, this image was updated.
    UploadTime string
    The time, as a RFC 3339 string, the image was uploaded. For example, 2014-10-02T15:01:23.045123456Z.
    BuildTime string
    The time, as a RFC 3339 string, this image was built.
    ImageName string
    Extracted short name of the image (last part of name, without tag or digest). For example, from .../nginx@sha256:...nginx.
    ImageSizeBytes string
    Calculated size of the image in bytes.
    MediaType string
    Media type of this image, e.g. application/vnd.docker.distribution.manifest.v2+json.
    Name string
    The fully qualified name of the fetched image. This name has the form: projects/{{project}}/locations/{{location}}/repository/{{repository_id}}/dockerImages/{{docker_image}}. For example, projects/test-project/locations/us-west4/repositories/test-repo/dockerImages/nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf
    SelfLink string
    The URI to access the image. For example, us-west4-docker.pkg.dev/test-project/test-repo/nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf
    Tags []string
    A list of all tags associated with the image.
    UpdateTime string
    The time, as a RFC 3339 string, this image was updated.
    UploadTime string
    The time, as a RFC 3339 string, the image was uploaded. For example, 2014-10-02T15:01:23.045123456Z.
    buildTime String
    The time, as a RFC 3339 string, this image was built.
    imageName String
    Extracted short name of the image (last part of name, without tag or digest). For example, from .../nginx@sha256:...nginx.
    imageSizeBytes String
    Calculated size of the image in bytes.
    mediaType String
    Media type of this image, e.g. application/vnd.docker.distribution.manifest.v2+json.
    name String
    The fully qualified name of the fetched image. This name has the form: projects/{{project}}/locations/{{location}}/repository/{{repository_id}}/dockerImages/{{docker_image}}. For example, projects/test-project/locations/us-west4/repositories/test-repo/dockerImages/nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf
    selfLink String
    The URI to access the image. For example, us-west4-docker.pkg.dev/test-project/test-repo/nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf
    tags List<String>
    A list of all tags associated with the image.
    updateTime String
    The time, as a RFC 3339 string, this image was updated.
    uploadTime String
    The time, as a RFC 3339 string, the image was uploaded. For example, 2014-10-02T15:01:23.045123456Z.
    buildTime string
    The time, as a RFC 3339 string, this image was built.
    imageName string
    Extracted short name of the image (last part of name, without tag or digest). For example, from .../nginx@sha256:...nginx.
    imageSizeBytes string
    Calculated size of the image in bytes.
    mediaType string
    Media type of this image, e.g. application/vnd.docker.distribution.manifest.v2+json.
    name string
    The fully qualified name of the fetched image. This name has the form: projects/{{project}}/locations/{{location}}/repository/{{repository_id}}/dockerImages/{{docker_image}}. For example, projects/test-project/locations/us-west4/repositories/test-repo/dockerImages/nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf
    selfLink string
    The URI to access the image. For example, us-west4-docker.pkg.dev/test-project/test-repo/nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf
    tags string[]
    A list of all tags associated with the image.
    updateTime string
    The time, as a RFC 3339 string, this image was updated.
    uploadTime string
    The time, as a RFC 3339 string, the image was uploaded. For example, 2014-10-02T15:01:23.045123456Z.
    build_time str
    The time, as a RFC 3339 string, this image was built.
    image_name str
    Extracted short name of the image (last part of name, without tag or digest). For example, from .../nginx@sha256:...nginx.
    image_size_bytes str
    Calculated size of the image in bytes.
    media_type str
    Media type of this image, e.g. application/vnd.docker.distribution.manifest.v2+json.
    name str
    The fully qualified name of the fetched image. This name has the form: projects/{{project}}/locations/{{location}}/repository/{{repository_id}}/dockerImages/{{docker_image}}. For example, projects/test-project/locations/us-west4/repositories/test-repo/dockerImages/nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf
    self_link str
    The URI to access the image. For example, us-west4-docker.pkg.dev/test-project/test-repo/nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf
    tags Sequence[str]
    A list of all tags associated with the image.
    update_time str
    The time, as a RFC 3339 string, this image was updated.
    upload_time str
    The time, as a RFC 3339 string, the image was uploaded. For example, 2014-10-02T15:01:23.045123456Z.
    buildTime String
    The time, as a RFC 3339 string, this image was built.
    imageName String
    Extracted short name of the image (last part of name, without tag or digest). For example, from .../nginx@sha256:...nginx.
    imageSizeBytes String
    Calculated size of the image in bytes.
    mediaType String
    Media type of this image, e.g. application/vnd.docker.distribution.manifest.v2+json.
    name String
    The fully qualified name of the fetched image. This name has the form: projects/{{project}}/locations/{{location}}/repository/{{repository_id}}/dockerImages/{{docker_image}}. For example, projects/test-project/locations/us-west4/repositories/test-repo/dockerImages/nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf
    selfLink String
    The URI to access the image. For example, us-west4-docker.pkg.dev/test-project/test-repo/nginx@sha256:e9954c1fc875017be1c3e36eca16be2d9e9bccc4bf072163515467d6a823c7cf
    tags List<String>
    A list of all tags associated with the image.
    updateTime String
    The time, as a RFC 3339 string, this image was updated.
    uploadTime String
    The time, as a RFC 3339 string, the image was uploaded. For example, 2014-10-02T15:01:23.045123456Z.

    Package Details

    Repository
    Google Cloud (GCP) Classic pulumi/pulumi-gcp
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the google-beta Terraform Provider.
    gcp logo
    Google Cloud v8.41.1 published on Monday, Aug 25, 2025 by Pulumi