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
@@ -27,10 +27,10 @@ class ReleaseLinkArgs:
27
27
  name: Optional[pulumi.Input[_builtins.str]] = None):
28
28
  """
29
29
  The set of arguments for constructing a ReleaseLink resource.
30
- :param pulumi.Input[_builtins.str] project: The ID or [URL-encoded path of the project](https://docs.gitlab.com/api/index/#namespaced-path-encoding).
30
+ :param pulumi.Input[_builtins.str] project: The ID or Namespace path of the project.
31
31
  :param pulumi.Input[_builtins.str] tag_name: The tag associated with the Release.
32
32
  :param pulumi.Input[_builtins.str] url: The URL of the link. Link URLs must be unique within the release.
33
- :param pulumi.Input[_builtins.str] filepath: Relative path for a [Direct Asset link](https://docs.gitlab.com/user/project/releases/index/#permanent-links-to-release-assets).
33
+ :param pulumi.Input[_builtins.str] filepath: Relative path for a [Direct Asset link](https://docs.gitlab.com/user/project/releases/release_fields/#permanent-links-to-latest-release-assets).
34
34
  :param pulumi.Input[_builtins.str] link_type: The type of the link. Valid values are `other`, `runbook`, `image`, `package`. Defaults to other.
35
35
  :param pulumi.Input[_builtins.str] name: The name of the link. Link names must be unique within the release.
36
36
  """
@@ -48,7 +48,7 @@ class ReleaseLinkArgs:
48
48
  @pulumi.getter
49
49
  def project(self) -> pulumi.Input[_builtins.str]:
50
50
  """
51
- The ID or [URL-encoded path of the project](https://docs.gitlab.com/api/index/#namespaced-path-encoding).
51
+ The ID or Namespace path of the project.
52
52
  """
53
53
  return pulumi.get(self, "project")
54
54
 
@@ -84,7 +84,7 @@ class ReleaseLinkArgs:
84
84
  @pulumi.getter
85
85
  def filepath(self) -> Optional[pulumi.Input[_builtins.str]]:
86
86
  """
87
- Relative path for a [Direct Asset link](https://docs.gitlab.com/user/project/releases/index/#permanent-links-to-release-assets).
87
+ Relative path for a [Direct Asset link](https://docs.gitlab.com/user/project/releases/release_fields/#permanent-links-to-latest-release-assets).
88
88
  """
89
89
  return pulumi.get(self, "filepath")
90
90
 
@@ -131,13 +131,13 @@ class _ReleaseLinkState:
131
131
  url: Optional[pulumi.Input[_builtins.str]] = None):
132
132
  """
133
133
  Input properties used for looking up and filtering ReleaseLink resources.
134
- :param pulumi.Input[_builtins.str] direct_asset_url: Full path for a [Direct Asset link](https://docs.gitlab.com/user/project/releases/index/#permanent-links-to-release-assets).
134
+ :param pulumi.Input[_builtins.str] direct_asset_url: Full path for a [Direct Asset link](https://docs.gitlab.com/user/project/releases/release_fields/#permanent-links-to-latest-release-assets).
135
135
  :param pulumi.Input[_builtins.bool] external: External or internal link.
136
- :param pulumi.Input[_builtins.str] filepath: Relative path for a [Direct Asset link](https://docs.gitlab.com/user/project/releases/index/#permanent-links-to-release-assets).
136
+ :param pulumi.Input[_builtins.str] filepath: Relative path for a [Direct Asset link](https://docs.gitlab.com/user/project/releases/release_fields/#permanent-links-to-latest-release-assets).
137
137
  :param pulumi.Input[_builtins.int] link_id: The ID of the link.
138
138
  :param pulumi.Input[_builtins.str] link_type: The type of the link. Valid values are `other`, `runbook`, `image`, `package`. Defaults to other.
139
139
  :param pulumi.Input[_builtins.str] name: The name of the link. Link names must be unique within the release.
140
- :param pulumi.Input[_builtins.str] project: The ID or [URL-encoded path of the project](https://docs.gitlab.com/api/index/#namespaced-path-encoding).
140
+ :param pulumi.Input[_builtins.str] project: The ID or Namespace path of the project.
141
141
  :param pulumi.Input[_builtins.str] tag_name: The tag associated with the Release.
142
142
  :param pulumi.Input[_builtins.str] url: The URL of the link. Link URLs must be unique within the release.
143
143
  """
@@ -164,7 +164,7 @@ class _ReleaseLinkState:
164
164
  @pulumi.getter(name="directAssetUrl")
165
165
  def direct_asset_url(self) -> Optional[pulumi.Input[_builtins.str]]:
166
166
  """
167
- Full path for a [Direct Asset link](https://docs.gitlab.com/user/project/releases/index/#permanent-links-to-release-assets).
167
+ Full path for a [Direct Asset link](https://docs.gitlab.com/user/project/releases/release_fields/#permanent-links-to-latest-release-assets).
168
168
  """
169
169
  return pulumi.get(self, "direct_asset_url")
170
170
 
@@ -188,7 +188,7 @@ class _ReleaseLinkState:
188
188
  @pulumi.getter
189
189
  def filepath(self) -> Optional[pulumi.Input[_builtins.str]]:
190
190
  """
191
- Relative path for a [Direct Asset link](https://docs.gitlab.com/user/project/releases/index/#permanent-links-to-release-assets).
191
+ Relative path for a [Direct Asset link](https://docs.gitlab.com/user/project/releases/release_fields/#permanent-links-to-latest-release-assets).
192
192
  """
193
193
  return pulumi.get(self, "filepath")
194
194
 
@@ -236,7 +236,7 @@ class _ReleaseLinkState:
236
236
  @pulumi.getter
237
237
  def project(self) -> Optional[pulumi.Input[_builtins.str]]:
238
238
  """
239
- The ID or [URL-encoded path of the project](https://docs.gitlab.com/api/index/#namespaced-path-encoding).
239
+ The ID or Namespace path of the project.
240
240
  """
241
241
  return pulumi.get(self, "project")
242
242
 
@@ -329,10 +329,10 @@ class ReleaseLink(pulumi.CustomResource):
329
329
 
330
330
  :param str resource_name: The name of the resource.
331
331
  :param pulumi.ResourceOptions opts: Options for the resource.
332
- :param pulumi.Input[_builtins.str] filepath: Relative path for a [Direct Asset link](https://docs.gitlab.com/user/project/releases/index/#permanent-links-to-release-assets).
332
+ :param pulumi.Input[_builtins.str] filepath: Relative path for a [Direct Asset link](https://docs.gitlab.com/user/project/releases/release_fields/#permanent-links-to-latest-release-assets).
333
333
  :param pulumi.Input[_builtins.str] link_type: The type of the link. Valid values are `other`, `runbook`, `image`, `package`. Defaults to other.
334
334
  :param pulumi.Input[_builtins.str] name: The name of the link. Link names must be unique within the release.
335
- :param pulumi.Input[_builtins.str] project: The ID or [URL-encoded path of the project](https://docs.gitlab.com/api/index/#namespaced-path-encoding).
335
+ :param pulumi.Input[_builtins.str] project: The ID or Namespace path of the project.
336
336
  :param pulumi.Input[_builtins.str] tag_name: The tag associated with the Release.
337
337
  :param pulumi.Input[_builtins.str] url: The URL of the link. Link URLs must be unique within the release.
338
338
  """
@@ -458,13 +458,13 @@ class ReleaseLink(pulumi.CustomResource):
458
458
  :param str resource_name: The unique name of the resulting resource.
459
459
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
460
460
  :param pulumi.ResourceOptions opts: Options for the resource.
461
- :param pulumi.Input[_builtins.str] direct_asset_url: Full path for a [Direct Asset link](https://docs.gitlab.com/user/project/releases/index/#permanent-links-to-release-assets).
461
+ :param pulumi.Input[_builtins.str] direct_asset_url: Full path for a [Direct Asset link](https://docs.gitlab.com/user/project/releases/release_fields/#permanent-links-to-latest-release-assets).
462
462
  :param pulumi.Input[_builtins.bool] external: External or internal link.
463
- :param pulumi.Input[_builtins.str] filepath: Relative path for a [Direct Asset link](https://docs.gitlab.com/user/project/releases/index/#permanent-links-to-release-assets).
463
+ :param pulumi.Input[_builtins.str] filepath: Relative path for a [Direct Asset link](https://docs.gitlab.com/user/project/releases/release_fields/#permanent-links-to-latest-release-assets).
464
464
  :param pulumi.Input[_builtins.int] link_id: The ID of the link.
465
465
  :param pulumi.Input[_builtins.str] link_type: The type of the link. Valid values are `other`, `runbook`, `image`, `package`. Defaults to other.
466
466
  :param pulumi.Input[_builtins.str] name: The name of the link. Link names must be unique within the release.
467
- :param pulumi.Input[_builtins.str] project: The ID or [URL-encoded path of the project](https://docs.gitlab.com/api/index/#namespaced-path-encoding).
467
+ :param pulumi.Input[_builtins.str] project: The ID or Namespace path of the project.
468
468
  :param pulumi.Input[_builtins.str] tag_name: The tag associated with the Release.
469
469
  :param pulumi.Input[_builtins.str] url: The URL of the link. Link URLs must be unique within the release.
470
470
  """
@@ -487,7 +487,7 @@ class ReleaseLink(pulumi.CustomResource):
487
487
  @pulumi.getter(name="directAssetUrl")
488
488
  def direct_asset_url(self) -> pulumi.Output[_builtins.str]:
489
489
  """
490
- Full path for a [Direct Asset link](https://docs.gitlab.com/user/project/releases/index/#permanent-links-to-release-assets).
490
+ Full path for a [Direct Asset link](https://docs.gitlab.com/user/project/releases/release_fields/#permanent-links-to-latest-release-assets).
491
491
  """
492
492
  return pulumi.get(self, "direct_asset_url")
493
493
 
@@ -503,7 +503,7 @@ class ReleaseLink(pulumi.CustomResource):
503
503
  @pulumi.getter
504
504
  def filepath(self) -> pulumi.Output[Optional[_builtins.str]]:
505
505
  """
506
- Relative path for a [Direct Asset link](https://docs.gitlab.com/user/project/releases/index/#permanent-links-to-release-assets).
506
+ Relative path for a [Direct Asset link](https://docs.gitlab.com/user/project/releases/release_fields/#permanent-links-to-latest-release-assets).
507
507
  """
508
508
  return pulumi.get(self, "filepath")
509
509
 
@@ -517,7 +517,7 @@ class ReleaseLink(pulumi.CustomResource):
517
517
 
518
518
  @_builtins.property
519
519
  @pulumi.getter(name="linkType")
520
- def link_type(self) -> pulumi.Output[Optional[_builtins.str]]:
520
+ def link_type(self) -> pulumi.Output[_builtins.str]:
521
521
  """
522
522
  The type of the link. Valid values are `other`, `runbook`, `image`, `package`. Defaults to other.
523
523
  """
@@ -535,7 +535,7 @@ class ReleaseLink(pulumi.CustomResource):
535
535
  @pulumi.getter
536
536
  def project(self) -> pulumi.Output[_builtins.str]:
537
537
  """
538
- The ID or [URL-encoded path of the project](https://docs.gitlab.com/api/index/#namespaced-path-encoding).
538
+ The ID or Namespace path of the project.
539
539
  """
540
540
  return pulumi.get(self, "project")
541
541
 
pulumi_gitlab/runner.py CHANGED
@@ -372,7 +372,7 @@ class Runner(pulumi.CustomResource):
372
372
  """
373
373
  The `Runner` resource allows to manage the lifecycle of a runner.
374
374
 
375
- > This resource has been deprecated in favor of the `UserRunner` resource. Please use that resource, and the new registration flow, instead.
375
+ > This resource has been deprecated in favor of the `UserRunner` resource. Please use that resource, and the new registration flow, instead. To be removed in 19.0.
376
376
 
377
377
  A runner can either be registered at an instance level or group level.
378
378
  The runner will be registered at a group level if the token used is from a group, or at an instance level if the token used is for the instance.
@@ -380,7 +380,7 @@ class Runner(pulumi.CustomResource):
380
380
  > Using this resource will register a runner using the deprecated `registration_token` flow. To use the new `authentication_token` flow instead,
381
381
  use the `UserRunner` resource!
382
382
 
383
- **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/api/runners/#register-a-new-runner)
383
+ **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/api/runners/)
384
384
 
385
385
  ## Import
386
386
 
@@ -425,7 +425,7 @@ class Runner(pulumi.CustomResource):
425
425
  """
426
426
  The `Runner` resource allows to manage the lifecycle of a runner.
427
427
 
428
- > This resource has been deprecated in favor of the `UserRunner` resource. Please use that resource, and the new registration flow, instead.
428
+ > This resource has been deprecated in favor of the `UserRunner` resource. Please use that resource, and the new registration flow, instead. To be removed in 19.0.
429
429
 
430
430
  A runner can either be registered at an instance level or group level.
431
431
  The runner will be registered at a group level if the token used is from a group, or at an instance level if the token used is for the instance.
@@ -433,7 +433,7 @@ class Runner(pulumi.CustomResource):
433
433
  > Using this resource will register a runner using the deprecated `registration_token` flow. To use the new `authentication_token` flow instead,
434
434
  use the `UserRunner` resource!
435
435
 
436
- **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/api/runners/#register-a-new-runner)
436
+ **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/api/runners/)
437
437
 
438
438
  ## Import
439
439
 
@@ -34,7 +34,7 @@ class SystemHookArgs:
34
34
  :param pulumi.Input[_builtins.bool] push_events: When true, the hook fires on push events.
35
35
  :param pulumi.Input[_builtins.bool] repository_update_events: Trigger hook on repository update events.
36
36
  :param pulumi.Input[_builtins.bool] tag_push_events: When true, the hook fires on new tags being pushed.
37
- :param pulumi.Input[_builtins.str] token: Secret token to validate received payloads; this isnt returned in the response. This attribute is not available for imported resources.
37
+ :param pulumi.Input[_builtins.str] token: Secret token to validate received payloads; this isn't returned in the response. This attribute is not available for imported resources.
38
38
  """
39
39
  pulumi.set(__self__, "url", url)
40
40
  if enable_ssl_verification is not None:
@@ -126,7 +126,7 @@ class SystemHookArgs:
126
126
  @pulumi.getter
127
127
  def token(self) -> Optional[pulumi.Input[_builtins.str]]:
128
128
  """
129
- Secret token to validate received payloads; this isnt returned in the response. This attribute is not available for imported resources.
129
+ Secret token to validate received payloads; this isn't returned in the response. This attribute is not available for imported resources.
130
130
  """
131
131
  return pulumi.get(self, "token")
132
132
 
@@ -154,7 +154,7 @@ class _SystemHookState:
154
154
  :param pulumi.Input[_builtins.bool] push_events: When true, the hook fires on push events.
155
155
  :param pulumi.Input[_builtins.bool] repository_update_events: Trigger hook on repository update events.
156
156
  :param pulumi.Input[_builtins.bool] tag_push_events: When true, the hook fires on new tags being pushed.
157
- :param pulumi.Input[_builtins.str] token: Secret token to validate received payloads; this isnt returned in the response. This attribute is not available for imported resources.
157
+ :param pulumi.Input[_builtins.str] token: Secret token to validate received payloads; this isn't returned in the response. This attribute is not available for imported resources.
158
158
  :param pulumi.Input[_builtins.str] url: The hook URL.
159
159
  """
160
160
  if created_at is not None:
@@ -250,7 +250,7 @@ class _SystemHookState:
250
250
  @pulumi.getter
251
251
  def token(self) -> Optional[pulumi.Input[_builtins.str]]:
252
252
  """
253
- Secret token to validate received payloads; this isnt returned in the response. This attribute is not available for imported resources.
253
+ Secret token to validate received payloads; this isn't returned in the response. This attribute is not available for imported resources.
254
254
  """
255
255
  return pulumi.get(self, "token")
256
256
 
@@ -337,7 +337,7 @@ class SystemHook(pulumi.CustomResource):
337
337
  :param pulumi.Input[_builtins.bool] push_events: When true, the hook fires on push events.
338
338
  :param pulumi.Input[_builtins.bool] repository_update_events: Trigger hook on repository update events.
339
339
  :param pulumi.Input[_builtins.bool] tag_push_events: When true, the hook fires on new tags being pushed.
340
- :param pulumi.Input[_builtins.str] token: Secret token to validate received payloads; this isnt returned in the response. This attribute is not available for imported resources.
340
+ :param pulumi.Input[_builtins.str] token: Secret token to validate received payloads; this isn't returned in the response. This attribute is not available for imported resources.
341
341
  :param pulumi.Input[_builtins.str] url: The hook URL.
342
342
  """
343
343
  ...
@@ -465,7 +465,7 @@ class SystemHook(pulumi.CustomResource):
465
465
  :param pulumi.Input[_builtins.bool] push_events: When true, the hook fires on push events.
466
466
  :param pulumi.Input[_builtins.bool] repository_update_events: Trigger hook on repository update events.
467
467
  :param pulumi.Input[_builtins.bool] tag_push_events: When true, the hook fires on new tags being pushed.
468
- :param pulumi.Input[_builtins.str] token: Secret token to validate received payloads; this isnt returned in the response. This attribute is not available for imported resources.
468
+ :param pulumi.Input[_builtins.str] token: Secret token to validate received payloads; this isn't returned in the response. This attribute is not available for imported resources.
469
469
  :param pulumi.Input[_builtins.str] url: The hook URL.
470
470
  """
471
471
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
@@ -534,7 +534,7 @@ class SystemHook(pulumi.CustomResource):
534
534
  @pulumi.getter
535
535
  def token(self) -> pulumi.Output[Optional[_builtins.str]]:
536
536
  """
537
- Secret token to validate received payloads; this isnt returned in the response. This attribute is not available for imported resources.
537
+ Secret token to validate received payloads; this isn't returned in the response. This attribute is not available for imported resources.
538
538
  """
539
539
  return pulumi.get(self, "token")
540
540
 
@@ -0,0 +1,386 @@
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__ = ['UserAvatarArgs', 'UserAvatar']
18
+
19
+ @pulumi.input_type
20
+ class UserAvatarArgs:
21
+ def __init__(__self__, *,
22
+ avatar: pulumi.Input[_builtins.str],
23
+ user_id: pulumi.Input[_builtins.int],
24
+ avatar_hash: Optional[pulumi.Input[_builtins.str]] = None,
25
+ token: Optional[pulumi.Input[_builtins.str]] = None):
26
+ """
27
+ The set of arguments for constructing a UserAvatar resource.
28
+ :param pulumi.Input[_builtins.str] avatar: A local path to the avatar image to upload. **Note**: the avatar is not available for imported resources.
29
+ :param pulumi.Input[_builtins.int] user_id: The ID of the user.
30
+ :param pulumi.Input[_builtins.str] avatar_hash: The hash of the avatar image. This is used to track changes to the avatar image if the image contents change but the image name remains the same. Use `filesha256("path/to/avatar.png")` whenever possible.
31
+ :param pulumi.Input[_builtins.str] token: The access token of the user. If this field is omitted, a GitLab token with administrator scope is required to manage the avatar for the specified user. **Note**: the token is not available for imported resources.
32
+ """
33
+ pulumi.set(__self__, "avatar", avatar)
34
+ pulumi.set(__self__, "user_id", user_id)
35
+ if avatar_hash is not None:
36
+ pulumi.set(__self__, "avatar_hash", avatar_hash)
37
+ if token is not None:
38
+ pulumi.set(__self__, "token", token)
39
+
40
+ @_builtins.property
41
+ @pulumi.getter
42
+ def avatar(self) -> pulumi.Input[_builtins.str]:
43
+ """
44
+ A local path to the avatar image to upload. **Note**: the avatar is not available for imported resources.
45
+ """
46
+ return pulumi.get(self, "avatar")
47
+
48
+ @avatar.setter
49
+ def avatar(self, value: pulumi.Input[_builtins.str]):
50
+ pulumi.set(self, "avatar", value)
51
+
52
+ @_builtins.property
53
+ @pulumi.getter(name="userId")
54
+ def user_id(self) -> pulumi.Input[_builtins.int]:
55
+ """
56
+ The ID of the user.
57
+ """
58
+ return pulumi.get(self, "user_id")
59
+
60
+ @user_id.setter
61
+ def user_id(self, value: pulumi.Input[_builtins.int]):
62
+ pulumi.set(self, "user_id", value)
63
+
64
+ @_builtins.property
65
+ @pulumi.getter(name="avatarHash")
66
+ def avatar_hash(self) -> Optional[pulumi.Input[_builtins.str]]:
67
+ """
68
+ The hash of the avatar image. This is used to track changes to the avatar image if the image contents change but the image name remains the same. Use `filesha256("path/to/avatar.png")` whenever possible.
69
+ """
70
+ return pulumi.get(self, "avatar_hash")
71
+
72
+ @avatar_hash.setter
73
+ def avatar_hash(self, value: Optional[pulumi.Input[_builtins.str]]):
74
+ pulumi.set(self, "avatar_hash", value)
75
+
76
+ @_builtins.property
77
+ @pulumi.getter
78
+ def token(self) -> Optional[pulumi.Input[_builtins.str]]:
79
+ """
80
+ The access token of the user. If this field is omitted, a GitLab token with administrator scope is required to manage the avatar for the specified user. **Note**: the token is not available for imported resources.
81
+ """
82
+ return pulumi.get(self, "token")
83
+
84
+ @token.setter
85
+ def token(self, value: Optional[pulumi.Input[_builtins.str]]):
86
+ pulumi.set(self, "token", value)
87
+
88
+
89
+ @pulumi.input_type
90
+ class _UserAvatarState:
91
+ def __init__(__self__, *,
92
+ avatar: Optional[pulumi.Input[_builtins.str]] = None,
93
+ avatar_hash: Optional[pulumi.Input[_builtins.str]] = None,
94
+ avatar_url: Optional[pulumi.Input[_builtins.str]] = None,
95
+ token: Optional[pulumi.Input[_builtins.str]] = None,
96
+ user_id: Optional[pulumi.Input[_builtins.int]] = None):
97
+ """
98
+ Input properties used for looking up and filtering UserAvatar resources.
99
+ :param pulumi.Input[_builtins.str] avatar: A local path to the avatar image to upload. **Note**: the avatar is not available for imported resources.
100
+ :param pulumi.Input[_builtins.str] avatar_hash: The hash of the avatar image. This is used to track changes to the avatar image if the image contents change but the image name remains the same. Use `filesha256("path/to/avatar.png")` whenever possible.
101
+ :param pulumi.Input[_builtins.str] avatar_url: The URL of the avatar image.
102
+ :param pulumi.Input[_builtins.str] token: The access token of the user. If this field is omitted, a GitLab token with administrator scope is required to manage the avatar for the specified user. **Note**: the token is not available for imported resources.
103
+ :param pulumi.Input[_builtins.int] user_id: The ID of the user.
104
+ """
105
+ if avatar is not None:
106
+ pulumi.set(__self__, "avatar", avatar)
107
+ if avatar_hash is not None:
108
+ pulumi.set(__self__, "avatar_hash", avatar_hash)
109
+ if avatar_url is not None:
110
+ pulumi.set(__self__, "avatar_url", avatar_url)
111
+ if token is not None:
112
+ pulumi.set(__self__, "token", token)
113
+ if user_id is not None:
114
+ pulumi.set(__self__, "user_id", user_id)
115
+
116
+ @_builtins.property
117
+ @pulumi.getter
118
+ def avatar(self) -> Optional[pulumi.Input[_builtins.str]]:
119
+ """
120
+ A local path to the avatar image to upload. **Note**: the avatar is not available for imported resources.
121
+ """
122
+ return pulumi.get(self, "avatar")
123
+
124
+ @avatar.setter
125
+ def avatar(self, value: Optional[pulumi.Input[_builtins.str]]):
126
+ pulumi.set(self, "avatar", value)
127
+
128
+ @_builtins.property
129
+ @pulumi.getter(name="avatarHash")
130
+ def avatar_hash(self) -> Optional[pulumi.Input[_builtins.str]]:
131
+ """
132
+ The hash of the avatar image. This is used to track changes to the avatar image if the image contents change but the image name remains the same. Use `filesha256("path/to/avatar.png")` whenever possible.
133
+ """
134
+ return pulumi.get(self, "avatar_hash")
135
+
136
+ @avatar_hash.setter
137
+ def avatar_hash(self, value: Optional[pulumi.Input[_builtins.str]]):
138
+ pulumi.set(self, "avatar_hash", value)
139
+
140
+ @_builtins.property
141
+ @pulumi.getter(name="avatarUrl")
142
+ def avatar_url(self) -> Optional[pulumi.Input[_builtins.str]]:
143
+ """
144
+ The URL of the avatar image.
145
+ """
146
+ return pulumi.get(self, "avatar_url")
147
+
148
+ @avatar_url.setter
149
+ def avatar_url(self, value: Optional[pulumi.Input[_builtins.str]]):
150
+ pulumi.set(self, "avatar_url", value)
151
+
152
+ @_builtins.property
153
+ @pulumi.getter
154
+ def token(self) -> Optional[pulumi.Input[_builtins.str]]:
155
+ """
156
+ The access token of the user. If this field is omitted, a GitLab token with administrator scope is required to manage the avatar for the specified user. **Note**: the token is not available for imported resources.
157
+ """
158
+ return pulumi.get(self, "token")
159
+
160
+ @token.setter
161
+ def token(self, value: Optional[pulumi.Input[_builtins.str]]):
162
+ pulumi.set(self, "token", value)
163
+
164
+ @_builtins.property
165
+ @pulumi.getter(name="userId")
166
+ def user_id(self) -> Optional[pulumi.Input[_builtins.int]]:
167
+ """
168
+ The ID of the user.
169
+ """
170
+ return pulumi.get(self, "user_id")
171
+
172
+ @user_id.setter
173
+ def user_id(self, value: Optional[pulumi.Input[_builtins.int]]):
174
+ pulumi.set(self, "user_id", value)
175
+
176
+
177
+ @pulumi.type_token("gitlab:index/userAvatar:UserAvatar")
178
+ class UserAvatar(pulumi.CustomResource):
179
+ @overload
180
+ def __init__(__self__,
181
+ resource_name: str,
182
+ opts: Optional[pulumi.ResourceOptions] = None,
183
+ avatar: Optional[pulumi.Input[_builtins.str]] = None,
184
+ avatar_hash: Optional[pulumi.Input[_builtins.str]] = None,
185
+ token: Optional[pulumi.Input[_builtins.str]] = None,
186
+ user_id: Optional[pulumi.Input[_builtins.int]] = None,
187
+ __props__=None):
188
+ """
189
+ The `UserAvatar` resource allows users to manage the lifecycle of a user avatar.
190
+ The resource can also be used to set the avatar on project or group access tokens, as well as on service accounts.
191
+
192
+ > The `token` attribute is optional only when the GitLab token used by the provider has an administrator scope, as this allows an administrator to manage user avatars.
193
+
194
+ > The provided `token` must have the `api` scope in order to set the avatar.
195
+
196
+ **Upstream API**: [GitLab API docs](https://docs.gitlab.com/api/users/#upload-an-avatar-for-yourself)
197
+
198
+ ## Import
199
+
200
+ Starting in Terraform v1.5.0, you can use an import block to import `gitlab_user_avatar`. For example:
201
+
202
+ terraform
203
+
204
+ import {
205
+
206
+ to = gitlab_user_avatar.example
207
+
208
+ id = "see CLI command below for ID"
209
+
210
+ }
211
+
212
+ Importing using the CLI is supported with the following syntax:
213
+
214
+ A GitLab User Avatar can be imported using the user id, e.g.
215
+
216
+ ```sh
217
+ $ pulumi import gitlab:index/userAvatar:UserAvatar example "12345"
218
+ ```
219
+
220
+ NOTE: the `token` and `avatar` resource attributes are not available for imported resources as this information cannot be read from the GitLab API.
221
+
222
+ :param str resource_name: The name of the resource.
223
+ :param pulumi.ResourceOptions opts: Options for the resource.
224
+ :param pulumi.Input[_builtins.str] avatar: A local path to the avatar image to upload. **Note**: the avatar is not available for imported resources.
225
+ :param pulumi.Input[_builtins.str] avatar_hash: The hash of the avatar image. This is used to track changes to the avatar image if the image contents change but the image name remains the same. Use `filesha256("path/to/avatar.png")` whenever possible.
226
+ :param pulumi.Input[_builtins.str] token: The access token of the user. If this field is omitted, a GitLab token with administrator scope is required to manage the avatar for the specified user. **Note**: the token is not available for imported resources.
227
+ :param pulumi.Input[_builtins.int] user_id: The ID of the user.
228
+ """
229
+ ...
230
+ @overload
231
+ def __init__(__self__,
232
+ resource_name: str,
233
+ args: UserAvatarArgs,
234
+ opts: Optional[pulumi.ResourceOptions] = None):
235
+ """
236
+ The `UserAvatar` resource allows users to manage the lifecycle of a user avatar.
237
+ The resource can also be used to set the avatar on project or group access tokens, as well as on service accounts.
238
+
239
+ > The `token` attribute is optional only when the GitLab token used by the provider has an administrator scope, as this allows an administrator to manage user avatars.
240
+
241
+ > The provided `token` must have the `api` scope in order to set the avatar.
242
+
243
+ **Upstream API**: [GitLab API docs](https://docs.gitlab.com/api/users/#upload-an-avatar-for-yourself)
244
+
245
+ ## Import
246
+
247
+ Starting in Terraform v1.5.0, you can use an import block to import `gitlab_user_avatar`. For example:
248
+
249
+ terraform
250
+
251
+ import {
252
+
253
+ to = gitlab_user_avatar.example
254
+
255
+ id = "see CLI command below for ID"
256
+
257
+ }
258
+
259
+ Importing using the CLI is supported with the following syntax:
260
+
261
+ A GitLab User Avatar can be imported using the user id, e.g.
262
+
263
+ ```sh
264
+ $ pulumi import gitlab:index/userAvatar:UserAvatar example "12345"
265
+ ```
266
+
267
+ NOTE: the `token` and `avatar` resource attributes are not available for imported resources as this information cannot be read from the GitLab API.
268
+
269
+ :param str resource_name: The name of the resource.
270
+ :param UserAvatarArgs args: The arguments to use to populate this resource's properties.
271
+ :param pulumi.ResourceOptions opts: Options for the resource.
272
+ """
273
+ ...
274
+ def __init__(__self__, resource_name: str, *args, **kwargs):
275
+ resource_args, opts = _utilities.get_resource_args_opts(UserAvatarArgs, pulumi.ResourceOptions, *args, **kwargs)
276
+ if resource_args is not None:
277
+ __self__._internal_init(resource_name, opts, **resource_args.__dict__)
278
+ else:
279
+ __self__._internal_init(resource_name, *args, **kwargs)
280
+
281
+ def _internal_init(__self__,
282
+ resource_name: str,
283
+ opts: Optional[pulumi.ResourceOptions] = None,
284
+ avatar: Optional[pulumi.Input[_builtins.str]] = None,
285
+ avatar_hash: Optional[pulumi.Input[_builtins.str]] = None,
286
+ token: Optional[pulumi.Input[_builtins.str]] = None,
287
+ user_id: Optional[pulumi.Input[_builtins.int]] = None,
288
+ __props__=None):
289
+ opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
290
+ if not isinstance(opts, pulumi.ResourceOptions):
291
+ raise TypeError('Expected resource options to be a ResourceOptions instance')
292
+ if opts.id is None:
293
+ if __props__ is not None:
294
+ raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
295
+ __props__ = UserAvatarArgs.__new__(UserAvatarArgs)
296
+
297
+ if avatar is None and not opts.urn:
298
+ raise TypeError("Missing required property 'avatar'")
299
+ __props__.__dict__["avatar"] = avatar
300
+ __props__.__dict__["avatar_hash"] = avatar_hash
301
+ __props__.__dict__["token"] = None if token is None else pulumi.Output.secret(token)
302
+ if user_id is None and not opts.urn:
303
+ raise TypeError("Missing required property 'user_id'")
304
+ __props__.__dict__["user_id"] = user_id
305
+ __props__.__dict__["avatar_url"] = None
306
+ secret_opts = pulumi.ResourceOptions(additional_secret_outputs=["token"])
307
+ opts = pulumi.ResourceOptions.merge(opts, secret_opts)
308
+ super(UserAvatar, __self__).__init__(
309
+ 'gitlab:index/userAvatar:UserAvatar',
310
+ resource_name,
311
+ __props__,
312
+ opts)
313
+
314
+ @staticmethod
315
+ def get(resource_name: str,
316
+ id: pulumi.Input[str],
317
+ opts: Optional[pulumi.ResourceOptions] = None,
318
+ avatar: Optional[pulumi.Input[_builtins.str]] = None,
319
+ avatar_hash: Optional[pulumi.Input[_builtins.str]] = None,
320
+ avatar_url: Optional[pulumi.Input[_builtins.str]] = None,
321
+ token: Optional[pulumi.Input[_builtins.str]] = None,
322
+ user_id: Optional[pulumi.Input[_builtins.int]] = None) -> 'UserAvatar':
323
+ """
324
+ Get an existing UserAvatar resource's state with the given name, id, and optional extra
325
+ properties used to qualify the lookup.
326
+
327
+ :param str resource_name: The unique name of the resulting resource.
328
+ :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
329
+ :param pulumi.ResourceOptions opts: Options for the resource.
330
+ :param pulumi.Input[_builtins.str] avatar: A local path to the avatar image to upload. **Note**: the avatar is not available for imported resources.
331
+ :param pulumi.Input[_builtins.str] avatar_hash: The hash of the avatar image. This is used to track changes to the avatar image if the image contents change but the image name remains the same. Use `filesha256("path/to/avatar.png")` whenever possible.
332
+ :param pulumi.Input[_builtins.str] avatar_url: The URL of the avatar image.
333
+ :param pulumi.Input[_builtins.str] token: The access token of the user. If this field is omitted, a GitLab token with administrator scope is required to manage the avatar for the specified user. **Note**: the token is not available for imported resources.
334
+ :param pulumi.Input[_builtins.int] user_id: The ID of the user.
335
+ """
336
+ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
337
+
338
+ __props__ = _UserAvatarState.__new__(_UserAvatarState)
339
+
340
+ __props__.__dict__["avatar"] = avatar
341
+ __props__.__dict__["avatar_hash"] = avatar_hash
342
+ __props__.__dict__["avatar_url"] = avatar_url
343
+ __props__.__dict__["token"] = token
344
+ __props__.__dict__["user_id"] = user_id
345
+ return UserAvatar(resource_name, opts=opts, __props__=__props__)
346
+
347
+ @_builtins.property
348
+ @pulumi.getter
349
+ def avatar(self) -> pulumi.Output[_builtins.str]:
350
+ """
351
+ A local path to the avatar image to upload. **Note**: the avatar is not available for imported resources.
352
+ """
353
+ return pulumi.get(self, "avatar")
354
+
355
+ @_builtins.property
356
+ @pulumi.getter(name="avatarHash")
357
+ def avatar_hash(self) -> pulumi.Output[Optional[_builtins.str]]:
358
+ """
359
+ The hash of the avatar image. This is used to track changes to the avatar image if the image contents change but the image name remains the same. Use `filesha256("path/to/avatar.png")` whenever possible.
360
+ """
361
+ return pulumi.get(self, "avatar_hash")
362
+
363
+ @_builtins.property
364
+ @pulumi.getter(name="avatarUrl")
365
+ def avatar_url(self) -> pulumi.Output[_builtins.str]:
366
+ """
367
+ The URL of the avatar image.
368
+ """
369
+ return pulumi.get(self, "avatar_url")
370
+
371
+ @_builtins.property
372
+ @pulumi.getter
373
+ def token(self) -> pulumi.Output[Optional[_builtins.str]]:
374
+ """
375
+ The access token of the user. If this field is omitted, a GitLab token with administrator scope is required to manage the avatar for the specified user. **Note**: the token is not available for imported resources.
376
+ """
377
+ return pulumi.get(self, "token")
378
+
379
+ @_builtins.property
380
+ @pulumi.getter(name="userId")
381
+ def user_id(self) -> pulumi.Output[_builtins.int]:
382
+ """
383
+ The ID of the user.
384
+ """
385
+ return pulumi.get(self, "user_id")
386
+
@@ -141,7 +141,7 @@ class UserGpgKey(pulumi.CustomResource):
141
141
 
142
142
  > Managing GPG keys for arbitrary users requires admin privileges.
143
143
 
144
- **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/api/users/#get-a-specific-gpg-key)
144
+ **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/api/user_keys/#get-a-gpg-key-for-a-user)
145
145
 
146
146
  ## Example Usage
147
147
 
@@ -206,7 +206,7 @@ class UserGpgKey(pulumi.CustomResource):
206
206
 
207
207
  > Managing GPG keys for arbitrary users requires admin privileges.
208
208
 
209
- **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/api/users/#get-a-specific-gpg-key)
209
+ **Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/api/user_keys/#get-a-gpg-key-for-a-user)
210
210
 
211
211
  ## Example Usage
212
212