Module Repository

This page documents the language specification for the azuredevops package. If you're looking for help working with the inputs, outputs, or functions of azuredevops resources in a Pulumi program, please see the resource documentation for examples and API reference.

Resources

Functions

Others

Resources

Resource Git

class Git extends CustomResource

Manages a git repository within Azure DevOps.

Example Usage

Create Git repository
import * as pulumi from "@pulumi/pulumi";
import * as azuredevops from "@pulumi/azuredevops";

const project = new azuredevops.Core.Project("project", {
    projectName: "Sample Project",
    visibility: "private",
    versionControl: "Git",
    workItemTemplate: "Agile",
});
const repo = new azuredevops.Repository.Git("repo", {
    projectId: project.id,
    initialization: {
        initType: "Clean",
    },
});
Create Fork of another Azure DevOps Git repository
import * as pulumi from "@pulumi/pulumi";
import * as azuredevops from "@pulumi/azuredevops";

const repo = new azuredevops.Repository.Git("repo", {
    projectId: azuredevops_project.project.id,
    parentId: azuredevops_git_repository.parent.id,
});

constructor

new Git(name: string, args: GitArgs, opts?: pulumi.CustomResourceOptions)

Create a Git resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: GitState, opts?: pulumi.CustomResourceOptions): Git

Get an existing Git resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is Git

Returns true if the given object is an instance of Git. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property defaultBranch

public defaultBranch: pulumi.Output<string>;

The ref of the default branch.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property initialization

public initialization: pulumi.Output<GitInitialization | undefined>;

An initialization block as documented below.

property isFork

public isFork: pulumi.Output<boolean>;

True if the repository was created as a fork.

property name

public name: pulumi.Output<string>;

The name of the git repository.

property parentRepositoryId

public parentRepositoryId: pulumi.Output<string | undefined>;

property projectId

public projectId: pulumi.Output<string>;

The project ID or project name.

property remoteUrl

public remoteUrl: pulumi.Output<string>;

Git HTTPS URL of the repository

property size

public size: pulumi.Output<number>;

Size in bytes.

property sshUrl

public sshUrl: pulumi.Output<string>;

Git SSH URL of the repository.

property url

public url: pulumi.Output<string>;

REST API URL of the repository.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property webUrl

public webUrl: pulumi.Output<string>;

Web link to the repository.

Functions

Function getRepositories

getRepositories(args?: GetRepositoriesArgs, opts?: pulumi.InvokeOptions): Promise<GetRepositoriesResult>

Use this data source to access information about an existing Git Repositories within Azure DevOps.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azuredevops from "@pulumi/azuredevops";

const project = azuredevops.Core.getProject({
    projectName: "contoso-project",
});
const allRepos = project.then(project => azuredevops.Repository.getRepositories({
    projectId: project.id,
    includeHidden: true,
}));
const singleRepo = project.then(project => azuredevops.Repository.getRepositories({
    projectId: project.id,
    name: "contoso-repo",
}));

Others

interface GetRepositoriesArgs

interface GetRepositoriesArgs

A collection of arguments for invoking getRepositories.

property includeHidden

includeHidden?: undefined | false | true;

property name

name?: undefined | string;

property projectId

projectId?: undefined | string;

interface GetRepositoriesResult

interface GetRepositoriesResult

A collection of values returned by getRepositories.

property id

id: string;

The provider-assigned unique ID for this managed resource.

property includeHidden

includeHidden?: undefined | false | true;

property name

name?: undefined | string;

property projectId

projectId?: undefined | string;

property repositories

repositories: GetRepositoriesRepository[];

interface GitArgs

interface GitArgs

The set of arguments for constructing a Git resource.

property defaultBranch

defaultBranch?: pulumi.Input<string>;

The ref of the default branch.

property initialization

initialization?: pulumi.Input<GitInitialization>;

An initialization block as documented below.

property name

name?: pulumi.Input<string>;

The name of the git repository.

property parentRepositoryId

parentRepositoryId?: pulumi.Input<string>;

property projectId

projectId: pulumi.Input<string>;

The project ID or project name.

interface GitState

interface GitState

Input properties used for looking up and filtering Git resources.

property defaultBranch

defaultBranch?: pulumi.Input<string>;

The ref of the default branch.

property initialization

initialization?: pulumi.Input<GitInitialization>;

An initialization block as documented below.

property isFork

isFork?: pulumi.Input<boolean>;

True if the repository was created as a fork.

property name

name?: pulumi.Input<string>;

The name of the git repository.

property parentRepositoryId

parentRepositoryId?: pulumi.Input<string>;

property projectId

projectId?: pulumi.Input<string>;

The project ID or project name.

property remoteUrl

remoteUrl?: pulumi.Input<string>;

Git HTTPS URL of the repository

property size

size?: pulumi.Input<number>;

Size in bytes.

property sshUrl

sshUrl?: pulumi.Input<string>;

Git SSH URL of the repository.

property url

url?: pulumi.Input<string>;

REST API URL of the repository.

property webUrl

webUrl?: pulumi.Input<string>;

Web link to the repository.