pulumi-gcp 8.21.0a1741183435__py3-none-any.whl → 8.22.0__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 (75) hide show
  1. pulumi_gcp/__init__.py +32 -0
  2. pulumi_gcp/alloydb/_inputs.py +66 -0
  3. pulumi_gcp/alloydb/outputs.py +95 -0
  4. pulumi_gcp/backupdisasterrecovery/_inputs.py +3 -3
  5. pulumi_gcp/backupdisasterrecovery/outputs.py +4 -4
  6. pulumi_gcp/certificatemanager/certificate.py +53 -7
  7. pulumi_gcp/certificatemanager/outputs.py +8 -2
  8. pulumi_gcp/compute/__init__.py +1 -0
  9. pulumi_gcp/compute/_inputs.py +600 -17
  10. pulumi_gcp/compute/backend_service.py +195 -7
  11. pulumi_gcp/compute/disk.py +108 -0
  12. pulumi_gcp/compute/firewall_policy_association.py +28 -2
  13. pulumi_gcp/compute/get_backend_service.py +12 -1
  14. pulumi_gcp/compute/get_disk.py +23 -1
  15. pulumi_gcp/compute/get_region_disk.py +23 -1
  16. pulumi_gcp/compute/get_region_ssl_policy.py +203 -0
  17. pulumi_gcp/compute/outputs.py +623 -23
  18. pulumi_gcp/compute/region_backend_service.py +193 -7
  19. pulumi_gcp/compute/region_disk.py +114 -0
  20. pulumi_gcp/compute/shared_vpc_service_project.py +0 -4
  21. pulumi_gcp/compute/subnetwork.py +147 -0
  22. pulumi_gcp/container/_inputs.py +3 -3
  23. pulumi_gcp/container/outputs.py +4 -4
  24. pulumi_gcp/datastream/_inputs.py +273 -0
  25. pulumi_gcp/datastream/connection_profile.py +54 -2
  26. pulumi_gcp/datastream/outputs.py +224 -0
  27. pulumi_gcp/eventarc/__init__.py +1 -0
  28. pulumi_gcp/eventarc/_inputs.py +40 -0
  29. pulumi_gcp/eventarc/channel.py +85 -93
  30. pulumi_gcp/eventarc/google_api_source.py +997 -0
  31. pulumi_gcp/eventarc/outputs.py +41 -0
  32. pulumi_gcp/firebase/data_connect_service.py +40 -2
  33. pulumi_gcp/iam/__init__.py +2 -0
  34. pulumi_gcp/iam/_inputs.py +51 -18
  35. pulumi_gcp/iam/folders_policy_binding.py +10 -26
  36. pulumi_gcp/iam/oauth_client.py +979 -0
  37. pulumi_gcp/iam/oauth_client_credential.py +641 -0
  38. pulumi_gcp/iam/organizations_policy_binding.py +8 -24
  39. pulumi_gcp/iam/outputs.py +34 -12
  40. pulumi_gcp/iam/principal_access_boundary_policy.py +58 -22
  41. pulumi_gcp/iam/projects_policy_binding.py +8 -24
  42. pulumi_gcp/kms/crypto_key_version.py +14 -7
  43. pulumi_gcp/monitoring/_inputs.py +15 -18
  44. pulumi_gcp/monitoring/alert_policy.py +46 -0
  45. pulumi_gcp/monitoring/outputs.py +10 -12
  46. pulumi_gcp/networksecurity/__init__.py +1 -0
  47. pulumi_gcp/networksecurity/_inputs.py +30 -18
  48. pulumi_gcp/networksecurity/backend_authentication_config.py +847 -0
  49. pulumi_gcp/networksecurity/intercept_deployment.py +178 -94
  50. pulumi_gcp/networksecurity/intercept_deployment_group.py +161 -77
  51. pulumi_gcp/networksecurity/intercept_endpoint_group.py +161 -66
  52. pulumi_gcp/networksecurity/intercept_endpoint_group_association.py +137 -80
  53. pulumi_gcp/networksecurity/mirroring_deployment.py +178 -94
  54. pulumi_gcp/networksecurity/mirroring_deployment_group.py +161 -77
  55. pulumi_gcp/networksecurity/mirroring_endpoint_group.py +161 -80
  56. pulumi_gcp/networksecurity/mirroring_endpoint_group_association.py +137 -105
  57. pulumi_gcp/networksecurity/outputs.py +20 -12
  58. pulumi_gcp/networkservices/endpoint_policy.py +12 -0
  59. pulumi_gcp/networkservices/grpc_route.py +12 -0
  60. pulumi_gcp/networkservices/http_route.py +16 -0
  61. pulumi_gcp/networkservices/mesh.py +16 -0
  62. pulumi_gcp/networkservices/service_binding.py +14 -0
  63. pulumi_gcp/networkservices/tcp_route.py +16 -0
  64. pulumi_gcp/networkservices/tls_route.py +12 -0
  65. pulumi_gcp/pulumi-plugin.json +1 -1
  66. pulumi_gcp/tpu/_inputs.py +21 -1
  67. pulumi_gcp/tpu/outputs.py +13 -1
  68. pulumi_gcp/tpu/v2_vm.py +2 -0
  69. pulumi_gcp/vmwareengine/_inputs.py +6 -0
  70. pulumi_gcp/vmwareengine/outputs.py +8 -0
  71. pulumi_gcp/workstations/workstation_cluster.py +137 -1
  72. {pulumi_gcp-8.21.0a1741183435.dist-info → pulumi_gcp-8.22.0.dist-info}/METADATA +1 -1
  73. {pulumi_gcp-8.21.0a1741183435.dist-info → pulumi_gcp-8.22.0.dist-info}/RECORD +75 -70
  74. {pulumi_gcp-8.21.0a1741183435.dist-info → pulumi_gcp-8.22.0.dist-info}/WHEEL +1 -1
  75. {pulumi_gcp-8.21.0a1741183435.dist-info → pulumi_gcp-8.22.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,641 @@
1
+ # coding=utf-8
2
+ # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
3
+ # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+
5
+ import copy
6
+ import warnings
7
+ import sys
8
+ import pulumi
9
+ import pulumi.runtime
10
+ from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
15
+ from .. import _utilities
16
+
17
+ __all__ = ['OauthClientCredentialArgs', 'OauthClientCredential']
18
+
19
+ @pulumi.input_type
20
+ class OauthClientCredentialArgs:
21
+ def __init__(__self__, *,
22
+ location: pulumi.Input[str],
23
+ oauth_client_credential_id: pulumi.Input[str],
24
+ oauthclient: pulumi.Input[str],
25
+ disabled: Optional[pulumi.Input[bool]] = None,
26
+ display_name: Optional[pulumi.Input[str]] = None,
27
+ project: Optional[pulumi.Input[str]] = None):
28
+ """
29
+ The set of arguments for constructing a OauthClientCredential resource.
30
+ :param pulumi.Input[str] location: Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
31
+ :param pulumi.Input[str] oauth_client_credential_id: Required. The ID to use for the OauthClientCredential, which becomes the
32
+ final component of the resource name. This value should be 4-32 characters,
33
+ and may contain the characters [a-z0-9-]. The prefix `gcp-` is
34
+ reserved for use by Google, and may not be specified.
35
+
36
+
37
+ - - -
38
+ :param pulumi.Input[str] oauthclient: Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
39
+ :param pulumi.Input[bool] disabled: Whether the OauthClientCredential is disabled. You cannot use a
40
+ disabled OauthClientCredential.
41
+ :param pulumi.Input[str] display_name: A user-specified display name of the OauthClientCredential.
42
+ Cannot exceed 32 characters.
43
+ :param pulumi.Input[str] project: The ID of the project in which the resource belongs.
44
+ If it is not provided, the provider project is used.
45
+ """
46
+ pulumi.set(__self__, "location", location)
47
+ pulumi.set(__self__, "oauth_client_credential_id", oauth_client_credential_id)
48
+ pulumi.set(__self__, "oauthclient", oauthclient)
49
+ if disabled is not None:
50
+ pulumi.set(__self__, "disabled", disabled)
51
+ if display_name is not None:
52
+ pulumi.set(__self__, "display_name", display_name)
53
+ if project is not None:
54
+ pulumi.set(__self__, "project", project)
55
+
56
+ @property
57
+ @pulumi.getter
58
+ def location(self) -> pulumi.Input[str]:
59
+ """
60
+ Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
61
+ """
62
+ return pulumi.get(self, "location")
63
+
64
+ @location.setter
65
+ def location(self, value: pulumi.Input[str]):
66
+ pulumi.set(self, "location", value)
67
+
68
+ @property
69
+ @pulumi.getter(name="oauthClientCredentialId")
70
+ def oauth_client_credential_id(self) -> pulumi.Input[str]:
71
+ """
72
+ Required. The ID to use for the OauthClientCredential, which becomes the
73
+ final component of the resource name. This value should be 4-32 characters,
74
+ and may contain the characters [a-z0-9-]. The prefix `gcp-` is
75
+ reserved for use by Google, and may not be specified.
76
+
77
+
78
+ - - -
79
+ """
80
+ return pulumi.get(self, "oauth_client_credential_id")
81
+
82
+ @oauth_client_credential_id.setter
83
+ def oauth_client_credential_id(self, value: pulumi.Input[str]):
84
+ pulumi.set(self, "oauth_client_credential_id", value)
85
+
86
+ @property
87
+ @pulumi.getter
88
+ def oauthclient(self) -> pulumi.Input[str]:
89
+ """
90
+ Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
91
+ """
92
+ return pulumi.get(self, "oauthclient")
93
+
94
+ @oauthclient.setter
95
+ def oauthclient(self, value: pulumi.Input[str]):
96
+ pulumi.set(self, "oauthclient", value)
97
+
98
+ @property
99
+ @pulumi.getter
100
+ def disabled(self) -> Optional[pulumi.Input[bool]]:
101
+ """
102
+ Whether the OauthClientCredential is disabled. You cannot use a
103
+ disabled OauthClientCredential.
104
+ """
105
+ return pulumi.get(self, "disabled")
106
+
107
+ @disabled.setter
108
+ def disabled(self, value: Optional[pulumi.Input[bool]]):
109
+ pulumi.set(self, "disabled", value)
110
+
111
+ @property
112
+ @pulumi.getter(name="displayName")
113
+ def display_name(self) -> Optional[pulumi.Input[str]]:
114
+ """
115
+ A user-specified display name of the OauthClientCredential.
116
+ Cannot exceed 32 characters.
117
+ """
118
+ return pulumi.get(self, "display_name")
119
+
120
+ @display_name.setter
121
+ def display_name(self, value: Optional[pulumi.Input[str]]):
122
+ pulumi.set(self, "display_name", value)
123
+
124
+ @property
125
+ @pulumi.getter
126
+ def project(self) -> Optional[pulumi.Input[str]]:
127
+ """
128
+ The ID of the project in which the resource belongs.
129
+ If it is not provided, the provider project is used.
130
+ """
131
+ return pulumi.get(self, "project")
132
+
133
+ @project.setter
134
+ def project(self, value: Optional[pulumi.Input[str]]):
135
+ pulumi.set(self, "project", value)
136
+
137
+
138
+ @pulumi.input_type
139
+ class _OauthClientCredentialState:
140
+ def __init__(__self__, *,
141
+ client_secret: Optional[pulumi.Input[str]] = None,
142
+ disabled: Optional[pulumi.Input[bool]] = None,
143
+ display_name: Optional[pulumi.Input[str]] = None,
144
+ location: Optional[pulumi.Input[str]] = None,
145
+ name: Optional[pulumi.Input[str]] = None,
146
+ oauth_client_credential_id: Optional[pulumi.Input[str]] = None,
147
+ oauthclient: Optional[pulumi.Input[str]] = None,
148
+ project: Optional[pulumi.Input[str]] = None):
149
+ """
150
+ Input properties used for looking up and filtering OauthClientCredential resources.
151
+ :param pulumi.Input[str] client_secret: The system-generated OAuth client secret.
152
+ The client secret must be stored securely. If the client secret is
153
+ leaked, you must delete and re-create the client credential. To learn
154
+ more, see [OAuth client and credential security risks and
155
+ mitigations](https://cloud.google.com/iam/docs/workforce-oauth-app#security)
156
+ :param pulumi.Input[bool] disabled: Whether the OauthClientCredential is disabled. You cannot use a
157
+ disabled OauthClientCredential.
158
+ :param pulumi.Input[str] display_name: A user-specified display name of the OauthClientCredential.
159
+ Cannot exceed 32 characters.
160
+ :param pulumi.Input[str] location: Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
161
+ :param pulumi.Input[str] name: Immutable. Identifier. The resource name of the OauthClientCredential.
162
+ Format:
163
+ `projects/{project}/locations/{location}/oauthClients/{oauth_client}/credentials/{credential}`
164
+ :param pulumi.Input[str] oauth_client_credential_id: Required. The ID to use for the OauthClientCredential, which becomes the
165
+ final component of the resource name. This value should be 4-32 characters,
166
+ and may contain the characters [a-z0-9-]. The prefix `gcp-` is
167
+ reserved for use by Google, and may not be specified.
168
+
169
+
170
+ - - -
171
+ :param pulumi.Input[str] oauthclient: Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
172
+ :param pulumi.Input[str] project: The ID of the project in which the resource belongs.
173
+ If it is not provided, the provider project is used.
174
+ """
175
+ if client_secret is not None:
176
+ pulumi.set(__self__, "client_secret", client_secret)
177
+ if disabled is not None:
178
+ pulumi.set(__self__, "disabled", disabled)
179
+ if display_name is not None:
180
+ pulumi.set(__self__, "display_name", display_name)
181
+ if location is not None:
182
+ pulumi.set(__self__, "location", location)
183
+ if name is not None:
184
+ pulumi.set(__self__, "name", name)
185
+ if oauth_client_credential_id is not None:
186
+ pulumi.set(__self__, "oauth_client_credential_id", oauth_client_credential_id)
187
+ if oauthclient is not None:
188
+ pulumi.set(__self__, "oauthclient", oauthclient)
189
+ if project is not None:
190
+ pulumi.set(__self__, "project", project)
191
+
192
+ @property
193
+ @pulumi.getter(name="clientSecret")
194
+ def client_secret(self) -> Optional[pulumi.Input[str]]:
195
+ """
196
+ The system-generated OAuth client secret.
197
+ The client secret must be stored securely. If the client secret is
198
+ leaked, you must delete and re-create the client credential. To learn
199
+ more, see [OAuth client and credential security risks and
200
+ mitigations](https://cloud.google.com/iam/docs/workforce-oauth-app#security)
201
+ """
202
+ return pulumi.get(self, "client_secret")
203
+
204
+ @client_secret.setter
205
+ def client_secret(self, value: Optional[pulumi.Input[str]]):
206
+ pulumi.set(self, "client_secret", value)
207
+
208
+ @property
209
+ @pulumi.getter
210
+ def disabled(self) -> Optional[pulumi.Input[bool]]:
211
+ """
212
+ Whether the OauthClientCredential is disabled. You cannot use a
213
+ disabled OauthClientCredential.
214
+ """
215
+ return pulumi.get(self, "disabled")
216
+
217
+ @disabled.setter
218
+ def disabled(self, value: Optional[pulumi.Input[bool]]):
219
+ pulumi.set(self, "disabled", value)
220
+
221
+ @property
222
+ @pulumi.getter(name="displayName")
223
+ def display_name(self) -> Optional[pulumi.Input[str]]:
224
+ """
225
+ A user-specified display name of the OauthClientCredential.
226
+ Cannot exceed 32 characters.
227
+ """
228
+ return pulumi.get(self, "display_name")
229
+
230
+ @display_name.setter
231
+ def display_name(self, value: Optional[pulumi.Input[str]]):
232
+ pulumi.set(self, "display_name", value)
233
+
234
+ @property
235
+ @pulumi.getter
236
+ def location(self) -> Optional[pulumi.Input[str]]:
237
+ """
238
+ Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
239
+ """
240
+ return pulumi.get(self, "location")
241
+
242
+ @location.setter
243
+ def location(self, value: Optional[pulumi.Input[str]]):
244
+ pulumi.set(self, "location", value)
245
+
246
+ @property
247
+ @pulumi.getter
248
+ def name(self) -> Optional[pulumi.Input[str]]:
249
+ """
250
+ Immutable. Identifier. The resource name of the OauthClientCredential.
251
+ Format:
252
+ `projects/{project}/locations/{location}/oauthClients/{oauth_client}/credentials/{credential}`
253
+ """
254
+ return pulumi.get(self, "name")
255
+
256
+ @name.setter
257
+ def name(self, value: Optional[pulumi.Input[str]]):
258
+ pulumi.set(self, "name", value)
259
+
260
+ @property
261
+ @pulumi.getter(name="oauthClientCredentialId")
262
+ def oauth_client_credential_id(self) -> Optional[pulumi.Input[str]]:
263
+ """
264
+ Required. The ID to use for the OauthClientCredential, which becomes the
265
+ final component of the resource name. This value should be 4-32 characters,
266
+ and may contain the characters [a-z0-9-]. The prefix `gcp-` is
267
+ reserved for use by Google, and may not be specified.
268
+
269
+
270
+ - - -
271
+ """
272
+ return pulumi.get(self, "oauth_client_credential_id")
273
+
274
+ @oauth_client_credential_id.setter
275
+ def oauth_client_credential_id(self, value: Optional[pulumi.Input[str]]):
276
+ pulumi.set(self, "oauth_client_credential_id", value)
277
+
278
+ @property
279
+ @pulumi.getter
280
+ def oauthclient(self) -> Optional[pulumi.Input[str]]:
281
+ """
282
+ Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
283
+ """
284
+ return pulumi.get(self, "oauthclient")
285
+
286
+ @oauthclient.setter
287
+ def oauthclient(self, value: Optional[pulumi.Input[str]]):
288
+ pulumi.set(self, "oauthclient", value)
289
+
290
+ @property
291
+ @pulumi.getter
292
+ def project(self) -> Optional[pulumi.Input[str]]:
293
+ """
294
+ The ID of the project in which the resource belongs.
295
+ If it is not provided, the provider project is used.
296
+ """
297
+ return pulumi.get(self, "project")
298
+
299
+ @project.setter
300
+ def project(self, value: Optional[pulumi.Input[str]]):
301
+ pulumi.set(self, "project", value)
302
+
303
+
304
+ class OauthClientCredential(pulumi.CustomResource):
305
+ @overload
306
+ def __init__(__self__,
307
+ resource_name: str,
308
+ opts: Optional[pulumi.ResourceOptions] = None,
309
+ disabled: Optional[pulumi.Input[bool]] = None,
310
+ display_name: Optional[pulumi.Input[str]] = None,
311
+ location: Optional[pulumi.Input[str]] = None,
312
+ oauth_client_credential_id: Optional[pulumi.Input[str]] = None,
313
+ oauthclient: Optional[pulumi.Input[str]] = None,
314
+ project: Optional[pulumi.Input[str]] = None,
315
+ __props__=None):
316
+ """
317
+ Represents an OAuth Client Credential. Used to authenticate an OAuth Client
318
+ while accessing Google Cloud resources on behalf of a Workforce Identity Federation user
319
+ by using OAuth 2.0 Protocol.
320
+
321
+ To get more information about OauthClientCredential, see:
322
+
323
+ * [API documentation](https://cloud.google.com/iam/docs/reference/rest/v1/projects.locations.oauthClients.credentials)
324
+ * How-to Guides
325
+ * [Managing OAuth clients](https://cloud.google.com/iam/docs/workforce-manage-oauth-app#manage-clients)
326
+
327
+ ## Example Usage
328
+
329
+ ### Iam Oauth Client Credential Full
330
+
331
+ ```python
332
+ import pulumi
333
+ import pulumi_gcp as gcp
334
+
335
+ oauth_client = gcp.iam.OauthClient("oauth_client",
336
+ oauth_client_id="example-client-id",
337
+ location="global",
338
+ allowed_grant_types=["AUTHORIZATION_CODE_GRANT"],
339
+ allowed_redirect_uris=["https://www.example.com"],
340
+ allowed_scopes=["https://www.googleapis.com/auth/cloud-platform"],
341
+ client_type="CONFIDENTIAL_CLIENT")
342
+ example = gcp.iam.OauthClientCredential("example",
343
+ oauthclient=oauth_client.oauth_client_id,
344
+ location=oauth_client.location,
345
+ oauth_client_credential_id="cred-id",
346
+ disabled=True,
347
+ display_name="Display Name of credential")
348
+ ```
349
+
350
+ ## Import
351
+
352
+ OauthClientCredential can be imported using any of these accepted formats:
353
+
354
+ * `projects/{{project}}/locations/{{location}}/oauthClients/{{oauthclient}}/credentials/{{oauth_client_credential_id}}`
355
+
356
+ * `{{project}}/{{location}}/{{oauthclient}}/{{oauth_client_credential_id}}`
357
+
358
+ * `{{location}}/{{oauthclient}}/{{oauth_client_credential_id}}`
359
+
360
+ When using the `pulumi import` command, OauthClientCredential can be imported using one of the formats above. For example:
361
+
362
+ ```sh
363
+ $ pulumi import gcp:iam/oauthClientCredential:OauthClientCredential default projects/{{project}}/locations/{{location}}/oauthClients/{{oauthclient}}/credentials/{{oauth_client_credential_id}}
364
+ ```
365
+
366
+ ```sh
367
+ $ pulumi import gcp:iam/oauthClientCredential:OauthClientCredential default {{project}}/{{location}}/{{oauthclient}}/{{oauth_client_credential_id}}
368
+ ```
369
+
370
+ ```sh
371
+ $ pulumi import gcp:iam/oauthClientCredential:OauthClientCredential default {{location}}/{{oauthclient}}/{{oauth_client_credential_id}}
372
+ ```
373
+
374
+ :param str resource_name: The name of the resource.
375
+ :param pulumi.ResourceOptions opts: Options for the resource.
376
+ :param pulumi.Input[bool] disabled: Whether the OauthClientCredential is disabled. You cannot use a
377
+ disabled OauthClientCredential.
378
+ :param pulumi.Input[str] display_name: A user-specified display name of the OauthClientCredential.
379
+ Cannot exceed 32 characters.
380
+ :param pulumi.Input[str] location: Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
381
+ :param pulumi.Input[str] oauth_client_credential_id: Required. The ID to use for the OauthClientCredential, which becomes the
382
+ final component of the resource name. This value should be 4-32 characters,
383
+ and may contain the characters [a-z0-9-]. The prefix `gcp-` is
384
+ reserved for use by Google, and may not be specified.
385
+
386
+
387
+ - - -
388
+ :param pulumi.Input[str] oauthclient: Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
389
+ :param pulumi.Input[str] project: The ID of the project in which the resource belongs.
390
+ If it is not provided, the provider project is used.
391
+ """
392
+ ...
393
+ @overload
394
+ def __init__(__self__,
395
+ resource_name: str,
396
+ args: OauthClientCredentialArgs,
397
+ opts: Optional[pulumi.ResourceOptions] = None):
398
+ """
399
+ Represents an OAuth Client Credential. Used to authenticate an OAuth Client
400
+ while accessing Google Cloud resources on behalf of a Workforce Identity Federation user
401
+ by using OAuth 2.0 Protocol.
402
+
403
+ To get more information about OauthClientCredential, see:
404
+
405
+ * [API documentation](https://cloud.google.com/iam/docs/reference/rest/v1/projects.locations.oauthClients.credentials)
406
+ * How-to Guides
407
+ * [Managing OAuth clients](https://cloud.google.com/iam/docs/workforce-manage-oauth-app#manage-clients)
408
+
409
+ ## Example Usage
410
+
411
+ ### Iam Oauth Client Credential Full
412
+
413
+ ```python
414
+ import pulumi
415
+ import pulumi_gcp as gcp
416
+
417
+ oauth_client = gcp.iam.OauthClient("oauth_client",
418
+ oauth_client_id="example-client-id",
419
+ location="global",
420
+ allowed_grant_types=["AUTHORIZATION_CODE_GRANT"],
421
+ allowed_redirect_uris=["https://www.example.com"],
422
+ allowed_scopes=["https://www.googleapis.com/auth/cloud-platform"],
423
+ client_type="CONFIDENTIAL_CLIENT")
424
+ example = gcp.iam.OauthClientCredential("example",
425
+ oauthclient=oauth_client.oauth_client_id,
426
+ location=oauth_client.location,
427
+ oauth_client_credential_id="cred-id",
428
+ disabled=True,
429
+ display_name="Display Name of credential")
430
+ ```
431
+
432
+ ## Import
433
+
434
+ OauthClientCredential can be imported using any of these accepted formats:
435
+
436
+ * `projects/{{project}}/locations/{{location}}/oauthClients/{{oauthclient}}/credentials/{{oauth_client_credential_id}}`
437
+
438
+ * `{{project}}/{{location}}/{{oauthclient}}/{{oauth_client_credential_id}}`
439
+
440
+ * `{{location}}/{{oauthclient}}/{{oauth_client_credential_id}}`
441
+
442
+ When using the `pulumi import` command, OauthClientCredential can be imported using one of the formats above. For example:
443
+
444
+ ```sh
445
+ $ pulumi import gcp:iam/oauthClientCredential:OauthClientCredential default projects/{{project}}/locations/{{location}}/oauthClients/{{oauthclient}}/credentials/{{oauth_client_credential_id}}
446
+ ```
447
+
448
+ ```sh
449
+ $ pulumi import gcp:iam/oauthClientCredential:OauthClientCredential default {{project}}/{{location}}/{{oauthclient}}/{{oauth_client_credential_id}}
450
+ ```
451
+
452
+ ```sh
453
+ $ pulumi import gcp:iam/oauthClientCredential:OauthClientCredential default {{location}}/{{oauthclient}}/{{oauth_client_credential_id}}
454
+ ```
455
+
456
+ :param str resource_name: The name of the resource.
457
+ :param OauthClientCredentialArgs args: The arguments to use to populate this resource's properties.
458
+ :param pulumi.ResourceOptions opts: Options for the resource.
459
+ """
460
+ ...
461
+ def __init__(__self__, resource_name: str, *args, **kwargs):
462
+ resource_args, opts = _utilities.get_resource_args_opts(OauthClientCredentialArgs, pulumi.ResourceOptions, *args, **kwargs)
463
+ if resource_args is not None:
464
+ __self__._internal_init(resource_name, opts, **resource_args.__dict__)
465
+ else:
466
+ __self__._internal_init(resource_name, *args, **kwargs)
467
+
468
+ def _internal_init(__self__,
469
+ resource_name: str,
470
+ opts: Optional[pulumi.ResourceOptions] = None,
471
+ disabled: Optional[pulumi.Input[bool]] = None,
472
+ display_name: Optional[pulumi.Input[str]] = None,
473
+ location: Optional[pulumi.Input[str]] = None,
474
+ oauth_client_credential_id: Optional[pulumi.Input[str]] = None,
475
+ oauthclient: Optional[pulumi.Input[str]] = None,
476
+ project: Optional[pulumi.Input[str]] = None,
477
+ __props__=None):
478
+ opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
479
+ if not isinstance(opts, pulumi.ResourceOptions):
480
+ raise TypeError('Expected resource options to be a ResourceOptions instance')
481
+ if opts.id is None:
482
+ if __props__ is not None:
483
+ raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
484
+ __props__ = OauthClientCredentialArgs.__new__(OauthClientCredentialArgs)
485
+
486
+ __props__.__dict__["disabled"] = disabled
487
+ __props__.__dict__["display_name"] = display_name
488
+ if location is None and not opts.urn:
489
+ raise TypeError("Missing required property 'location'")
490
+ __props__.__dict__["location"] = location
491
+ if oauth_client_credential_id is None and not opts.urn:
492
+ raise TypeError("Missing required property 'oauth_client_credential_id'")
493
+ __props__.__dict__["oauth_client_credential_id"] = oauth_client_credential_id
494
+ if oauthclient is None and not opts.urn:
495
+ raise TypeError("Missing required property 'oauthclient'")
496
+ __props__.__dict__["oauthclient"] = oauthclient
497
+ __props__.__dict__["project"] = project
498
+ __props__.__dict__["client_secret"] = None
499
+ __props__.__dict__["name"] = None
500
+ super(OauthClientCredential, __self__).__init__(
501
+ 'gcp:iam/oauthClientCredential:OauthClientCredential',
502
+ resource_name,
503
+ __props__,
504
+ opts)
505
+
506
+ @staticmethod
507
+ def get(resource_name: str,
508
+ id: pulumi.Input[str],
509
+ opts: Optional[pulumi.ResourceOptions] = None,
510
+ client_secret: Optional[pulumi.Input[str]] = None,
511
+ disabled: Optional[pulumi.Input[bool]] = None,
512
+ display_name: Optional[pulumi.Input[str]] = None,
513
+ location: Optional[pulumi.Input[str]] = None,
514
+ name: Optional[pulumi.Input[str]] = None,
515
+ oauth_client_credential_id: Optional[pulumi.Input[str]] = None,
516
+ oauthclient: Optional[pulumi.Input[str]] = None,
517
+ project: Optional[pulumi.Input[str]] = None) -> 'OauthClientCredential':
518
+ """
519
+ Get an existing OauthClientCredential resource's state with the given name, id, and optional extra
520
+ properties used to qualify the lookup.
521
+
522
+ :param str resource_name: The unique name of the resulting resource.
523
+ :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
524
+ :param pulumi.ResourceOptions opts: Options for the resource.
525
+ :param pulumi.Input[str] client_secret: The system-generated OAuth client secret.
526
+ The client secret must be stored securely. If the client secret is
527
+ leaked, you must delete and re-create the client credential. To learn
528
+ more, see [OAuth client and credential security risks and
529
+ mitigations](https://cloud.google.com/iam/docs/workforce-oauth-app#security)
530
+ :param pulumi.Input[bool] disabled: Whether the OauthClientCredential is disabled. You cannot use a
531
+ disabled OauthClientCredential.
532
+ :param pulumi.Input[str] display_name: A user-specified display name of the OauthClientCredential.
533
+ Cannot exceed 32 characters.
534
+ :param pulumi.Input[str] location: Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
535
+ :param pulumi.Input[str] name: Immutable. Identifier. The resource name of the OauthClientCredential.
536
+ Format:
537
+ `projects/{project}/locations/{location}/oauthClients/{oauth_client}/credentials/{credential}`
538
+ :param pulumi.Input[str] oauth_client_credential_id: Required. The ID to use for the OauthClientCredential, which becomes the
539
+ final component of the resource name. This value should be 4-32 characters,
540
+ and may contain the characters [a-z0-9-]. The prefix `gcp-` is
541
+ reserved for use by Google, and may not be specified.
542
+
543
+
544
+ - - -
545
+ :param pulumi.Input[str] oauthclient: Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
546
+ :param pulumi.Input[str] project: The ID of the project in which the resource belongs.
547
+ If it is not provided, the provider project is used.
548
+ """
549
+ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
550
+
551
+ __props__ = _OauthClientCredentialState.__new__(_OauthClientCredentialState)
552
+
553
+ __props__.__dict__["client_secret"] = client_secret
554
+ __props__.__dict__["disabled"] = disabled
555
+ __props__.__dict__["display_name"] = display_name
556
+ __props__.__dict__["location"] = location
557
+ __props__.__dict__["name"] = name
558
+ __props__.__dict__["oauth_client_credential_id"] = oauth_client_credential_id
559
+ __props__.__dict__["oauthclient"] = oauthclient
560
+ __props__.__dict__["project"] = project
561
+ return OauthClientCredential(resource_name, opts=opts, __props__=__props__)
562
+
563
+ @property
564
+ @pulumi.getter(name="clientSecret")
565
+ def client_secret(self) -> pulumi.Output[str]:
566
+ """
567
+ The system-generated OAuth client secret.
568
+ The client secret must be stored securely. If the client secret is
569
+ leaked, you must delete and re-create the client credential. To learn
570
+ more, see [OAuth client and credential security risks and
571
+ mitigations](https://cloud.google.com/iam/docs/workforce-oauth-app#security)
572
+ """
573
+ return pulumi.get(self, "client_secret")
574
+
575
+ @property
576
+ @pulumi.getter
577
+ def disabled(self) -> pulumi.Output[Optional[bool]]:
578
+ """
579
+ Whether the OauthClientCredential is disabled. You cannot use a
580
+ disabled OauthClientCredential.
581
+ """
582
+ return pulumi.get(self, "disabled")
583
+
584
+ @property
585
+ @pulumi.getter(name="displayName")
586
+ def display_name(self) -> pulumi.Output[Optional[str]]:
587
+ """
588
+ A user-specified display name of the OauthClientCredential.
589
+ Cannot exceed 32 characters.
590
+ """
591
+ return pulumi.get(self, "display_name")
592
+
593
+ @property
594
+ @pulumi.getter
595
+ def location(self) -> pulumi.Output[str]:
596
+ """
597
+ Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
598
+ """
599
+ return pulumi.get(self, "location")
600
+
601
+ @property
602
+ @pulumi.getter
603
+ def name(self) -> pulumi.Output[str]:
604
+ """
605
+ Immutable. Identifier. The resource name of the OauthClientCredential.
606
+ Format:
607
+ `projects/{project}/locations/{location}/oauthClients/{oauth_client}/credentials/{credential}`
608
+ """
609
+ return pulumi.get(self, "name")
610
+
611
+ @property
612
+ @pulumi.getter(name="oauthClientCredentialId")
613
+ def oauth_client_credential_id(self) -> pulumi.Output[str]:
614
+ """
615
+ Required. The ID to use for the OauthClientCredential, which becomes the
616
+ final component of the resource name. This value should be 4-32 characters,
617
+ and may contain the characters [a-z0-9-]. The prefix `gcp-` is
618
+ reserved for use by Google, and may not be specified.
619
+
620
+
621
+ - - -
622
+ """
623
+ return pulumi.get(self, "oauth_client_credential_id")
624
+
625
+ @property
626
+ @pulumi.getter
627
+ def oauthclient(self) -> pulumi.Output[str]:
628
+ """
629
+ Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
630
+ """
631
+ return pulumi.get(self, "oauthclient")
632
+
633
+ @property
634
+ @pulumi.getter
635
+ def project(self) -> pulumi.Output[str]:
636
+ """
637
+ The ID of the project in which the resource belongs.
638
+ If it is not provided, the provider project is used.
639
+ """
640
+ return pulumi.get(self, "project")
641
+