pulumi-gitlab 9.8.0__py3-none-any.whl → 9.8.0a1766504625__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.
@@ -1,489 +0,0 @@
1
- # coding=utf-8
2
- # *** WARNING: this file was generated by pulumi-language-python. ***
3
- # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
-
5
- import builtins as _builtins
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__ = ['ProjectSecureFileArgs', 'ProjectSecureFile']
18
-
19
- @pulumi.input_type
20
- class ProjectSecureFileArgs:
21
- def __init__(__self__, *,
22
- content: pulumi.Input[_builtins.str],
23
- project: pulumi.Input[_builtins.str],
24
- name: Optional[pulumi.Input[_builtins.str]] = None):
25
- """
26
- The set of arguments for constructing a ProjectSecureFile resource.
27
- :param pulumi.Input[_builtins.str] content: The contents of the secure file
28
- :param pulumi.Input[_builtins.str] project: The ID or full path of the project to environment is created for.
29
- :param pulumi.Input[_builtins.str] name: The name for the secure file, unique per project
30
- """
31
- pulumi.set(__self__, "content", content)
32
- pulumi.set(__self__, "project", project)
33
- if name is not None:
34
- pulumi.set(__self__, "name", name)
35
-
36
- @_builtins.property
37
- @pulumi.getter
38
- def content(self) -> pulumi.Input[_builtins.str]:
39
- """
40
- The contents of the secure file
41
- """
42
- return pulumi.get(self, "content")
43
-
44
- @content.setter
45
- def content(self, value: pulumi.Input[_builtins.str]):
46
- pulumi.set(self, "content", value)
47
-
48
- @_builtins.property
49
- @pulumi.getter
50
- def project(self) -> pulumi.Input[_builtins.str]:
51
- """
52
- The ID or full path of the project to environment is created for.
53
- """
54
- return pulumi.get(self, "project")
55
-
56
- @project.setter
57
- def project(self, value: pulumi.Input[_builtins.str]):
58
- pulumi.set(self, "project", value)
59
-
60
- @_builtins.property
61
- @pulumi.getter
62
- def name(self) -> Optional[pulumi.Input[_builtins.str]]:
63
- """
64
- The name for the secure file, unique per project
65
- """
66
- return pulumi.get(self, "name")
67
-
68
- @name.setter
69
- def name(self, value: Optional[pulumi.Input[_builtins.str]]):
70
- pulumi.set(self, "name", value)
71
-
72
-
73
- @pulumi.input_type
74
- class _ProjectSecureFileState:
75
- def __init__(__self__, *,
76
- checksum: Optional[pulumi.Input[_builtins.str]] = None,
77
- checksum_algorithm: Optional[pulumi.Input[_builtins.str]] = None,
78
- content: Optional[pulumi.Input[_builtins.str]] = None,
79
- created_at: Optional[pulumi.Input[_builtins.str]] = None,
80
- expires_at: Optional[pulumi.Input[_builtins.str]] = None,
81
- name: Optional[pulumi.Input[_builtins.str]] = None,
82
- project: Optional[pulumi.Input[_builtins.str]] = None,
83
- secure_file_id: Optional[pulumi.Input[_builtins.int]] = None):
84
- """
85
- Input properties used for looking up and filtering ProjectSecureFile resources.
86
- :param pulumi.Input[_builtins.str] checksum: The checksum of the file
87
- :param pulumi.Input[_builtins.str] checksum_algorithm: The checksum algorithm used
88
- :param pulumi.Input[_builtins.str] content: The contents of the secure file
89
- :param pulumi.Input[_builtins.str] created_at: The time the secure file was uploaded
90
- :param pulumi.Input[_builtins.str] expires_at: The time the secure file will expire
91
- :param pulumi.Input[_builtins.str] name: The name for the secure file, unique per project
92
- :param pulumi.Input[_builtins.str] project: The ID or full path of the project to environment is created for.
93
- :param pulumi.Input[_builtins.int] secure_file_id: The id of the secure file in gitlab
94
- """
95
- if checksum is not None:
96
- pulumi.set(__self__, "checksum", checksum)
97
- if checksum_algorithm is not None:
98
- pulumi.set(__self__, "checksum_algorithm", checksum_algorithm)
99
- if content is not None:
100
- pulumi.set(__self__, "content", content)
101
- if created_at is not None:
102
- pulumi.set(__self__, "created_at", created_at)
103
- if expires_at is not None:
104
- pulumi.set(__self__, "expires_at", expires_at)
105
- if name is not None:
106
- pulumi.set(__self__, "name", name)
107
- if project is not None:
108
- pulumi.set(__self__, "project", project)
109
- if secure_file_id is not None:
110
- pulumi.set(__self__, "secure_file_id", secure_file_id)
111
-
112
- @_builtins.property
113
- @pulumi.getter
114
- def checksum(self) -> Optional[pulumi.Input[_builtins.str]]:
115
- """
116
- The checksum of the file
117
- """
118
- return pulumi.get(self, "checksum")
119
-
120
- @checksum.setter
121
- def checksum(self, value: Optional[pulumi.Input[_builtins.str]]):
122
- pulumi.set(self, "checksum", value)
123
-
124
- @_builtins.property
125
- @pulumi.getter(name="checksumAlgorithm")
126
- def checksum_algorithm(self) -> Optional[pulumi.Input[_builtins.str]]:
127
- """
128
- The checksum algorithm used
129
- """
130
- return pulumi.get(self, "checksum_algorithm")
131
-
132
- @checksum_algorithm.setter
133
- def checksum_algorithm(self, value: Optional[pulumi.Input[_builtins.str]]):
134
- pulumi.set(self, "checksum_algorithm", value)
135
-
136
- @_builtins.property
137
- @pulumi.getter
138
- def content(self) -> Optional[pulumi.Input[_builtins.str]]:
139
- """
140
- The contents of the secure file
141
- """
142
- return pulumi.get(self, "content")
143
-
144
- @content.setter
145
- def content(self, value: Optional[pulumi.Input[_builtins.str]]):
146
- pulumi.set(self, "content", value)
147
-
148
- @_builtins.property
149
- @pulumi.getter(name="createdAt")
150
- def created_at(self) -> Optional[pulumi.Input[_builtins.str]]:
151
- """
152
- The time the secure file was uploaded
153
- """
154
- return pulumi.get(self, "created_at")
155
-
156
- @created_at.setter
157
- def created_at(self, value: Optional[pulumi.Input[_builtins.str]]):
158
- pulumi.set(self, "created_at", value)
159
-
160
- @_builtins.property
161
- @pulumi.getter(name="expiresAt")
162
- def expires_at(self) -> Optional[pulumi.Input[_builtins.str]]:
163
- """
164
- The time the secure file will expire
165
- """
166
- return pulumi.get(self, "expires_at")
167
-
168
- @expires_at.setter
169
- def expires_at(self, value: Optional[pulumi.Input[_builtins.str]]):
170
- pulumi.set(self, "expires_at", value)
171
-
172
- @_builtins.property
173
- @pulumi.getter
174
- def name(self) -> Optional[pulumi.Input[_builtins.str]]:
175
- """
176
- The name for the secure file, unique per project
177
- """
178
- return pulumi.get(self, "name")
179
-
180
- @name.setter
181
- def name(self, value: Optional[pulumi.Input[_builtins.str]]):
182
- pulumi.set(self, "name", value)
183
-
184
- @_builtins.property
185
- @pulumi.getter
186
- def project(self) -> Optional[pulumi.Input[_builtins.str]]:
187
- """
188
- The ID or full path of the project to environment is created for.
189
- """
190
- return pulumi.get(self, "project")
191
-
192
- @project.setter
193
- def project(self, value: Optional[pulumi.Input[_builtins.str]]):
194
- pulumi.set(self, "project", value)
195
-
196
- @_builtins.property
197
- @pulumi.getter(name="secureFileId")
198
- def secure_file_id(self) -> Optional[pulumi.Input[_builtins.int]]:
199
- """
200
- The id of the secure file in gitlab
201
- """
202
- return pulumi.get(self, "secure_file_id")
203
-
204
- @secure_file_id.setter
205
- def secure_file_id(self, value: Optional[pulumi.Input[_builtins.int]]):
206
- pulumi.set(self, "secure_file_id", value)
207
-
208
-
209
- @pulumi.type_token("gitlab:index/projectSecureFile:ProjectSecureFile")
210
- class ProjectSecureFile(pulumi.CustomResource):
211
- @overload
212
- def __init__(__self__,
213
- resource_name: str,
214
- opts: Optional[pulumi.ResourceOptions] = None,
215
- content: Optional[pulumi.Input[_builtins.str]] = None,
216
- name: Optional[pulumi.Input[_builtins.str]] = None,
217
- project: Optional[pulumi.Input[_builtins.str]] = None,
218
- __props__=None):
219
- """
220
- The `ProjectSecureFile` resource allows users to manage the lifecycle of a secure file in gitlab.
221
-
222
- **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/api/secure_files/)
223
-
224
- ## Example Usage
225
-
226
- ```python
227
- import pulumi
228
- import pulumi_gitlab as gitlab
229
- import pulumi_std as std
230
-
231
- this = gitlab.Group("this",
232
- name="example",
233
- path="example",
234
- description="An example group")
235
- this_project = gitlab.Project("this",
236
- name="example",
237
- namespace_id=this.id,
238
- initialize_with_readme=True)
239
- this_project_secure_file = gitlab.ProjectSecureFile("this",
240
- name="my-secure-file",
241
- project=this_project.id,
242
- content=std.file(input="example.txt").result)
243
- disable_poll_for_metadata = gitlab.ProjectSecureFile("disable_poll_for_metadata",
244
- name="my-secure-file",
245
- project=this_project.id,
246
- content=std.file(input="example.txt").result,
247
- poll_for_metadata_duration_in_seconds=0)
248
- ```
249
-
250
- ## Import
251
-
252
- Starting in Terraform v1.5.0, you can use an import block to import `gitlab_project_secure_file`. For example:
253
-
254
- terraform
255
-
256
- import {
257
-
258
- to = gitlab_project_secure_file.example
259
-
260
- id = "see CLI command below for ID"
261
-
262
- }
263
-
264
- Importing using the CLI is supported with the following syntax:
265
-
266
- GitLab secure files can be imported using an id made up of `projectId:secureFileId`, e.g.
267
-
268
- ```sh
269
- $ pulumi import gitlab:index/projectSecureFile:ProjectSecureFile bar 123:321
270
- ```
271
-
272
- :param str resource_name: The name of the resource.
273
- :param pulumi.ResourceOptions opts: Options for the resource.
274
- :param pulumi.Input[_builtins.str] content: The contents of the secure file
275
- :param pulumi.Input[_builtins.str] name: The name for the secure file, unique per project
276
- :param pulumi.Input[_builtins.str] project: The ID or full path of the project to environment is created for.
277
- """
278
- ...
279
- @overload
280
- def __init__(__self__,
281
- resource_name: str,
282
- args: ProjectSecureFileArgs,
283
- opts: Optional[pulumi.ResourceOptions] = None):
284
- """
285
- The `ProjectSecureFile` resource allows users to manage the lifecycle of a secure file in gitlab.
286
-
287
- **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/api/secure_files/)
288
-
289
- ## Example Usage
290
-
291
- ```python
292
- import pulumi
293
- import pulumi_gitlab as gitlab
294
- import pulumi_std as std
295
-
296
- this = gitlab.Group("this",
297
- name="example",
298
- path="example",
299
- description="An example group")
300
- this_project = gitlab.Project("this",
301
- name="example",
302
- namespace_id=this.id,
303
- initialize_with_readme=True)
304
- this_project_secure_file = gitlab.ProjectSecureFile("this",
305
- name="my-secure-file",
306
- project=this_project.id,
307
- content=std.file(input="example.txt").result)
308
- disable_poll_for_metadata = gitlab.ProjectSecureFile("disable_poll_for_metadata",
309
- name="my-secure-file",
310
- project=this_project.id,
311
- content=std.file(input="example.txt").result,
312
- poll_for_metadata_duration_in_seconds=0)
313
- ```
314
-
315
- ## Import
316
-
317
- Starting in Terraform v1.5.0, you can use an import block to import `gitlab_project_secure_file`. For example:
318
-
319
- terraform
320
-
321
- import {
322
-
323
- to = gitlab_project_secure_file.example
324
-
325
- id = "see CLI command below for ID"
326
-
327
- }
328
-
329
- Importing using the CLI is supported with the following syntax:
330
-
331
- GitLab secure files can be imported using an id made up of `projectId:secureFileId`, e.g.
332
-
333
- ```sh
334
- $ pulumi import gitlab:index/projectSecureFile:ProjectSecureFile bar 123:321
335
- ```
336
-
337
- :param str resource_name: The name of the resource.
338
- :param ProjectSecureFileArgs 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(ProjectSecureFileArgs, 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
- content: Optional[pulumi.Input[_builtins.str]] = None,
353
- name: Optional[pulumi.Input[_builtins.str]] = None,
354
- project: Optional[pulumi.Input[_builtins.str]] = None,
355
- __props__=None):
356
- opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
357
- if not isinstance(opts, pulumi.ResourceOptions):
358
- raise TypeError('Expected resource options to be a ResourceOptions instance')
359
- if opts.id is None:
360
- if __props__ is not None:
361
- raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
362
- __props__ = ProjectSecureFileArgs.__new__(ProjectSecureFileArgs)
363
-
364
- if content is None and not opts.urn:
365
- raise TypeError("Missing required property 'content'")
366
- __props__.__dict__["content"] = None if content is None else pulumi.Output.secret(content)
367
- __props__.__dict__["name"] = name
368
- if project is None and not opts.urn:
369
- raise TypeError("Missing required property 'project'")
370
- __props__.__dict__["project"] = project
371
- __props__.__dict__["checksum"] = None
372
- __props__.__dict__["checksum_algorithm"] = None
373
- __props__.__dict__["created_at"] = None
374
- __props__.__dict__["expires_at"] = None
375
- __props__.__dict__["secure_file_id"] = None
376
- secret_opts = pulumi.ResourceOptions(additional_secret_outputs=["content"])
377
- opts = pulumi.ResourceOptions.merge(opts, secret_opts)
378
- super(ProjectSecureFile, __self__).__init__(
379
- 'gitlab:index/projectSecureFile:ProjectSecureFile',
380
- resource_name,
381
- __props__,
382
- opts)
383
-
384
- @staticmethod
385
- def get(resource_name: str,
386
- id: pulumi.Input[str],
387
- opts: Optional[pulumi.ResourceOptions] = None,
388
- checksum: Optional[pulumi.Input[_builtins.str]] = None,
389
- checksum_algorithm: Optional[pulumi.Input[_builtins.str]] = None,
390
- content: Optional[pulumi.Input[_builtins.str]] = None,
391
- created_at: Optional[pulumi.Input[_builtins.str]] = None,
392
- expires_at: Optional[pulumi.Input[_builtins.str]] = None,
393
- name: Optional[pulumi.Input[_builtins.str]] = None,
394
- project: Optional[pulumi.Input[_builtins.str]] = None,
395
- secure_file_id: Optional[pulumi.Input[_builtins.int]] = None) -> 'ProjectSecureFile':
396
- """
397
- Get an existing ProjectSecureFile resource's state with the given name, id, and optional extra
398
- properties used to qualify the lookup.
399
-
400
- :param str resource_name: The unique name of the resulting resource.
401
- :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
402
- :param pulumi.ResourceOptions opts: Options for the resource.
403
- :param pulumi.Input[_builtins.str] checksum: The checksum of the file
404
- :param pulumi.Input[_builtins.str] checksum_algorithm: The checksum algorithm used
405
- :param pulumi.Input[_builtins.str] content: The contents of the secure file
406
- :param pulumi.Input[_builtins.str] created_at: The time the secure file was uploaded
407
- :param pulumi.Input[_builtins.str] expires_at: The time the secure file will expire
408
- :param pulumi.Input[_builtins.str] name: The name for the secure file, unique per project
409
- :param pulumi.Input[_builtins.str] project: The ID or full path of the project to environment is created for.
410
- :param pulumi.Input[_builtins.int] secure_file_id: The id of the secure file in gitlab
411
- """
412
- opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
413
-
414
- __props__ = _ProjectSecureFileState.__new__(_ProjectSecureFileState)
415
-
416
- __props__.__dict__["checksum"] = checksum
417
- __props__.__dict__["checksum_algorithm"] = checksum_algorithm
418
- __props__.__dict__["content"] = content
419
- __props__.__dict__["created_at"] = created_at
420
- __props__.__dict__["expires_at"] = expires_at
421
- __props__.__dict__["name"] = name
422
- __props__.__dict__["project"] = project
423
- __props__.__dict__["secure_file_id"] = secure_file_id
424
- return ProjectSecureFile(resource_name, opts=opts, __props__=__props__)
425
-
426
- @_builtins.property
427
- @pulumi.getter
428
- def checksum(self) -> pulumi.Output[_builtins.str]:
429
- """
430
- The checksum of the file
431
- """
432
- return pulumi.get(self, "checksum")
433
-
434
- @_builtins.property
435
- @pulumi.getter(name="checksumAlgorithm")
436
- def checksum_algorithm(self) -> pulumi.Output[_builtins.str]:
437
- """
438
- The checksum algorithm used
439
- """
440
- return pulumi.get(self, "checksum_algorithm")
441
-
442
- @_builtins.property
443
- @pulumi.getter
444
- def content(self) -> pulumi.Output[_builtins.str]:
445
- """
446
- The contents of the secure file
447
- """
448
- return pulumi.get(self, "content")
449
-
450
- @_builtins.property
451
- @pulumi.getter(name="createdAt")
452
- def created_at(self) -> pulumi.Output[_builtins.str]:
453
- """
454
- The time the secure file was uploaded
455
- """
456
- return pulumi.get(self, "created_at")
457
-
458
- @_builtins.property
459
- @pulumi.getter(name="expiresAt")
460
- def expires_at(self) -> pulumi.Output[_builtins.str]:
461
- """
462
- The time the secure file will expire
463
- """
464
- return pulumi.get(self, "expires_at")
465
-
466
- @_builtins.property
467
- @pulumi.getter
468
- def name(self) -> pulumi.Output[_builtins.str]:
469
- """
470
- The name for the secure file, unique per project
471
- """
472
- return pulumi.get(self, "name")
473
-
474
- @_builtins.property
475
- @pulumi.getter
476
- def project(self) -> pulumi.Output[_builtins.str]:
477
- """
478
- The ID or full path of the project to environment is created for.
479
- """
480
- return pulumi.get(self, "project")
481
-
482
- @_builtins.property
483
- @pulumi.getter(name="secureFileId")
484
- def secure_file_id(self) -> pulumi.Output[_builtins.int]:
485
- """
486
- The id of the secure file in gitlab
487
- """
488
- return pulumi.get(self, "secure_file_id")
489
-