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,653 +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__ = ['TableGrantArgs', 'TableGrant']
13
-
14
- @pulumi.input_type
15
- class TableGrantArgs:
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
- table_name: Optional[pulumi.Input[str]] = None,
27
- with_grant_option: Optional[pulumi.Input[bool]] = None):
28
- """
29
- The set of arguments for constructing a TableGrant resource.
30
- :param pulumi.Input[str] database_name: The name of the database containing the current or future tables 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 tables in the given schema. When this is true and no schema*name is provided apply this grant on all tables in the given database. The table*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 tables in the given schema. When this is true and no schema*name is provided apply this grant on all future tables in the given database. The table*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 table. 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 tables on which to grant privileges.
37
- :param pulumi.Input[Sequence[pulumi.Input[str]]] shares: Grants privilege to these shares (only valid if on*future or on*all are unset).
38
- :param pulumi.Input[str] table_name: The name of the table on which to grant privileges immediately (only valid if on*future or 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 table_name is not None:
59
- pulumi.set(__self__, "table_name", table_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 tables 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 tables in the given schema. When this is true and no schema*name is provided apply this grant on all tables in the given database. The table*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 tables in the given schema. When this is true and no schema*name is provided apply this grant on all future tables in the given database. The table*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 table. 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 tables 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 or 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="tableName")
170
- def table_name(self) -> Optional[pulumi.Input[str]]:
171
- """
172
- The name of the table on which to grant privileges immediately (only valid if on*future or on*all are unset).
173
- """
174
- return pulumi.get(self, "table_name")
175
-
176
- @table_name.setter
177
- def table_name(self, value: Optional[pulumi.Input[str]]):
178
- pulumi.set(self, "table_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 _TableGrantState:
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
- table_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 TableGrant resources.
209
- :param pulumi.Input[str] database_name: The name of the database containing the current or future tables 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 tables in the given schema. When this is true and no schema*name is provided apply this grant on all tables in the given database. The table*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 tables in the given schema. When this is true and no schema*name is provided apply this grant on all future tables in the given database. The table*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 table. 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 tables on which to grant privileges.
216
- :param pulumi.Input[Sequence[pulumi.Input[str]]] shares: Grants privilege to these shares (only valid if on*future or on*all are unset).
217
- :param pulumi.Input[str] table_name: The name of the table on which to grant privileges immediately (only valid if on*future or 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 table_name is not None:
239
- pulumi.set(__self__, "table_name", table_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 tables 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 tables in the given schema. When this is true and no schema*name is provided apply this grant on all tables in the given database. The table*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 tables in the given schema. When this is true and no schema*name is provided apply this grant on all future tables in the given database. The table*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 table. 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 tables 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 or 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="tableName")
350
- def table_name(self) -> Optional[pulumi.Input[str]]:
351
- """
352
- The name of the table on which to grant privileges immediately (only valid if on*future or on*all are unset).
353
- """
354
- return pulumi.get(self, "table_name")
355
-
356
- @table_name.setter
357
- def table_name(self, value: Optional[pulumi.Input[str]]):
358
- pulumi.set(self, "table_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 TableGrant(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
- table_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.TableGrant("grant",
400
- database_name="database",
401
- schema_name="schema",
402
- table_name="table",
403
- privilege="SELECT",
404
- roles=["role1"],
405
- shares=["share1"],
406
- on_future=False,
407
- with_grant_option=False)
408
- ```
409
-
410
- ## Import
411
-
412
- format is database_name|schema_name|table_name|privilege|with_grant_option|on_future|on_all|roles|shares
413
-
414
- ```sh
415
- $ pulumi import snowflake:index/tableGrant:TableGrant example "MY_DATABASE|MY_SCHEMA|MY_TABLE|USAGE|false|false|false|role1,role2|share1,share2"
416
- ```
417
-
418
- :param str resource_name: The name of the resource.
419
- :param pulumi.ResourceOptions opts: Options for the resource.
420
- :param pulumi.Input[str] database_name: The name of the database containing the current or future tables on which to grant privileges.
421
- :param pulumi.Input[bool] on_all: When this is set to true and a schema*name is provided, apply this grant on all tables in the given schema. When this is true and no schema*name is provided apply this grant on all tables in the given database. The table*name and shares fields must be unset in order to use on*all. Cannot be used together with on_future.
422
- :param pulumi.Input[bool] on_future: When this is set to true and a schema*name is provided, apply this grant on all future tables in the given schema. When this is true and no schema*name is provided apply this grant on all future tables in the given database. The table*name and shares fields must be unset in order to use on*future. Cannot be used together with on_all.
423
- :param pulumi.Input[str] privilege: The privilege to grant on the current or future table. To grant all privileges, use the value `ALL PRIVILEGES`.
424
- :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`
425
- :param pulumi.Input[Sequence[pulumi.Input[str]]] roles: Grants privilege to these roles.
426
- :param pulumi.Input[str] schema_name: The name of the schema containing the current or future tables on which to grant privileges.
427
- :param pulumi.Input[Sequence[pulumi.Input[str]]] shares: Grants privilege to these shares (only valid if on*future or on*all are unset).
428
- :param pulumi.Input[str] table_name: The name of the table on which to grant privileges immediately (only valid if on*future or on*all are unset).
429
- :param pulumi.Input[bool] with_grant_option: When this is set to true, allows the recipient role to grant the privileges to other roles.
430
- """
431
- ...
432
- @overload
433
- def __init__(__self__,
434
- resource_name: str,
435
- args: TableGrantArgs,
436
- opts: Optional[pulumi.ResourceOptions] = None):
437
- """
438
- > **Deprecation** This resource is deprecated and will be removed in a future major version release. Please use GrantPrivilegesToAccountRole instead. <deprecation>
439
-
440
- ## Example Usage
441
-
442
- ```python
443
- import pulumi
444
- import pulumi_snowflake as snowflake
445
-
446
- grant = snowflake.TableGrant("grant",
447
- database_name="database",
448
- schema_name="schema",
449
- table_name="table",
450
- privilege="SELECT",
451
- roles=["role1"],
452
- shares=["share1"],
453
- on_future=False,
454
- with_grant_option=False)
455
- ```
456
-
457
- ## Import
458
-
459
- format is database_name|schema_name|table_name|privilege|with_grant_option|on_future|on_all|roles|shares
460
-
461
- ```sh
462
- $ pulumi import snowflake:index/tableGrant:TableGrant example "MY_DATABASE|MY_SCHEMA|MY_TABLE|USAGE|false|false|false|role1,role2|share1,share2"
463
- ```
464
-
465
- :param str resource_name: The name of the resource.
466
- :param TableGrantArgs args: The arguments to use to populate this resource's properties.
467
- :param pulumi.ResourceOptions opts: Options for the resource.
468
- """
469
- ...
470
- def __init__(__self__, resource_name: str, *args, **kwargs):
471
- resource_args, opts = _utilities.get_resource_args_opts(TableGrantArgs, pulumi.ResourceOptions, *args, **kwargs)
472
- if resource_args is not None:
473
- __self__._internal_init(resource_name, opts, **resource_args.__dict__)
474
- else:
475
- __self__._internal_init(resource_name, *args, **kwargs)
476
-
477
- def _internal_init(__self__,
478
- resource_name: str,
479
- opts: Optional[pulumi.ResourceOptions] = None,
480
- database_name: Optional[pulumi.Input[str]] = None,
481
- enable_multiple_grants: Optional[pulumi.Input[bool]] = None,
482
- on_all: Optional[pulumi.Input[bool]] = None,
483
- on_future: Optional[pulumi.Input[bool]] = None,
484
- privilege: Optional[pulumi.Input[str]] = None,
485
- revert_ownership_to_role_name: Optional[pulumi.Input[str]] = None,
486
- roles: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
487
- schema_name: Optional[pulumi.Input[str]] = None,
488
- shares: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
489
- table_name: Optional[pulumi.Input[str]] = None,
490
- with_grant_option: Optional[pulumi.Input[bool]] = None,
491
- __props__=None):
492
- opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
493
- if not isinstance(opts, pulumi.ResourceOptions):
494
- raise TypeError('Expected resource options to be a ResourceOptions instance')
495
- if opts.id is None:
496
- if __props__ is not None:
497
- raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
498
- __props__ = TableGrantArgs.__new__(TableGrantArgs)
499
-
500
- if database_name is None and not opts.urn:
501
- raise TypeError("Missing required property 'database_name'")
502
- __props__.__dict__["database_name"] = database_name
503
- __props__.__dict__["enable_multiple_grants"] = enable_multiple_grants
504
- __props__.__dict__["on_all"] = on_all
505
- __props__.__dict__["on_future"] = on_future
506
- __props__.__dict__["privilege"] = privilege
507
- __props__.__dict__["revert_ownership_to_role_name"] = revert_ownership_to_role_name
508
- __props__.__dict__["roles"] = roles
509
- __props__.__dict__["schema_name"] = schema_name
510
- __props__.__dict__["shares"] = shares
511
- __props__.__dict__["table_name"] = table_name
512
- __props__.__dict__["with_grant_option"] = with_grant_option
513
- super(TableGrant, __self__).__init__(
514
- 'snowflake:index/tableGrant:TableGrant',
515
- resource_name,
516
- __props__,
517
- opts)
518
-
519
- @staticmethod
520
- def get(resource_name: str,
521
- id: pulumi.Input[str],
522
- opts: Optional[pulumi.ResourceOptions] = None,
523
- database_name: Optional[pulumi.Input[str]] = None,
524
- enable_multiple_grants: Optional[pulumi.Input[bool]] = None,
525
- on_all: Optional[pulumi.Input[bool]] = None,
526
- on_future: Optional[pulumi.Input[bool]] = None,
527
- privilege: Optional[pulumi.Input[str]] = None,
528
- revert_ownership_to_role_name: Optional[pulumi.Input[str]] = None,
529
- roles: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
530
- schema_name: Optional[pulumi.Input[str]] = None,
531
- shares: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
532
- table_name: Optional[pulumi.Input[str]] = None,
533
- with_grant_option: Optional[pulumi.Input[bool]] = None) -> 'TableGrant':
534
- """
535
- Get an existing TableGrant resource's state with the given name, id, and optional extra
536
- properties used to qualify the lookup.
537
-
538
- :param str resource_name: The unique name of the resulting resource.
539
- :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
540
- :param pulumi.ResourceOptions opts: Options for the resource.
541
- :param pulumi.Input[str] database_name: The name of the database containing the current or future tables on which to grant privileges.
542
- :param pulumi.Input[bool] on_all: When this is set to true and a schema*name is provided, apply this grant on all tables in the given schema. When this is true and no schema*name is provided apply this grant on all tables in the given database. The table*name and shares fields must be unset in order to use on*all. Cannot be used together with on_future.
543
- :param pulumi.Input[bool] on_future: When this is set to true and a schema*name is provided, apply this grant on all future tables in the given schema. When this is true and no schema*name is provided apply this grant on all future tables in the given database. The table*name and shares fields must be unset in order to use on*future. Cannot be used together with on_all.
544
- :param pulumi.Input[str] privilege: The privilege to grant on the current or future table. To grant all privileges, use the value `ALL PRIVILEGES`.
545
- :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`
546
- :param pulumi.Input[Sequence[pulumi.Input[str]]] roles: Grants privilege to these roles.
547
- :param pulumi.Input[str] schema_name: The name of the schema containing the current or future tables on which to grant privileges.
548
- :param pulumi.Input[Sequence[pulumi.Input[str]]] shares: Grants privilege to these shares (only valid if on*future or on*all are unset).
549
- :param pulumi.Input[str] table_name: The name of the table on which to grant privileges immediately (only valid if on*future or on*all are unset).
550
- :param pulumi.Input[bool] with_grant_option: When this is set to true, allows the recipient role to grant the privileges to other roles.
551
- """
552
- opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
553
-
554
- __props__ = _TableGrantState.__new__(_TableGrantState)
555
-
556
- __props__.__dict__["database_name"] = database_name
557
- __props__.__dict__["enable_multiple_grants"] = enable_multiple_grants
558
- __props__.__dict__["on_all"] = on_all
559
- __props__.__dict__["on_future"] = on_future
560
- __props__.__dict__["privilege"] = privilege
561
- __props__.__dict__["revert_ownership_to_role_name"] = revert_ownership_to_role_name
562
- __props__.__dict__["roles"] = roles
563
- __props__.__dict__["schema_name"] = schema_name
564
- __props__.__dict__["shares"] = shares
565
- __props__.__dict__["table_name"] = table_name
566
- __props__.__dict__["with_grant_option"] = with_grant_option
567
- return TableGrant(resource_name, opts=opts, __props__=__props__)
568
-
569
- @property
570
- @pulumi.getter(name="databaseName")
571
- def database_name(self) -> pulumi.Output[str]:
572
- """
573
- The name of the database containing the current or future tables on which to grant privileges.
574
- """
575
- return pulumi.get(self, "database_name")
576
-
577
- @property
578
- @pulumi.getter(name="enableMultipleGrants")
579
- def enable_multiple_grants(self) -> pulumi.Output[Optional[bool]]:
580
- return pulumi.get(self, "enable_multiple_grants")
581
-
582
- @property
583
- @pulumi.getter(name="onAll")
584
- def on_all(self) -> pulumi.Output[Optional[bool]]:
585
- """
586
- When this is set to true and a schema*name is provided, apply this grant on all tables in the given schema. When this is true and no schema*name is provided apply this grant on all tables in the given database. The table*name and shares fields must be unset in order to use on*all. Cannot be used together with on_future.
587
- """
588
- return pulumi.get(self, "on_all")
589
-
590
- @property
591
- @pulumi.getter(name="onFuture")
592
- def on_future(self) -> pulumi.Output[Optional[bool]]:
593
- """
594
- When this is set to true and a schema*name is provided, apply this grant on all future tables in the given schema. When this is true and no schema*name is provided apply this grant on all future tables in the given database. The table*name and shares fields must be unset in order to use on*future. Cannot be used together with on_all.
595
- """
596
- return pulumi.get(self, "on_future")
597
-
598
- @property
599
- @pulumi.getter
600
- def privilege(self) -> pulumi.Output[Optional[str]]:
601
- """
602
- The privilege to grant on the current or future table. To grant all privileges, use the value `ALL PRIVILEGES`.
603
- """
604
- return pulumi.get(self, "privilege")
605
-
606
- @property
607
- @pulumi.getter(name="revertOwnershipToRoleName")
608
- def revert_ownership_to_role_name(self) -> pulumi.Output[Optional[str]]:
609
- """
610
- The name of the role to revert ownership to on destroy. Has no effect unless `privilege` is set to `OWNERSHIP`
611
- """
612
- return pulumi.get(self, "revert_ownership_to_role_name")
613
-
614
- @property
615
- @pulumi.getter
616
- def roles(self) -> pulumi.Output[Optional[Sequence[str]]]:
617
- """
618
- Grants privilege to these roles.
619
- """
620
- return pulumi.get(self, "roles")
621
-
622
- @property
623
- @pulumi.getter(name="schemaName")
624
- def schema_name(self) -> pulumi.Output[Optional[str]]:
625
- """
626
- The name of the schema containing the current or future tables on which to grant privileges.
627
- """
628
- return pulumi.get(self, "schema_name")
629
-
630
- @property
631
- @pulumi.getter
632
- def shares(self) -> pulumi.Output[Optional[Sequence[str]]]:
633
- """
634
- Grants privilege to these shares (only valid if on*future or on*all are unset).
635
- """
636
- return pulumi.get(self, "shares")
637
-
638
- @property
639
- @pulumi.getter(name="tableName")
640
- def table_name(self) -> pulumi.Output[Optional[str]]:
641
- """
642
- The name of the table on which to grant privileges immediately (only valid if on*future or on*all are unset).
643
- """
644
- return pulumi.get(self, "table_name")
645
-
646
- @property
647
- @pulumi.getter(name="withGrantOption")
648
- def with_grant_option(self) -> pulumi.Output[Optional[bool]]:
649
- """
650
- When this is set to true, allows the recipient role to grant the privileges to other roles.
651
- """
652
- return pulumi.get(self, "with_grant_option")
653
-