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

gcp.artifactregistry.getRepositories

Explore with Pulumi AI

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

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

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const example = gcp.artifactregistry.getRepositories({
        location: "us-central1",
        project: "my-project",
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    example = gcp.artifactregistry.get_repositories(location="us-central1",
        project="my-project")
    
    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.GetRepositories(ctx, &artifactregistry.GetRepositoriesArgs{
    			Location: "us-central1",
    			Project:  pulumi.StringRef("my-project"),
    		}, 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 example = Gcp.ArtifactRegistry.GetRepositories.Invoke(new()
        {
            Location = "us-central1",
            Project = "my-project",
        });
    
    });
    
    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.GetRepositoriesArgs;
    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 example = ArtifactregistryFunctions.getRepositories(GetRepositoriesArgs.builder()
                .location("us-central1")
                .project("my-project")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: gcp:artifactregistry:getRepositories
          arguments:
            location: us-central1
            project: my-project
    

    Using getRepositories

    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 getRepositories(args: GetRepositoriesArgs, opts?: InvokeOptions): Promise<GetRepositoriesResult>
    function getRepositoriesOutput(args: GetRepositoriesOutputArgs, opts?: InvokeOptions): Output<GetRepositoriesResult>
    def get_repositories(location: Optional[str] = None,
                         name_filter: Optional[str] = None,
                         project: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetRepositoriesResult
    def get_repositories_output(location: Optional[pulumi.Input[str]] = None,
                         name_filter: Optional[pulumi.Input[str]] = None,
                         project: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetRepositoriesResult]
    func GetRepositories(ctx *Context, args *GetRepositoriesArgs, opts ...InvokeOption) (*GetRepositoriesResult, error)
    func GetRepositoriesOutput(ctx *Context, args *GetRepositoriesOutputArgs, opts ...InvokeOption) GetRepositoriesResultOutput

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

    public static class GetRepositories 
    {
        public static Task<GetRepositoriesResult> InvokeAsync(GetRepositoriesArgs args, InvokeOptions? opts = null)
        public static Output<GetRepositoriesResult> Invoke(GetRepositoriesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetRepositoriesResult> getRepositories(GetRepositoriesArgs args, InvokeOptions options)
    public static Output<GetRepositoriesResult> getRepositories(GetRepositoriesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: gcp:artifactregistry/getRepositories:getRepositories
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Location string
    The location of the artifact registry repositories. eg us-central1.
    NameFilter string
    Optional. An expression for filtering the results by name. You can also use wildcards *. I.e. my-repo, *-repo, my-*, *-re*. For further information reach out to the API docs.
    Project string
    The ID of the project. If it is not provided, the provider project is used.
    Location string
    The location of the artifact registry repositories. eg us-central1.
    NameFilter string
    Optional. An expression for filtering the results by name. You can also use wildcards *. I.e. my-repo, *-repo, my-*, *-re*. For further information reach out to the API docs.
    Project string
    The ID of the project. If it is not provided, the provider project is used.
    location String
    The location of the artifact registry repositories. eg us-central1.
    nameFilter String
    Optional. An expression for filtering the results by name. You can also use wildcards *. I.e. my-repo, *-repo, my-*, *-re*. For further information reach out to the API docs.
    project String
    The ID of the project. If it is not provided, the provider project is used.
    location string
    The location of the artifact registry repositories. eg us-central1.
    nameFilter string
    Optional. An expression for filtering the results by name. You can also use wildcards *. I.e. my-repo, *-repo, my-*, *-re*. For further information reach out to the API docs.
    project string
    The ID of the project. If it is not provided, the provider project is used.
    location str
    The location of the artifact registry repositories. eg us-central1.
    name_filter str
    Optional. An expression for filtering the results by name. You can also use wildcards *. I.e. my-repo, *-repo, my-*, *-re*. For further information reach out to the API docs.
    project str
    The ID of the project. If it is not provided, the provider project is used.
    location String
    The location of the artifact registry repositories. eg us-central1.
    nameFilter String
    Optional. An expression for filtering the results by name. You can also use wildcards *. I.e. my-repo, *-repo, my-*, *-re*. For further information reach out to the API docs.
    project String
    The ID of the project. If it is not provided, the provider project is used.

    getRepositories Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    Repositories List<GetRepositoriesRepository>
    A list of all retrieved Artifact Registry repositories. Structure is defined below.
    NameFilter string
    Project string
    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    Repositories []GetRepositoriesRepository
    A list of all retrieved Artifact Registry repositories. Structure is defined below.
    NameFilter string
    Project string
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    repositories List<GetRepositoriesRepository>
    A list of all retrieved Artifact Registry repositories. Structure is defined below.
    nameFilter String
    project String
    id string
    The provider-assigned unique ID for this managed resource.
    location string
    repositories GetRepositoriesRepository[]
    A list of all retrieved Artifact Registry repositories. Structure is defined below.
    nameFilter string
    project string
    id str
    The provider-assigned unique ID for this managed resource.
    location str
    repositories Sequence[GetRepositoriesRepository]
    A list of all retrieved Artifact Registry repositories. Structure is defined below.
    name_filter str
    project str
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    repositories List<Property Map>
    A list of all retrieved Artifact Registry repositories. Structure is defined below.
    nameFilter String
    project String

    Supporting Types

    GetRepositoriesRepository

    CreateTime string
    The time when the repository was created.
    Description string
    The user-provided description of the repository.
    Format string
    The format of packages that are stored in the repository. Supported formats can be found here.
    Id string
    An identifier for the resource with format projects/{{project}}/locations/{{location}}/repositories/{{repository_id}}
    RepositoryId string
    The last part of the repository name, for example: "repo1"
    UpdateTime string
    The time when the repository was last updated.
    CreateTime string
    The time when the repository was created.
    Description string
    The user-provided description of the repository.
    Format string
    The format of packages that are stored in the repository. Supported formats can be found here.
    Id string
    An identifier for the resource with format projects/{{project}}/locations/{{location}}/repositories/{{repository_id}}
    RepositoryId string
    The last part of the repository name, for example: "repo1"
    UpdateTime string
    The time when the repository was last updated.
    createTime String
    The time when the repository was created.
    description String
    The user-provided description of the repository.
    format String
    The format of packages that are stored in the repository. Supported formats can be found here.
    id String
    An identifier for the resource with format projects/{{project}}/locations/{{location}}/repositories/{{repository_id}}
    repositoryId String
    The last part of the repository name, for example: "repo1"
    updateTime String
    The time when the repository was last updated.
    createTime string
    The time when the repository was created.
    description string
    The user-provided description of the repository.
    format string
    The format of packages that are stored in the repository. Supported formats can be found here.
    id string
    An identifier for the resource with format projects/{{project}}/locations/{{location}}/repositories/{{repository_id}}
    repositoryId string
    The last part of the repository name, for example: "repo1"
    updateTime string
    The time when the repository was last updated.
    create_time str
    The time when the repository was created.
    description str
    The user-provided description of the repository.
    format str
    The format of packages that are stored in the repository. Supported formats can be found here.
    id str
    An identifier for the resource with format projects/{{project}}/locations/{{location}}/repositories/{{repository_id}}
    repository_id str
    The last part of the repository name, for example: "repo1"
    update_time str
    The time when the repository was last updated.
    createTime String
    The time when the repository was created.
    description String
    The user-provided description of the repository.
    format String
    The format of packages that are stored in the repository. Supported formats can be found here.
    id String
    An identifier for the resource with format projects/{{project}}/locations/{{location}}/repositories/{{repository_id}}
    repositoryId String
    The last part of the repository name, for example: "repo1"
    updateTime String
    The time when the repository was last updated.

    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