UNPKG

@pulumi/azuredevops

Version:

A Pulumi package for creating and managing Azure DevOps.

76 lines 2.82 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.getGitRepositoryFileOutput = exports.getGitRepositoryFile = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Use this data source to get an existing Git Repository File. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azuredevops from "@pulumi/azuredevops"; * * const example = azuredevops.getProject({ * name: "Example Project", * }); * // Load a specific Git repository by name * const exampleGetGitRepository = example.then(example => azuredevops.getGitRepository({ * projectId: example.id, * name: "Example Repository", * })); * const exampleGetGitRepositoryFile = exampleGetGitRepository.then(exampleGetGitRepository => azuredevops.getGitRepositoryFile({ * repositoryId: exampleGetGitRepository.id, * branch: "refs/heads/main", * file: "MyFile.txt", * })); * ``` */ function getGitRepositoryFile(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("azuredevops:index/getGitRepositoryFile:getGitRepositoryFile", { "branch": args.branch, "file": args.file, "repositoryId": args.repositoryId, "tag": args.tag, }, opts); } exports.getGitRepositoryFile = getGitRepositoryFile; /** * Use this data source to get an existing Git Repository File. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azuredevops from "@pulumi/azuredevops"; * * const example = azuredevops.getProject({ * name: "Example Project", * }); * // Load a specific Git repository by name * const exampleGetGitRepository = example.then(example => azuredevops.getGitRepository({ * projectId: example.id, * name: "Example Repository", * })); * const exampleGetGitRepositoryFile = exampleGetGitRepository.then(exampleGetGitRepository => azuredevops.getGitRepositoryFile({ * repositoryId: exampleGetGitRepository.id, * branch: "refs/heads/main", * file: "MyFile.txt", * })); * ``` */ function getGitRepositoryFileOutput(args, opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("azuredevops:index/getGitRepositoryFile:getGitRepositoryFile", { "branch": args.branch, "file": args.file, "repositoryId": args.repositoryId, "tag": args.tag, }, opts); } exports.getGitRepositoryFileOutput = getGitRepositoryFileOutput; //# sourceMappingURL=getGitRepositoryFile.js.map