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