pulumi-snowflake 0.56.0a1721200104__py3-none-any.whl → 0.56.0a1721667766__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 (62) hide show
  1. pulumi_snowflake/__init__.py +66 -217
  2. pulumi_snowflake/_inputs.py +10145 -1557
  3. pulumi_snowflake/_utilities.py +3 -4
  4. pulumi_snowflake/api_authentication_integration_with_authorization_code_grant.py +688 -0
  5. pulumi_snowflake/api_authentication_integration_with_client_credentials.py +641 -0
  6. pulumi_snowflake/api_authentication_integration_with_jwt_bearer.py +676 -0
  7. pulumi_snowflake/cortex_search_service.py +563 -0
  8. pulumi_snowflake/database.py +854 -232
  9. pulumi_snowflake/database_old.py +556 -0
  10. pulumi_snowflake/external_oauth_integration.py +562 -534
  11. pulumi_snowflake/failover_group.py +2 -2
  12. pulumi_snowflake/get_cortex_search_services.py +197 -0
  13. pulumi_snowflake/get_databases.py +71 -62
  14. pulumi_snowflake/get_security_integrations.py +122 -0
  15. pulumi_snowflake/get_warehouses.py +66 -18
  16. pulumi_snowflake/grant_privileges_to_database_role.py +0 -4
  17. pulumi_snowflake/managed_account.py +7 -7
  18. pulumi_snowflake/oauth_integration.py +4 -0
  19. pulumi_snowflake/oauth_integration_for_custom_clients.py +936 -0
  20. pulumi_snowflake/oauth_integration_for_partner_applications.py +580 -0
  21. pulumi_snowflake/outputs.py +12987 -2857
  22. pulumi_snowflake/pulumi-plugin.json +1 -1
  23. pulumi_snowflake/saml2_integration.py +971 -0
  24. pulumi_snowflake/saml_integration.py +4 -0
  25. pulumi_snowflake/scim_integration.py +255 -105
  26. pulumi_snowflake/secondary_database.py +1059 -0
  27. pulumi_snowflake/sequence.py +6 -6
  28. pulumi_snowflake/shared_database.py +914 -0
  29. pulumi_snowflake/tag_association.py +38 -38
  30. pulumi_snowflake/user_password_policy_attachment.py +32 -0
  31. pulumi_snowflake/warehouse.py +143 -120
  32. {pulumi_snowflake-0.56.0a1721200104.dist-info → pulumi_snowflake-0.56.0a1721667766.dist-info}/METADATA +1 -1
  33. {pulumi_snowflake-0.56.0a1721200104.dist-info → pulumi_snowflake-0.56.0a1721667766.dist-info}/RECORD +35 -50
  34. {pulumi_snowflake-0.56.0a1721200104.dist-info → pulumi_snowflake-0.56.0a1721667766.dist-info}/WHEEL +1 -1
  35. pulumi_snowflake/account_grant.py +0 -319
  36. pulumi_snowflake/database_grant.py +0 -471
  37. pulumi_snowflake/external_table_grant.py +0 -666
  38. pulumi_snowflake/failover_group_grant.py +0 -368
  39. pulumi_snowflake/file_format_grant.py +0 -611
  40. pulumi_snowflake/function_grant.py +0 -721
  41. pulumi_snowflake/grant_privileges_to_role.py +0 -821
  42. pulumi_snowflake/integration_grant.py +0 -416
  43. pulumi_snowflake/masking_policy_grant.py +0 -518
  44. pulumi_snowflake/materialized_view_grant.py +0 -665
  45. pulumi_snowflake/pipe_grant.py +0 -563
  46. pulumi_snowflake/procedure_grant.py +0 -721
  47. pulumi_snowflake/resource_monitor_grant.py +0 -363
  48. pulumi_snowflake/role_grants.py +0 -340
  49. pulumi_snowflake/role_ownership_grant.py +0 -329
  50. pulumi_snowflake/row_access_policy_grant.py +0 -516
  51. pulumi_snowflake/schema_grant.py +0 -603
  52. pulumi_snowflake/sequence_grant.py +0 -611
  53. pulumi_snowflake/stage_grant.py +0 -611
  54. pulumi_snowflake/stream_grant.py +0 -611
  55. pulumi_snowflake/table_grant.py +0 -653
  56. pulumi_snowflake/tag_grant.py +0 -508
  57. pulumi_snowflake/task_grant.py +0 -611
  58. pulumi_snowflake/user_grant.py +0 -370
  59. pulumi_snowflake/user_ownership_grant.py +0 -275
  60. pulumi_snowflake/view_grant.py +0 -685
  61. pulumi_snowflake/warehouse_grant.py +0 -416
  62. {pulumi_snowflake-0.56.0a1721200104.dist-info → pulumi_snowflake-0.56.0a1721667766.dist-info}/top_level.txt +0 -0
@@ -1,821 +0,0 @@
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 pulumi
8
- import pulumi.runtime
9
- from typing import Any, Mapping, Optional, Sequence, Union, overload
10
- from . import _utilities
11
- from . import outputs
12
- from ._inputs import *
13
-
14
- __all__ = ['GrantPrivilegesToRoleArgs', 'GrantPrivilegesToRole']
15
-
16
- @pulumi.input_type
17
- class GrantPrivilegesToRoleArgs:
18
- def __init__(__self__, *,
19
- role_name: pulumi.Input[str],
20
- all_privileges: Optional[pulumi.Input[bool]] = None,
21
- on_account: Optional[pulumi.Input[bool]] = None,
22
- on_account_object: Optional[pulumi.Input['GrantPrivilegesToRoleOnAccountObjectArgs']] = None,
23
- on_schema: Optional[pulumi.Input['GrantPrivilegesToRoleOnSchemaArgs']] = None,
24
- on_schema_object: Optional[pulumi.Input['GrantPrivilegesToRoleOnSchemaObjectArgs']] = None,
25
- privileges: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
26
- with_grant_option: Optional[pulumi.Input[bool]] = None):
27
- """
28
- The set of arguments for constructing a GrantPrivilegesToRole resource.
29
- :param pulumi.Input[str] role_name: The fully qualified name of the role to which privileges will be granted.
30
- :param pulumi.Input[bool] all_privileges: Grant all privileges on the account role.
31
- :param pulumi.Input[bool] on_account: If true, the privileges will be granted on the account.
32
- :param pulumi.Input['GrantPrivilegesToRoleOnAccountObjectArgs'] on_account_object: Specifies the account object on which privileges will be granted
33
- :param pulumi.Input['GrantPrivilegesToRoleOnSchemaArgs'] on_schema: Specifies the schema on which privileges will be granted.
34
- :param pulumi.Input['GrantPrivilegesToRoleOnSchemaObjectArgs'] on_schema_object: Specifies the schema object on which privileges will be granted.
35
- :param pulumi.Input[Sequence[pulumi.Input[str]]] privileges: The privileges to grant on the account role.
36
- :param pulumi.Input[bool] with_grant_option: Specifies whether the grantee can grant the privileges to other users.
37
- """
38
- pulumi.set(__self__, "role_name", role_name)
39
- if all_privileges is not None:
40
- pulumi.set(__self__, "all_privileges", all_privileges)
41
- if on_account is not None:
42
- pulumi.set(__self__, "on_account", on_account)
43
- if on_account_object is not None:
44
- pulumi.set(__self__, "on_account_object", on_account_object)
45
- if on_schema is not None:
46
- pulumi.set(__self__, "on_schema", on_schema)
47
- if on_schema_object is not None:
48
- pulumi.set(__self__, "on_schema_object", on_schema_object)
49
- if privileges is not None:
50
- pulumi.set(__self__, "privileges", privileges)
51
- if with_grant_option is not None:
52
- pulumi.set(__self__, "with_grant_option", with_grant_option)
53
-
54
- @property
55
- @pulumi.getter(name="roleName")
56
- def role_name(self) -> pulumi.Input[str]:
57
- """
58
- The fully qualified name of the role to which privileges will be granted.
59
- """
60
- return pulumi.get(self, "role_name")
61
-
62
- @role_name.setter
63
- def role_name(self, value: pulumi.Input[str]):
64
- pulumi.set(self, "role_name", value)
65
-
66
- @property
67
- @pulumi.getter(name="allPrivileges")
68
- def all_privileges(self) -> Optional[pulumi.Input[bool]]:
69
- """
70
- Grant all privileges on the account role.
71
- """
72
- return pulumi.get(self, "all_privileges")
73
-
74
- @all_privileges.setter
75
- def all_privileges(self, value: Optional[pulumi.Input[bool]]):
76
- pulumi.set(self, "all_privileges", value)
77
-
78
- @property
79
- @pulumi.getter(name="onAccount")
80
- def on_account(self) -> Optional[pulumi.Input[bool]]:
81
- """
82
- If true, the privileges will be granted on the account.
83
- """
84
- return pulumi.get(self, "on_account")
85
-
86
- @on_account.setter
87
- def on_account(self, value: Optional[pulumi.Input[bool]]):
88
- pulumi.set(self, "on_account", value)
89
-
90
- @property
91
- @pulumi.getter(name="onAccountObject")
92
- def on_account_object(self) -> Optional[pulumi.Input['GrantPrivilegesToRoleOnAccountObjectArgs']]:
93
- """
94
- Specifies the account object on which privileges will be granted
95
- """
96
- return pulumi.get(self, "on_account_object")
97
-
98
- @on_account_object.setter
99
- def on_account_object(self, value: Optional[pulumi.Input['GrantPrivilegesToRoleOnAccountObjectArgs']]):
100
- pulumi.set(self, "on_account_object", value)
101
-
102
- @property
103
- @pulumi.getter(name="onSchema")
104
- def on_schema(self) -> Optional[pulumi.Input['GrantPrivilegesToRoleOnSchemaArgs']]:
105
- """
106
- Specifies the schema on which privileges will be granted.
107
- """
108
- return pulumi.get(self, "on_schema")
109
-
110
- @on_schema.setter
111
- def on_schema(self, value: Optional[pulumi.Input['GrantPrivilegesToRoleOnSchemaArgs']]):
112
- pulumi.set(self, "on_schema", value)
113
-
114
- @property
115
- @pulumi.getter(name="onSchemaObject")
116
- def on_schema_object(self) -> Optional[pulumi.Input['GrantPrivilegesToRoleOnSchemaObjectArgs']]:
117
- """
118
- Specifies the schema object on which privileges will be granted.
119
- """
120
- return pulumi.get(self, "on_schema_object")
121
-
122
- @on_schema_object.setter
123
- def on_schema_object(self, value: Optional[pulumi.Input['GrantPrivilegesToRoleOnSchemaObjectArgs']]):
124
- pulumi.set(self, "on_schema_object", value)
125
-
126
- @property
127
- @pulumi.getter
128
- def privileges(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
129
- """
130
- The privileges to grant on the account role.
131
- """
132
- return pulumi.get(self, "privileges")
133
-
134
- @privileges.setter
135
- def privileges(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
136
- pulumi.set(self, "privileges", value)
137
-
138
- @property
139
- @pulumi.getter(name="withGrantOption")
140
- def with_grant_option(self) -> Optional[pulumi.Input[bool]]:
141
- """
142
- Specifies whether the grantee can grant the privileges to other users.
143
- """
144
- return pulumi.get(self, "with_grant_option")
145
-
146
- @with_grant_option.setter
147
- def with_grant_option(self, value: Optional[pulumi.Input[bool]]):
148
- pulumi.set(self, "with_grant_option", value)
149
-
150
-
151
- @pulumi.input_type
152
- class _GrantPrivilegesToRoleState:
153
- def __init__(__self__, *,
154
- all_privileges: Optional[pulumi.Input[bool]] = None,
155
- on_account: Optional[pulumi.Input[bool]] = None,
156
- on_account_object: Optional[pulumi.Input['GrantPrivilegesToRoleOnAccountObjectArgs']] = None,
157
- on_schema: Optional[pulumi.Input['GrantPrivilegesToRoleOnSchemaArgs']] = None,
158
- on_schema_object: Optional[pulumi.Input['GrantPrivilegesToRoleOnSchemaObjectArgs']] = None,
159
- privileges: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
160
- role_name: Optional[pulumi.Input[str]] = None,
161
- with_grant_option: Optional[pulumi.Input[bool]] = None):
162
- """
163
- Input properties used for looking up and filtering GrantPrivilegesToRole resources.
164
- :param pulumi.Input[bool] all_privileges: Grant all privileges on the account role.
165
- :param pulumi.Input[bool] on_account: If true, the privileges will be granted on the account.
166
- :param pulumi.Input['GrantPrivilegesToRoleOnAccountObjectArgs'] on_account_object: Specifies the account object on which privileges will be granted
167
- :param pulumi.Input['GrantPrivilegesToRoleOnSchemaArgs'] on_schema: Specifies the schema on which privileges will be granted.
168
- :param pulumi.Input['GrantPrivilegesToRoleOnSchemaObjectArgs'] on_schema_object: Specifies the schema object on which privileges will be granted.
169
- :param pulumi.Input[Sequence[pulumi.Input[str]]] privileges: The privileges to grant on the account role.
170
- :param pulumi.Input[str] role_name: The fully qualified name of the role to which privileges will be granted.
171
- :param pulumi.Input[bool] with_grant_option: Specifies whether the grantee can grant the privileges to other users.
172
- """
173
- if all_privileges is not None:
174
- pulumi.set(__self__, "all_privileges", all_privileges)
175
- if on_account is not None:
176
- pulumi.set(__self__, "on_account", on_account)
177
- if on_account_object is not None:
178
- pulumi.set(__self__, "on_account_object", on_account_object)
179
- if on_schema is not None:
180
- pulumi.set(__self__, "on_schema", on_schema)
181
- if on_schema_object is not None:
182
- pulumi.set(__self__, "on_schema_object", on_schema_object)
183
- if privileges is not None:
184
- pulumi.set(__self__, "privileges", privileges)
185
- if role_name is not None:
186
- pulumi.set(__self__, "role_name", role_name)
187
- if with_grant_option is not None:
188
- pulumi.set(__self__, "with_grant_option", with_grant_option)
189
-
190
- @property
191
- @pulumi.getter(name="allPrivileges")
192
- def all_privileges(self) -> Optional[pulumi.Input[bool]]:
193
- """
194
- Grant all privileges on the account role.
195
- """
196
- return pulumi.get(self, "all_privileges")
197
-
198
- @all_privileges.setter
199
- def all_privileges(self, value: Optional[pulumi.Input[bool]]):
200
- pulumi.set(self, "all_privileges", value)
201
-
202
- @property
203
- @pulumi.getter(name="onAccount")
204
- def on_account(self) -> Optional[pulumi.Input[bool]]:
205
- """
206
- If true, the privileges will be granted on the account.
207
- """
208
- return pulumi.get(self, "on_account")
209
-
210
- @on_account.setter
211
- def on_account(self, value: Optional[pulumi.Input[bool]]):
212
- pulumi.set(self, "on_account", value)
213
-
214
- @property
215
- @pulumi.getter(name="onAccountObject")
216
- def on_account_object(self) -> Optional[pulumi.Input['GrantPrivilegesToRoleOnAccountObjectArgs']]:
217
- """
218
- Specifies the account object on which privileges will be granted
219
- """
220
- return pulumi.get(self, "on_account_object")
221
-
222
- @on_account_object.setter
223
- def on_account_object(self, value: Optional[pulumi.Input['GrantPrivilegesToRoleOnAccountObjectArgs']]):
224
- pulumi.set(self, "on_account_object", value)
225
-
226
- @property
227
- @pulumi.getter(name="onSchema")
228
- def on_schema(self) -> Optional[pulumi.Input['GrantPrivilegesToRoleOnSchemaArgs']]:
229
- """
230
- Specifies the schema on which privileges will be granted.
231
- """
232
- return pulumi.get(self, "on_schema")
233
-
234
- @on_schema.setter
235
- def on_schema(self, value: Optional[pulumi.Input['GrantPrivilegesToRoleOnSchemaArgs']]):
236
- pulumi.set(self, "on_schema", value)
237
-
238
- @property
239
- @pulumi.getter(name="onSchemaObject")
240
- def on_schema_object(self) -> Optional[pulumi.Input['GrantPrivilegesToRoleOnSchemaObjectArgs']]:
241
- """
242
- Specifies the schema object on which privileges will be granted.
243
- """
244
- return pulumi.get(self, "on_schema_object")
245
-
246
- @on_schema_object.setter
247
- def on_schema_object(self, value: Optional[pulumi.Input['GrantPrivilegesToRoleOnSchemaObjectArgs']]):
248
- pulumi.set(self, "on_schema_object", value)
249
-
250
- @property
251
- @pulumi.getter
252
- def privileges(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
253
- """
254
- The privileges to grant on the account role.
255
- """
256
- return pulumi.get(self, "privileges")
257
-
258
- @privileges.setter
259
- def privileges(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
260
- pulumi.set(self, "privileges", value)
261
-
262
- @property
263
- @pulumi.getter(name="roleName")
264
- def role_name(self) -> Optional[pulumi.Input[str]]:
265
- """
266
- The fully qualified name of the role to which privileges will be granted.
267
- """
268
- return pulumi.get(self, "role_name")
269
-
270
- @role_name.setter
271
- def role_name(self, value: Optional[pulumi.Input[str]]):
272
- pulumi.set(self, "role_name", value)
273
-
274
- @property
275
- @pulumi.getter(name="withGrantOption")
276
- def with_grant_option(self) -> Optional[pulumi.Input[bool]]:
277
- """
278
- Specifies whether the grantee can grant the privileges to other users.
279
- """
280
- return pulumi.get(self, "with_grant_option")
281
-
282
- @with_grant_option.setter
283
- def with_grant_option(self, value: Optional[pulumi.Input[bool]]):
284
- pulumi.set(self, "with_grant_option", value)
285
-
286
-
287
- class GrantPrivilegesToRole(pulumi.CustomResource):
288
- @overload
289
- def __init__(__self__,
290
- resource_name: str,
291
- opts: Optional[pulumi.ResourceOptions] = None,
292
- all_privileges: Optional[pulumi.Input[bool]] = None,
293
- on_account: Optional[pulumi.Input[bool]] = None,
294
- on_account_object: Optional[pulumi.Input[pulumi.InputType['GrantPrivilegesToRoleOnAccountObjectArgs']]] = None,
295
- on_schema: Optional[pulumi.Input[pulumi.InputType['GrantPrivilegesToRoleOnSchemaArgs']]] = None,
296
- on_schema_object: Optional[pulumi.Input[pulumi.InputType['GrantPrivilegesToRoleOnSchemaObjectArgs']]] = None,
297
- privileges: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
298
- role_name: Optional[pulumi.Input[str]] = None,
299
- with_grant_option: Optional[pulumi.Input[bool]] = None,
300
- __props__=None):
301
- """
302
- > **Deprecation** This resource is deprecated and will be removed in a future major version release. Please use GrantPrivilegesToAccountRole instead. <deprecation>
303
-
304
- ## Example Usage
305
-
306
- ```python
307
- import pulumi
308
- import pulumi_snowflake as snowflake
309
-
310
- ##################################
311
- ### global privileges
312
- ##################################
313
- # list of privileges
314
- g1 = snowflake.GrantPrivilegesToRole("g1",
315
- privileges=[
316
- "MODIFY",
317
- "USAGE",
318
- ],
319
- role_name=r["name"],
320
- on_account=True)
321
- # all privileges + grant option
322
- g2 = snowflake.GrantPrivilegesToRole("g2",
323
- role_name=r["name"],
324
- on_account=True,
325
- all_privileges=True,
326
- with_grant_option=True)
327
- ##################################
328
- ### account object privileges
329
- ##################################
330
- # list of privileges
331
- g3 = snowflake.GrantPrivilegesToRole("g3",
332
- privileges=[
333
- "CREATE",
334
- "MONITOR",
335
- ],
336
- role_name=r["name"],
337
- on_account_object=snowflake.GrantPrivilegesToRoleOnAccountObjectArgs(
338
- object_type="DATABASE",
339
- object_name=d["name"],
340
- ))
341
- # all privileges + grant option
342
- g4 = snowflake.GrantPrivilegesToRole("g4",
343
- role_name=r["name"],
344
- on_account_object=snowflake.GrantPrivilegesToRoleOnAccountObjectArgs(
345
- object_type="DATABASE",
346
- object_name=d["name"],
347
- ),
348
- all_privileges=True,
349
- with_grant_option=True)
350
- ##################################
351
- ### schema privileges
352
- ##################################
353
- # list of privileges
354
- g5 = snowflake.GrantPrivilegesToRole("g5",
355
- privileges=[
356
- "MODIFY",
357
- "CREATE TABLE",
358
- ],
359
- role_name=r["name"],
360
- on_schema=snowflake.GrantPrivilegesToRoleOnSchemaArgs(
361
- schema_name="\\"my_db\\".\\"my_schema\\"",
362
- ))
363
- # all privileges + grant option
364
- g6 = snowflake.GrantPrivilegesToRole("g6",
365
- role_name=r["name"],
366
- on_schema=snowflake.GrantPrivilegesToRoleOnSchemaArgs(
367
- schema_name="\\"my_db\\".\\"my_schema\\"",
368
- ),
369
- all_privileges=True,
370
- with_grant_option=True)
371
- # all schemas in database
372
- g7 = snowflake.GrantPrivilegesToRole("g7",
373
- privileges=[
374
- "MODIFY",
375
- "CREATE TABLE",
376
- ],
377
- role_name=r["name"],
378
- on_schema=snowflake.GrantPrivilegesToRoleOnSchemaArgs(
379
- all_schemas_in_database=d["name"],
380
- ))
381
- # future schemas in database
382
- g8 = snowflake.GrantPrivilegesToRole("g8",
383
- privileges=[
384
- "MODIFY",
385
- "CREATE TABLE",
386
- ],
387
- role_name=r["name"],
388
- on_schema=snowflake.GrantPrivilegesToRoleOnSchemaArgs(
389
- future_schemas_in_database=d["name"],
390
- ))
391
- ##################################
392
- ### schema object privileges
393
- ##################################
394
- # list of privileges
395
- g9 = snowflake.GrantPrivilegesToRole("g9",
396
- privileges=[
397
- "SELECT",
398
- "REFERENCES",
399
- ],
400
- role_name=r["name"],
401
- on_schema_object=snowflake.GrantPrivilegesToRoleOnSchemaObjectArgs(
402
- object_type="VIEW",
403
- object_name="\\"my_db\\".\\"my_schema\\".\\"my_view\\"",
404
- ))
405
- # all privileges + grant option
406
- g10 = snowflake.GrantPrivilegesToRole("g10",
407
- role_name=r["name"],
408
- on_schema_object=snowflake.GrantPrivilegesToRoleOnSchemaObjectArgs(
409
- object_type="VIEW",
410
- object_name="\\"my_db\\".\\"my_schema\\".\\"my_view\\"",
411
- ),
412
- all_privileges=True,
413
- with_grant_option=True)
414
- # all in database
415
- g11 = snowflake.GrantPrivilegesToRole("g11",
416
- privileges=[
417
- "SELECT",
418
- "INSERT",
419
- ],
420
- role_name=r["name"],
421
- on_schema_object=snowflake.GrantPrivilegesToRoleOnSchemaObjectArgs(
422
- all=snowflake.GrantPrivilegesToRoleOnSchemaObjectAllArgs(
423
- object_type_plural="TABLES",
424
- in_database=d["name"],
425
- ),
426
- ))
427
- # all in schema
428
- g12 = snowflake.GrantPrivilegesToRole("g12",
429
- privileges=[
430
- "SELECT",
431
- "INSERT",
432
- ],
433
- role_name=r["name"],
434
- on_schema_object=snowflake.GrantPrivilegesToRoleOnSchemaObjectArgs(
435
- all=snowflake.GrantPrivilegesToRoleOnSchemaObjectAllArgs(
436
- object_type_plural="TABLES",
437
- in_schema="\\"my_db\\".\\"my_schema\\"",
438
- ),
439
- ))
440
- # future in database
441
- g13 = snowflake.GrantPrivilegesToRole("g13",
442
- privileges=[
443
- "SELECT",
444
- "INSERT",
445
- ],
446
- role_name=r["name"],
447
- on_schema_object=snowflake.GrantPrivilegesToRoleOnSchemaObjectArgs(
448
- future=snowflake.GrantPrivilegesToRoleOnSchemaObjectFutureArgs(
449
- object_type_plural="TABLES",
450
- in_database=d["name"],
451
- ),
452
- ))
453
- # future in schema
454
- g14 = snowflake.GrantPrivilegesToRole("g14",
455
- privileges=[
456
- "SELECT",
457
- "INSERT",
458
- ],
459
- role_name=r["name"],
460
- on_schema_object=snowflake.GrantPrivilegesToRoleOnSchemaObjectArgs(
461
- future=snowflake.GrantPrivilegesToRoleOnSchemaObjectFutureArgs(
462
- object_type_plural="TABLES",
463
- in_schema="\\"my_db\\".\\"my_schema\\"",
464
- ),
465
- ))
466
- ```
467
-
468
- ## Import
469
-
470
- format is role_name (string) | privileges (comma-delimited string) | all_privileges (bool) |with_grant_option (bool) | on_account (bool) | on_account_object (bool) | on_schema (bool) | on_schema_object (bool) | all (bool) | future (bool) | object_type (string) | object_name (string) | object_type_plural (string) | in_schema (bool) | schema_name (string) | in_database (bool) | database_name (string)
471
-
472
- ```sh
473
- $ pulumi import snowflake:index/grantPrivilegesToRole:GrantPrivilegesToRole "test_role|MANAGE GRANTS,MONITOR USAGE|false|false|true|false|false|false|false|false||||false||false|"
474
- ```
475
-
476
- :param str resource_name: The name of the resource.
477
- :param pulumi.ResourceOptions opts: Options for the resource.
478
- :param pulumi.Input[bool] all_privileges: Grant all privileges on the account role.
479
- :param pulumi.Input[bool] on_account: If true, the privileges will be granted on the account.
480
- :param pulumi.Input[pulumi.InputType['GrantPrivilegesToRoleOnAccountObjectArgs']] on_account_object: Specifies the account object on which privileges will be granted
481
- :param pulumi.Input[pulumi.InputType['GrantPrivilegesToRoleOnSchemaArgs']] on_schema: Specifies the schema on which privileges will be granted.
482
- :param pulumi.Input[pulumi.InputType['GrantPrivilegesToRoleOnSchemaObjectArgs']] on_schema_object: Specifies the schema object on which privileges will be granted.
483
- :param pulumi.Input[Sequence[pulumi.Input[str]]] privileges: The privileges to grant on the account role.
484
- :param pulumi.Input[str] role_name: The fully qualified name of the role to which privileges will be granted.
485
- :param pulumi.Input[bool] with_grant_option: Specifies whether the grantee can grant the privileges to other users.
486
- """
487
- ...
488
- @overload
489
- def __init__(__self__,
490
- resource_name: str,
491
- args: GrantPrivilegesToRoleArgs,
492
- opts: Optional[pulumi.ResourceOptions] = None):
493
- """
494
- > **Deprecation** This resource is deprecated and will be removed in a future major version release. Please use GrantPrivilegesToAccountRole instead. <deprecation>
495
-
496
- ## Example Usage
497
-
498
- ```python
499
- import pulumi
500
- import pulumi_snowflake as snowflake
501
-
502
- ##################################
503
- ### global privileges
504
- ##################################
505
- # list of privileges
506
- g1 = snowflake.GrantPrivilegesToRole("g1",
507
- privileges=[
508
- "MODIFY",
509
- "USAGE",
510
- ],
511
- role_name=r["name"],
512
- on_account=True)
513
- # all privileges + grant option
514
- g2 = snowflake.GrantPrivilegesToRole("g2",
515
- role_name=r["name"],
516
- on_account=True,
517
- all_privileges=True,
518
- with_grant_option=True)
519
- ##################################
520
- ### account object privileges
521
- ##################################
522
- # list of privileges
523
- g3 = snowflake.GrantPrivilegesToRole("g3",
524
- privileges=[
525
- "CREATE",
526
- "MONITOR",
527
- ],
528
- role_name=r["name"],
529
- on_account_object=snowflake.GrantPrivilegesToRoleOnAccountObjectArgs(
530
- object_type="DATABASE",
531
- object_name=d["name"],
532
- ))
533
- # all privileges + grant option
534
- g4 = snowflake.GrantPrivilegesToRole("g4",
535
- role_name=r["name"],
536
- on_account_object=snowflake.GrantPrivilegesToRoleOnAccountObjectArgs(
537
- object_type="DATABASE",
538
- object_name=d["name"],
539
- ),
540
- all_privileges=True,
541
- with_grant_option=True)
542
- ##################################
543
- ### schema privileges
544
- ##################################
545
- # list of privileges
546
- g5 = snowflake.GrantPrivilegesToRole("g5",
547
- privileges=[
548
- "MODIFY",
549
- "CREATE TABLE",
550
- ],
551
- role_name=r["name"],
552
- on_schema=snowflake.GrantPrivilegesToRoleOnSchemaArgs(
553
- schema_name="\\"my_db\\".\\"my_schema\\"",
554
- ))
555
- # all privileges + grant option
556
- g6 = snowflake.GrantPrivilegesToRole("g6",
557
- role_name=r["name"],
558
- on_schema=snowflake.GrantPrivilegesToRoleOnSchemaArgs(
559
- schema_name="\\"my_db\\".\\"my_schema\\"",
560
- ),
561
- all_privileges=True,
562
- with_grant_option=True)
563
- # all schemas in database
564
- g7 = snowflake.GrantPrivilegesToRole("g7",
565
- privileges=[
566
- "MODIFY",
567
- "CREATE TABLE",
568
- ],
569
- role_name=r["name"],
570
- on_schema=snowflake.GrantPrivilegesToRoleOnSchemaArgs(
571
- all_schemas_in_database=d["name"],
572
- ))
573
- # future schemas in database
574
- g8 = snowflake.GrantPrivilegesToRole("g8",
575
- privileges=[
576
- "MODIFY",
577
- "CREATE TABLE",
578
- ],
579
- role_name=r["name"],
580
- on_schema=snowflake.GrantPrivilegesToRoleOnSchemaArgs(
581
- future_schemas_in_database=d["name"],
582
- ))
583
- ##################################
584
- ### schema object privileges
585
- ##################################
586
- # list of privileges
587
- g9 = snowflake.GrantPrivilegesToRole("g9",
588
- privileges=[
589
- "SELECT",
590
- "REFERENCES",
591
- ],
592
- role_name=r["name"],
593
- on_schema_object=snowflake.GrantPrivilegesToRoleOnSchemaObjectArgs(
594
- object_type="VIEW",
595
- object_name="\\"my_db\\".\\"my_schema\\".\\"my_view\\"",
596
- ))
597
- # all privileges + grant option
598
- g10 = snowflake.GrantPrivilegesToRole("g10",
599
- role_name=r["name"],
600
- on_schema_object=snowflake.GrantPrivilegesToRoleOnSchemaObjectArgs(
601
- object_type="VIEW",
602
- object_name="\\"my_db\\".\\"my_schema\\".\\"my_view\\"",
603
- ),
604
- all_privileges=True,
605
- with_grant_option=True)
606
- # all in database
607
- g11 = snowflake.GrantPrivilegesToRole("g11",
608
- privileges=[
609
- "SELECT",
610
- "INSERT",
611
- ],
612
- role_name=r["name"],
613
- on_schema_object=snowflake.GrantPrivilegesToRoleOnSchemaObjectArgs(
614
- all=snowflake.GrantPrivilegesToRoleOnSchemaObjectAllArgs(
615
- object_type_plural="TABLES",
616
- in_database=d["name"],
617
- ),
618
- ))
619
- # all in schema
620
- g12 = snowflake.GrantPrivilegesToRole("g12",
621
- privileges=[
622
- "SELECT",
623
- "INSERT",
624
- ],
625
- role_name=r["name"],
626
- on_schema_object=snowflake.GrantPrivilegesToRoleOnSchemaObjectArgs(
627
- all=snowflake.GrantPrivilegesToRoleOnSchemaObjectAllArgs(
628
- object_type_plural="TABLES",
629
- in_schema="\\"my_db\\".\\"my_schema\\"",
630
- ),
631
- ))
632
- # future in database
633
- g13 = snowflake.GrantPrivilegesToRole("g13",
634
- privileges=[
635
- "SELECT",
636
- "INSERT",
637
- ],
638
- role_name=r["name"],
639
- on_schema_object=snowflake.GrantPrivilegesToRoleOnSchemaObjectArgs(
640
- future=snowflake.GrantPrivilegesToRoleOnSchemaObjectFutureArgs(
641
- object_type_plural="TABLES",
642
- in_database=d["name"],
643
- ),
644
- ))
645
- # future in schema
646
- g14 = snowflake.GrantPrivilegesToRole("g14",
647
- privileges=[
648
- "SELECT",
649
- "INSERT",
650
- ],
651
- role_name=r["name"],
652
- on_schema_object=snowflake.GrantPrivilegesToRoleOnSchemaObjectArgs(
653
- future=snowflake.GrantPrivilegesToRoleOnSchemaObjectFutureArgs(
654
- object_type_plural="TABLES",
655
- in_schema="\\"my_db\\".\\"my_schema\\"",
656
- ),
657
- ))
658
- ```
659
-
660
- ## Import
661
-
662
- format is role_name (string) | privileges (comma-delimited string) | all_privileges (bool) |with_grant_option (bool) | on_account (bool) | on_account_object (bool) | on_schema (bool) | on_schema_object (bool) | all (bool) | future (bool) | object_type (string) | object_name (string) | object_type_plural (string) | in_schema (bool) | schema_name (string) | in_database (bool) | database_name (string)
663
-
664
- ```sh
665
- $ pulumi import snowflake:index/grantPrivilegesToRole:GrantPrivilegesToRole "test_role|MANAGE GRANTS,MONITOR USAGE|false|false|true|false|false|false|false|false||||false||false|"
666
- ```
667
-
668
- :param str resource_name: The name of the resource.
669
- :param GrantPrivilegesToRoleArgs args: The arguments to use to populate this resource's properties.
670
- :param pulumi.ResourceOptions opts: Options for the resource.
671
- """
672
- ...
673
- def __init__(__self__, resource_name: str, *args, **kwargs):
674
- resource_args, opts = _utilities.get_resource_args_opts(GrantPrivilegesToRoleArgs, pulumi.ResourceOptions, *args, **kwargs)
675
- if resource_args is not None:
676
- __self__._internal_init(resource_name, opts, **resource_args.__dict__)
677
- else:
678
- __self__._internal_init(resource_name, *args, **kwargs)
679
-
680
- def _internal_init(__self__,
681
- resource_name: str,
682
- opts: Optional[pulumi.ResourceOptions] = None,
683
- all_privileges: Optional[pulumi.Input[bool]] = None,
684
- on_account: Optional[pulumi.Input[bool]] = None,
685
- on_account_object: Optional[pulumi.Input[pulumi.InputType['GrantPrivilegesToRoleOnAccountObjectArgs']]] = None,
686
- on_schema: Optional[pulumi.Input[pulumi.InputType['GrantPrivilegesToRoleOnSchemaArgs']]] = None,
687
- on_schema_object: Optional[pulumi.Input[pulumi.InputType['GrantPrivilegesToRoleOnSchemaObjectArgs']]] = None,
688
- privileges: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
689
- role_name: Optional[pulumi.Input[str]] = None,
690
- with_grant_option: Optional[pulumi.Input[bool]] = None,
691
- __props__=None):
692
- opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
693
- if not isinstance(opts, pulumi.ResourceOptions):
694
- raise TypeError('Expected resource options to be a ResourceOptions instance')
695
- if opts.id is None:
696
- if __props__ is not None:
697
- raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
698
- __props__ = GrantPrivilegesToRoleArgs.__new__(GrantPrivilegesToRoleArgs)
699
-
700
- __props__.__dict__["all_privileges"] = all_privileges
701
- __props__.__dict__["on_account"] = on_account
702
- __props__.__dict__["on_account_object"] = on_account_object
703
- __props__.__dict__["on_schema"] = on_schema
704
- __props__.__dict__["on_schema_object"] = on_schema_object
705
- __props__.__dict__["privileges"] = privileges
706
- if role_name is None and not opts.urn:
707
- raise TypeError("Missing required property 'role_name'")
708
- __props__.__dict__["role_name"] = role_name
709
- __props__.__dict__["with_grant_option"] = with_grant_option
710
- super(GrantPrivilegesToRole, __self__).__init__(
711
- 'snowflake:index/grantPrivilegesToRole:GrantPrivilegesToRole',
712
- resource_name,
713
- __props__,
714
- opts)
715
-
716
- @staticmethod
717
- def get(resource_name: str,
718
- id: pulumi.Input[str],
719
- opts: Optional[pulumi.ResourceOptions] = None,
720
- all_privileges: Optional[pulumi.Input[bool]] = None,
721
- on_account: Optional[pulumi.Input[bool]] = None,
722
- on_account_object: Optional[pulumi.Input[pulumi.InputType['GrantPrivilegesToRoleOnAccountObjectArgs']]] = None,
723
- on_schema: Optional[pulumi.Input[pulumi.InputType['GrantPrivilegesToRoleOnSchemaArgs']]] = None,
724
- on_schema_object: Optional[pulumi.Input[pulumi.InputType['GrantPrivilegesToRoleOnSchemaObjectArgs']]] = None,
725
- privileges: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
726
- role_name: Optional[pulumi.Input[str]] = None,
727
- with_grant_option: Optional[pulumi.Input[bool]] = None) -> 'GrantPrivilegesToRole':
728
- """
729
- Get an existing GrantPrivilegesToRole resource's state with the given name, id, and optional extra
730
- properties used to qualify the lookup.
731
-
732
- :param str resource_name: The unique name of the resulting resource.
733
- :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
734
- :param pulumi.ResourceOptions opts: Options for the resource.
735
- :param pulumi.Input[bool] all_privileges: Grant all privileges on the account role.
736
- :param pulumi.Input[bool] on_account: If true, the privileges will be granted on the account.
737
- :param pulumi.Input[pulumi.InputType['GrantPrivilegesToRoleOnAccountObjectArgs']] on_account_object: Specifies the account object on which privileges will be granted
738
- :param pulumi.Input[pulumi.InputType['GrantPrivilegesToRoleOnSchemaArgs']] on_schema: Specifies the schema on which privileges will be granted.
739
- :param pulumi.Input[pulumi.InputType['GrantPrivilegesToRoleOnSchemaObjectArgs']] on_schema_object: Specifies the schema object on which privileges will be granted.
740
- :param pulumi.Input[Sequence[pulumi.Input[str]]] privileges: The privileges to grant on the account role.
741
- :param pulumi.Input[str] role_name: The fully qualified name of the role to which privileges will be granted.
742
- :param pulumi.Input[bool] with_grant_option: Specifies whether the grantee can grant the privileges to other users.
743
- """
744
- opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
745
-
746
- __props__ = _GrantPrivilegesToRoleState.__new__(_GrantPrivilegesToRoleState)
747
-
748
- __props__.__dict__["all_privileges"] = all_privileges
749
- __props__.__dict__["on_account"] = on_account
750
- __props__.__dict__["on_account_object"] = on_account_object
751
- __props__.__dict__["on_schema"] = on_schema
752
- __props__.__dict__["on_schema_object"] = on_schema_object
753
- __props__.__dict__["privileges"] = privileges
754
- __props__.__dict__["role_name"] = role_name
755
- __props__.__dict__["with_grant_option"] = with_grant_option
756
- return GrantPrivilegesToRole(resource_name, opts=opts, __props__=__props__)
757
-
758
- @property
759
- @pulumi.getter(name="allPrivileges")
760
- def all_privileges(self) -> pulumi.Output[Optional[bool]]:
761
- """
762
- Grant all privileges on the account role.
763
- """
764
- return pulumi.get(self, "all_privileges")
765
-
766
- @property
767
- @pulumi.getter(name="onAccount")
768
- def on_account(self) -> pulumi.Output[Optional[bool]]:
769
- """
770
- If true, the privileges will be granted on the account.
771
- """
772
- return pulumi.get(self, "on_account")
773
-
774
- @property
775
- @pulumi.getter(name="onAccountObject")
776
- def on_account_object(self) -> pulumi.Output[Optional['outputs.GrantPrivilegesToRoleOnAccountObject']]:
777
- """
778
- Specifies the account object on which privileges will be granted
779
- """
780
- return pulumi.get(self, "on_account_object")
781
-
782
- @property
783
- @pulumi.getter(name="onSchema")
784
- def on_schema(self) -> pulumi.Output[Optional['outputs.GrantPrivilegesToRoleOnSchema']]:
785
- """
786
- Specifies the schema on which privileges will be granted.
787
- """
788
- return pulumi.get(self, "on_schema")
789
-
790
- @property
791
- @pulumi.getter(name="onSchemaObject")
792
- def on_schema_object(self) -> pulumi.Output[Optional['outputs.GrantPrivilegesToRoleOnSchemaObject']]:
793
- """
794
- Specifies the schema object on which privileges will be granted.
795
- """
796
- return pulumi.get(self, "on_schema_object")
797
-
798
- @property
799
- @pulumi.getter
800
- def privileges(self) -> pulumi.Output[Optional[Sequence[str]]]:
801
- """
802
- The privileges to grant on the account role.
803
- """
804
- return pulumi.get(self, "privileges")
805
-
806
- @property
807
- @pulumi.getter(name="roleName")
808
- def role_name(self) -> pulumi.Output[str]:
809
- """
810
- The fully qualified name of the role to which privileges will be granted.
811
- """
812
- return pulumi.get(self, "role_name")
813
-
814
- @property
815
- @pulumi.getter(name="withGrantOption")
816
- def with_grant_option(self) -> pulumi.Output[Optional[bool]]:
817
- """
818
- Specifies whether the grantee can grant the privileges to other users.
819
- """
820
- return pulumi.get(self, "with_grant_option")
821
-