pulumi-snowflake 0.56.0a1721327760__py3-none-any.whl → 0.57.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 (74) hide show
  1. pulumi_snowflake/__init__.py +78 -209
  2. pulumi_snowflake/_inputs.py +12188 -1362
  3. pulumi_snowflake/_utilities.py +2 -0
  4. pulumi_snowflake/account_role.py +226 -0
  5. pulumi_snowflake/api_authentication_integration_with_authorization_code_grant.py +692 -0
  6. pulumi_snowflake/api_authentication_integration_with_client_credentials.py +645 -0
  7. pulumi_snowflake/api_authentication_integration_with_jwt_bearer.py +680 -0
  8. pulumi_snowflake/cortex_search_service.py +563 -0
  9. pulumi_snowflake/database.py +854 -232
  10. pulumi_snowflake/database_old.py +556 -0
  11. pulumi_snowflake/external_oauth_integration.py +562 -534
  12. pulumi_snowflake/failover_group.py +2 -2
  13. pulumi_snowflake/get_cortex_search_services.py +197 -0
  14. pulumi_snowflake/get_databases.py +71 -62
  15. pulumi_snowflake/get_network_policies.py +122 -0
  16. pulumi_snowflake/get_roles.py +37 -31
  17. pulumi_snowflake/get_schemas.py +115 -38
  18. pulumi_snowflake/get_security_integrations.py +122 -0
  19. pulumi_snowflake/get_streamlits.py +159 -0
  20. pulumi_snowflake/get_warehouses.py +66 -18
  21. pulumi_snowflake/grant_privileges_to_database_role.py +0 -4
  22. pulumi_snowflake/managed_account.py +7 -7
  23. pulumi_snowflake/network_policy.py +103 -19
  24. pulumi_snowflake/oauth_integration.py +4 -0
  25. pulumi_snowflake/oauth_integration_for_custom_clients.py +940 -0
  26. pulumi_snowflake/oauth_integration_for_partner_applications.py +584 -0
  27. pulumi_snowflake/outputs.py +16178 -2927
  28. pulumi_snowflake/pulumi-plugin.json +1 -1
  29. pulumi_snowflake/role.py +44 -72
  30. pulumi_snowflake/saml2_integration.py +975 -0
  31. pulumi_snowflake/saml_integration.py +4 -0
  32. pulumi_snowflake/schema.py +905 -151
  33. pulumi_snowflake/scim_integration.py +257 -103
  34. pulumi_snowflake/secondary_database.py +1059 -0
  35. pulumi_snowflake/sequence.py +6 -6
  36. pulumi_snowflake/shared_database.py +914 -0
  37. pulumi_snowflake/streamlit.py +650 -0
  38. pulumi_snowflake/table.py +0 -120
  39. pulumi_snowflake/table_constraint.py +2 -2
  40. pulumi_snowflake/tag_association.py +38 -38
  41. pulumi_snowflake/unsafe_execute.py +8 -8
  42. pulumi_snowflake/user_password_policy_attachment.py +32 -0
  43. pulumi_snowflake/warehouse.py +143 -120
  44. {pulumi_snowflake-0.56.0a1721327760.dist-info → pulumi_snowflake-0.57.0.dist-info}/METADATA +1 -1
  45. {pulumi_snowflake-0.56.0a1721327760.dist-info → pulumi_snowflake-0.57.0.dist-info}/RECORD +47 -58
  46. {pulumi_snowflake-0.56.0a1721327760.dist-info → pulumi_snowflake-0.57.0.dist-info}/WHEEL +1 -1
  47. pulumi_snowflake/account_grant.py +0 -319
  48. pulumi_snowflake/database_grant.py +0 -471
  49. pulumi_snowflake/external_table_grant.py +0 -666
  50. pulumi_snowflake/failover_group_grant.py +0 -368
  51. pulumi_snowflake/file_format_grant.py +0 -611
  52. pulumi_snowflake/function_grant.py +0 -721
  53. pulumi_snowflake/grant_privileges_to_role.py +0 -821
  54. pulumi_snowflake/integration_grant.py +0 -416
  55. pulumi_snowflake/masking_policy_grant.py +0 -518
  56. pulumi_snowflake/materialized_view_grant.py +0 -665
  57. pulumi_snowflake/pipe_grant.py +0 -563
  58. pulumi_snowflake/procedure_grant.py +0 -721
  59. pulumi_snowflake/resource_monitor_grant.py +0 -363
  60. pulumi_snowflake/role_grants.py +0 -340
  61. pulumi_snowflake/role_ownership_grant.py +0 -329
  62. pulumi_snowflake/row_access_policy_grant.py +0 -516
  63. pulumi_snowflake/schema_grant.py +0 -603
  64. pulumi_snowflake/sequence_grant.py +0 -611
  65. pulumi_snowflake/stage_grant.py +0 -611
  66. pulumi_snowflake/stream_grant.py +0 -611
  67. pulumi_snowflake/table_grant.py +0 -653
  68. pulumi_snowflake/tag_grant.py +0 -508
  69. pulumi_snowflake/task_grant.py +0 -611
  70. pulumi_snowflake/user_grant.py +0 -370
  71. pulumi_snowflake/user_ownership_grant.py +0 -275
  72. pulumi_snowflake/view_grant.py +0 -685
  73. pulumi_snowflake/warehouse_grant.py +0 -416
  74. {pulumi_snowflake-0.56.0a1721327760.dist-info → pulumi_snowflake-0.57.0.dist-info}/top_level.txt +0 -0
@@ -1,665 +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__ = ['MaterializedViewGrantArgs', 'MaterializedViewGrant']
13
-
14
- @pulumi.input_type
15
- class MaterializedViewGrantArgs:
16
- def __init__(__self__, *,
17
- database_name: pulumi.Input[str],
18
- enable_multiple_grants: Optional[pulumi.Input[bool]] = None,
19
- materialized_view_name: Optional[pulumi.Input[str]] = None,
20
- on_all: Optional[pulumi.Input[bool]] = None,
21
- on_future: Optional[pulumi.Input[bool]] = None,
22
- privilege: Optional[pulumi.Input[str]] = None,
23
- revert_ownership_to_role_name: Optional[pulumi.Input[str]] = None,
24
- roles: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
25
- schema_name: Optional[pulumi.Input[str]] = None,
26
- shares: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
27
- with_grant_option: Optional[pulumi.Input[bool]] = None):
28
- """
29
- The set of arguments for constructing a MaterializedViewGrant resource.
30
- :param pulumi.Input[str] database_name: The name of the database containing the current or future materialized views on which to grant privileges.
31
- :param pulumi.Input[str] materialized_view_name: The name of the materialized view on which to grant privileges immediately (only valid if on*future and on*all are false).
32
- :param pulumi.Input[bool] on_all: When this is set to true and a schema*name is provided, apply this grant on all materialized views in the given schema. When this is true and no schema*name is provided apply this grant on all materialized views in the given database. The materialized*view*name and shares fields must be unset in order to use on*all. Cannot be used together with on*future.
33
- :param pulumi.Input[bool] on_future: When this is set to true and a schema*name is provided, apply this grant on all future materialized views in the given schema. When this is true and no schema*name is provided apply this grant on all future materialized views in the given database. The materialized*view*name and shares fields must be unset in order to use on*future. Cannot be used together with on*all.
34
- :param pulumi.Input[str] privilege: The privilege to grant on the current or future materialized view. To grant all privileges, use the value `ALL PRIVILEGES`
35
- :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`
36
- :param pulumi.Input[Sequence[pulumi.Input[str]]] roles: Grants privilege to these roles.
37
- :param pulumi.Input[str] schema_name: The name of the schema containing the current or future materialized views on which to grant privileges.
38
- :param pulumi.Input[Sequence[pulumi.Input[str]]] shares: Grants privilege to these shares (only valid if on*future and on*all are false).
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 materialized_view_name is not None:
45
- pulumi.set(__self__, "materialized_view_name", materialized_view_name)
46
- if on_all is not None:
47
- pulumi.set(__self__, "on_all", on_all)
48
- if on_future is not None:
49
- pulumi.set(__self__, "on_future", on_future)
50
- if privilege is not None:
51
- pulumi.set(__self__, "privilege", privilege)
52
- if revert_ownership_to_role_name is not None:
53
- pulumi.set(__self__, "revert_ownership_to_role_name", revert_ownership_to_role_name)
54
- if roles is not None:
55
- pulumi.set(__self__, "roles", roles)
56
- if schema_name is not None:
57
- pulumi.set(__self__, "schema_name", schema_name)
58
- if shares is not None:
59
- pulumi.set(__self__, "shares", shares)
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 materialized 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="materializedViewName")
86
- def materialized_view_name(self) -> Optional[pulumi.Input[str]]:
87
- """
88
- The name of the materialized view on which to grant privileges immediately (only valid if on*future and on*all are false).
89
- """
90
- return pulumi.get(self, "materialized_view_name")
91
-
92
- @materialized_view_name.setter
93
- def materialized_view_name(self, value: Optional[pulumi.Input[str]]):
94
- pulumi.set(self, "materialized_view_name", value)
95
-
96
- @property
97
- @pulumi.getter(name="onAll")
98
- def on_all(self) -> Optional[pulumi.Input[bool]]:
99
- """
100
- When this is set to true and a schema*name is provided, apply this grant on all materialized views in the given schema. When this is true and no schema*name is provided apply this grant on all materialized views in the given database. The materialized*view*name and shares fields must be unset in order to use on*all. Cannot be used together with on*future.
101
- """
102
- return pulumi.get(self, "on_all")
103
-
104
- @on_all.setter
105
- def on_all(self, value: Optional[pulumi.Input[bool]]):
106
- pulumi.set(self, "on_all", value)
107
-
108
- @property
109
- @pulumi.getter(name="onFuture")
110
- def on_future(self) -> Optional[pulumi.Input[bool]]:
111
- """
112
- When this is set to true and a schema*name is provided, apply this grant on all future materialized views in the given schema. When this is true and no schema*name is provided apply this grant on all future materialized views in the given database. The materialized*view*name and shares fields must be unset in order to use on*future. Cannot be used together with on*all.
113
- """
114
- return pulumi.get(self, "on_future")
115
-
116
- @on_future.setter
117
- def on_future(self, value: Optional[pulumi.Input[bool]]):
118
- pulumi.set(self, "on_future", value)
119
-
120
- @property
121
- @pulumi.getter
122
- def privilege(self) -> Optional[pulumi.Input[str]]:
123
- """
124
- The privilege to grant on the current or future materialized view. To grant all privileges, use the value `ALL PRIVILEGES`
125
- """
126
- return pulumi.get(self, "privilege")
127
-
128
- @privilege.setter
129
- def privilege(self, value: Optional[pulumi.Input[str]]):
130
- pulumi.set(self, "privilege", value)
131
-
132
- @property
133
- @pulumi.getter(name="revertOwnershipToRoleName")
134
- def revert_ownership_to_role_name(self) -> Optional[pulumi.Input[str]]:
135
- """
136
- The name of the role to revert ownership to on destroy. Has no effect unless `privilege` is set to `OWNERSHIP`
137
- """
138
- return pulumi.get(self, "revert_ownership_to_role_name")
139
-
140
- @revert_ownership_to_role_name.setter
141
- def revert_ownership_to_role_name(self, value: Optional[pulumi.Input[str]]):
142
- pulumi.set(self, "revert_ownership_to_role_name", value)
143
-
144
- @property
145
- @pulumi.getter
146
- def roles(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
147
- """
148
- Grants privilege to these roles.
149
- """
150
- return pulumi.get(self, "roles")
151
-
152
- @roles.setter
153
- def roles(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
154
- pulumi.set(self, "roles", value)
155
-
156
- @property
157
- @pulumi.getter(name="schemaName")
158
- def schema_name(self) -> Optional[pulumi.Input[str]]:
159
- """
160
- The name of the schema containing the current or future materialized views on which to grant privileges.
161
- """
162
- return pulumi.get(self, "schema_name")
163
-
164
- @schema_name.setter
165
- def schema_name(self, value: Optional[pulumi.Input[str]]):
166
- pulumi.set(self, "schema_name", value)
167
-
168
- @property
169
- @pulumi.getter
170
- def shares(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
171
- """
172
- Grants privilege to these shares (only valid if on*future and on*all are false).
173
- """
174
- return pulumi.get(self, "shares")
175
-
176
- @shares.setter
177
- def shares(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
178
- pulumi.set(self, "shares", 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 _MaterializedViewGrantState:
195
- def __init__(__self__, *,
196
- database_name: Optional[pulumi.Input[str]] = None,
197
- enable_multiple_grants: Optional[pulumi.Input[bool]] = None,
198
- materialized_view_name: Optional[pulumi.Input[str]] = None,
199
- on_all: Optional[pulumi.Input[bool]] = None,
200
- on_future: Optional[pulumi.Input[bool]] = None,
201
- privilege: Optional[pulumi.Input[str]] = None,
202
- revert_ownership_to_role_name: Optional[pulumi.Input[str]] = None,
203
- roles: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
204
- schema_name: Optional[pulumi.Input[str]] = None,
205
- shares: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
206
- with_grant_option: Optional[pulumi.Input[bool]] = None):
207
- """
208
- Input properties used for looking up and filtering MaterializedViewGrant resources.
209
- :param pulumi.Input[str] database_name: The name of the database containing the current or future materialized views on which to grant privileges.
210
- :param pulumi.Input[str] materialized_view_name: The name of the materialized view on which to grant privileges immediately (only valid if on*future and on*all are false).
211
- :param pulumi.Input[bool] on_all: When this is set to true and a schema*name is provided, apply this grant on all materialized views in the given schema. When this is true and no schema*name is provided apply this grant on all materialized views in the given database. The materialized*view*name and shares fields must be unset in order to use on*all. Cannot be used together with on*future.
212
- :param pulumi.Input[bool] on_future: When this is set to true and a schema*name is provided, apply this grant on all future materialized views in the given schema. When this is true and no schema*name is provided apply this grant on all future materialized views in the given database. The materialized*view*name and shares fields must be unset in order to use on*future. Cannot be used together with on*all.
213
- :param pulumi.Input[str] privilege: The privilege to grant on the current or future materialized view. To grant all privileges, use the value `ALL PRIVILEGES`
214
- :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`
215
- :param pulumi.Input[Sequence[pulumi.Input[str]]] roles: Grants privilege to these roles.
216
- :param pulumi.Input[str] schema_name: The name of the schema containing the current or future materialized views on which to grant privileges.
217
- :param pulumi.Input[Sequence[pulumi.Input[str]]] shares: Grants privilege to these shares (only valid if on*future and on*all are false).
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 materialized_view_name is not None:
225
- pulumi.set(__self__, "materialized_view_name", materialized_view_name)
226
- if on_all is not None:
227
- pulumi.set(__self__, "on_all", on_all)
228
- if on_future is not None:
229
- pulumi.set(__self__, "on_future", on_future)
230
- if privilege is not None:
231
- pulumi.set(__self__, "privilege", privilege)
232
- if revert_ownership_to_role_name is not None:
233
- pulumi.set(__self__, "revert_ownership_to_role_name", revert_ownership_to_role_name)
234
- if roles is not None:
235
- pulumi.set(__self__, "roles", roles)
236
- if schema_name is not None:
237
- pulumi.set(__self__, "schema_name", schema_name)
238
- if shares is not None:
239
- pulumi.set(__self__, "shares", shares)
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 materialized 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="materializedViewName")
266
- def materialized_view_name(self) -> Optional[pulumi.Input[str]]:
267
- """
268
- The name of the materialized view on which to grant privileges immediately (only valid if on*future and on*all are false).
269
- """
270
- return pulumi.get(self, "materialized_view_name")
271
-
272
- @materialized_view_name.setter
273
- def materialized_view_name(self, value: Optional[pulumi.Input[str]]):
274
- pulumi.set(self, "materialized_view_name", value)
275
-
276
- @property
277
- @pulumi.getter(name="onAll")
278
- def on_all(self) -> Optional[pulumi.Input[bool]]:
279
- """
280
- When this is set to true and a schema*name is provided, apply this grant on all materialized views in the given schema. When this is true and no schema*name is provided apply this grant on all materialized views in the given database. The materialized*view*name and shares fields must be unset in order to use on*all. Cannot be used together with on*future.
281
- """
282
- return pulumi.get(self, "on_all")
283
-
284
- @on_all.setter
285
- def on_all(self, value: Optional[pulumi.Input[bool]]):
286
- pulumi.set(self, "on_all", value)
287
-
288
- @property
289
- @pulumi.getter(name="onFuture")
290
- def on_future(self) -> Optional[pulumi.Input[bool]]:
291
- """
292
- When this is set to true and a schema*name is provided, apply this grant on all future materialized views in the given schema. When this is true and no schema*name is provided apply this grant on all future materialized views in the given database. The materialized*view*name and shares fields must be unset in order to use on*future. Cannot be used together with on*all.
293
- """
294
- return pulumi.get(self, "on_future")
295
-
296
- @on_future.setter
297
- def on_future(self, value: Optional[pulumi.Input[bool]]):
298
- pulumi.set(self, "on_future", value)
299
-
300
- @property
301
- @pulumi.getter
302
- def privilege(self) -> Optional[pulumi.Input[str]]:
303
- """
304
- The privilege to grant on the current or future materialized view. To grant all privileges, use the value `ALL PRIVILEGES`
305
- """
306
- return pulumi.get(self, "privilege")
307
-
308
- @privilege.setter
309
- def privilege(self, value: Optional[pulumi.Input[str]]):
310
- pulumi.set(self, "privilege", value)
311
-
312
- @property
313
- @pulumi.getter(name="revertOwnershipToRoleName")
314
- def revert_ownership_to_role_name(self) -> Optional[pulumi.Input[str]]:
315
- """
316
- The name of the role to revert ownership to on destroy. Has no effect unless `privilege` is set to `OWNERSHIP`
317
- """
318
- return pulumi.get(self, "revert_ownership_to_role_name")
319
-
320
- @revert_ownership_to_role_name.setter
321
- def revert_ownership_to_role_name(self, value: Optional[pulumi.Input[str]]):
322
- pulumi.set(self, "revert_ownership_to_role_name", value)
323
-
324
- @property
325
- @pulumi.getter
326
- def roles(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
327
- """
328
- Grants privilege to these roles.
329
- """
330
- return pulumi.get(self, "roles")
331
-
332
- @roles.setter
333
- def roles(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
334
- pulumi.set(self, "roles", value)
335
-
336
- @property
337
- @pulumi.getter(name="schemaName")
338
- def schema_name(self) -> Optional[pulumi.Input[str]]:
339
- """
340
- The name of the schema containing the current or future materialized views on which to grant privileges.
341
- """
342
- return pulumi.get(self, "schema_name")
343
-
344
- @schema_name.setter
345
- def schema_name(self, value: Optional[pulumi.Input[str]]):
346
- pulumi.set(self, "schema_name", value)
347
-
348
- @property
349
- @pulumi.getter
350
- def shares(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
351
- """
352
- Grants privilege to these shares (only valid if on*future and on*all are false).
353
- """
354
- return pulumi.get(self, "shares")
355
-
356
- @shares.setter
357
- def shares(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
358
- pulumi.set(self, "shares", 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 MaterializedViewGrant(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
- materialized_view_name: Optional[pulumi.Input[str]] = None,
381
- on_all: Optional[pulumi.Input[bool]] = None,
382
- on_future: Optional[pulumi.Input[bool]] = None,
383
- privilege: Optional[pulumi.Input[str]] = None,
384
- revert_ownership_to_role_name: Optional[pulumi.Input[str]] = None,
385
- roles: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
386
- schema_name: Optional[pulumi.Input[str]] = None,
387
- shares: Optional[pulumi.Input[Sequence[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.MaterializedViewGrant("grant",
400
- database_name="database",
401
- schema_name="schema",
402
- materialized_view_name="materialized_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
- ```
415
-
416
- ## Import
417
-
418
- format is database_name|schema_name|materialized_view_name|privilege|with_grant_option|on_future|on_all|roles|shares
419
-
420
- ```sh
421
- $ pulumi import snowflake:index/materializedViewGrant:MaterializedViewGrant example "MY_DATABASE|MY_SCHEMA|MY_MV_NAME|SELECT|false|false|role1,role2|share1,share2"
422
- ```
423
-
424
- :param str resource_name: The name of the resource.
425
- :param pulumi.ResourceOptions opts: Options for the resource.
426
- :param pulumi.Input[str] database_name: The name of the database containing the current or future materialized views on which to grant privileges.
427
- :param pulumi.Input[str] materialized_view_name: The name of the materialized view on which to grant privileges immediately (only valid if on*future and on*all are false).
428
- :param pulumi.Input[bool] on_all: When this is set to true and a schema*name is provided, apply this grant on all materialized views in the given schema. When this is true and no schema*name is provided apply this grant on all materialized views in the given database. The materialized*view*name and shares fields must be unset in order to use on*all. Cannot be used together with on*future.
429
- :param pulumi.Input[bool] on_future: When this is set to true and a schema*name is provided, apply this grant on all future materialized views in the given schema. When this is true and no schema*name is provided apply this grant on all future materialized views in the given database. The materialized*view*name and shares fields must be unset in order to use on*future. Cannot be used together with on*all.
430
- :param pulumi.Input[str] privilege: The privilege to grant on the current or future materialized view. To grant all privileges, use the value `ALL PRIVILEGES`
431
- :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`
432
- :param pulumi.Input[Sequence[pulumi.Input[str]]] roles: Grants privilege to these roles.
433
- :param pulumi.Input[str] schema_name: The name of the schema containing the current or future materialized views on which to grant privileges.
434
- :param pulumi.Input[Sequence[pulumi.Input[str]]] shares: Grants privilege to these shares (only valid if on*future and on*all are false).
435
- :param pulumi.Input[bool] with_grant_option: When this is set to true, allows the recipient role to grant the privileges to other roles.
436
- """
437
- ...
438
- @overload
439
- def __init__(__self__,
440
- resource_name: str,
441
- args: MaterializedViewGrantArgs,
442
- opts: Optional[pulumi.ResourceOptions] = None):
443
- """
444
- > **Deprecation** This resource is deprecated and will be removed in a future major version release. Please use GrantPrivilegesToAccountRole instead. <deprecation>
445
-
446
- ## Example Usage
447
-
448
- ```python
449
- import pulumi
450
- import pulumi_snowflake as snowflake
451
-
452
- grant = snowflake.MaterializedViewGrant("grant",
453
- database_name="database",
454
- schema_name="schema",
455
- materialized_view_name="materialized_view",
456
- privilege="SELECT",
457
- roles=[
458
- "role1",
459
- "role2",
460
- ],
461
- shares=[
462
- "share1",
463
- "share2",
464
- ],
465
- on_future=False,
466
- with_grant_option=False)
467
- ```
468
-
469
- ## Import
470
-
471
- format is database_name|schema_name|materialized_view_name|privilege|with_grant_option|on_future|on_all|roles|shares
472
-
473
- ```sh
474
- $ pulumi import snowflake:index/materializedViewGrant:MaterializedViewGrant example "MY_DATABASE|MY_SCHEMA|MY_MV_NAME|SELECT|false|false|role1,role2|share1,share2"
475
- ```
476
-
477
- :param str resource_name: The name of the resource.
478
- :param MaterializedViewGrantArgs args: The arguments to use to populate this resource's properties.
479
- :param pulumi.ResourceOptions opts: Options for the resource.
480
- """
481
- ...
482
- def __init__(__self__, resource_name: str, *args, **kwargs):
483
- resource_args, opts = _utilities.get_resource_args_opts(MaterializedViewGrantArgs, pulumi.ResourceOptions, *args, **kwargs)
484
- if resource_args is not None:
485
- __self__._internal_init(resource_name, opts, **resource_args.__dict__)
486
- else:
487
- __self__._internal_init(resource_name, *args, **kwargs)
488
-
489
- def _internal_init(__self__,
490
- resource_name: str,
491
- opts: Optional[pulumi.ResourceOptions] = None,
492
- database_name: Optional[pulumi.Input[str]] = None,
493
- enable_multiple_grants: Optional[pulumi.Input[bool]] = None,
494
- materialized_view_name: Optional[pulumi.Input[str]] = None,
495
- on_all: Optional[pulumi.Input[bool]] = None,
496
- on_future: Optional[pulumi.Input[bool]] = None,
497
- privilege: Optional[pulumi.Input[str]] = None,
498
- revert_ownership_to_role_name: Optional[pulumi.Input[str]] = None,
499
- roles: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
500
- schema_name: Optional[pulumi.Input[str]] = None,
501
- shares: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
502
- with_grant_option: Optional[pulumi.Input[bool]] = None,
503
- __props__=None):
504
- opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
505
- if not isinstance(opts, pulumi.ResourceOptions):
506
- raise TypeError('Expected resource options to be a ResourceOptions instance')
507
- if opts.id is None:
508
- if __props__ is not None:
509
- raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
510
- __props__ = MaterializedViewGrantArgs.__new__(MaterializedViewGrantArgs)
511
-
512
- if database_name is None and not opts.urn:
513
- raise TypeError("Missing required property 'database_name'")
514
- __props__.__dict__["database_name"] = database_name
515
- __props__.__dict__["enable_multiple_grants"] = enable_multiple_grants
516
- __props__.__dict__["materialized_view_name"] = materialized_view_name
517
- __props__.__dict__["on_all"] = on_all
518
- __props__.__dict__["on_future"] = on_future
519
- __props__.__dict__["privilege"] = privilege
520
- __props__.__dict__["revert_ownership_to_role_name"] = revert_ownership_to_role_name
521
- __props__.__dict__["roles"] = roles
522
- __props__.__dict__["schema_name"] = schema_name
523
- __props__.__dict__["shares"] = shares
524
- __props__.__dict__["with_grant_option"] = with_grant_option
525
- super(MaterializedViewGrant, __self__).__init__(
526
- 'snowflake:index/materializedViewGrant:MaterializedViewGrant',
527
- resource_name,
528
- __props__,
529
- opts)
530
-
531
- @staticmethod
532
- def get(resource_name: str,
533
- id: pulumi.Input[str],
534
- opts: Optional[pulumi.ResourceOptions] = None,
535
- database_name: Optional[pulumi.Input[str]] = None,
536
- enable_multiple_grants: Optional[pulumi.Input[bool]] = None,
537
- materialized_view_name: Optional[pulumi.Input[str]] = None,
538
- on_all: Optional[pulumi.Input[bool]] = None,
539
- on_future: Optional[pulumi.Input[bool]] = None,
540
- privilege: Optional[pulumi.Input[str]] = None,
541
- revert_ownership_to_role_name: Optional[pulumi.Input[str]] = None,
542
- roles: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
543
- schema_name: Optional[pulumi.Input[str]] = None,
544
- shares: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
545
- with_grant_option: Optional[pulumi.Input[bool]] = None) -> 'MaterializedViewGrant':
546
- """
547
- Get an existing MaterializedViewGrant resource's state with the given name, id, and optional extra
548
- properties used to qualify the lookup.
549
-
550
- :param str resource_name: The unique name of the resulting resource.
551
- :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
552
- :param pulumi.ResourceOptions opts: Options for the resource.
553
- :param pulumi.Input[str] database_name: The name of the database containing the current or future materialized views on which to grant privileges.
554
- :param pulumi.Input[str] materialized_view_name: The name of the materialized view on which to grant privileges immediately (only valid if on*future and on*all are false).
555
- :param pulumi.Input[bool] on_all: When this is set to true and a schema*name is provided, apply this grant on all materialized views in the given schema. When this is true and no schema*name is provided apply this grant on all materialized views in the given database. The materialized*view*name and shares fields must be unset in order to use on*all. Cannot be used together with on*future.
556
- :param pulumi.Input[bool] on_future: When this is set to true and a schema*name is provided, apply this grant on all future materialized views in the given schema. When this is true and no schema*name is provided apply this grant on all future materialized views in the given database. The materialized*view*name and shares fields must be unset in order to use on*future. Cannot be used together with on*all.
557
- :param pulumi.Input[str] privilege: The privilege to grant on the current or future materialized view. To grant all privileges, use the value `ALL PRIVILEGES`
558
- :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`
559
- :param pulumi.Input[Sequence[pulumi.Input[str]]] roles: Grants privilege to these roles.
560
- :param pulumi.Input[str] schema_name: The name of the schema containing the current or future materialized views on which to grant privileges.
561
- :param pulumi.Input[Sequence[pulumi.Input[str]]] shares: Grants privilege to these shares (only valid if on*future and on*all are false).
562
- :param pulumi.Input[bool] with_grant_option: When this is set to true, allows the recipient role to grant the privileges to other roles.
563
- """
564
- opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
565
-
566
- __props__ = _MaterializedViewGrantState.__new__(_MaterializedViewGrantState)
567
-
568
- __props__.__dict__["database_name"] = database_name
569
- __props__.__dict__["enable_multiple_grants"] = enable_multiple_grants
570
- __props__.__dict__["materialized_view_name"] = materialized_view_name
571
- __props__.__dict__["on_all"] = on_all
572
- __props__.__dict__["on_future"] = on_future
573
- __props__.__dict__["privilege"] = privilege
574
- __props__.__dict__["revert_ownership_to_role_name"] = revert_ownership_to_role_name
575
- __props__.__dict__["roles"] = roles
576
- __props__.__dict__["schema_name"] = schema_name
577
- __props__.__dict__["shares"] = shares
578
- __props__.__dict__["with_grant_option"] = with_grant_option
579
- return MaterializedViewGrant(resource_name, opts=opts, __props__=__props__)
580
-
581
- @property
582
- @pulumi.getter(name="databaseName")
583
- def database_name(self) -> pulumi.Output[str]:
584
- """
585
- The name of the database containing the current or future materialized views on which to grant privileges.
586
- """
587
- return pulumi.get(self, "database_name")
588
-
589
- @property
590
- @pulumi.getter(name="enableMultipleGrants")
591
- def enable_multiple_grants(self) -> pulumi.Output[Optional[bool]]:
592
- return pulumi.get(self, "enable_multiple_grants")
593
-
594
- @property
595
- @pulumi.getter(name="materializedViewName")
596
- def materialized_view_name(self) -> pulumi.Output[Optional[str]]:
597
- """
598
- The name of the materialized view on which to grant privileges immediately (only valid if on*future and on*all are false).
599
- """
600
- return pulumi.get(self, "materialized_view_name")
601
-
602
- @property
603
- @pulumi.getter(name="onAll")
604
- def on_all(self) -> pulumi.Output[Optional[bool]]:
605
- """
606
- When this is set to true and a schema*name is provided, apply this grant on all materialized views in the given schema. When this is true and no schema*name is provided apply this grant on all materialized views in the given database. The materialized*view*name and shares fields must be unset in order to use on*all. Cannot be used together with on*future.
607
- """
608
- return pulumi.get(self, "on_all")
609
-
610
- @property
611
- @pulumi.getter(name="onFuture")
612
- def on_future(self) -> pulumi.Output[Optional[bool]]:
613
- """
614
- When this is set to true and a schema*name is provided, apply this grant on all future materialized views in the given schema. When this is true and no schema*name is provided apply this grant on all future materialized views in the given database. The materialized*view*name and shares fields must be unset in order to use on*future. Cannot be used together with on*all.
615
- """
616
- return pulumi.get(self, "on_future")
617
-
618
- @property
619
- @pulumi.getter
620
- def privilege(self) -> pulumi.Output[Optional[str]]:
621
- """
622
- The privilege to grant on the current or future materialized view. To grant all privileges, use the value `ALL PRIVILEGES`
623
- """
624
- return pulumi.get(self, "privilege")
625
-
626
- @property
627
- @pulumi.getter(name="revertOwnershipToRoleName")
628
- def revert_ownership_to_role_name(self) -> pulumi.Output[Optional[str]]:
629
- """
630
- The name of the role to revert ownership to on destroy. Has no effect unless `privilege` is set to `OWNERSHIP`
631
- """
632
- return pulumi.get(self, "revert_ownership_to_role_name")
633
-
634
- @property
635
- @pulumi.getter
636
- def roles(self) -> pulumi.Output[Optional[Sequence[str]]]:
637
- """
638
- Grants privilege to these roles.
639
- """
640
- return pulumi.get(self, "roles")
641
-
642
- @property
643
- @pulumi.getter(name="schemaName")
644
- def schema_name(self) -> pulumi.Output[Optional[str]]:
645
- """
646
- The name of the schema containing the current or future materialized views on which to grant privileges.
647
- """
648
- return pulumi.get(self, "schema_name")
649
-
650
- @property
651
- @pulumi.getter
652
- def shares(self) -> pulumi.Output[Optional[Sequence[str]]]:
653
- """
654
- Grants privilege to these shares (only valid if on*future and on*all are false).
655
- """
656
- return pulumi.get(self, "shares")
657
-
658
- @property
659
- @pulumi.getter(name="withGrantOption")
660
- def with_grant_option(self) -> pulumi.Output[Optional[bool]]:
661
- """
662
- When this is set to true, allows the recipient role to grant the privileges to other roles.
663
- """
664
- return pulumi.get(self, "with_grant_option")
665
-