/
getProject.ts
166 lines (160 loc) · 4.9 KB
/
getProject.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
// *** 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! ***
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
import * as utilities from "./utilities";
/**
* Provides details about a specific project in the gitlab provider. The results include the name of the project, path, description, default branch, etc.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gitlab from "@pulumi/gitlab";
*
* const example = gitlab.getProject({
* id: 30,
* });
* ```
*
* > This content is derived from https://github.com/terraform-providers/terraform-provider-gitlab/blob/master/website/docs/d/project.html.markdown.
*/
export function getProject(args: GetProjectArgs, opts?: pulumi.InvokeOptions): Promise<GetProjectResult> & GetProjectResult {
if (!opts) {
opts = {}
}
if (!opts.version) {
opts.version = utilities.getVersion();
}
const promise: Promise<GetProjectResult> = pulumi.runtime.invoke("gitlab:index/getProject:getProject", {
"archived": args.archived,
"defaultBranch": args.defaultBranch,
"description": args.description,
"httpUrlToRepo": args.httpUrlToRepo,
"id": args.id,
"issuesEnabled": args.issuesEnabled,
"lfsEnabled": args.lfsEnabled,
"mergeRequestsEnabled": args.mergeRequestsEnabled,
"name": args.name,
"namespaceId": args.namespaceId,
"path": args.path,
"pipelinesEnabled": args.pipelinesEnabled,
"requestAccessEnabled": args.requestAccessEnabled,
"runnersToken": args.runnersToken,
"snippetsEnabled": args.snippetsEnabled,
"sshUrlToRepo": args.sshUrlToRepo,
"visibilityLevel": args.visibilityLevel,
"webUrl": args.webUrl,
"wikiEnabled": args.wikiEnabled,
}, opts);
return pulumi.utils.liftProperties(promise, opts);
}
/**
* A collection of arguments for invoking getProject.
*/
export interface GetProjectArgs {
readonly archived?: boolean;
readonly defaultBranch?: string;
readonly description?: string;
readonly httpUrlToRepo?: string;
/**
* The integer that uniquely identifies the project within the gitlab install.
*/
readonly id: number;
readonly issuesEnabled?: boolean;
readonly lfsEnabled?: boolean;
readonly mergeRequestsEnabled?: boolean;
readonly name?: string;
readonly namespaceId?: number;
readonly path?: string;
readonly pipelinesEnabled?: boolean;
readonly requestAccessEnabled?: boolean;
readonly runnersToken?: string;
readonly snippetsEnabled?: boolean;
readonly sshUrlToRepo?: string;
readonly visibilityLevel?: string;
readonly webUrl?: string;
readonly wikiEnabled?: boolean;
}
/**
* A collection of values returned by getProject.
*/
export interface GetProjectResult {
/**
* Whether the project is in read-only mode (archived).
*/
readonly archived: boolean;
/**
* The default branch for the project.
*/
readonly defaultBranch: string;
/**
* A description of the project.
*/
readonly description: string;
/**
* URL that can be provided to `git clone` to clone the
* repository via HTTP.
*/
readonly httpUrlToRepo: string;
/**
* Integer that uniquely identifies the project within the gitlab install.
*/
readonly id: number;
/**
* Enable issue tracking for the project.
*/
readonly issuesEnabled: boolean;
/**
* Enable LFS for the project.
*/
readonly lfsEnabled: boolean;
/**
* Enable merge requests for the project.
*/
readonly mergeRequestsEnabled: boolean;
readonly name: string;
/**
* The namespace (group or user) of the project. Defaults to your user.
* See `gitlab..Group` for an example.
*/
readonly namespaceId: number;
/**
* The path of the repository.
*/
readonly path: string;
/**
* Enable pipelines for the project.
*/
readonly pipelinesEnabled: boolean;
/**
* Allow users to request member access.
*/
readonly requestAccessEnabled: boolean;
/**
* Registration token to use during runner setup.
*/
readonly runnersToken: string;
/**
* Enable snippets for the project.
*/
readonly snippetsEnabled: boolean;
/**
* URL that can be provided to `git clone` to clone the
* repository via SSH.
*/
readonly sshUrlToRepo: string;
/**
* Repositories are created as private by default.
*/
readonly visibilityLevel: string;
/**
* URL that can be used to find the project in a browser.
*/
readonly webUrl: string;
/**
* Enable wiki for the project.
*/
readonly wikiEnabled: boolean;
}