@pulumi/azuredevops
Version: 
A Pulumi package for creating and managing Azure DevOps.
123 lines (122 loc) • 4.21 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as outputs from "./types/output";
/**
 * 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
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azuredevops from "@pulumi/azuredevops";
 *
 * const example = azuredevops.getProject({
 *     name: "Example Project",
 * });
 * // Load all Git repositories of a project, which are accessible for the current user
 * const example_all_repos = example.then(example => azuredevops.getRepositories({
 *     projectId: example.id,
 *     includeHidden: true,
 * }));
 * // Load a specific Git repository by name
 * const example_single_repo = example.then(example => azuredevops.getRepositories({
 *     projectId: example.id,
 *     name: "Example Repository",
 * }));
 * ```
 *
 * ## Relevant Links
 *
 * - [Azure DevOps Service REST API 7.0 - Git API](https://docs.microsoft.com/en-us/rest/api/azure/devops/git/?view=azure-devops-rest-7.0)
 */
export declare function getRepositories(args?: GetRepositoriesArgs, opts?: pulumi.InvokeOptions): Promise<GetRepositoriesResult>;
/**
 * A collection of arguments for invoking getRepositories.
 */
export interface GetRepositoriesArgs {
    /**
     * Defaults to `false`.
     *
     * DataSource without specifying any arguments will return all Git repositories of an organization.
     */
    includeHidden?: boolean;
    /**
     * Name of the Git repository to retrieve; requires `projectId` to be specified as well
     */
    name?: string;
    /**
     * ID of project to list Git repositories
     */
    projectId?: string;
}
/**
 * A collection of values returned by getRepositories.
 */
export interface GetRepositoriesResult {
    /**
     * The provider-assigned unique ID for this managed resource.
     */
    readonly id: string;
    readonly includeHidden?: boolean;
    /**
     * Git repository name.
     */
    readonly name?: string;
    /**
     * Project identifier to which the Git repository belongs.
     */
    readonly projectId?: string;
    /**
     * A `repositories` blocks as documented below. A list of existing projects in your Azure DevOps Organization with details about every project.
     */
    readonly repositories: outputs.GetRepositoriesRepository[];
}
/**
 * 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
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azuredevops from "@pulumi/azuredevops";
 *
 * const example = azuredevops.getProject({
 *     name: "Example Project",
 * });
 * // Load all Git repositories of a project, which are accessible for the current user
 * const example_all_repos = example.then(example => azuredevops.getRepositories({
 *     projectId: example.id,
 *     includeHidden: true,
 * }));
 * // Load a specific Git repository by name
 * const example_single_repo = example.then(example => azuredevops.getRepositories({
 *     projectId: example.id,
 *     name: "Example Repository",
 * }));
 * ```
 *
 * ## Relevant Links
 *
 * - [Azure DevOps Service REST API 7.0 - Git API](https://docs.microsoft.com/en-us/rest/api/azure/devops/git/?view=azure-devops-rest-7.0)
 */
export declare function getRepositoriesOutput(args?: GetRepositoriesOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetRepositoriesResult>;
/**
 * A collection of arguments for invoking getRepositories.
 */
export interface GetRepositoriesOutputArgs {
    /**
     * Defaults to `false`.
     *
     * DataSource without specifying any arguments will return all Git repositories of an organization.
     */
    includeHidden?: pulumi.Input<boolean>;
    /**
     * Name of the Git repository to retrieve; requires `projectId` to be specified as well
     */
    name?: pulumi.Input<string>;
    /**
     * ID of project to list Git repositories
     */
    projectId?: pulumi.Input<string>;
}