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,685 +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
-
12
- __all__ = ['ViewGrantArgs', 'ViewGrant']
13
-
14
- @pulumi.input_type
15
- class ViewGrantArgs:
16
- def __init__(__self__, *,
17
- database_name: pulumi.Input[str],
18
- enable_multiple_grants: Optional[pulumi.Input[bool]] = None,
19
- on_all: Optional[pulumi.Input[bool]] = None,
20
- on_future: Optional[pulumi.Input[bool]] = None,
21
- privilege: Optional[pulumi.Input[str]] = None,
22
- revert_ownership_to_role_name: Optional[pulumi.Input[str]] = None,
23
- roles: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
24
- schema_name: Optional[pulumi.Input[str]] = None,
25
- shares: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
26
- view_name: Optional[pulumi.Input[str]] = None,
27
- with_grant_option: Optional[pulumi.Input[bool]] = None):
28
- """
29
- The set of arguments for constructing a ViewGrant resource.
30
- :param pulumi.Input[str] database_name: The name of the database containing the current or future views on which to grant privileges.
31
- :param pulumi.Input[bool] on_all: When this is set to true and a schema*name is provided, apply this grant on all views in the given schema. When this is true and no schema*name is provided apply this grant on all views in the given database. The view*name and shares fields must be unset in order to use on*all. Cannot be used together with on_future.
32
- :param pulumi.Input[bool] on_future: When this is set to true and a schema*name is provided, apply this grant on all future views in the given schema. When this is true and no schema*name is provided apply this grant on all future views in the given database. The view*name and shares fields must be unset in order to use on*future. Cannot be used together with on_all.
33
- :param pulumi.Input[str] privilege: The privilege to grant on the current or future view. To grant all privileges, use the value `ALL PRIVILEGES`.
34
- :param pulumi.Input[str] revert_ownership_to_role_name: The name of the role to revert ownership to on destroy. Has no effect unless `privilege` is set to `OWNERSHIP`
35
- :param pulumi.Input[Sequence[pulumi.Input[str]]] roles: Grants privilege to these roles.
36
- :param pulumi.Input[str] schema_name: The name of the schema containing the current or future views on which to grant privileges.
37
- :param pulumi.Input[Sequence[pulumi.Input[str]]] shares: Grants privilege to these shares (only valid if on*future and on*all are unset).
38
- :param pulumi.Input[str] view_name: The name of the view on which to grant privileges immediately (only valid if on*future and on*all are unset).
39
- :param pulumi.Input[bool] with_grant_option: When this is set to true, allows the recipient role to grant the privileges to other roles.
40
- """
41
- pulumi.set(__self__, "database_name", database_name)
42
- if enable_multiple_grants is not None:
43
- pulumi.set(__self__, "enable_multiple_grants", enable_multiple_grants)
44
- if on_all is not None:
45
- pulumi.set(__self__, "on_all", on_all)
46
- if on_future is not None:
47
- pulumi.set(__self__, "on_future", on_future)
48
- if privilege is not None:
49
- pulumi.set(__self__, "privilege", privilege)
50
- if revert_ownership_to_role_name is not None:
51
- pulumi.set(__self__, "revert_ownership_to_role_name", revert_ownership_to_role_name)
52
- if roles is not None:
53
- pulumi.set(__self__, "roles", roles)
54
- if schema_name is not None:
55
- pulumi.set(__self__, "schema_name", schema_name)
56
- if shares is not None:
57
- pulumi.set(__self__, "shares", shares)
58
- if view_name is not None:
59
- pulumi.set(__self__, "view_name", view_name)
60
- if with_grant_option is not None:
61
- pulumi.set(__self__, "with_grant_option", with_grant_option)
62
-
63
- @property
64
- @pulumi.getter(name="databaseName")
65
- def database_name(self) -> pulumi.Input[str]:
66
- """
67
- The name of the database containing the current or future views on which to grant privileges.
68
- """
69
- return pulumi.get(self, "database_name")
70
-
71
- @database_name.setter
72
- def database_name(self, value: pulumi.Input[str]):
73
- pulumi.set(self, "database_name", value)
74
-
75
- @property
76
- @pulumi.getter(name="enableMultipleGrants")
77
- def enable_multiple_grants(self) -> Optional[pulumi.Input[bool]]:
78
- return pulumi.get(self, "enable_multiple_grants")
79
-
80
- @enable_multiple_grants.setter
81
- def enable_multiple_grants(self, value: Optional[pulumi.Input[bool]]):
82
- pulumi.set(self, "enable_multiple_grants", value)
83
-
84
- @property
85
- @pulumi.getter(name="onAll")
86
- def on_all(self) -> Optional[pulumi.Input[bool]]:
87
- """
88
- When this is set to true and a schema*name is provided, apply this grant on all views in the given schema. When this is true and no schema*name is provided apply this grant on all views in the given database. The view*name and shares fields must be unset in order to use on*all. Cannot be used together with on_future.
89
- """
90
- return pulumi.get(self, "on_all")
91
-
92
- @on_all.setter
93
- def on_all(self, value: Optional[pulumi.Input[bool]]):
94
- pulumi.set(self, "on_all", value)
95
-
96
- @property
97
- @pulumi.getter(name="onFuture")
98
- def on_future(self) -> Optional[pulumi.Input[bool]]:
99
- """
100
- When this is set to true and a schema*name is provided, apply this grant on all future views in the given schema. When this is true and no schema*name is provided apply this grant on all future views in the given database. The view*name and shares fields must be unset in order to use on*future. Cannot be used together with on_all.
101
- """
102
- return pulumi.get(self, "on_future")
103
-
104
- @on_future.setter
105
- def on_future(self, value: Optional[pulumi.Input[bool]]):
106
- pulumi.set(self, "on_future", value)
107
-
108
- @property
109
- @pulumi.getter
110
- def privilege(self) -> Optional[pulumi.Input[str]]:
111
- """
112
- The privilege to grant on the current or future view. To grant all privileges, use the value `ALL PRIVILEGES`.
113
- """
114
- return pulumi.get(self, "privilege")
115
-
116
- @privilege.setter
117
- def privilege(self, value: Optional[pulumi.Input[str]]):
118
- pulumi.set(self, "privilege", value)
119
-
120
- @property
121
- @pulumi.getter(name="revertOwnershipToRoleName")
122
- def revert_ownership_to_role_name(self) -> Optional[pulumi.Input[str]]:
123
- """
124
- The name of the role to revert ownership to on destroy. Has no effect unless `privilege` is set to `OWNERSHIP`
125
- """
126
- return pulumi.get(self, "revert_ownership_to_role_name")
127
-
128
- @revert_ownership_to_role_name.setter
129
- def revert_ownership_to_role_name(self, value: Optional[pulumi.Input[str]]):
130
- pulumi.set(self, "revert_ownership_to_role_name", value)
131
-
132
- @property
133
- @pulumi.getter
134
- def roles(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
135
- """
136
- Grants privilege to these roles.
137
- """
138
- return pulumi.get(self, "roles")
139
-
140
- @roles.setter
141
- def roles(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
142
- pulumi.set(self, "roles", value)
143
-
144
- @property
145
- @pulumi.getter(name="schemaName")
146
- def schema_name(self) -> Optional[pulumi.Input[str]]:
147
- """
148
- The name of the schema containing the current or future views on which to grant privileges.
149
- """
150
- return pulumi.get(self, "schema_name")
151
-
152
- @schema_name.setter
153
- def schema_name(self, value: Optional[pulumi.Input[str]]):
154
- pulumi.set(self, "schema_name", value)
155
-
156
- @property
157
- @pulumi.getter
158
- def shares(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
159
- """
160
- Grants privilege to these shares (only valid if on*future and on*all are unset).
161
- """
162
- return pulumi.get(self, "shares")
163
-
164
- @shares.setter
165
- def shares(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
166
- pulumi.set(self, "shares", value)
167
-
168
- @property
169
- @pulumi.getter(name="viewName")
170
- def view_name(self) -> Optional[pulumi.Input[str]]:
171
- """
172
- The name of the view on which to grant privileges immediately (only valid if on*future and on*all are unset).
173
- """
174
- return pulumi.get(self, "view_name")
175
-
176
- @view_name.setter
177
- def view_name(self, value: Optional[pulumi.Input[str]]):
178
- pulumi.set(self, "view_name", value)
179
-
180
- @property
181
- @pulumi.getter(name="withGrantOption")
182
- def with_grant_option(self) -> Optional[pulumi.Input[bool]]:
183
- """
184
- When this is set to true, allows the recipient role to grant the privileges to other roles.
185
- """
186
- return pulumi.get(self, "with_grant_option")
187
-
188
- @with_grant_option.setter
189
- def with_grant_option(self, value: Optional[pulumi.Input[bool]]):
190
- pulumi.set(self, "with_grant_option", value)
191
-
192
-
193
- @pulumi.input_type
194
- class _ViewGrantState:
195
- def __init__(__self__, *,
196
- database_name: Optional[pulumi.Input[str]] = None,
197
- enable_multiple_grants: Optional[pulumi.Input[bool]] = None,
198
- on_all: Optional[pulumi.Input[bool]] = None,
199
- on_future: Optional[pulumi.Input[bool]] = None,
200
- privilege: Optional[pulumi.Input[str]] = None,
201
- revert_ownership_to_role_name: Optional[pulumi.Input[str]] = None,
202
- roles: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
203
- schema_name: Optional[pulumi.Input[str]] = None,
204
- shares: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
205
- view_name: Optional[pulumi.Input[str]] = None,
206
- with_grant_option: Optional[pulumi.Input[bool]] = None):
207
- """
208
- Input properties used for looking up and filtering ViewGrant resources.
209
- :param pulumi.Input[str] database_name: The name of the database containing the current or future views on which to grant privileges.
210
- :param pulumi.Input[bool] on_all: When this is set to true and a schema*name is provided, apply this grant on all views in the given schema. When this is true and no schema*name is provided apply this grant on all views in the given database. The view*name and shares fields must be unset in order to use on*all. Cannot be used together with on_future.
211
- :param pulumi.Input[bool] on_future: When this is set to true and a schema*name is provided, apply this grant on all future views in the given schema. When this is true and no schema*name is provided apply this grant on all future views in the given database. The view*name and shares fields must be unset in order to use on*future. Cannot be used together with on_all.
212
- :param pulumi.Input[str] privilege: The privilege to grant on the current or future view. To grant all privileges, use the value `ALL PRIVILEGES`.
213
- :param pulumi.Input[str] revert_ownership_to_role_name: The name of the role to revert ownership to on destroy. Has no effect unless `privilege` is set to `OWNERSHIP`
214
- :param pulumi.Input[Sequence[pulumi.Input[str]]] roles: Grants privilege to these roles.
215
- :param pulumi.Input[str] schema_name: The name of the schema containing the current or future views on which to grant privileges.
216
- :param pulumi.Input[Sequence[pulumi.Input[str]]] shares: Grants privilege to these shares (only valid if on*future and on*all are unset).
217
- :param pulumi.Input[str] view_name: The name of the view on which to grant privileges immediately (only valid if on*future and on*all are unset).
218
- :param pulumi.Input[bool] with_grant_option: When this is set to true, allows the recipient role to grant the privileges to other roles.
219
- """
220
- if database_name is not None:
221
- pulumi.set(__self__, "database_name", database_name)
222
- if enable_multiple_grants is not None:
223
- pulumi.set(__self__, "enable_multiple_grants", enable_multiple_grants)
224
- if on_all is not None:
225
- pulumi.set(__self__, "on_all", on_all)
226
- if on_future is not None:
227
- pulumi.set(__self__, "on_future", on_future)
228
- if privilege is not None:
229
- pulumi.set(__self__, "privilege", privilege)
230
- if revert_ownership_to_role_name is not None:
231
- pulumi.set(__self__, "revert_ownership_to_role_name", revert_ownership_to_role_name)
232
- if roles is not None:
233
- pulumi.set(__self__, "roles", roles)
234
- if schema_name is not None:
235
- pulumi.set(__self__, "schema_name", schema_name)
236
- if shares is not None:
237
- pulumi.set(__self__, "shares", shares)
238
- if view_name is not None:
239
- pulumi.set(__self__, "view_name", view_name)
240
- if with_grant_option is not None:
241
- pulumi.set(__self__, "with_grant_option", with_grant_option)
242
-
243
- @property
244
- @pulumi.getter(name="databaseName")
245
- def database_name(self) -> Optional[pulumi.Input[str]]:
246
- """
247
- The name of the database containing the current or future views on which to grant privileges.
248
- """
249
- return pulumi.get(self, "database_name")
250
-
251
- @database_name.setter
252
- def database_name(self, value: Optional[pulumi.Input[str]]):
253
- pulumi.set(self, "database_name", value)
254
-
255
- @property
256
- @pulumi.getter(name="enableMultipleGrants")
257
- def enable_multiple_grants(self) -> Optional[pulumi.Input[bool]]:
258
- return pulumi.get(self, "enable_multiple_grants")
259
-
260
- @enable_multiple_grants.setter
261
- def enable_multiple_grants(self, value: Optional[pulumi.Input[bool]]):
262
- pulumi.set(self, "enable_multiple_grants", value)
263
-
264
- @property
265
- @pulumi.getter(name="onAll")
266
- def on_all(self) -> Optional[pulumi.Input[bool]]:
267
- """
268
- When this is set to true and a schema*name is provided, apply this grant on all views in the given schema. When this is true and no schema*name is provided apply this grant on all views in the given database. The view*name and shares fields must be unset in order to use on*all. Cannot be used together with on_future.
269
- """
270
- return pulumi.get(self, "on_all")
271
-
272
- @on_all.setter
273
- def on_all(self, value: Optional[pulumi.Input[bool]]):
274
- pulumi.set(self, "on_all", value)
275
-
276
- @property
277
- @pulumi.getter(name="onFuture")
278
- def on_future(self) -> Optional[pulumi.Input[bool]]:
279
- """
280
- When this is set to true and a schema*name is provided, apply this grant on all future views in the given schema. When this is true and no schema*name is provided apply this grant on all future views in the given database. The view*name and shares fields must be unset in order to use on*future. Cannot be used together with on_all.
281
- """
282
- return pulumi.get(self, "on_future")
283
-
284
- @on_future.setter
285
- def on_future(self, value: Optional[pulumi.Input[bool]]):
286
- pulumi.set(self, "on_future", value)
287
-
288
- @property
289
- @pulumi.getter
290
- def privilege(self) -> Optional[pulumi.Input[str]]:
291
- """
292
- The privilege to grant on the current or future view. To grant all privileges, use the value `ALL PRIVILEGES`.
293
- """
294
- return pulumi.get(self, "privilege")
295
-
296
- @privilege.setter
297
- def privilege(self, value: Optional[pulumi.Input[str]]):
298
- pulumi.set(self, "privilege", value)
299
-
300
- @property
301
- @pulumi.getter(name="revertOwnershipToRoleName")
302
- def revert_ownership_to_role_name(self) -> Optional[pulumi.Input[str]]:
303
- """
304
- The name of the role to revert ownership to on destroy. Has no effect unless `privilege` is set to `OWNERSHIP`
305
- """
306
- return pulumi.get(self, "revert_ownership_to_role_name")
307
-
308
- @revert_ownership_to_role_name.setter
309
- def revert_ownership_to_role_name(self, value: Optional[pulumi.Input[str]]):
310
- pulumi.set(self, "revert_ownership_to_role_name", value)
311
-
312
- @property
313
- @pulumi.getter
314
- def roles(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
315
- """
316
- Grants privilege to these roles.
317
- """
318
- return pulumi.get(self, "roles")
319
-
320
- @roles.setter
321
- def roles(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
322
- pulumi.set(self, "roles", value)
323
-
324
- @property
325
- @pulumi.getter(name="schemaName")
326
- def schema_name(self) -> Optional[pulumi.Input[str]]:
327
- """
328
- The name of the schema containing the current or future views on which to grant privileges.
329
- """
330
- return pulumi.get(self, "schema_name")
331
-
332
- @schema_name.setter
333
- def schema_name(self, value: Optional[pulumi.Input[str]]):
334
- pulumi.set(self, "schema_name", value)
335
-
336
- @property
337
- @pulumi.getter
338
- def shares(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
339
- """
340
- Grants privilege to these shares (only valid if on*future and on*all are unset).
341
- """
342
- return pulumi.get(self, "shares")
343
-
344
- @shares.setter
345
- def shares(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
346
- pulumi.set(self, "shares", value)
347
-
348
- @property
349
- @pulumi.getter(name="viewName")
350
- def view_name(self) -> Optional[pulumi.Input[str]]:
351
- """
352
- The name of the view on which to grant privileges immediately (only valid if on*future and on*all are unset).
353
- """
354
- return pulumi.get(self, "view_name")
355
-
356
- @view_name.setter
357
- def view_name(self, value: Optional[pulumi.Input[str]]):
358
- pulumi.set(self, "view_name", value)
359
-
360
- @property
361
- @pulumi.getter(name="withGrantOption")
362
- def with_grant_option(self) -> Optional[pulumi.Input[bool]]:
363
- """
364
- When this is set to true, allows the recipient role to grant the privileges to other roles.
365
- """
366
- return pulumi.get(self, "with_grant_option")
367
-
368
- @with_grant_option.setter
369
- def with_grant_option(self, value: Optional[pulumi.Input[bool]]):
370
- pulumi.set(self, "with_grant_option", value)
371
-
372
-
373
- class ViewGrant(pulumi.CustomResource):
374
- @overload
375
- def __init__(__self__,
376
- resource_name: str,
377
- opts: Optional[pulumi.ResourceOptions] = None,
378
- database_name: Optional[pulumi.Input[str]] = None,
379
- enable_multiple_grants: Optional[pulumi.Input[bool]] = None,
380
- on_all: Optional[pulumi.Input[bool]] = None,
381
- on_future: Optional[pulumi.Input[bool]] = None,
382
- privilege: Optional[pulumi.Input[str]] = None,
383
- revert_ownership_to_role_name: Optional[pulumi.Input[str]] = None,
384
- roles: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
385
- schema_name: Optional[pulumi.Input[str]] = None,
386
- shares: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
387
- view_name: Optional[pulumi.Input[str]] = None,
388
- with_grant_option: Optional[pulumi.Input[bool]] = None,
389
- __props__=None):
390
- """
391
- > **Deprecation** This resource is deprecated and will be removed in a future major version release. Please use GrantPrivilegesToAccountRole instead. <deprecation>
392
-
393
- ## Example Usage
394
-
395
- ```python
396
- import pulumi
397
- import pulumi_snowflake as snowflake
398
-
399
- grant = snowflake.ViewGrant("grant",
400
- database_name="database",
401
- schema_name="schema",
402
- view_name="view",
403
- privilege="SELECT",
404
- roles=[
405
- "role1",
406
- "role2",
407
- ],
408
- shares=[
409
- "share1",
410
- "share2",
411
- ],
412
- on_future=False,
413
- with_grant_option=False)
414
- #Snowflake view grant is an object level grant, not a schema level grant. To add schema level
415
- #grants, use the `snowflake_schema_grant` resource
416
- grant_schema_grant = snowflake.SchemaGrant("grant",
417
- database_name="database",
418
- schema_name="schema",
419
- privilege="USAGE",
420
- roles=[
421
- "role1",
422
- "role2",
423
- ])
424
- ```
425
-
426
- ## Import
427
-
428
- format is database_name|schema_name|view_name|privilege|with_grant_option|on_future|on_all|roles|shares
429
-
430
- ```sh
431
- $ pulumi import snowflake:index/viewGrant:ViewGrant example "MY_DATABASE|MY_SCHEMA|MY_VIEW|USAGE|false|false|false|role1,role2|share1,share2"
432
- ```
433
-
434
- :param str resource_name: The name of the resource.
435
- :param pulumi.ResourceOptions opts: Options for the resource.
436
- :param pulumi.Input[str] database_name: The name of the database containing the current or future views on which to grant privileges.
437
- :param pulumi.Input[bool] on_all: When this is set to true and a schema*name is provided, apply this grant on all views in the given schema. When this is true and no schema*name is provided apply this grant on all views in the given database. The view*name and shares fields must be unset in order to use on*all. Cannot be used together with on_future.
438
- :param pulumi.Input[bool] on_future: When this is set to true and a schema*name is provided, apply this grant on all future views in the given schema. When this is true and no schema*name is provided apply this grant on all future views in the given database. The view*name and shares fields must be unset in order to use on*future. Cannot be used together with on_all.
439
- :param pulumi.Input[str] privilege: The privilege to grant on the current or future view. To grant all privileges, use the value `ALL PRIVILEGES`.
440
- :param pulumi.Input[str] revert_ownership_to_role_name: The name of the role to revert ownership to on destroy. Has no effect unless `privilege` is set to `OWNERSHIP`
441
- :param pulumi.Input[Sequence[pulumi.Input[str]]] roles: Grants privilege to these roles.
442
- :param pulumi.Input[str] schema_name: The name of the schema containing the current or future views on which to grant privileges.
443
- :param pulumi.Input[Sequence[pulumi.Input[str]]] shares: Grants privilege to these shares (only valid if on*future and on*all are unset).
444
- :param pulumi.Input[str] view_name: The name of the view on which to grant privileges immediately (only valid if on*future and on*all are unset).
445
- :param pulumi.Input[bool] with_grant_option: When this is set to true, allows the recipient role to grant the privileges to other roles.
446
- """
447
- ...
448
- @overload
449
- def __init__(__self__,
450
- resource_name: str,
451
- args: ViewGrantArgs,
452
- opts: Optional[pulumi.ResourceOptions] = None):
453
- """
454
- > **Deprecation** This resource is deprecated and will be removed in a future major version release. Please use GrantPrivilegesToAccountRole instead. <deprecation>
455
-
456
- ## Example Usage
457
-
458
- ```python
459
- import pulumi
460
- import pulumi_snowflake as snowflake
461
-
462
- grant = snowflake.ViewGrant("grant",
463
- database_name="database",
464
- schema_name="schema",
465
- view_name="view",
466
- privilege="SELECT",
467
- roles=[
468
- "role1",
469
- "role2",
470
- ],
471
- shares=[
472
- "share1",
473
- "share2",
474
- ],
475
- on_future=False,
476
- with_grant_option=False)
477
- #Snowflake view grant is an object level grant, not a schema level grant. To add schema level
478
- #grants, use the `snowflake_schema_grant` resource
479
- grant_schema_grant = snowflake.SchemaGrant("grant",
480
- database_name="database",
481
- schema_name="schema",
482
- privilege="USAGE",
483
- roles=[
484
- "role1",
485
- "role2",
486
- ])
487
- ```
488
-
489
- ## Import
490
-
491
- format is database_name|schema_name|view_name|privilege|with_grant_option|on_future|on_all|roles|shares
492
-
493
- ```sh
494
- $ pulumi import snowflake:index/viewGrant:ViewGrant example "MY_DATABASE|MY_SCHEMA|MY_VIEW|USAGE|false|false|false|role1,role2|share1,share2"
495
- ```
496
-
497
- :param str resource_name: The name of the resource.
498
- :param ViewGrantArgs args: The arguments to use to populate this resource's properties.
499
- :param pulumi.ResourceOptions opts: Options for the resource.
500
- """
501
- ...
502
- def __init__(__self__, resource_name: str, *args, **kwargs):
503
- resource_args, opts = _utilities.get_resource_args_opts(ViewGrantArgs, pulumi.ResourceOptions, *args, **kwargs)
504
- if resource_args is not None:
505
- __self__._internal_init(resource_name, opts, **resource_args.__dict__)
506
- else:
507
- __self__._internal_init(resource_name, *args, **kwargs)
508
-
509
- def _internal_init(__self__,
510
- resource_name: str,
511
- opts: Optional[pulumi.ResourceOptions] = None,
512
- database_name: Optional[pulumi.Input[str]] = None,
513
- enable_multiple_grants: Optional[pulumi.Input[bool]] = None,
514
- on_all: Optional[pulumi.Input[bool]] = None,
515
- on_future: Optional[pulumi.Input[bool]] = None,
516
- privilege: Optional[pulumi.Input[str]] = None,
517
- revert_ownership_to_role_name: Optional[pulumi.Input[str]] = None,
518
- roles: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
519
- schema_name: Optional[pulumi.Input[str]] = None,
520
- shares: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
521
- view_name: Optional[pulumi.Input[str]] = None,
522
- with_grant_option: Optional[pulumi.Input[bool]] = None,
523
- __props__=None):
524
- opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
525
- if not isinstance(opts, pulumi.ResourceOptions):
526
- raise TypeError('Expected resource options to be a ResourceOptions instance')
527
- if opts.id is None:
528
- if __props__ is not None:
529
- raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
530
- __props__ = ViewGrantArgs.__new__(ViewGrantArgs)
531
-
532
- if database_name is None and not opts.urn:
533
- raise TypeError("Missing required property 'database_name'")
534
- __props__.__dict__["database_name"] = database_name
535
- __props__.__dict__["enable_multiple_grants"] = enable_multiple_grants
536
- __props__.__dict__["on_all"] = on_all
537
- __props__.__dict__["on_future"] = on_future
538
- __props__.__dict__["privilege"] = privilege
539
- __props__.__dict__["revert_ownership_to_role_name"] = revert_ownership_to_role_name
540
- __props__.__dict__["roles"] = roles
541
- __props__.__dict__["schema_name"] = schema_name
542
- __props__.__dict__["shares"] = shares
543
- __props__.__dict__["view_name"] = view_name
544
- __props__.__dict__["with_grant_option"] = with_grant_option
545
- super(ViewGrant, __self__).__init__(
546
- 'snowflake:index/viewGrant:ViewGrant',
547
- resource_name,
548
- __props__,
549
- opts)
550
-
551
- @staticmethod
552
- def get(resource_name: str,
553
- id: pulumi.Input[str],
554
- opts: Optional[pulumi.ResourceOptions] = None,
555
- database_name: Optional[pulumi.Input[str]] = None,
556
- enable_multiple_grants: Optional[pulumi.Input[bool]] = None,
557
- on_all: Optional[pulumi.Input[bool]] = None,
558
- on_future: Optional[pulumi.Input[bool]] = None,
559
- privilege: Optional[pulumi.Input[str]] = None,
560
- revert_ownership_to_role_name: Optional[pulumi.Input[str]] = None,
561
- roles: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
562
- schema_name: Optional[pulumi.Input[str]] = None,
563
- shares: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
564
- view_name: Optional[pulumi.Input[str]] = None,
565
- with_grant_option: Optional[pulumi.Input[bool]] = None) -> 'ViewGrant':
566
- """
567
- Get an existing ViewGrant resource's state with the given name, id, and optional extra
568
- properties used to qualify the lookup.
569
-
570
- :param str resource_name: The unique name of the resulting resource.
571
- :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
572
- :param pulumi.ResourceOptions opts: Options for the resource.
573
- :param pulumi.Input[str] database_name: The name of the database containing the current or future views on which to grant privileges.
574
- :param pulumi.Input[bool] on_all: When this is set to true and a schema*name is provided, apply this grant on all views in the given schema. When this is true and no schema*name is provided apply this grant on all views in the given database. The view*name and shares fields must be unset in order to use on*all. Cannot be used together with on_future.
575
- :param pulumi.Input[bool] on_future: When this is set to true and a schema*name is provided, apply this grant on all future views in the given schema. When this is true and no schema*name is provided apply this grant on all future views in the given database. The view*name and shares fields must be unset in order to use on*future. Cannot be used together with on_all.
576
- :param pulumi.Input[str] privilege: The privilege to grant on the current or future view. To grant all privileges, use the value `ALL PRIVILEGES`.
577
- :param pulumi.Input[str] revert_ownership_to_role_name: The name of the role to revert ownership to on destroy. Has no effect unless `privilege` is set to `OWNERSHIP`
578
- :param pulumi.Input[Sequence[pulumi.Input[str]]] roles: Grants privilege to these roles.
579
- :param pulumi.Input[str] schema_name: The name of the schema containing the current or future views on which to grant privileges.
580
- :param pulumi.Input[Sequence[pulumi.Input[str]]] shares: Grants privilege to these shares (only valid if on*future and on*all are unset).
581
- :param pulumi.Input[str] view_name: The name of the view on which to grant privileges immediately (only valid if on*future and on*all are unset).
582
- :param pulumi.Input[bool] with_grant_option: When this is set to true, allows the recipient role to grant the privileges to other roles.
583
- """
584
- opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
585
-
586
- __props__ = _ViewGrantState.__new__(_ViewGrantState)
587
-
588
- __props__.__dict__["database_name"] = database_name
589
- __props__.__dict__["enable_multiple_grants"] = enable_multiple_grants
590
- __props__.__dict__["on_all"] = on_all
591
- __props__.__dict__["on_future"] = on_future
592
- __props__.__dict__["privilege"] = privilege
593
- __props__.__dict__["revert_ownership_to_role_name"] = revert_ownership_to_role_name
594
- __props__.__dict__["roles"] = roles
595
- __props__.__dict__["schema_name"] = schema_name
596
- __props__.__dict__["shares"] = shares
597
- __props__.__dict__["view_name"] = view_name
598
- __props__.__dict__["with_grant_option"] = with_grant_option
599
- return ViewGrant(resource_name, opts=opts, __props__=__props__)
600
-
601
- @property
602
- @pulumi.getter(name="databaseName")
603
- def database_name(self) -> pulumi.Output[str]:
604
- """
605
- The name of the database containing the current or future views on which to grant privileges.
606
- """
607
- return pulumi.get(self, "database_name")
608
-
609
- @property
610
- @pulumi.getter(name="enableMultipleGrants")
611
- def enable_multiple_grants(self) -> pulumi.Output[Optional[bool]]:
612
- return pulumi.get(self, "enable_multiple_grants")
613
-
614
- @property
615
- @pulumi.getter(name="onAll")
616
- def on_all(self) -> pulumi.Output[Optional[bool]]:
617
- """
618
- When this is set to true and a schema*name is provided, apply this grant on all views in the given schema. When this is true and no schema*name is provided apply this grant on all views in the given database. The view*name and shares fields must be unset in order to use on*all. Cannot be used together with on_future.
619
- """
620
- return pulumi.get(self, "on_all")
621
-
622
- @property
623
- @pulumi.getter(name="onFuture")
624
- def on_future(self) -> pulumi.Output[Optional[bool]]:
625
- """
626
- When this is set to true and a schema*name is provided, apply this grant on all future views in the given schema. When this is true and no schema*name is provided apply this grant on all future views in the given database. The view*name and shares fields must be unset in order to use on*future. Cannot be used together with on_all.
627
- """
628
- return pulumi.get(self, "on_future")
629
-
630
- @property
631
- @pulumi.getter
632
- def privilege(self) -> pulumi.Output[Optional[str]]:
633
- """
634
- The privilege to grant on the current or future view. To grant all privileges, use the value `ALL PRIVILEGES`.
635
- """
636
- return pulumi.get(self, "privilege")
637
-
638
- @property
639
- @pulumi.getter(name="revertOwnershipToRoleName")
640
- def revert_ownership_to_role_name(self) -> pulumi.Output[Optional[str]]:
641
- """
642
- The name of the role to revert ownership to on destroy. Has no effect unless `privilege` is set to `OWNERSHIP`
643
- """
644
- return pulumi.get(self, "revert_ownership_to_role_name")
645
-
646
- @property
647
- @pulumi.getter
648
- def roles(self) -> pulumi.Output[Optional[Sequence[str]]]:
649
- """
650
- Grants privilege to these roles.
651
- """
652
- return pulumi.get(self, "roles")
653
-
654
- @property
655
- @pulumi.getter(name="schemaName")
656
- def schema_name(self) -> pulumi.Output[Optional[str]]:
657
- """
658
- The name of the schema containing the current or future views on which to grant privileges.
659
- """
660
- return pulumi.get(self, "schema_name")
661
-
662
- @property
663
- @pulumi.getter
664
- def shares(self) -> pulumi.Output[Optional[Sequence[str]]]:
665
- """
666
- Grants privilege to these shares (only valid if on*future and on*all are unset).
667
- """
668
- return pulumi.get(self, "shares")
669
-
670
- @property
671
- @pulumi.getter(name="viewName")
672
- def view_name(self) -> pulumi.Output[Optional[str]]:
673
- """
674
- The name of the view on which to grant privileges immediately (only valid if on*future and on*all are unset).
675
- """
676
- return pulumi.get(self, "view_name")
677
-
678
- @property
679
- @pulumi.getter(name="withGrantOption")
680
- def with_grant_option(self) -> pulumi.Output[Optional[bool]]:
681
- """
682
- When this is set to true, allows the recipient role to grant the privileges to other roles.
683
- """
684
- return pulumi.get(self, "with_grant_option")
685
-