UNPKG

@pulumi/azuredevops

Version:

A Pulumi package for creating and managing Azure DevOps.

86 lines 3.37 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.getRepositoriesOutput = exports.getRepositories = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * 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) */ function getRepositories(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("azuredevops:index/getRepositories:getRepositories", { "includeHidden": args.includeHidden, "name": args.name, "projectId": args.projectId, }, opts); } exports.getRepositories = 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 * * ```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) */ function getRepositoriesOutput(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("azuredevops:index/getRepositories:getRepositories", { "includeHidden": args.includeHidden, "name": args.name, "projectId": args.projectId, }, opts); } exports.getRepositoriesOutput = getRepositoriesOutput; //# sourceMappingURL=getRepositories.js.map