1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. artifactregistry
  5. getMavenArtifacts
Google Cloud v9.3.0 published on Tuesday, Oct 7, 2025 by Pulumi

gcp.artifactregistry.getMavenArtifacts

Deploy with Pulumi
gcp logo
Google Cloud v9.3.0 published on Tuesday, Oct 7, 2025 by Pulumi

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const myArtifacts = gcp.artifactregistry.getMavenArtifacts({
        location: "us-central1",
        repositoryId: "example-repo",
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    my_artifacts = gcp.artifactregistry.get_maven_artifacts(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.GetMavenArtifacts(ctx, &artifactregistry.GetMavenArtifactsArgs{
    			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 myArtifacts = Gcp.ArtifactRegistry.GetMavenArtifacts.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.GetMavenArtifactsArgs;
    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 myArtifacts = ArtifactregistryFunctions.getMavenArtifacts(GetMavenArtifactsArgs.builder()
                .location("us-central1")
                .repositoryId("example-repo")
                .build());
    
        }
    }
    
    variables:
      myArtifacts:
        fn::invoke:
          function: gcp:artifactregistry:getMavenArtifacts
          arguments:
            location: us-central1
            repositoryId: example-repo
    

    Using getMavenArtifacts

    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 getMavenArtifacts(args: GetMavenArtifactsArgs, opts?: InvokeOptions): Promise<GetMavenArtifactsResult>
    function getMavenArtifactsOutput(args: GetMavenArtifactsOutputArgs, opts?: InvokeOptions): Output<GetMavenArtifactsResult>
    def get_maven_artifacts(location: Optional[str] = None,
                            project: Optional[str] = None,
                            repository_id: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetMavenArtifactsResult
    def get_maven_artifacts_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[GetMavenArtifactsResult]
    func GetMavenArtifacts(ctx *Context, args *GetMavenArtifactsArgs, opts ...InvokeOption) (*GetMavenArtifactsResult, error)
    func GetMavenArtifactsOutput(ctx *Context, args *GetMavenArtifactsOutputArgs, opts ...InvokeOption) GetMavenArtifactsResultOutput

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

    public static class GetMavenArtifacts 
    {
        public static Task<GetMavenArtifactsResult> InvokeAsync(GetMavenArtifactsArgs args, InvokeOptions? opts = null)
        public static Output<GetMavenArtifactsResult> Invoke(GetMavenArtifactsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetMavenArtifactsResult> getMavenArtifacts(GetMavenArtifactsArgs args, InvokeOptions options)
    public static Output<GetMavenArtifactsResult> getMavenArtifacts(GetMavenArtifactsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: gcp:artifactregistry/getMavenArtifacts:getMavenArtifacts
      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.

    getMavenArtifacts Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    MavenArtifacts List<GetMavenArtifactsMavenArtifact>
    A list of all retrieved Artifact Registry Maven artifacts. Structure is defined below.
    RepositoryId string
    Project string
    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    MavenArtifacts []GetMavenArtifactsMavenArtifact
    A list of all retrieved Artifact Registry Maven artifacts. Structure is defined below.
    RepositoryId string
    Project string
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    mavenArtifacts List<GetMavenArtifactsMavenArtifact>
    A list of all retrieved Artifact Registry Maven artifacts. Structure is defined below.
    repositoryId String
    project String
    id string
    The provider-assigned unique ID for this managed resource.
    location string
    mavenArtifacts GetMavenArtifactsMavenArtifact[]
    A list of all retrieved Artifact Registry Maven artifacts. Structure is defined below.
    repositoryId string
    project string
    id str
    The provider-assigned unique ID for this managed resource.
    location str
    maven_artifacts Sequence[GetMavenArtifactsMavenArtifact]
    A list of all retrieved Artifact Registry Maven artifacts. Structure is defined below.
    repository_id str
    project str
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    mavenArtifacts List<Property Map>
    A list of all retrieved Artifact Registry Maven artifacts. Structure is defined below.
    repositoryId String
    project String

    Supporting Types

    GetMavenArtifactsMavenArtifact

    ArtifactId string
    The name of the artifact to fetch.
    CreateTime string
    The time the artifact was created.
    GroupId string
    Group ID for the artifact.
    Name string
    The fully qualified name of the fetched artifact. Format:

    projects/{{project}}/locations/{{location}}/repositories/{{repository_id}}/mavenArtifacts/{{group_id}}:{{artifact_id}}:{{version}}
    
    PomUri string
    URL to access the pom file of the artifact.
    UpdateTime string
    The time the artifact was last updated.
    Version string
    The version of the Maven artifact.
    ArtifactId string
    The name of the artifact to fetch.
    CreateTime string
    The time the artifact was created.
    GroupId string
    Group ID for the artifact.
    Name string
    The fully qualified name of the fetched artifact. Format:

    projects/{{project}}/locations/{{location}}/repositories/{{repository_id}}/mavenArtifacts/{{group_id}}:{{artifact_id}}:{{version}}
    
    PomUri string
    URL to access the pom file of the artifact.
    UpdateTime string
    The time the artifact was last updated.
    Version string
    The version of the Maven artifact.
    artifactId String
    The name of the artifact to fetch.
    createTime String
    The time the artifact was created.
    groupId String
    Group ID for the artifact.
    name String
    The fully qualified name of the fetched artifact. Format:

    projects/{{project}}/locations/{{location}}/repositories/{{repository_id}}/mavenArtifacts/{{group_id}}:{{artifact_id}}:{{version}}
    
    pomUri String
    URL to access the pom file of the artifact.
    updateTime String
    The time the artifact was last updated.
    version String
    The version of the Maven artifact.
    artifactId string
    The name of the artifact to fetch.
    createTime string
    The time the artifact was created.
    groupId string
    Group ID for the artifact.
    name string
    The fully qualified name of the fetched artifact. Format:

    projects/{{project}}/locations/{{location}}/repositories/{{repository_id}}/mavenArtifacts/{{group_id}}:{{artifact_id}}:{{version}}
    
    pomUri string
    URL to access the pom file of the artifact.
    updateTime string
    The time the artifact was last updated.
    version string
    The version of the Maven artifact.
    artifact_id str
    The name of the artifact to fetch.
    create_time str
    The time the artifact was created.
    group_id str
    Group ID for the artifact.
    name str
    The fully qualified name of the fetched artifact. Format:

    projects/{{project}}/locations/{{location}}/repositories/{{repository_id}}/mavenArtifacts/{{group_id}}:{{artifact_id}}:{{version}}
    
    pom_uri str
    URL to access the pom file of the artifact.
    update_time str
    The time the artifact was last updated.
    version str
    The version of the Maven artifact.
    artifactId String
    The name of the artifact to fetch.
    createTime String
    The time the artifact was created.
    groupId String
    Group ID for the artifact.
    name String
    The fully qualified name of the fetched artifact. Format:

    projects/{{project}}/locations/{{location}}/repositories/{{repository_id}}/mavenArtifacts/{{group_id}}:{{artifact_id}}:{{version}}
    
    pomUri String
    URL to access the pom file of the artifact.
    updateTime String
    The time the artifact was last updated.
    version String
    The version of the Maven artifact.

    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.3.0 published on Tuesday, Oct 7, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate