pulumi-gitlab 9.5.0a1761172288__py3-none-any.whl → 9.8.1__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.
Files changed (81) hide show
  1. pulumi_gitlab/__init__.py +69 -0
  2. pulumi_gitlab/_inputs.py +557 -0
  3. pulumi_gitlab/branch.py +1 -1
  4. pulumi_gitlab/deploy_key_enable.py +4 -42
  5. pulumi_gitlab/get_artifact_file.py +266 -0
  6. pulumi_gitlab/get_group_billable_member_memberships.py +2 -2
  7. pulumi_gitlab/get_group_hook.py +15 -1
  8. pulumi_gitlab/get_group_membership.py +2 -2
  9. pulumi_gitlab/get_group_service_account.py +2 -2
  10. pulumi_gitlab/get_group_service_account_access_tokens.py +138 -0
  11. pulumi_gitlab/get_group_variable.py +1 -1
  12. pulumi_gitlab/get_instance_service_account.py +2 -2
  13. pulumi_gitlab/get_member_role.py +200 -0
  14. pulumi_gitlab/get_project.py +15 -1
  15. pulumi_gitlab/get_project_hook.py +17 -3
  16. pulumi_gitlab/get_project_issue_label_events.py +170 -0
  17. pulumi_gitlab/get_project_membership.py +2 -2
  18. pulumi_gitlab/get_project_protected_tag.py +2 -2
  19. pulumi_gitlab/get_project_secure_file.py +247 -0
  20. pulumi_gitlab/get_project_tag.py +2 -2
  21. pulumi_gitlab/get_project_tags.py +1 -1
  22. pulumi_gitlab/get_projects.py +3 -3
  23. pulumi_gitlab/get_release_link.py +5 -5
  24. pulumi_gitlab/get_release_links.py +3 -3
  25. pulumi_gitlab/get_security_policy_document.py +170 -0
  26. pulumi_gitlab/get_user.py +32 -0
  27. pulumi_gitlab/global_level_notifications.py +2 -2
  28. pulumi_gitlab/group.py +141 -0
  29. pulumi_gitlab/group_access_token.py +4 -4
  30. pulumi_gitlab/group_hook.py +163 -112
  31. pulumi_gitlab/group_label.py +7 -7
  32. pulumi_gitlab/group_level_mr_approvals.py +36 -0
  33. pulumi_gitlab/group_membership.py +2 -2
  34. pulumi_gitlab/group_service_account.py +2 -2
  35. pulumi_gitlab/group_service_account_access_token.py +92 -2
  36. pulumi_gitlab/group_share_group.py +2 -2
  37. pulumi_gitlab/instance_service_account.py +2 -2
  38. pulumi_gitlab/instance_variable.py +12 -12
  39. pulumi_gitlab/integration_emails_on_push.py +9 -7
  40. pulumi_gitlab/label.py +7 -7
  41. pulumi_gitlab/member_role.py +9 -9
  42. pulumi_gitlab/outputs.py +851 -15
  43. pulumi_gitlab/pages_domain.py +7 -7
  44. pulumi_gitlab/personal_access_token.py +2 -2
  45. pulumi_gitlab/pipeline_schedule_variable.py +2 -2
  46. pulumi_gitlab/project.py +54 -7
  47. pulumi_gitlab/project_access_token.py +2 -2
  48. pulumi_gitlab/project_approval_rule.py +120 -0
  49. pulumi_gitlab/project_cicd_catalog.py +314 -0
  50. pulumi_gitlab/project_deploy_token.py +2 -2
  51. pulumi_gitlab/project_hook.py +155 -102
  52. pulumi_gitlab/project_integration_emails_on_push.py +17 -7
  53. pulumi_gitlab/project_issue_link.py +502 -0
  54. pulumi_gitlab/project_job_token_scope.py +24 -4
  55. pulumi_gitlab/project_label.py +11 -11
  56. pulumi_gitlab/project_level_mr_approvals.py +2 -2
  57. pulumi_gitlab/project_level_notifications.py +2 -2
  58. pulumi_gitlab/project_membership.py +2 -2
  59. pulumi_gitlab/project_mirror.py +8 -6
  60. pulumi_gitlab/project_package_dependency_proxy.py +446 -0
  61. pulumi_gitlab/project_pull_mirror.py +837 -0
  62. pulumi_gitlab/project_push_mirror.py +547 -0
  63. pulumi_gitlab/project_secure_file.py +489 -0
  64. pulumi_gitlab/project_tag.py +3 -3
  65. pulumi_gitlab/project_target_branch_rule.py +2 -2
  66. pulumi_gitlab/project_variable.py +7 -7
  67. pulumi_gitlab/project_wiki_page.py +26 -0
  68. pulumi_gitlab/pulumi-plugin.json +1 -1
  69. pulumi_gitlab/release_link.py +19 -19
  70. pulumi_gitlab/runner.py +4 -4
  71. pulumi_gitlab/system_hook.py +7 -7
  72. pulumi_gitlab/user_avatar.py +386 -0
  73. pulumi_gitlab/user_gpg_key.py +2 -2
  74. pulumi_gitlab/user_impersonation_token.py +2 -2
  75. pulumi_gitlab/user_runner.py +14 -14
  76. pulumi_gitlab/user_ssh_key.py +2 -2
  77. pulumi_gitlab/value_stream_analytics.py +88 -0
  78. {pulumi_gitlab-9.5.0a1761172288.dist-info → pulumi_gitlab-9.8.1.dist-info}/METADATA +1 -1
  79. {pulumi_gitlab-9.5.0a1761172288.dist-info → pulumi_gitlab-9.8.1.dist-info}/RECORD +81 -68
  80. {pulumi_gitlab-9.5.0a1761172288.dist-info → pulumi_gitlab-9.8.1.dist-info}/WHEEL +0 -0
  81. {pulumi_gitlab-9.5.0a1761172288.dist-info → pulumi_gitlab-9.8.1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,247 @@
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
+ from . import outputs
17
+
18
+ __all__ = [
19
+ 'GetProjectSecureFileResult',
20
+ 'AwaitableGetProjectSecureFileResult',
21
+ 'get_project_secure_file',
22
+ 'get_project_secure_file_output',
23
+ ]
24
+
25
+ @pulumi.output_type
26
+ class GetProjectSecureFileResult:
27
+ """
28
+ A collection of values returned by getProjectSecureFile.
29
+ """
30
+ def __init__(__self__, checksum=None, checksum_algorithm=None, content=None, created_at=None, expires_at=None, id=None, metadata=None, name=None, project=None, secure_file_id=None):
31
+ if checksum and not isinstance(checksum, str):
32
+ raise TypeError("Expected argument 'checksum' to be a str")
33
+ pulumi.set(__self__, "checksum", checksum)
34
+ if checksum_algorithm and not isinstance(checksum_algorithm, str):
35
+ raise TypeError("Expected argument 'checksum_algorithm' to be a str")
36
+ pulumi.set(__self__, "checksum_algorithm", checksum_algorithm)
37
+ if content and not isinstance(content, str):
38
+ raise TypeError("Expected argument 'content' to be a str")
39
+ pulumi.set(__self__, "content", content)
40
+ if created_at and not isinstance(created_at, str):
41
+ raise TypeError("Expected argument 'created_at' to be a str")
42
+ pulumi.set(__self__, "created_at", created_at)
43
+ if expires_at and not isinstance(expires_at, str):
44
+ raise TypeError("Expected argument 'expires_at' to be a str")
45
+ pulumi.set(__self__, "expires_at", expires_at)
46
+ if id and not isinstance(id, str):
47
+ raise TypeError("Expected argument 'id' to be a str")
48
+ pulumi.set(__self__, "id", id)
49
+ if metadata and not isinstance(metadata, dict):
50
+ raise TypeError("Expected argument 'metadata' to be a dict")
51
+ pulumi.set(__self__, "metadata", metadata)
52
+ if name and not isinstance(name, str):
53
+ raise TypeError("Expected argument 'name' to be a str")
54
+ pulumi.set(__self__, "name", name)
55
+ if project and not isinstance(project, str):
56
+ raise TypeError("Expected argument 'project' to be a str")
57
+ pulumi.set(__self__, "project", project)
58
+ if secure_file_id and not isinstance(secure_file_id, int):
59
+ raise TypeError("Expected argument 'secure_file_id' to be a int")
60
+ pulumi.set(__self__, "secure_file_id", secure_file_id)
61
+
62
+ @_builtins.property
63
+ @pulumi.getter
64
+ def checksum(self) -> _builtins.str:
65
+ """
66
+ The checksum of the file
67
+ """
68
+ return pulumi.get(self, "checksum")
69
+
70
+ @_builtins.property
71
+ @pulumi.getter(name="checksumAlgorithm")
72
+ def checksum_algorithm(self) -> _builtins.str:
73
+ """
74
+ The checksum algorithm used
75
+ """
76
+ return pulumi.get(self, "checksum_algorithm")
77
+
78
+ @_builtins.property
79
+ @pulumi.getter
80
+ def content(self) -> _builtins.str:
81
+ """
82
+ The contents of the secure file
83
+ """
84
+ return pulumi.get(self, "content")
85
+
86
+ @_builtins.property
87
+ @pulumi.getter(name="createdAt")
88
+ def created_at(self) -> _builtins.str:
89
+ """
90
+ The time the secure file was uploaded
91
+ """
92
+ return pulumi.get(self, "created_at")
93
+
94
+ @_builtins.property
95
+ @pulumi.getter(name="expiresAt")
96
+ def expires_at(self) -> _builtins.str:
97
+ """
98
+ The time the secure file will expire
99
+ """
100
+ return pulumi.get(self, "expires_at")
101
+
102
+ @_builtins.property
103
+ @pulumi.getter
104
+ def id(self) -> _builtins.str:
105
+ """
106
+ The ID of this data source. In the format `<project:id>`
107
+ """
108
+ return pulumi.get(self, "id")
109
+
110
+ @_builtins.property
111
+ @pulumi.getter
112
+ def metadata(self) -> 'outputs.GetProjectSecureFileMetadataResult':
113
+ """
114
+ metadata returned by the gitlab api about the secure file
115
+ """
116
+ return pulumi.get(self, "metadata")
117
+
118
+ @_builtins.property
119
+ @pulumi.getter
120
+ def name(self) -> Optional[_builtins.str]:
121
+ """
122
+ The name for the secure file, unique per project
123
+ """
124
+ return pulumi.get(self, "name")
125
+
126
+ @_builtins.property
127
+ @pulumi.getter
128
+ def project(self) -> _builtins.str:
129
+ """
130
+ The ID or full path of the project the secure file resides.
131
+ """
132
+ return pulumi.get(self, "project")
133
+
134
+ @_builtins.property
135
+ @pulumi.getter(name="secureFileId")
136
+ def secure_file_id(self) -> _builtins.int:
137
+ """
138
+ The id of the secure file in gitlab
139
+ """
140
+ return pulumi.get(self, "secure_file_id")
141
+
142
+
143
+ class AwaitableGetProjectSecureFileResult(GetProjectSecureFileResult):
144
+ # pylint: disable=using-constant-test
145
+ def __await__(self):
146
+ if False:
147
+ yield self
148
+ return GetProjectSecureFileResult(
149
+ checksum=self.checksum,
150
+ checksum_algorithm=self.checksum_algorithm,
151
+ content=self.content,
152
+ created_at=self.created_at,
153
+ expires_at=self.expires_at,
154
+ id=self.id,
155
+ metadata=self.metadata,
156
+ name=self.name,
157
+ project=self.project,
158
+ secure_file_id=self.secure_file_id)
159
+
160
+
161
+ def get_project_secure_file(name: Optional[_builtins.str] = None,
162
+ project: Optional[_builtins.str] = None,
163
+ secure_file_id: Optional[_builtins.int] = None,
164
+ opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetProjectSecureFileResult:
165
+ """
166
+ The `ProjectSecureFile` data source allows the contents of a secure file to be retrieved by either Name or ID.
167
+
168
+ **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/api/secure_files/)
169
+
170
+ ## Example Usage
171
+
172
+ ```python
173
+ import pulumi
174
+ import pulumi_gitlab as gitlab
175
+
176
+ by_id = gitlab.get_project_secure_file(project="123",
177
+ secure_file_id=123)
178
+ by_name = gitlab.get_project_secure_file(project="123",
179
+ name="secret.pem")
180
+ ```
181
+
182
+
183
+ :param _builtins.str name: The name for the secure file, unique per project
184
+ :param _builtins.str project: The ID or full path of the project the secure file resides.
185
+ :param _builtins.int secure_file_id: The id of the secure file in gitlab
186
+ """
187
+ __args__ = dict()
188
+ __args__['name'] = name
189
+ __args__['project'] = project
190
+ __args__['secureFileId'] = secure_file_id
191
+ opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
192
+ __ret__ = pulumi.runtime.invoke('gitlab:index/getProjectSecureFile:getProjectSecureFile', __args__, opts=opts, typ=GetProjectSecureFileResult).value
193
+
194
+ return AwaitableGetProjectSecureFileResult(
195
+ checksum=pulumi.get(__ret__, 'checksum'),
196
+ checksum_algorithm=pulumi.get(__ret__, 'checksum_algorithm'),
197
+ content=pulumi.get(__ret__, 'content'),
198
+ created_at=pulumi.get(__ret__, 'created_at'),
199
+ expires_at=pulumi.get(__ret__, 'expires_at'),
200
+ id=pulumi.get(__ret__, 'id'),
201
+ metadata=pulumi.get(__ret__, 'metadata'),
202
+ name=pulumi.get(__ret__, 'name'),
203
+ project=pulumi.get(__ret__, 'project'),
204
+ secure_file_id=pulumi.get(__ret__, 'secure_file_id'))
205
+ def get_project_secure_file_output(name: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
206
+ project: Optional[pulumi.Input[_builtins.str]] = None,
207
+ secure_file_id: Optional[pulumi.Input[Optional[_builtins.int]]] = None,
208
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetProjectSecureFileResult]:
209
+ """
210
+ The `ProjectSecureFile` data source allows the contents of a secure file to be retrieved by either Name or ID.
211
+
212
+ **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/api/secure_files/)
213
+
214
+ ## Example Usage
215
+
216
+ ```python
217
+ import pulumi
218
+ import pulumi_gitlab as gitlab
219
+
220
+ by_id = gitlab.get_project_secure_file(project="123",
221
+ secure_file_id=123)
222
+ by_name = gitlab.get_project_secure_file(project="123",
223
+ name="secret.pem")
224
+ ```
225
+
226
+
227
+ :param _builtins.str name: The name for the secure file, unique per project
228
+ :param _builtins.str project: The ID or full path of the project the secure file resides.
229
+ :param _builtins.int secure_file_id: The id of the secure file in gitlab
230
+ """
231
+ __args__ = dict()
232
+ __args__['name'] = name
233
+ __args__['project'] = project
234
+ __args__['secureFileId'] = secure_file_id
235
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
236
+ __ret__ = pulumi.runtime.invoke_output('gitlab:index/getProjectSecureFile:getProjectSecureFile', __args__, opts=opts, typ=GetProjectSecureFileResult)
237
+ return __ret__.apply(lambda __response__: GetProjectSecureFileResult(
238
+ checksum=pulumi.get(__response__, 'checksum'),
239
+ checksum_algorithm=pulumi.get(__response__, 'checksum_algorithm'),
240
+ content=pulumi.get(__response__, 'content'),
241
+ created_at=pulumi.get(__response__, 'created_at'),
242
+ expires_at=pulumi.get(__response__, 'expires_at'),
243
+ id=pulumi.get(__response__, 'id'),
244
+ metadata=pulumi.get(__response__, 'metadata'),
245
+ name=pulumi.get(__response__, 'name'),
246
+ project=pulumi.get(__response__, 'project'),
247
+ secure_file_id=pulumi.get(__response__, 'secure_file_id')))
@@ -65,7 +65,7 @@ class GetProjectTagResult:
65
65
  @pulumi.getter
66
66
  def id(self) -> _builtins.str:
67
67
  """
68
- The provider-assigned unique ID for this managed resource.
68
+ The ID of this datasource. In the format `<project:name>`.
69
69
  """
70
70
  return pulumi.get(self, "id")
71
71
 
@@ -97,7 +97,7 @@ class GetProjectTagResult:
97
97
  @pulumi.getter
98
98
  def protected(self) -> _builtins.bool:
99
99
  """
100
- Bool, true if tag has tag protection.
100
+ True if tag has tag protection.
101
101
  """
102
102
  return pulumi.get(self, "protected")
103
103
 
@@ -51,7 +51,7 @@ class GetProjectTagsResult:
51
51
  @pulumi.getter
52
52
  def id(self) -> _builtins.str:
53
53
  """
54
- The provider-assigned unique ID for this managed resource.
54
+ The ID of this datasource. In the format `<project:hash-of-other-options>`.
55
55
  """
56
56
  return pulumi.get(self, "id")
57
57
 
@@ -153,7 +153,7 @@ class GetProjectsResult:
153
153
  @pulumi.getter(name="minAccessLevel")
154
154
  def min_access_level(self) -> Optional[_builtins.int]:
155
155
  """
156
- Limit to projects where current user has at least this access level, refer to the [official documentation](https://docs.gitlab.com/api/members/) for values. Cannot be used with `group_id`.
156
+ Limit to projects where current user has at least this access level, refer to the [official documentation](https://docs.gitlab.com/user/permissions/#default-roles) for values. Cannot be used with `group_id`.
157
157
  """
158
158
  return pulumi.get(self, "min_access_level")
159
159
 
@@ -381,7 +381,7 @@ def get_projects(archived: Optional[_builtins.bool] = None,
381
381
  :param _builtins.bool include_subgroups: Include projects in subgroups of this group. Default is `false`. Needs `group_id`.
382
382
  :param _builtins.int max_queryable_pages: The maximum number of project results pages that may be queried. Prevents overloading your Gitlab instance in case of a misconfiguration.
383
383
  :param _builtins.bool membership: Limit by projects that the current user is a member of.
384
- :param _builtins.int min_access_level: Limit to projects where current user has at least this access level, refer to the [official documentation](https://docs.gitlab.com/api/members/) for values. Cannot be used with `group_id`.
384
+ :param _builtins.int min_access_level: Limit to projects where current user has at least this access level, refer to the [official documentation](https://docs.gitlab.com/user/permissions/#default-roles) for values. Cannot be used with `group_id`.
385
385
  :param _builtins.str order_by: Return projects ordered ordered by: `id`, `name`, `path`, `created_at`, `updated_at`, `last_activity_at`, `similarity`, `repository_size`, `storage_size`, `packages_size`, `wiki_size`. Some values or only available in certain circumstances. See [upstream docs](https://docs.gitlab.com/api/projects/#list-all-projects) for details.
386
386
  :param _builtins.bool owned: Limit by projects owned by the current user.
387
387
  :param _builtins.int page: The first page to begin the query on.
@@ -505,7 +505,7 @@ def get_projects_output(archived: Optional[pulumi.Input[Optional[_builtins.bool]
505
505
  :param _builtins.bool include_subgroups: Include projects in subgroups of this group. Default is `false`. Needs `group_id`.
506
506
  :param _builtins.int max_queryable_pages: The maximum number of project results pages that may be queried. Prevents overloading your Gitlab instance in case of a misconfiguration.
507
507
  :param _builtins.bool membership: Limit by projects that the current user is a member of.
508
- :param _builtins.int min_access_level: Limit to projects where current user has at least this access level, refer to the [official documentation](https://docs.gitlab.com/api/members/) for values. Cannot be used with `group_id`.
508
+ :param _builtins.int min_access_level: Limit to projects where current user has at least this access level, refer to the [official documentation](https://docs.gitlab.com/user/permissions/#default-roles) for values. Cannot be used with `group_id`.
509
509
  :param _builtins.str order_by: Return projects ordered ordered by: `id`, `name`, `path`, `created_at`, `updated_at`, `last_activity_at`, `similarity`, `repository_size`, `storage_size`, `packages_size`, `wiki_size`. Some values or only available in certain circumstances. See [upstream docs](https://docs.gitlab.com/api/projects/#list-all-projects) for details.
510
510
  :param _builtins.bool owned: Limit by projects owned by the current user.
511
511
  :param _builtins.int page: The first page to begin the query on.
@@ -62,7 +62,7 @@ class GetReleaseLinkResult:
62
62
  @pulumi.getter(name="directAssetUrl")
63
63
  def direct_asset_url(self) -> _builtins.str:
64
64
  """
65
- Full path for a [Direct Asset link](https://docs.gitlab.com/user/project/releases/index/#permanent-links-to-release-assets).
65
+ Full path for a [Direct Asset link](https://docs.gitlab.com/user/project/releases/release_fields/#permanent-links-to-latest-release-assets).
66
66
  """
67
67
  return pulumi.get(self, "direct_asset_url")
68
68
 
@@ -78,7 +78,7 @@ class GetReleaseLinkResult:
78
78
  @pulumi.getter
79
79
  def filepath(self) -> _builtins.str:
80
80
  """
81
- Relative path for a [Direct Asset link](https://docs.gitlab.com/user/project/releases/index/#permanent-links-to-release-assets).
81
+ Relative path for a [Direct Asset link](https://docs.gitlab.com/user/project/releases/release_fields/#permanent-links-to-latest-release-assets).
82
82
  """
83
83
  return pulumi.get(self, "filepath")
84
84
 
@@ -118,7 +118,7 @@ class GetReleaseLinkResult:
118
118
  @pulumi.getter
119
119
  def project(self) -> _builtins.str:
120
120
  """
121
- The ID or [URL-encoded path of the project](https://docs.gitlab.com/api/index/#namespaced-path-encoding).
121
+ The ID or Namespace path of the project.
122
122
  """
123
123
  return pulumi.get(self, "project")
124
124
 
@@ -168,7 +168,7 @@ def get_release_link(link_id: Optional[_builtins.int] = None,
168
168
 
169
169
 
170
170
  :param _builtins.int link_id: The ID of the link.
171
- :param _builtins.str project: The ID or [URL-encoded path of the project](https://docs.gitlab.com/api/index/#namespaced-path-encoding).
171
+ :param _builtins.str project: The ID or Namespace path of the project.
172
172
  :param _builtins.str tag_name: The tag associated with the Release.
173
173
  """
174
174
  __args__ = dict()
@@ -200,7 +200,7 @@ def get_release_link_output(link_id: Optional[pulumi.Input[_builtins.int]] = Non
200
200
 
201
201
 
202
202
  :param _builtins.int link_id: The ID of the link.
203
- :param _builtins.str project: The ID or [URL-encoded path of the project](https://docs.gitlab.com/api/index/#namespaced-path-encoding).
203
+ :param _builtins.str project: The ID or Namespace path of the project.
204
204
  :param _builtins.str tag_name: The tag associated with the Release.
205
205
  """
206
206
  __args__ = dict()
@@ -53,7 +53,7 @@ class GetReleaseLinksResult:
53
53
  @pulumi.getter
54
54
  def project(self) -> _builtins.str:
55
55
  """
56
- The ID or [URL-encoded path of the project](https://docs.gitlab.com/api/index/#namespaced-path-encoding).
56
+ The ID or Namespace path of the project.
57
57
  """
58
58
  return pulumi.get(self, "project")
59
59
 
@@ -95,7 +95,7 @@ def get_release_links(project: Optional[_builtins.str] = None,
95
95
  **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/api/releases/links/)
96
96
 
97
97
 
98
- :param _builtins.str project: The ID or [URL-encoded path of the project](https://docs.gitlab.com/api/index/#namespaced-path-encoding).
98
+ :param _builtins.str project: The ID or Namespace path of the project.
99
99
  :param _builtins.str tag_name: The tag associated with the Release.
100
100
  """
101
101
  __args__ = dict()
@@ -118,7 +118,7 @@ def get_release_links_output(project: Optional[pulumi.Input[_builtins.str]] = No
118
118
  **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/api/releases/links/)
119
119
 
120
120
 
121
- :param _builtins.str project: The ID or [URL-encoded path of the project](https://docs.gitlab.com/api/index/#namespaced-path-encoding).
121
+ :param _builtins.str project: The ID or Namespace path of the project.
122
122
  :param _builtins.str tag_name: The tag associated with the Release.
123
123
  """
124
124
  __args__ = dict()
@@ -0,0 +1,170 @@
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
+ from . import outputs
17
+ from ._inputs import *
18
+
19
+ __all__ = [
20
+ 'GetSecurityPolicyDocumentResult',
21
+ 'AwaitableGetSecurityPolicyDocumentResult',
22
+ 'get_security_policy_document',
23
+ 'get_security_policy_document_output',
24
+ ]
25
+
26
+ @pulumi.output_type
27
+ class GetSecurityPolicyDocumentResult:
28
+ """
29
+ A collection of values returned by getSecurityPolicyDocument.
30
+ """
31
+ def __init__(__self__, id=None, scan_execution_policies=None, yaml=None):
32
+ if id and not isinstance(id, str):
33
+ raise TypeError("Expected argument 'id' to be a str")
34
+ pulumi.set(__self__, "id", id)
35
+ if scan_execution_policies and not isinstance(scan_execution_policies, list):
36
+ raise TypeError("Expected argument 'scan_execution_policies' to be a list")
37
+ pulumi.set(__self__, "scan_execution_policies", scan_execution_policies)
38
+ if yaml and not isinstance(yaml, str):
39
+ raise TypeError("Expected argument 'yaml' to be a str")
40
+ pulumi.set(__self__, "yaml", yaml)
41
+
42
+ @_builtins.property
43
+ @pulumi.getter
44
+ def id(self) -> _builtins.str:
45
+ """
46
+ Unique identifier for this policy document (hash of generated YAML).
47
+ """
48
+ return pulumi.get(self, "id")
49
+
50
+ @_builtins.property
51
+ @pulumi.getter(name="scanExecutionPolicies")
52
+ def scan_execution_policies(self) -> Optional[Sequence['outputs.GetSecurityPolicyDocumentScanExecutionPolicyResult']]:
53
+ """
54
+ Scan execution policy configuration. Multiple policies can be specified.
55
+ """
56
+ return pulumi.get(self, "scan_execution_policies")
57
+
58
+ @_builtins.property
59
+ @pulumi.getter
60
+ def yaml(self) -> _builtins.str:
61
+ """
62
+ The generated policy document in YAML format, ready to write to `.gitlab/security-policies/policy.yml`.
63
+ """
64
+ return pulumi.get(self, "yaml")
65
+
66
+
67
+ class AwaitableGetSecurityPolicyDocumentResult(GetSecurityPolicyDocumentResult):
68
+ # pylint: disable=using-constant-test
69
+ def __await__(self):
70
+ if False:
71
+ yield self
72
+ return GetSecurityPolicyDocumentResult(
73
+ id=self.id,
74
+ scan_execution_policies=self.scan_execution_policies,
75
+ yaml=self.yaml)
76
+
77
+
78
+ def get_security_policy_document(scan_execution_policies: Optional[Sequence[Union['GetSecurityPolicyDocumentScanExecutionPolicyArgs', 'GetSecurityPolicyDocumentScanExecutionPolicyArgsDict']]] = None,
79
+ opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetSecurityPolicyDocumentResult:
80
+ """
81
+ Generates a GitLab security policy YAML document from structured configuration.
82
+ This data source performs pure transformation without any API calls.
83
+
84
+ **Upstream API**: [GitLab Security Policies Documentation](https://docs.gitlab.com/ee/user/application_security/policies/scan_execution_policies/)
85
+
86
+ ## Example Usage
87
+
88
+ ```python
89
+ import pulumi
90
+ import pulumi_gitlab as gitlab
91
+
92
+ # Use this with `gitlab_repository_file` to manage your policies using native HCL
93
+ scan = gitlab.get_security_policy_document(scan_execution_policies=[{
94
+ "name": "Basic SAST Policy",
95
+ "enabled": True,
96
+ "rules": [{
97
+ "type": "pipeline",
98
+ "branch_type": "all",
99
+ }],
100
+ "actions": [{
101
+ "scan": "sast",
102
+ }],
103
+ }])
104
+ # See `gitlab_project_security_policy_attachment` or `gitlab_group_security_policy_attachment`
105
+ # for how to link a security policy project to a project or group.
106
+ policy = gitlab.RepositoryFile("policy",
107
+ project="1234",
108
+ ref="main",
109
+ file_path=".gitlab/security-policies/policy.yml",
110
+ content=scan.yaml)
111
+ ```
112
+
113
+
114
+ :param Sequence[Union['GetSecurityPolicyDocumentScanExecutionPolicyArgs', 'GetSecurityPolicyDocumentScanExecutionPolicyArgsDict']] scan_execution_policies: Scan execution policy configuration. Multiple policies can be specified.
115
+ """
116
+ __args__ = dict()
117
+ __args__['scanExecutionPolicies'] = scan_execution_policies
118
+ opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
119
+ __ret__ = pulumi.runtime.invoke('gitlab:index/getSecurityPolicyDocument:getSecurityPolicyDocument', __args__, opts=opts, typ=GetSecurityPolicyDocumentResult).value
120
+
121
+ return AwaitableGetSecurityPolicyDocumentResult(
122
+ id=pulumi.get(__ret__, 'id'),
123
+ scan_execution_policies=pulumi.get(__ret__, 'scan_execution_policies'),
124
+ yaml=pulumi.get(__ret__, 'yaml'))
125
+ def get_security_policy_document_output(scan_execution_policies: Optional[pulumi.Input[Optional[Sequence[Union['GetSecurityPolicyDocumentScanExecutionPolicyArgs', 'GetSecurityPolicyDocumentScanExecutionPolicyArgsDict']]]]] = None,
126
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetSecurityPolicyDocumentResult]:
127
+ """
128
+ Generates a GitLab security policy YAML document from structured configuration.
129
+ This data source performs pure transformation without any API calls.
130
+
131
+ **Upstream API**: [GitLab Security Policies Documentation](https://docs.gitlab.com/ee/user/application_security/policies/scan_execution_policies/)
132
+
133
+ ## Example Usage
134
+
135
+ ```python
136
+ import pulumi
137
+ import pulumi_gitlab as gitlab
138
+
139
+ # Use this with `gitlab_repository_file` to manage your policies using native HCL
140
+ scan = gitlab.get_security_policy_document(scan_execution_policies=[{
141
+ "name": "Basic SAST Policy",
142
+ "enabled": True,
143
+ "rules": [{
144
+ "type": "pipeline",
145
+ "branch_type": "all",
146
+ }],
147
+ "actions": [{
148
+ "scan": "sast",
149
+ }],
150
+ }])
151
+ # See `gitlab_project_security_policy_attachment` or `gitlab_group_security_policy_attachment`
152
+ # for how to link a security policy project to a project or group.
153
+ policy = gitlab.RepositoryFile("policy",
154
+ project="1234",
155
+ ref="main",
156
+ file_path=".gitlab/security-policies/policy.yml",
157
+ content=scan.yaml)
158
+ ```
159
+
160
+
161
+ :param Sequence[Union['GetSecurityPolicyDocumentScanExecutionPolicyArgs', 'GetSecurityPolicyDocumentScanExecutionPolicyArgsDict']] scan_execution_policies: Scan execution policy configuration. Multiple policies can be specified.
162
+ """
163
+ __args__ = dict()
164
+ __args__['scanExecutionPolicies'] = scan_execution_policies
165
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
166
+ __ret__ = pulumi.runtime.invoke_output('gitlab:index/getSecurityPolicyDocument:getSecurityPolicyDocument', __args__, opts=opts, typ=GetSecurityPolicyDocumentResult)
167
+ return __ret__.apply(lambda __response__: GetSecurityPolicyDocumentResult(
168
+ id=pulumi.get(__response__, 'id'),
169
+ scan_execution_policies=pulumi.get(__response__, 'scan_execution_policies'),
170
+ yaml=pulumi.get(__response__, 'yaml')))
pulumi_gitlab/get_user.py CHANGED
@@ -424,6 +424,22 @@ def get_user(email: Optional[_builtins.str] = None,
424
424
 
425
425
  **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/api/users/#get-a-single-user)
426
426
 
427
+ ## Example Usage
428
+
429
+ ```python
430
+ import pulumi
431
+ import pulumi_gitlab as gitlab
432
+ import pulumi_std as std
433
+
434
+ example = gitlab.get_user(username="myuser")
435
+ # Example using `for_each`
436
+ example_two = {__key: gitlab.get_user(username=__value) for __key, __value in std.toset(input=[
437
+ "user1",
438
+ "user2",
439
+ "user3",
440
+ ]).result}
441
+ ```
442
+
427
443
 
428
444
  :param _builtins.str email: The public email address of the user.
429
445
  :param _builtins.bool email_exact_match: (Experimental) If true, returns only an exact match. Otherwise, fuzzy matching might return the closest result. If no exact match is available, the data source returns an error.
@@ -487,6 +503,22 @@ def get_user_output(email: Optional[pulumi.Input[Optional[_builtins.str]]] = Non
487
503
 
488
504
  **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/api/users/#get-a-single-user)
489
505
 
506
+ ## Example Usage
507
+
508
+ ```python
509
+ import pulumi
510
+ import pulumi_gitlab as gitlab
511
+ import pulumi_std as std
512
+
513
+ example = gitlab.get_user(username="myuser")
514
+ # Example using `for_each`
515
+ example_two = {__key: gitlab.get_user(username=__value) for __key, __value in std.toset(input=[
516
+ "user1",
517
+ "user2",
518
+ "user3",
519
+ ]).result}
520
+ ```
521
+
490
522
 
491
523
  :param _builtins.str email: The public email address of the user.
492
524
  :param _builtins.bool email_exact_match: (Experimental) If true, returns only an exact match. Otherwise, fuzzy matching might return the closest result. If no exact match is available, the data source returns an error.
@@ -636,7 +636,7 @@ class GlobalLevelNotifications(pulumi.CustomResource):
636
636
  """
637
637
  The `GlobalLevelNotifications` resource allows to manage global notifications.
638
638
 
639
- **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/api/notification_settings/#group--project-level-notification-settings)
639
+ **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/api/notification_settings/#get-group-or-project-notification-settings)
640
640
 
641
641
  ## Import
642
642
 
@@ -694,7 +694,7 @@ class GlobalLevelNotifications(pulumi.CustomResource):
694
694
  """
695
695
  The `GlobalLevelNotifications` resource allows to manage global notifications.
696
696
 
697
- **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/api/notification_settings/#group--project-level-notification-settings)
697
+ **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/api/notification_settings/#get-group-or-project-notification-settings)
698
698
 
699
699
  ## Import
700
700