pulumi-azuredevops 3.5.0a1735017670__py3-none-any.whl → 3.6.0a1735363298__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,479 @@
1
+ # coding=utf-8
2
+ # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
3
+ # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+
5
+ import copy
6
+ import warnings
7
+ import sys
8
+ import pulumi
9
+ import pulumi.runtime
10
+ from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
15
+ from . import _utilities
16
+
17
+ __all__ = ['ServiceEndpointGitLabArgs', 'ServiceEndpointGitLab']
18
+
19
+ @pulumi.input_type
20
+ class ServiceEndpointGitLabArgs:
21
+ def __init__(__self__, *,
22
+ api_token: pulumi.Input[str],
23
+ project_id: pulumi.Input[str],
24
+ service_endpoint_name: pulumi.Input[str],
25
+ url: pulumi.Input[str],
26
+ username: pulumi.Input[str],
27
+ authorization: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
28
+ description: Optional[pulumi.Input[str]] = None):
29
+ """
30
+ The set of arguments for constructing a ServiceEndpointGitLab resource.
31
+ :param pulumi.Input[str] api_token: The API token of the GitLab.
32
+ :param pulumi.Input[str] project_id: The ID of the project.
33
+ :param pulumi.Input[str] service_endpoint_name: The Service Endpoint name.
34
+ :param pulumi.Input[str] url: The server URL for GitLab. Example: `https://gitlab.com`.
35
+ :param pulumi.Input[str] username: The username used to login to GitLab.
36
+ """
37
+ pulumi.set(__self__, "api_token", api_token)
38
+ pulumi.set(__self__, "project_id", project_id)
39
+ pulumi.set(__self__, "service_endpoint_name", service_endpoint_name)
40
+ pulumi.set(__self__, "url", url)
41
+ pulumi.set(__self__, "username", username)
42
+ if authorization is not None:
43
+ pulumi.set(__self__, "authorization", authorization)
44
+ if description is not None:
45
+ pulumi.set(__self__, "description", description)
46
+
47
+ @property
48
+ @pulumi.getter(name="apiToken")
49
+ def api_token(self) -> pulumi.Input[str]:
50
+ """
51
+ The API token of the GitLab.
52
+ """
53
+ return pulumi.get(self, "api_token")
54
+
55
+ @api_token.setter
56
+ def api_token(self, value: pulumi.Input[str]):
57
+ pulumi.set(self, "api_token", value)
58
+
59
+ @property
60
+ @pulumi.getter(name="projectId")
61
+ def project_id(self) -> pulumi.Input[str]:
62
+ """
63
+ The ID of the project.
64
+ """
65
+ return pulumi.get(self, "project_id")
66
+
67
+ @project_id.setter
68
+ def project_id(self, value: pulumi.Input[str]):
69
+ pulumi.set(self, "project_id", value)
70
+
71
+ @property
72
+ @pulumi.getter(name="serviceEndpointName")
73
+ def service_endpoint_name(self) -> pulumi.Input[str]:
74
+ """
75
+ The Service Endpoint name.
76
+ """
77
+ return pulumi.get(self, "service_endpoint_name")
78
+
79
+ @service_endpoint_name.setter
80
+ def service_endpoint_name(self, value: pulumi.Input[str]):
81
+ pulumi.set(self, "service_endpoint_name", value)
82
+
83
+ @property
84
+ @pulumi.getter
85
+ def url(self) -> pulumi.Input[str]:
86
+ """
87
+ The server URL for GitLab. Example: `https://gitlab.com`.
88
+ """
89
+ return pulumi.get(self, "url")
90
+
91
+ @url.setter
92
+ def url(self, value: pulumi.Input[str]):
93
+ pulumi.set(self, "url", value)
94
+
95
+ @property
96
+ @pulumi.getter
97
+ def username(self) -> pulumi.Input[str]:
98
+ """
99
+ The username used to login to GitLab.
100
+ """
101
+ return pulumi.get(self, "username")
102
+
103
+ @username.setter
104
+ def username(self, value: pulumi.Input[str]):
105
+ pulumi.set(self, "username", value)
106
+
107
+ @property
108
+ @pulumi.getter
109
+ def authorization(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
110
+ return pulumi.get(self, "authorization")
111
+
112
+ @authorization.setter
113
+ def authorization(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
114
+ pulumi.set(self, "authorization", value)
115
+
116
+ @property
117
+ @pulumi.getter
118
+ def description(self) -> Optional[pulumi.Input[str]]:
119
+ return pulumi.get(self, "description")
120
+
121
+ @description.setter
122
+ def description(self, value: Optional[pulumi.Input[str]]):
123
+ pulumi.set(self, "description", value)
124
+
125
+
126
+ @pulumi.input_type
127
+ class _ServiceEndpointGitLabState:
128
+ def __init__(__self__, *,
129
+ api_token: Optional[pulumi.Input[str]] = None,
130
+ authorization: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
131
+ description: Optional[pulumi.Input[str]] = None,
132
+ project_id: Optional[pulumi.Input[str]] = None,
133
+ service_endpoint_name: Optional[pulumi.Input[str]] = None,
134
+ url: Optional[pulumi.Input[str]] = None,
135
+ username: Optional[pulumi.Input[str]] = None):
136
+ """
137
+ Input properties used for looking up and filtering ServiceEndpointGitLab resources.
138
+ :param pulumi.Input[str] api_token: The API token of the GitLab.
139
+ :param pulumi.Input[str] project_id: The ID of the project.
140
+ :param pulumi.Input[str] service_endpoint_name: The Service Endpoint name.
141
+ :param pulumi.Input[str] url: The server URL for GitLab. Example: `https://gitlab.com`.
142
+ :param pulumi.Input[str] username: The username used to login to GitLab.
143
+ """
144
+ if api_token is not None:
145
+ pulumi.set(__self__, "api_token", api_token)
146
+ if authorization is not None:
147
+ pulumi.set(__self__, "authorization", authorization)
148
+ if description is not None:
149
+ pulumi.set(__self__, "description", description)
150
+ if project_id is not None:
151
+ pulumi.set(__self__, "project_id", project_id)
152
+ if service_endpoint_name is not None:
153
+ pulumi.set(__self__, "service_endpoint_name", service_endpoint_name)
154
+ if url is not None:
155
+ pulumi.set(__self__, "url", url)
156
+ if username is not None:
157
+ pulumi.set(__self__, "username", username)
158
+
159
+ @property
160
+ @pulumi.getter(name="apiToken")
161
+ def api_token(self) -> Optional[pulumi.Input[str]]:
162
+ """
163
+ The API token of the GitLab.
164
+ """
165
+ return pulumi.get(self, "api_token")
166
+
167
+ @api_token.setter
168
+ def api_token(self, value: Optional[pulumi.Input[str]]):
169
+ pulumi.set(self, "api_token", value)
170
+
171
+ @property
172
+ @pulumi.getter
173
+ def authorization(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
174
+ return pulumi.get(self, "authorization")
175
+
176
+ @authorization.setter
177
+ def authorization(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
178
+ pulumi.set(self, "authorization", value)
179
+
180
+ @property
181
+ @pulumi.getter
182
+ def description(self) -> Optional[pulumi.Input[str]]:
183
+ return pulumi.get(self, "description")
184
+
185
+ @description.setter
186
+ def description(self, value: Optional[pulumi.Input[str]]):
187
+ pulumi.set(self, "description", value)
188
+
189
+ @property
190
+ @pulumi.getter(name="projectId")
191
+ def project_id(self) -> Optional[pulumi.Input[str]]:
192
+ """
193
+ The ID of the project.
194
+ """
195
+ return pulumi.get(self, "project_id")
196
+
197
+ @project_id.setter
198
+ def project_id(self, value: Optional[pulumi.Input[str]]):
199
+ pulumi.set(self, "project_id", value)
200
+
201
+ @property
202
+ @pulumi.getter(name="serviceEndpointName")
203
+ def service_endpoint_name(self) -> Optional[pulumi.Input[str]]:
204
+ """
205
+ The Service Endpoint name.
206
+ """
207
+ return pulumi.get(self, "service_endpoint_name")
208
+
209
+ @service_endpoint_name.setter
210
+ def service_endpoint_name(self, value: Optional[pulumi.Input[str]]):
211
+ pulumi.set(self, "service_endpoint_name", value)
212
+
213
+ @property
214
+ @pulumi.getter
215
+ def url(self) -> Optional[pulumi.Input[str]]:
216
+ """
217
+ The server URL for GitLab. Example: `https://gitlab.com`.
218
+ """
219
+ return pulumi.get(self, "url")
220
+
221
+ @url.setter
222
+ def url(self, value: Optional[pulumi.Input[str]]):
223
+ pulumi.set(self, "url", value)
224
+
225
+ @property
226
+ @pulumi.getter
227
+ def username(self) -> Optional[pulumi.Input[str]]:
228
+ """
229
+ The username used to login to GitLab.
230
+ """
231
+ return pulumi.get(self, "username")
232
+
233
+ @username.setter
234
+ def username(self, value: Optional[pulumi.Input[str]]):
235
+ pulumi.set(self, "username", value)
236
+
237
+
238
+ class ServiceEndpointGitLab(pulumi.CustomResource):
239
+ @overload
240
+ def __init__(__self__,
241
+ resource_name: str,
242
+ opts: Optional[pulumi.ResourceOptions] = None,
243
+ api_token: Optional[pulumi.Input[str]] = None,
244
+ authorization: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
245
+ description: Optional[pulumi.Input[str]] = None,
246
+ project_id: Optional[pulumi.Input[str]] = None,
247
+ service_endpoint_name: Optional[pulumi.Input[str]] = None,
248
+ url: Optional[pulumi.Input[str]] = None,
249
+ username: Optional[pulumi.Input[str]] = None,
250
+ __props__=None):
251
+ """
252
+ Manages an GitLab service endpoint within Azure DevOps. Using this service endpoint requires you to install: [GitLab Integration](https://marketplace.visualstudio.com/items?itemName=onlyutkarsh.gitlab-integration)
253
+
254
+ ## Example Usage
255
+
256
+ ```python
257
+ import pulumi
258
+ import pulumi_azuredevops as azuredevops
259
+
260
+ example = azuredevops.Project("example",
261
+ name="Example Project",
262
+ visibility="private",
263
+ version_control="Git",
264
+ work_item_template="Agile",
265
+ description="Managed by Pulumi")
266
+ example_service_endpoint_git_lab = azuredevops.ServiceEndpointGitLab("example",
267
+ project_id=example.id,
268
+ service_endpoint_name="Example GitLab",
269
+ url="https://gitlab.com",
270
+ username="username",
271
+ api_token="token",
272
+ description="Managed by Pulumi")
273
+ ```
274
+
275
+ ## Relevant Links
276
+
277
+ - [Azure DevOps Service REST API 7.0 - Endpoints](https://docs.microsoft.com/en-us/rest/api/azure/devops/serviceendpoint/endpoints?view=azure-devops-rest-7.0)
278
+
279
+ ## Import
280
+
281
+ Azure DevOps GitLab Service Endpoint can be imported using **projectID/serviceEndpointID** or **projectName/serviceEndpointID**
282
+
283
+ ```sh
284
+ $ pulumi import azuredevops:index/serviceEndpointGitLab:ServiceEndpointGitLab example 00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000
285
+ ```
286
+
287
+ :param str resource_name: The name of the resource.
288
+ :param pulumi.ResourceOptions opts: Options for the resource.
289
+ :param pulumi.Input[str] api_token: The API token of the GitLab.
290
+ :param pulumi.Input[str] project_id: The ID of the project.
291
+ :param pulumi.Input[str] service_endpoint_name: The Service Endpoint name.
292
+ :param pulumi.Input[str] url: The server URL for GitLab. Example: `https://gitlab.com`.
293
+ :param pulumi.Input[str] username: The username used to login to GitLab.
294
+ """
295
+ ...
296
+ @overload
297
+ def __init__(__self__,
298
+ resource_name: str,
299
+ args: ServiceEndpointGitLabArgs,
300
+ opts: Optional[pulumi.ResourceOptions] = None):
301
+ """
302
+ Manages an GitLab service endpoint within Azure DevOps. Using this service endpoint requires you to install: [GitLab Integration](https://marketplace.visualstudio.com/items?itemName=onlyutkarsh.gitlab-integration)
303
+
304
+ ## Example Usage
305
+
306
+ ```python
307
+ import pulumi
308
+ import pulumi_azuredevops as azuredevops
309
+
310
+ example = azuredevops.Project("example",
311
+ name="Example Project",
312
+ visibility="private",
313
+ version_control="Git",
314
+ work_item_template="Agile",
315
+ description="Managed by Pulumi")
316
+ example_service_endpoint_git_lab = azuredevops.ServiceEndpointGitLab("example",
317
+ project_id=example.id,
318
+ service_endpoint_name="Example GitLab",
319
+ url="https://gitlab.com",
320
+ username="username",
321
+ api_token="token",
322
+ description="Managed by Pulumi")
323
+ ```
324
+
325
+ ## Relevant Links
326
+
327
+ - [Azure DevOps Service REST API 7.0 - Endpoints](https://docs.microsoft.com/en-us/rest/api/azure/devops/serviceendpoint/endpoints?view=azure-devops-rest-7.0)
328
+
329
+ ## Import
330
+
331
+ Azure DevOps GitLab Service Endpoint can be imported using **projectID/serviceEndpointID** or **projectName/serviceEndpointID**
332
+
333
+ ```sh
334
+ $ pulumi import azuredevops:index/serviceEndpointGitLab:ServiceEndpointGitLab example 00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000
335
+ ```
336
+
337
+ :param str resource_name: The name of the resource.
338
+ :param ServiceEndpointGitLabArgs args: The arguments to use to populate this resource's properties.
339
+ :param pulumi.ResourceOptions opts: Options for the resource.
340
+ """
341
+ ...
342
+ def __init__(__self__, resource_name: str, *args, **kwargs):
343
+ resource_args, opts = _utilities.get_resource_args_opts(ServiceEndpointGitLabArgs, pulumi.ResourceOptions, *args, **kwargs)
344
+ if resource_args is not None:
345
+ __self__._internal_init(resource_name, opts, **resource_args.__dict__)
346
+ else:
347
+ __self__._internal_init(resource_name, *args, **kwargs)
348
+
349
+ def _internal_init(__self__,
350
+ resource_name: str,
351
+ opts: Optional[pulumi.ResourceOptions] = None,
352
+ api_token: Optional[pulumi.Input[str]] = None,
353
+ authorization: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
354
+ description: Optional[pulumi.Input[str]] = None,
355
+ project_id: Optional[pulumi.Input[str]] = None,
356
+ service_endpoint_name: Optional[pulumi.Input[str]] = None,
357
+ url: Optional[pulumi.Input[str]] = None,
358
+ username: Optional[pulumi.Input[str]] = None,
359
+ __props__=None):
360
+ opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
361
+ if not isinstance(opts, pulumi.ResourceOptions):
362
+ raise TypeError('Expected resource options to be a ResourceOptions instance')
363
+ if opts.id is None:
364
+ if __props__ is not None:
365
+ raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
366
+ __props__ = ServiceEndpointGitLabArgs.__new__(ServiceEndpointGitLabArgs)
367
+
368
+ if api_token is None and not opts.urn:
369
+ raise TypeError("Missing required property 'api_token'")
370
+ __props__.__dict__["api_token"] = None if api_token is None else pulumi.Output.secret(api_token)
371
+ __props__.__dict__["authorization"] = authorization
372
+ __props__.__dict__["description"] = description
373
+ if project_id is None and not opts.urn:
374
+ raise TypeError("Missing required property 'project_id'")
375
+ __props__.__dict__["project_id"] = project_id
376
+ if service_endpoint_name is None and not opts.urn:
377
+ raise TypeError("Missing required property 'service_endpoint_name'")
378
+ __props__.__dict__["service_endpoint_name"] = service_endpoint_name
379
+ if url is None and not opts.urn:
380
+ raise TypeError("Missing required property 'url'")
381
+ __props__.__dict__["url"] = url
382
+ if username is None and not opts.urn:
383
+ raise TypeError("Missing required property 'username'")
384
+ __props__.__dict__["username"] = username
385
+ secret_opts = pulumi.ResourceOptions(additional_secret_outputs=["apiToken"])
386
+ opts = pulumi.ResourceOptions.merge(opts, secret_opts)
387
+ super(ServiceEndpointGitLab, __self__).__init__(
388
+ 'azuredevops:index/serviceEndpointGitLab:ServiceEndpointGitLab',
389
+ resource_name,
390
+ __props__,
391
+ opts)
392
+
393
+ @staticmethod
394
+ def get(resource_name: str,
395
+ id: pulumi.Input[str],
396
+ opts: Optional[pulumi.ResourceOptions] = None,
397
+ api_token: Optional[pulumi.Input[str]] = None,
398
+ authorization: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
399
+ description: Optional[pulumi.Input[str]] = None,
400
+ project_id: Optional[pulumi.Input[str]] = None,
401
+ service_endpoint_name: Optional[pulumi.Input[str]] = None,
402
+ url: Optional[pulumi.Input[str]] = None,
403
+ username: Optional[pulumi.Input[str]] = None) -> 'ServiceEndpointGitLab':
404
+ """
405
+ Get an existing ServiceEndpointGitLab resource's state with the given name, id, and optional extra
406
+ properties used to qualify the lookup.
407
+
408
+ :param str resource_name: The unique name of the resulting resource.
409
+ :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
410
+ :param pulumi.ResourceOptions opts: Options for the resource.
411
+ :param pulumi.Input[str] api_token: The API token of the GitLab.
412
+ :param pulumi.Input[str] project_id: The ID of the project.
413
+ :param pulumi.Input[str] service_endpoint_name: The Service Endpoint name.
414
+ :param pulumi.Input[str] url: The server URL for GitLab. Example: `https://gitlab.com`.
415
+ :param pulumi.Input[str] username: The username used to login to GitLab.
416
+ """
417
+ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
418
+
419
+ __props__ = _ServiceEndpointGitLabState.__new__(_ServiceEndpointGitLabState)
420
+
421
+ __props__.__dict__["api_token"] = api_token
422
+ __props__.__dict__["authorization"] = authorization
423
+ __props__.__dict__["description"] = description
424
+ __props__.__dict__["project_id"] = project_id
425
+ __props__.__dict__["service_endpoint_name"] = service_endpoint_name
426
+ __props__.__dict__["url"] = url
427
+ __props__.__dict__["username"] = username
428
+ return ServiceEndpointGitLab(resource_name, opts=opts, __props__=__props__)
429
+
430
+ @property
431
+ @pulumi.getter(name="apiToken")
432
+ def api_token(self) -> pulumi.Output[str]:
433
+ """
434
+ The API token of the GitLab.
435
+ """
436
+ return pulumi.get(self, "api_token")
437
+
438
+ @property
439
+ @pulumi.getter
440
+ def authorization(self) -> pulumi.Output[Mapping[str, str]]:
441
+ return pulumi.get(self, "authorization")
442
+
443
+ @property
444
+ @pulumi.getter
445
+ def description(self) -> pulumi.Output[Optional[str]]:
446
+ return pulumi.get(self, "description")
447
+
448
+ @property
449
+ @pulumi.getter(name="projectId")
450
+ def project_id(self) -> pulumi.Output[str]:
451
+ """
452
+ The ID of the project.
453
+ """
454
+ return pulumi.get(self, "project_id")
455
+
456
+ @property
457
+ @pulumi.getter(name="serviceEndpointName")
458
+ def service_endpoint_name(self) -> pulumi.Output[str]:
459
+ """
460
+ The Service Endpoint name.
461
+ """
462
+ return pulumi.get(self, "service_endpoint_name")
463
+
464
+ @property
465
+ @pulumi.getter
466
+ def url(self) -> pulumi.Output[str]:
467
+ """
468
+ The server URL for GitLab. Example: `https://gitlab.com`.
469
+ """
470
+ return pulumi.get(self, "url")
471
+
472
+ @property
473
+ @pulumi.getter
474
+ def username(self) -> pulumi.Output[str]:
475
+ """
476
+ The username used to login to GitLab.
477
+ """
478
+ return pulumi.get(self, "username")
479
+