@pulumi/azuredevops
Version:
A Pulumi package for creating and managing Azure DevOps.
115 lines (114 loc) • 3.47 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* 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",
* }));
* ```
*/
export declare function getGitRepositoryFile(args: GetGitRepositoryFileArgs, opts?: pulumi.InvokeOptions): Promise<GetGitRepositoryFileResult>;
/**
* A collection of arguments for invoking getGitRepositoryFile.
*/
export interface GetGitRepositoryFileArgs {
/**
* The git branch to use. Conflicts with `tag`; one or the other must be specified.
*/
branch?: string;
/**
* The path of the file to get.
*/
file: string;
/**
* The ID of the Git repository.
*/
repositoryId: string;
/**
* The tag to use.Conflicts with `branch`; one or the other must be specified.
*/
tag?: string;
}
/**
* A collection of values returned by getGitRepositoryFile.
*/
export interface GetGitRepositoryFileResult {
readonly branch?: string;
/**
* The file content.
*/
readonly content: string;
readonly file: string;
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
/**
* The commit message for the file.
*/
readonly lastCommitMessage: string;
readonly repositoryId: string;
readonly tag?: string;
}
/**
* 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",
* }));
* ```
*/
export declare function getGitRepositoryFileOutput(args: GetGitRepositoryFileOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetGitRepositoryFileResult>;
/**
* A collection of arguments for invoking getGitRepositoryFile.
*/
export interface GetGitRepositoryFileOutputArgs {
/**
* The git branch to use. Conflicts with `tag`; one or the other must be specified.
*/
branch?: pulumi.Input<string>;
/**
* The path of the file to get.
*/
file: pulumi.Input<string>;
/**
* The ID of the Git repository.
*/
repositoryId: pulumi.Input<string>;
/**
* The tag to use.Conflicts with `branch`; one or the other must be specified.
*/
tag?: pulumi.Input<string>;
}