AzureDevOps

Pulumi Official
Package maintained by Pulumi
v2.4.0 published on Friday, Apr 22, 2022 by Pulumi

getRepositories

Deprecated:

azuredevops.repository.getRepositories has been deprecated in favor of azuredevops.getRepositories

Use this data source to access information about multiple existing Git Repositories within Azure DevOps. To read informations about a single Git Repository use the data source azuredevops.Git

Example Usage

using Pulumi;
using AzureDevOps = Pulumi.AzureDevOps;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(AzureDevOps.GetProject.InvokeAsync(new AzureDevOps.GetProjectArgs
        {
            Name = "Example Project",
        }));
        var example_all_repos = example.Apply(example => Output.Create(AzureDevOps.GetRepositories.InvokeAsync(new AzureDevOps.GetRepositoriesArgs
        {
            ProjectId = example.Id,
            IncludeHidden = true,
        })));
        var example_single_repo = example.Apply(example => Output.Create(AzureDevOps.GetRepositories.InvokeAsync(new AzureDevOps.GetRepositoriesArgs
        {
            ProjectId = example.Id,
            Name = "Example Repository",
        })));
    }

}
package main

import (
	"github.com/pulumi/pulumi-azuredevops/sdk/v2/go/azuredevops"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := azuredevops.LookupProject(ctx, &GetProjectArgs{
			Name: pulumi.StringRef("Example Project"),
		}, nil)
		if err != nil {
			return err
		}
		_, err = azuredevops.GetRepositories(ctx, &GetRepositoriesArgs{
			ProjectId:     pulumi.StringRef(example.Id),
			IncludeHidden: pulumi.BoolRef(true),
		}, nil)
		if err != nil {
			return err
		}
		_, err = azuredevops.GetRepositories(ctx, &GetRepositoriesArgs{
			ProjectId: pulumi.StringRef(example.Id),
			Name:      pulumi.StringRef("Example Repository"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_azuredevops as azuredevops

example = azuredevops.get_project(name="Example Project")
example_all_repos = azuredevops.get_repositories(project_id=example.id,
    include_hidden=True)
example_single_repo = azuredevops.get_repositories(project_id=example.id,
    name="Example Repository")
import * as pulumi from "@pulumi/pulumi";
import * as azuredevops from "@pulumi/azuredevops";

const example = azuredevops.getProject({
    name: "Example Project",
});
const example-all-repos = example.then(example => azuredevops.getRepositories({
    projectId: example.id,
    includeHidden: true,
}));
const example-single-repo = example.then(example => azuredevops.getRepositories({
    projectId: example.id,
    name: "Example Repository",
}));

Coming soon!

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(include_hidden: Optional[bool] = None,
                     name: Optional[str] = None,
                     project_id: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetRepositoriesResult
def get_repositories_output(include_hidden: Optional[pulumi.Input[bool]] = None,
                     name: Optional[pulumi.Input[str]] = None,
                     project_id: 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)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: azuredevops:Repository/getRepositories:getRepositories
  Arguments:
    # Arguments dictionary

The following arguments are supported:

IncludeHidden bool
Name string

Name of the Git repository to retrieve; requires project_id to be specified as well

ProjectId string

ID of project to list Git repositories

IncludeHidden bool
Name string

Name of the Git repository to retrieve; requires project_id to be specified as well

ProjectId string

ID of project to list Git repositories

includeHidden Boolean
name String

Name of the Git repository to retrieve; requires project_id to be specified as well

projectId String

ID of project to list Git repositories

includeHidden boolean
name string

Name of the Git repository to retrieve; requires project_id to be specified as well

projectId string

ID of project to list Git repositories

include_hidden bool
name str

Name of the Git repository to retrieve; requires project_id to be specified as well

project_id str

ID of project to list Git repositories

includeHidden Boolean
name String

Name of the Git repository to retrieve; requires project_id to be specified as well

projectId String

ID of project to list Git repositories

getRepositories Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Repositories List<Pulumi.AzureDevOps.Repository.Outputs.GetRepositoriesRepository>

A list of existing projects in your Azure DevOps Organization with details about every project which includes:

IncludeHidden bool
Name string

Git repository name.

ProjectId string

Project identifier to which the Git repository belongs.

Id string

The provider-assigned unique ID for this managed resource.

Repositories []GetRepositoriesRepository

A list of existing projects in your Azure DevOps Organization with details about every project which includes:

IncludeHidden bool
Name string

Git repository name.

ProjectId string

Project identifier to which the Git repository belongs.

id String

The provider-assigned unique ID for this managed resource.

repositories List<GetRepositories>

A list of existing projects in your Azure DevOps Organization with details about every project which includes:

includeHidden Boolean
name String

Git repository name.

projectId String

Project identifier to which the Git repository belongs.

id string

The provider-assigned unique ID for this managed resource.

repositories GetRepositoriesRepository[]

A list of existing projects in your Azure DevOps Organization with details about every project which includes:

includeHidden boolean
name string

Git repository name.

projectId string

Project identifier to which the Git repository belongs.

id str

The provider-assigned unique ID for this managed resource.

repositories GetRepositoriesRepository]

A list of existing projects in your Azure DevOps Organization with details about every project which includes:

include_hidden bool
name str

Git repository name.

project_id str

Project identifier to which the Git repository belongs.

id String

The provider-assigned unique ID for this managed resource.

repositories List<Property Map>

A list of existing projects in your Azure DevOps Organization with details about every project which includes:

includeHidden Boolean
name String

Git repository name.

projectId String

Project identifier to which the Git repository belongs.

Supporting Types

GetRepositoriesRepository

DefaultBranch string

The ref of the default branch.

Id string

Git repository identifier.

Name string

Name of the Git repository to retrieve; requires project_id to be specified as well

ProjectId string

ID of project to list Git repositories

RemoteUrl string

HTTPS Url to clone the Git repository

Size int

Compressed size (bytes) of the repository.

SshUrl string

SSH Url to clone the Git repository

Url string

Details REST API endpoint for the Git Repository.

WebUrl string

Url of the Git repository web view

DefaultBranch string

The ref of the default branch.

Id string

Git repository identifier.

Name string

Name of the Git repository to retrieve; requires project_id to be specified as well

ProjectId string

ID of project to list Git repositories

RemoteUrl string

HTTPS Url to clone the Git repository

Size int

Compressed size (bytes) of the repository.

SshUrl string

SSH Url to clone the Git repository

Url string

Details REST API endpoint for the Git Repository.

WebUrl string

Url of the Git repository web view

defaultBranch String

The ref of the default branch.

id String

Git repository identifier.

name String

Name of the Git repository to retrieve; requires project_id to be specified as well

projectId String

ID of project to list Git repositories

remoteUrl String

HTTPS Url to clone the Git repository

size Integer

Compressed size (bytes) of the repository.

sshUrl String

SSH Url to clone the Git repository

url String

Details REST API endpoint for the Git Repository.

webUrl String

Url of the Git repository web view

defaultBranch string

The ref of the default branch.

id string

Git repository identifier.

name string

Name of the Git repository to retrieve; requires project_id to be specified as well

projectId string

ID of project to list Git repositories

remoteUrl string

HTTPS Url to clone the Git repository

size number

Compressed size (bytes) of the repository.

sshUrl string

SSH Url to clone the Git repository

url string

Details REST API endpoint for the Git Repository.

webUrl string

Url of the Git repository web view

default_branch str

The ref of the default branch.

id str

Git repository identifier.

name str

Name of the Git repository to retrieve; requires project_id to be specified as well

project_id str

ID of project to list Git repositories

remote_url str

HTTPS Url to clone the Git repository

size int

Compressed size (bytes) of the repository.

ssh_url str

SSH Url to clone the Git repository

url str

Details REST API endpoint for the Git Repository.

web_url str

Url of the Git repository web view

defaultBranch String

The ref of the default branch.

id String

Git repository identifier.

name String

Name of the Git repository to retrieve; requires project_id to be specified as well

projectId String

ID of project to list Git repositories

remoteUrl String

HTTPS Url to clone the Git repository

size Number

Compressed size (bytes) of the repository.

sshUrl String

SSH Url to clone the Git repository

url String

Details REST API endpoint for the Git Repository.

webUrl String

Url of the Git repository web view

Package Details

Repository
https://github.com/pulumi/pulumi-azuredevops
License
Apache-2.0
Notes

This Pulumi package is based on the azuredevops Terraform Provider.