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