1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. artifactregistry
  5. getPackages
Google Cloud v9.4.0 published on Tuesday, Nov 4, 2025 by Pulumi

gcp.artifactregistry.getPackages

Start a Neo task
Explain and create a gcp.artifactregistry.getPackages resource
gcp logo
Google Cloud v9.4.0 published on Tuesday, Nov 4, 2025 by Pulumi

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const myImages = gcp.artifactregistry.getPackages({
        location: "us-central1",
        repositoryId: "example-repo",
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    my_images = gcp.artifactregistry.get_packages(location="us-central1",
        repository_id="example-repo")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/artifactregistry"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := artifactregistry.GetPackages(ctx, &artifactregistry.GetPackagesArgs{
    			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.GetPackages.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.GetPackagesArgs;
    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.getPackages(GetPackagesArgs.builder()
                .location("us-central1")
                .repositoryId("example-repo")
                .build());
    
        }
    }
    
    variables:
      myImages:
        fn::invoke:
          function: gcp:artifactregistry:getPackages
          arguments:
            location: us-central1
            repositoryId: example-repo
    

    Using getPackages

    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 getPackages(args: GetPackagesArgs, opts?: InvokeOptions): Promise<GetPackagesResult>
    function getPackagesOutput(args: GetPackagesOutputArgs, opts?: InvokeOptions): Output<GetPackagesResult>
    def get_packages(filter: Optional[str] = None,
                     location: Optional[str] = None,
                     project: Optional[str] = None,
                     repository_id: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetPackagesResult
    def get_packages_output(filter: Optional[pulumi.Input[str]] = None,
                     location: Optional[pulumi.Input[str]] = None,
                     project: Optional[pulumi.Input[str]] = None,
                     repository_id: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetPackagesResult]
    func GetPackages(ctx *Context, args *GetPackagesArgs, opts ...InvokeOption) (*GetPackagesResult, error)
    func GetPackagesOutput(ctx *Context, args *GetPackagesOutputArgs, opts ...InvokeOption) GetPackagesResultOutput

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

    public static class GetPackages 
    {
        public static Task<GetPackagesResult> InvokeAsync(GetPackagesArgs args, InvokeOptions? opts = null)
        public static Output<GetPackagesResult> Invoke(GetPackagesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPackagesResult> getPackages(GetPackagesArgs args, InvokeOptions options)
    public static Output<GetPackagesResult> getPackages(GetPackagesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: gcp:artifactregistry/getPackages:getPackages
      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.
    Filter string
    An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are name and annotations. Further information can be found in the REST API.
    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.
    Filter string
    An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are name and annotations. Further information can be found in the REST API.
    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.
    filter String
    An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are name and annotations. Further information can be found in the REST API.
    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.
    filter string
    An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are name and annotations. Further information can be found in the REST API.
    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.
    filter str
    An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are name and annotations. Further information can be found in the REST API.
    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.
    filter String
    An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are name and annotations. Further information can be found in the REST API.
    project String
    The project ID in which the resource belongs. If it is not provided, the provider project is used.

    getPackages Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    Packages List<GetPackagesPackage>
    A list of all retrieved Artifact Registry packages. Structure is defined below.
    RepositoryId string
    Filter string
    Project string
    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    Packages []GetPackagesPackage
    A list of all retrieved Artifact Registry packages. Structure is defined below.
    RepositoryId string
    Filter string
    Project string
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    packages List<GetPackagesPackage>
    A list of all retrieved Artifact Registry packages. Structure is defined below.
    repositoryId String
    filter String
    project String
    id string
    The provider-assigned unique ID for this managed resource.
    location string
    packages GetPackagesPackage[]
    A list of all retrieved Artifact Registry packages. Structure is defined below.
    repositoryId string
    filter string
    project string
    id str
    The provider-assigned unique ID for this managed resource.
    location str
    packages Sequence[GetPackagesPackage]
    A list of all retrieved Artifact Registry packages. Structure is defined below.
    repository_id str
    filter str
    project str
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    packages List<Property Map>
    A list of all retrieved Artifact Registry packages. Structure is defined below.
    repositoryId String
    filter String
    project String

    Supporting Types

    GetPackagesPackage

    Annotations Dictionary<string, string>
    Client specified annotations.
    CreateTime string
    The time, as a RFC 3339 string, this package was created.
    DisplayName string
    The display name of the package.
    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.
    UpdateTime string
    The time, as a RFC 3339 string, this package was last updated. This includes publishing a new version of the package.
    Annotations map[string]string
    Client specified annotations.
    CreateTime string
    The time, as a RFC 3339 string, this package was created.
    DisplayName string
    The display name of the package.
    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.
    UpdateTime string
    The time, as a RFC 3339 string, this package was last updated. This includes publishing a new version of the package.
    annotations Map<String,String>
    Client specified annotations.
    createTime String
    The time, as a RFC 3339 string, this package was created.
    displayName String
    The display name of the package.
    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.
    updateTime String
    The time, as a RFC 3339 string, this package was last updated. This includes publishing a new version of the package.
    annotations {[key: string]: string}
    Client specified annotations.
    createTime string
    The time, as a RFC 3339 string, this package was created.
    displayName string
    The display name of the package.
    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.
    updateTime string
    The time, as a RFC 3339 string, this package was last updated. This includes publishing a new version of the package.
    annotations Mapping[str, str]
    Client specified annotations.
    create_time str
    The time, as a RFC 3339 string, this package was created.
    display_name str
    The display name of the package.
    name str
    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.
    update_time str
    The time, as a RFC 3339 string, this package was last updated. This includes publishing a new version of the package.
    annotations Map<String>
    Client specified annotations.
    createTime String
    The time, as a RFC 3339 string, this package was created.
    displayName String
    The display name of the package.
    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.
    updateTime String
    The time, as a RFC 3339 string, this package was last updated. This includes publishing a new version of the package.

    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 v9.4.0 published on Tuesday, Nov 4, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate