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

gcp.artifactregistry.getTags

Explore with Pulumi AI

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

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const myTags = gcp.artifactregistry.getTags({
        location: "us-central1",
        repositoryId: "example-repo",
        packageName: "example-package",
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    my_tags = gcp.artifactregistry.get_tags(location="us-central1",
        repository_id="example-repo",
        package_name="example-package")
    
    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.GetTags(ctx, &artifactregistry.GetTagsArgs{
    			Location:     "us-central1",
    			RepositoryId: "example-repo",
    			PackageName:  "example-package",
    		}, 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 myTags = Gcp.ArtifactRegistry.GetTags.Invoke(new()
        {
            Location = "us-central1",
            RepositoryId = "example-repo",
            PackageName = "example-package",
        });
    
    });
    
    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.GetTagsArgs;
    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 myTags = ArtifactregistryFunctions.getTags(GetTagsArgs.builder()
                .location("us-central1")
                .repositoryId("example-repo")
                .packageName("example-package")
                .build());
    
        }
    }
    
    variables:
      myTags:
        fn::invoke:
          function: gcp:artifactregistry:getTags
          arguments:
            location: us-central1
            repositoryId: example-repo
            packageName: example-package
    

    Using getTags

    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 getTags(args: GetTagsArgs, opts?: InvokeOptions): Promise<GetTagsResult>
    function getTagsOutput(args: GetTagsOutputArgs, opts?: InvokeOptions): Output<GetTagsResult>
    def get_tags(filter: Optional[str] = None,
                 location: Optional[str] = None,
                 package_name: Optional[str] = None,
                 project: Optional[str] = None,
                 repository_id: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetTagsResult
    def get_tags_output(filter: Optional[pulumi.Input[str]] = None,
                 location: Optional[pulumi.Input[str]] = None,
                 package_name: Optional[pulumi.Input[str]] = None,
                 project: Optional[pulumi.Input[str]] = None,
                 repository_id: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetTagsResult]
    func GetTags(ctx *Context, args *GetTagsArgs, opts ...InvokeOption) (*GetTagsResult, error)
    func GetTagsOutput(ctx *Context, args *GetTagsOutputArgs, opts ...InvokeOption) GetTagsResultOutput

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

    public static class GetTags 
    {
        public static Task<GetTagsResult> InvokeAsync(GetTagsArgs args, InvokeOptions? opts = null)
        public static Output<GetTagsResult> Invoke(GetTagsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetTagsResult> getTags(GetTagsArgs args, InvokeOptions options)
    public static Output<GetTagsResult> getTags(GetTagsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: gcp:artifactregistry/getTags:getTags
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Location string
    The location of the Artifact Registry repository.
    PackageName string
    The name of the package.
    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 version. 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.
    PackageName string
    The name of the package.
    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 version. 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.
    packageName String
    The name of the package.
    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 version. 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.
    packageName string
    The name of the package.
    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 version. 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.
    package_name str
    The name of the package.
    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 version. 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.
    packageName String
    The name of the package.
    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 version. 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.

    getTags Result

    The following output properties are available:

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

    Supporting Types

    GetTagsTag

    Name string
    The name of the tag, for example: projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/tag1. If the package part contains slashes, the slashes are escaped.
    Version string
    The version of the tag.
    Name string
    The name of the tag, for example: projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/tag1. If the package part contains slashes, the slashes are escaped.
    Version string
    The version of the tag.
    name String
    The name of the tag, for example: projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/tag1. If the package part contains slashes, the slashes are escaped.
    version String
    The version of the tag.
    name string
    The name of the tag, for example: projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/tag1. If the package part contains slashes, the slashes are escaped.
    version string
    The version of the tag.
    name str
    The name of the tag, for example: projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/tag1. If the package part contains slashes, the slashes are escaped.
    version str
    The version of the tag.
    name String
    The name of the tag, for example: projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/tags/tag1. If the package part contains slashes, the slashes are escaped.
    version String
    The version of the tag.

    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