pulumi-snowflake 0.50.3a1710160126__py3-none-any.whl → 1.2.0a1736849992__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.

Potentially problematic release.


This version of pulumi-snowflake might be problematic. Click here for more details.

Files changed (182) hide show
  1. pulumi_snowflake/__init__.py +224 -172
  2. pulumi_snowflake/_inputs.py +52857 -1665
  3. pulumi_snowflake/_utilities.py +41 -5
  4. pulumi_snowflake/account.py +188 -218
  5. pulumi_snowflake/account_authentication_policy_attachment.py +149 -0
  6. pulumi_snowflake/account_parameter.py +21 -48
  7. pulumi_snowflake/account_password_policy_attachment.py +7 -32
  8. pulumi_snowflake/account_role.py +250 -0
  9. pulumi_snowflake/alert.py +38 -47
  10. pulumi_snowflake/api_authentication_integration_with_authorization_code_grant.py +704 -0
  11. pulumi_snowflake/api_authentication_integration_with_client_credentials.py +657 -0
  12. pulumi_snowflake/api_authentication_integration_with_jwt_bearer.py +692 -0
  13. pulumi_snowflake/api_integration.py +33 -52
  14. pulumi_snowflake/authentication_policy.py +622 -0
  15. pulumi_snowflake/config/__init__.pyi +76 -99
  16. pulumi_snowflake/config/outputs.py +5 -0
  17. pulumi_snowflake/config/vars.py +93 -124
  18. pulumi_snowflake/cortex_search_service.py +596 -0
  19. pulumi_snowflake/database.py +819 -213
  20. pulumi_snowflake/database_role.py +81 -44
  21. pulumi_snowflake/dynamic_table.py +42 -49
  22. pulumi_snowflake/email_notification_integration.py +33 -28
  23. pulumi_snowflake/{unsafe_execute.py → execute.py} +36 -39
  24. pulumi_snowflake/external_function.py +54 -75
  25. pulumi_snowflake/external_oauth_integration.py +593 -542
  26. pulumi_snowflake/external_table.py +67 -90
  27. pulumi_snowflake/external_volume.py +382 -0
  28. pulumi_snowflake/failover_group.py +57 -98
  29. pulumi_snowflake/file_format.py +33 -28
  30. pulumi_snowflake/function_java.py +1211 -0
  31. pulumi_snowflake/function_javascript.py +882 -0
  32. pulumi_snowflake/function_python.py +1212 -0
  33. pulumi_snowflake/function_scala.py +1212 -0
  34. pulumi_snowflake/function_sql.py +835 -0
  35. pulumi_snowflake/get_account_roles.py +129 -0
  36. pulumi_snowflake/get_accounts.py +53 -22
  37. pulumi_snowflake/get_alerts.py +22 -9
  38. pulumi_snowflake/get_connections.py +109 -0
  39. pulumi_snowflake/get_cortex_search_services.py +216 -0
  40. pulumi_snowflake/get_current_account.py +24 -13
  41. pulumi_snowflake/get_current_role.py +14 -7
  42. pulumi_snowflake/get_database.py +25 -9
  43. pulumi_snowflake/get_database_role.py +162 -0
  44. pulumi_snowflake/get_database_roles.py +79 -47
  45. pulumi_snowflake/get_databases.py +91 -73
  46. pulumi_snowflake/get_dynamic_tables.py +36 -19
  47. pulumi_snowflake/get_external_functions.py +28 -9
  48. pulumi_snowflake/get_external_tables.py +28 -9
  49. pulumi_snowflake/get_failover_groups.py +18 -7
  50. pulumi_snowflake/get_file_formats.py +28 -9
  51. pulumi_snowflake/get_functions.py +28 -9
  52. pulumi_snowflake/get_grants.py +207 -84
  53. pulumi_snowflake/get_masking_policies.py +91 -51
  54. pulumi_snowflake/get_materialized_views.py +28 -9
  55. pulumi_snowflake/get_network_policies.py +129 -0
  56. pulumi_snowflake/get_parameters.py +38 -15
  57. pulumi_snowflake/get_pipes.py +28 -9
  58. pulumi_snowflake/get_procedures.py +28 -9
  59. pulumi_snowflake/get_resource_monitors.py +37 -24
  60. pulumi_snowflake/get_row_access_policies.py +91 -51
  61. pulumi_snowflake/get_schemas.py +145 -41
  62. pulumi_snowflake/get_secrets.py +200 -0
  63. pulumi_snowflake/get_security_integrations.py +129 -0
  64. pulumi_snowflake/get_sequences.py +28 -9
  65. pulumi_snowflake/get_shares.py +18 -9
  66. pulumi_snowflake/get_stages.py +28 -9
  67. pulumi_snowflake/get_storage_integrations.py +16 -9
  68. pulumi_snowflake/get_streamlits.py +170 -0
  69. pulumi_snowflake/get_streams.py +114 -54
  70. pulumi_snowflake/get_system_generate_scim_access_token.py +18 -9
  71. pulumi_snowflake/get_system_get_aws_sns_iam_policy.py +32 -7
  72. pulumi_snowflake/get_system_get_private_link_config.py +120 -5
  73. pulumi_snowflake/get_system_get_snowflake_platform_info.py +15 -7
  74. pulumi_snowflake/get_tables.py +28 -9
  75. pulumi_snowflake/get_tags.py +130 -0
  76. pulumi_snowflake/get_tasks.py +134 -54
  77. pulumi_snowflake/get_users.py +116 -44
  78. pulumi_snowflake/get_views.py +114 -54
  79. pulumi_snowflake/get_warehouses.py +79 -26
  80. pulumi_snowflake/grant_account_role.py +28 -75
  81. pulumi_snowflake/grant_application_role.py +257 -0
  82. pulumi_snowflake/grant_database_role.py +35 -94
  83. pulumi_snowflake/grant_ownership.py +382 -0
  84. pulumi_snowflake/grant_privileges_to_account_role.py +42 -78
  85. pulumi_snowflake/grant_privileges_to_database_role.py +37 -383
  86. pulumi_snowflake/grant_privileges_to_share.py +96 -44
  87. pulumi_snowflake/legacy_service_user.py +3670 -0
  88. pulumi_snowflake/managed_account.py +40 -11
  89. pulumi_snowflake/masking_policy.py +213 -310
  90. pulumi_snowflake/materialized_view.py +62 -71
  91. pulumi_snowflake/network_policy.py +217 -61
  92. pulumi_snowflake/network_policy_attachment.py +5 -34
  93. pulumi_snowflake/network_rule.py +473 -0
  94. pulumi_snowflake/notification_integration.py +49 -84
  95. pulumi_snowflake/oauth_integration_for_custom_clients.py +906 -0
  96. pulumi_snowflake/{oauth_integration.py → oauth_integration_for_partner_applications.py} +191 -192
  97. pulumi_snowflake/object_parameter.py +10 -101
  98. pulumi_snowflake/outputs.py +49200 -2928
  99. pulumi_snowflake/password_policy.py +41 -28
  100. pulumi_snowflake/pipe.py +33 -4
  101. pulumi_snowflake/primary_connection.py +330 -0
  102. pulumi_snowflake/procedure_java.py +1273 -0
  103. pulumi_snowflake/procedure_javascript.py +895 -0
  104. pulumi_snowflake/procedure_python.py +1226 -0
  105. pulumi_snowflake/procedure_scala.py +1273 -0
  106. pulumi_snowflake/procedure_sql.py +895 -0
  107. pulumi_snowflake/provider.py +378 -613
  108. pulumi_snowflake/pulumi-plugin.json +2 -1
  109. pulumi_snowflake/resource_monitor.py +118 -327
  110. pulumi_snowflake/row_access_policy.py +200 -149
  111. pulumi_snowflake/{saml_integration.py → saml2_integration.py} +356 -299
  112. pulumi_snowflake/schema.py +949 -178
  113. pulumi_snowflake/scim_integration.py +286 -109
  114. pulumi_snowflake/secondary_connection.py +339 -0
  115. pulumi_snowflake/secondary_database.py +1080 -0
  116. pulumi_snowflake/secret_with_authorization_code_grant.py +548 -0
  117. pulumi_snowflake/secret_with_basic_authentication.py +500 -0
  118. pulumi_snowflake/secret_with_client_credentials.py +511 -0
  119. pulumi_snowflake/secret_with_generic_string.py +452 -0
  120. pulumi_snowflake/sequence.py +9 -34
  121. pulumi_snowflake/service_user.py +3585 -0
  122. pulumi_snowflake/share.py +33 -28
  123. pulumi_snowflake/shared_database.py +939 -0
  124. pulumi_snowflake/stage.py +95 -84
  125. pulumi_snowflake/storage_integration.py +46 -4
  126. pulumi_snowflake/stream_on_directory_table.py +517 -0
  127. pulumi_snowflake/stream_on_external_table.py +632 -0
  128. pulumi_snowflake/stream_on_table.py +666 -0
  129. pulumi_snowflake/stream_on_view.py +666 -0
  130. pulumi_snowflake/streamlit.py +671 -0
  131. pulumi_snowflake/table.py +86 -97
  132. pulumi_snowflake/table_column_masking_policy_application.py +7 -14
  133. pulumi_snowflake/table_constraint.py +29 -172
  134. pulumi_snowflake/tag.py +142 -74
  135. pulumi_snowflake/tag_association.py +40 -215
  136. pulumi_snowflake/task.py +3048 -418
  137. pulumi_snowflake/user.py +3351 -384
  138. pulumi_snowflake/user_authentication_policy_attachment.py +197 -0
  139. pulumi_snowflake/user_password_policy_attachment.py +5 -4
  140. pulumi_snowflake/user_public_keys.py +5 -0
  141. pulumi_snowflake/view.py +466 -215
  142. pulumi_snowflake/warehouse.py +184 -168
  143. {pulumi_snowflake-0.50.3a1710160126.dist-info → pulumi_snowflake-1.2.0a1736849992.dist-info}/METADATA +7 -6
  144. pulumi_snowflake-1.2.0a1736849992.dist-info/RECORD +148 -0
  145. {pulumi_snowflake-0.50.3a1710160126.dist-info → pulumi_snowflake-1.2.0a1736849992.dist-info}/WHEEL +1 -1
  146. pulumi_snowflake/account_grant.py +0 -343
  147. pulumi_snowflake/database_grant.py +0 -495
  148. pulumi_snowflake/external_table_grant.py +0 -690
  149. pulumi_snowflake/failover_group_grant.py +0 -388
  150. pulumi_snowflake/file_format_grant.py +0 -635
  151. pulumi_snowflake/function.py +0 -872
  152. pulumi_snowflake/function_grant.py +0 -745
  153. pulumi_snowflake/get_role.py +0 -121
  154. pulumi_snowflake/get_roles.py +0 -120
  155. pulumi_snowflake/grant_privileges_to_role.py +0 -825
  156. pulumi_snowflake/integration_grant.py +0 -440
  157. pulumi_snowflake/masking_policy_grant.py +0 -542
  158. pulumi_snowflake/materialized_view_grant.py +0 -689
  159. pulumi_snowflake/pipe_grant.py +0 -587
  160. pulumi_snowflake/procedure.py +0 -887
  161. pulumi_snowflake/procedure_grant.py +0 -745
  162. pulumi_snowflake/resource_monitor_grant.py +0 -387
  163. pulumi_snowflake/role.py +0 -273
  164. pulumi_snowflake/role_grants.py +0 -352
  165. pulumi_snowflake/role_ownership_grant.py +0 -338
  166. pulumi_snowflake/row_access_policy_grant.py +0 -540
  167. pulumi_snowflake/schema_grant.py +0 -647
  168. pulumi_snowflake/sequence_grant.py +0 -635
  169. pulumi_snowflake/session_parameter.py +0 -332
  170. pulumi_snowflake/stage_grant.py +0 -635
  171. pulumi_snowflake/stream.py +0 -614
  172. pulumi_snowflake/stream_grant.py +0 -635
  173. pulumi_snowflake/table_grant.py +0 -677
  174. pulumi_snowflake/tag_grant.py +0 -532
  175. pulumi_snowflake/tag_masking_policy_association.py +0 -210
  176. pulumi_snowflake/task_grant.py +0 -635
  177. pulumi_snowflake/user_grant.py +0 -394
  178. pulumi_snowflake/user_ownership_grant.py +0 -286
  179. pulumi_snowflake/view_grant.py +0 -705
  180. pulumi_snowflake/warehouse_grant.py +0 -440
  181. pulumi_snowflake-0.50.3a1710160126.dist-info/RECORD +0 -136
  182. {pulumi_snowflake-0.50.3a1710160126.dist-info → pulumi_snowflake-1.2.0a1736849992.dist-info}/top_level.txt +0 -0
@@ -1,635 +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__ = ['StageGrantArgs', 'StageGrant']
13
-
14
- @pulumi.input_type
15
- class StageGrantArgs:
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
- stage_name: Optional[pulumi.Input[str]] = None,
26
- with_grant_option: Optional[pulumi.Input[bool]] = None):
27
- """
28
- The set of arguments for constructing a StageGrant resource.
29
- :param pulumi.Input[str] database_name: The name of the database containing the current stage on which to grant privileges.
30
- :param pulumi.Input[Sequence[pulumi.Input[str]]] roles: Grants privilege to these roles.
31
- :param pulumi.Input[bool] enable_multiple_grants: When this is set to true, multiple grants of the same type can be created. This will cause Terraform to not revoke
32
- grants applied to roles and objects outside Terraform.
33
- :param pulumi.Input[bool] on_all: When this is set to true and a schema*name is provided, apply this grant on all stages in the given schema. When this is true and no schema*name is provided apply this grant on all stages in the given database. The stage*name field must be unset in order to use on*all. Cannot be used together with on_future.
34
- :param pulumi.Input[bool] on_future: When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name field must be unset in order to use on*future. Cannot be used together with on_all.
35
- :param pulumi.Input[str] privilege: The privilege to grant on the stage. To grant all privileges, use the value `ALL PRIVILEGES`.
36
- :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`
37
- :param pulumi.Input[str] schema_name: The name of the schema containing the current stage on which to grant privileges.
38
- :param pulumi.Input[str] stage_name: The name of the stage on which to grant privilege (only valid if on*future and on*all are false).
39
- :param pulumi.Input[bool] with_grant_option: When this is set to true, allows the recipient role to grant the privileges to other roles.
40
- """
41
- pulumi.set(__self__, "database_name", database_name)
42
- pulumi.set(__self__, "roles", roles)
43
- if enable_multiple_grants is not None:
44
- pulumi.set(__self__, "enable_multiple_grants", enable_multiple_grants)
45
- if on_all is not None:
46
- pulumi.set(__self__, "on_all", on_all)
47
- if on_future is not None:
48
- pulumi.set(__self__, "on_future", on_future)
49
- if privilege is not None:
50
- pulumi.set(__self__, "privilege", privilege)
51
- if revert_ownership_to_role_name is not None:
52
- pulumi.set(__self__, "revert_ownership_to_role_name", revert_ownership_to_role_name)
53
- if schema_name is not None:
54
- pulumi.set(__self__, "schema_name", schema_name)
55
- if stage_name is not None:
56
- pulumi.set(__self__, "stage_name", stage_name)
57
- if with_grant_option is not None:
58
- pulumi.set(__self__, "with_grant_option", with_grant_option)
59
-
60
- @property
61
- @pulumi.getter(name="databaseName")
62
- def database_name(self) -> pulumi.Input[str]:
63
- """
64
- The name of the database containing the current stage on which to grant privileges.
65
- """
66
- return pulumi.get(self, "database_name")
67
-
68
- @database_name.setter
69
- def database_name(self, value: pulumi.Input[str]):
70
- pulumi.set(self, "database_name", value)
71
-
72
- @property
73
- @pulumi.getter
74
- def roles(self) -> pulumi.Input[Sequence[pulumi.Input[str]]]:
75
- """
76
- Grants privilege to these roles.
77
- """
78
- return pulumi.get(self, "roles")
79
-
80
- @roles.setter
81
- def roles(self, value: pulumi.Input[Sequence[pulumi.Input[str]]]):
82
- pulumi.set(self, "roles", value)
83
-
84
- @property
85
- @pulumi.getter(name="enableMultipleGrants")
86
- def enable_multiple_grants(self) -> Optional[pulumi.Input[bool]]:
87
- """
88
- When this is set to true, multiple grants of the same type can be created. This will cause Terraform to not revoke
89
- grants applied to roles and objects outside Terraform.
90
- """
91
- return pulumi.get(self, "enable_multiple_grants")
92
-
93
- @enable_multiple_grants.setter
94
- def enable_multiple_grants(self, value: Optional[pulumi.Input[bool]]):
95
- pulumi.set(self, "enable_multiple_grants", value)
96
-
97
- @property
98
- @pulumi.getter(name="onAll")
99
- def on_all(self) -> Optional[pulumi.Input[bool]]:
100
- """
101
- When this is set to true and a schema*name is provided, apply this grant on all stages in the given schema. When this is true and no schema*name is provided apply this grant on all stages in the given database. The stage*name field must be unset in order to use on*all. Cannot be used together with on_future.
102
- """
103
- return pulumi.get(self, "on_all")
104
-
105
- @on_all.setter
106
- def on_all(self, value: Optional[pulumi.Input[bool]]):
107
- pulumi.set(self, "on_all", value)
108
-
109
- @property
110
- @pulumi.getter(name="onFuture")
111
- def on_future(self) -> Optional[pulumi.Input[bool]]:
112
- """
113
- When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name field must be unset in order to use on*future. Cannot be used together with on_all.
114
- """
115
- return pulumi.get(self, "on_future")
116
-
117
- @on_future.setter
118
- def on_future(self, value: Optional[pulumi.Input[bool]]):
119
- pulumi.set(self, "on_future", value)
120
-
121
- @property
122
- @pulumi.getter
123
- def privilege(self) -> Optional[pulumi.Input[str]]:
124
- """
125
- The privilege to grant on the stage. To grant all privileges, use the value `ALL PRIVILEGES`.
126
- """
127
- return pulumi.get(self, "privilege")
128
-
129
- @privilege.setter
130
- def privilege(self, value: Optional[pulumi.Input[str]]):
131
- pulumi.set(self, "privilege", value)
132
-
133
- @property
134
- @pulumi.getter(name="revertOwnershipToRoleName")
135
- def revert_ownership_to_role_name(self) -> Optional[pulumi.Input[str]]:
136
- """
137
- The name of the role to revert ownership to on destroy. Has no effect unless `privilege` is set to `OWNERSHIP`
138
- """
139
- return pulumi.get(self, "revert_ownership_to_role_name")
140
-
141
- @revert_ownership_to_role_name.setter
142
- def revert_ownership_to_role_name(self, value: Optional[pulumi.Input[str]]):
143
- pulumi.set(self, "revert_ownership_to_role_name", value)
144
-
145
- @property
146
- @pulumi.getter(name="schemaName")
147
- def schema_name(self) -> Optional[pulumi.Input[str]]:
148
- """
149
- The name of the schema containing the current stage on which to grant privileges.
150
- """
151
- return pulumi.get(self, "schema_name")
152
-
153
- @schema_name.setter
154
- def schema_name(self, value: Optional[pulumi.Input[str]]):
155
- pulumi.set(self, "schema_name", value)
156
-
157
- @property
158
- @pulumi.getter(name="stageName")
159
- def stage_name(self) -> Optional[pulumi.Input[str]]:
160
- """
161
- The name of the stage on which to grant privilege (only valid if on*future and on*all are false).
162
- """
163
- return pulumi.get(self, "stage_name")
164
-
165
- @stage_name.setter
166
- def stage_name(self, value: Optional[pulumi.Input[str]]):
167
- pulumi.set(self, "stage_name", value)
168
-
169
- @property
170
- @pulumi.getter(name="withGrantOption")
171
- def with_grant_option(self) -> Optional[pulumi.Input[bool]]:
172
- """
173
- When this is set to true, allows the recipient role to grant the privileges to other roles.
174
- """
175
- return pulumi.get(self, "with_grant_option")
176
-
177
- @with_grant_option.setter
178
- def with_grant_option(self, value: Optional[pulumi.Input[bool]]):
179
- pulumi.set(self, "with_grant_option", value)
180
-
181
-
182
- @pulumi.input_type
183
- class _StageGrantState:
184
- def __init__(__self__, *,
185
- database_name: Optional[pulumi.Input[str]] = None,
186
- enable_multiple_grants: Optional[pulumi.Input[bool]] = None,
187
- on_all: Optional[pulumi.Input[bool]] = None,
188
- on_future: Optional[pulumi.Input[bool]] = None,
189
- privilege: Optional[pulumi.Input[str]] = None,
190
- revert_ownership_to_role_name: Optional[pulumi.Input[str]] = None,
191
- roles: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
192
- schema_name: Optional[pulumi.Input[str]] = None,
193
- stage_name: Optional[pulumi.Input[str]] = None,
194
- with_grant_option: Optional[pulumi.Input[bool]] = None):
195
- """
196
- Input properties used for looking up and filtering StageGrant resources.
197
- :param pulumi.Input[str] database_name: The name of the database containing the current stage on which to grant privileges.
198
- :param pulumi.Input[bool] enable_multiple_grants: When this is set to true, multiple grants of the same type can be created. This will cause Terraform to not revoke
199
- grants applied to roles and objects outside Terraform.
200
- :param pulumi.Input[bool] on_all: When this is set to true and a schema*name is provided, apply this grant on all stages in the given schema. When this is true and no schema*name is provided apply this grant on all stages in the given database. The stage*name field must be unset in order to use on*all. Cannot be used together with on_future.
201
- :param pulumi.Input[bool] on_future: When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name field must be unset in order to use on*future. Cannot be used together with on_all.
202
- :param pulumi.Input[str] privilege: The privilege to grant on the stage. To grant all privileges, use the value `ALL PRIVILEGES`.
203
- :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`
204
- :param pulumi.Input[Sequence[pulumi.Input[str]]] roles: Grants privilege to these roles.
205
- :param pulumi.Input[str] schema_name: The name of the schema containing the current stage on which to grant privileges.
206
- :param pulumi.Input[str] stage_name: The name of the stage on which to grant privilege (only valid if on*future and on*all are false).
207
- :param pulumi.Input[bool] with_grant_option: When this is set to true, allows the recipient role to grant the privileges to other roles.
208
- """
209
- if database_name is not None:
210
- pulumi.set(__self__, "database_name", database_name)
211
- if enable_multiple_grants is not None:
212
- pulumi.set(__self__, "enable_multiple_grants", enable_multiple_grants)
213
- if on_all is not None:
214
- pulumi.set(__self__, "on_all", on_all)
215
- if on_future is not None:
216
- pulumi.set(__self__, "on_future", on_future)
217
- if privilege is not None:
218
- pulumi.set(__self__, "privilege", privilege)
219
- if revert_ownership_to_role_name is not None:
220
- pulumi.set(__self__, "revert_ownership_to_role_name", revert_ownership_to_role_name)
221
- if roles is not None:
222
- pulumi.set(__self__, "roles", roles)
223
- if schema_name is not None:
224
- pulumi.set(__self__, "schema_name", schema_name)
225
- if stage_name is not None:
226
- pulumi.set(__self__, "stage_name", stage_name)
227
- if with_grant_option is not None:
228
- pulumi.set(__self__, "with_grant_option", with_grant_option)
229
-
230
- @property
231
- @pulumi.getter(name="databaseName")
232
- def database_name(self) -> Optional[pulumi.Input[str]]:
233
- """
234
- The name of the database containing the current stage on which to grant privileges.
235
- """
236
- return pulumi.get(self, "database_name")
237
-
238
- @database_name.setter
239
- def database_name(self, value: Optional[pulumi.Input[str]]):
240
- pulumi.set(self, "database_name", value)
241
-
242
- @property
243
- @pulumi.getter(name="enableMultipleGrants")
244
- def enable_multiple_grants(self) -> Optional[pulumi.Input[bool]]:
245
- """
246
- When this is set to true, multiple grants of the same type can be created. This will cause Terraform to not revoke
247
- grants applied to roles and objects outside Terraform.
248
- """
249
- return pulumi.get(self, "enable_multiple_grants")
250
-
251
- @enable_multiple_grants.setter
252
- def enable_multiple_grants(self, value: Optional[pulumi.Input[bool]]):
253
- pulumi.set(self, "enable_multiple_grants", value)
254
-
255
- @property
256
- @pulumi.getter(name="onAll")
257
- def on_all(self) -> Optional[pulumi.Input[bool]]:
258
- """
259
- When this is set to true and a schema*name is provided, apply this grant on all stages in the given schema. When this is true and no schema*name is provided apply this grant on all stages in the given database. The stage*name field must be unset in order to use on*all. Cannot be used together with on_future.
260
- """
261
- return pulumi.get(self, "on_all")
262
-
263
- @on_all.setter
264
- def on_all(self, value: Optional[pulumi.Input[bool]]):
265
- pulumi.set(self, "on_all", value)
266
-
267
- @property
268
- @pulumi.getter(name="onFuture")
269
- def on_future(self) -> Optional[pulumi.Input[bool]]:
270
- """
271
- When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name field must be unset in order to use on*future. Cannot be used together with on_all.
272
- """
273
- return pulumi.get(self, "on_future")
274
-
275
- @on_future.setter
276
- def on_future(self, value: Optional[pulumi.Input[bool]]):
277
- pulumi.set(self, "on_future", value)
278
-
279
- @property
280
- @pulumi.getter
281
- def privilege(self) -> Optional[pulumi.Input[str]]:
282
- """
283
- The privilege to grant on the stage. To grant all privileges, use the value `ALL PRIVILEGES`.
284
- """
285
- return pulumi.get(self, "privilege")
286
-
287
- @privilege.setter
288
- def privilege(self, value: Optional[pulumi.Input[str]]):
289
- pulumi.set(self, "privilege", value)
290
-
291
- @property
292
- @pulumi.getter(name="revertOwnershipToRoleName")
293
- def revert_ownership_to_role_name(self) -> Optional[pulumi.Input[str]]:
294
- """
295
- The name of the role to revert ownership to on destroy. Has no effect unless `privilege` is set to `OWNERSHIP`
296
- """
297
- return pulumi.get(self, "revert_ownership_to_role_name")
298
-
299
- @revert_ownership_to_role_name.setter
300
- def revert_ownership_to_role_name(self, value: Optional[pulumi.Input[str]]):
301
- pulumi.set(self, "revert_ownership_to_role_name", value)
302
-
303
- @property
304
- @pulumi.getter
305
- def roles(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
306
- """
307
- Grants privilege to these roles.
308
- """
309
- return pulumi.get(self, "roles")
310
-
311
- @roles.setter
312
- def roles(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
313
- pulumi.set(self, "roles", value)
314
-
315
- @property
316
- @pulumi.getter(name="schemaName")
317
- def schema_name(self) -> Optional[pulumi.Input[str]]:
318
- """
319
- The name of the schema containing the current stage on which to grant privileges.
320
- """
321
- return pulumi.get(self, "schema_name")
322
-
323
- @schema_name.setter
324
- def schema_name(self, value: Optional[pulumi.Input[str]]):
325
- pulumi.set(self, "schema_name", value)
326
-
327
- @property
328
- @pulumi.getter(name="stageName")
329
- def stage_name(self) -> Optional[pulumi.Input[str]]:
330
- """
331
- The name of the stage on which to grant privilege (only valid if on*future and on*all are false).
332
- """
333
- return pulumi.get(self, "stage_name")
334
-
335
- @stage_name.setter
336
- def stage_name(self, value: Optional[pulumi.Input[str]]):
337
- pulumi.set(self, "stage_name", value)
338
-
339
- @property
340
- @pulumi.getter(name="withGrantOption")
341
- def with_grant_option(self) -> Optional[pulumi.Input[bool]]:
342
- """
343
- When this is set to true, allows the recipient role to grant the privileges to other roles.
344
- """
345
- return pulumi.get(self, "with_grant_option")
346
-
347
- @with_grant_option.setter
348
- def with_grant_option(self, value: Optional[pulumi.Input[bool]]):
349
- pulumi.set(self, "with_grant_option", value)
350
-
351
-
352
- class StageGrant(pulumi.CustomResource):
353
- @overload
354
- def __init__(__self__,
355
- resource_name: str,
356
- opts: Optional[pulumi.ResourceOptions] = None,
357
- database_name: Optional[pulumi.Input[str]] = None,
358
- enable_multiple_grants: Optional[pulumi.Input[bool]] = None,
359
- on_all: Optional[pulumi.Input[bool]] = None,
360
- on_future: Optional[pulumi.Input[bool]] = None,
361
- privilege: Optional[pulumi.Input[str]] = None,
362
- revert_ownership_to_role_name: Optional[pulumi.Input[str]] = None,
363
- roles: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
364
- schema_name: Optional[pulumi.Input[str]] = None,
365
- stage_name: Optional[pulumi.Input[str]] = None,
366
- with_grant_option: Optional[pulumi.Input[bool]] = None,
367
- __props__=None):
368
- """
369
- > **Deprecation** This resource is deprecated and will be removed in a future major version release. Please use GrantPrivilegesToAccountRole instead. <deprecation>
370
-
371
- ## Example Usage
372
-
373
- <!--Start PulumiCodeChooser -->
374
- ```python
375
- import pulumi
376
- import pulumi_snowflake as snowflake
377
-
378
- grant = snowflake.StageGrant("grant",
379
- database_name="database",
380
- on_future=False,
381
- privilege="USAGE",
382
- roles=[
383
- "role1",
384
- "role2",
385
- ],
386
- schema_name="schema",
387
- stage_name="stage",
388
- with_grant_option=False)
389
- ```
390
- <!--End PulumiCodeChooser -->
391
-
392
- ## Import
393
-
394
- format is database_name|schema_name|stage_name|privilege|with_grant_option|on_future|on_all|roles
395
-
396
- ```sh
397
- $ pulumi import snowflake:index/stageGrant:StageGrant example "MY_DATABASE|MY_SCHEMA|MY_STAGE|USAGE|false|false|false|role1,role2"
398
- ```
399
-
400
- :param str resource_name: The name of the resource.
401
- :param pulumi.ResourceOptions opts: Options for the resource.
402
- :param pulumi.Input[str] database_name: The name of the database containing the current stage on which to grant privileges.
403
- :param pulumi.Input[bool] enable_multiple_grants: When this is set to true, multiple grants of the same type can be created. This will cause Terraform to not revoke
404
- grants applied to roles and objects outside Terraform.
405
- :param pulumi.Input[bool] on_all: When this is set to true and a schema*name is provided, apply this grant on all stages in the given schema. When this is true and no schema*name is provided apply this grant on all stages in the given database. The stage*name field must be unset in order to use on*all. Cannot be used together with on_future.
406
- :param pulumi.Input[bool] on_future: When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name field must be unset in order to use on*future. Cannot be used together with on_all.
407
- :param pulumi.Input[str] privilege: The privilege to grant on the stage. To grant all privileges, use the value `ALL PRIVILEGES`.
408
- :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`
409
- :param pulumi.Input[Sequence[pulumi.Input[str]]] roles: Grants privilege to these roles.
410
- :param pulumi.Input[str] schema_name: The name of the schema containing the current stage on which to grant privileges.
411
- :param pulumi.Input[str] stage_name: The name of the stage on which to grant privilege (only valid if on*future and on*all are false).
412
- :param pulumi.Input[bool] with_grant_option: When this is set to true, allows the recipient role to grant the privileges to other roles.
413
- """
414
- ...
415
- @overload
416
- def __init__(__self__,
417
- resource_name: str,
418
- args: StageGrantArgs,
419
- opts: Optional[pulumi.ResourceOptions] = None):
420
- """
421
- > **Deprecation** This resource is deprecated and will be removed in a future major version release. Please use GrantPrivilegesToAccountRole instead. <deprecation>
422
-
423
- ## Example Usage
424
-
425
- <!--Start PulumiCodeChooser -->
426
- ```python
427
- import pulumi
428
- import pulumi_snowflake as snowflake
429
-
430
- grant = snowflake.StageGrant("grant",
431
- database_name="database",
432
- on_future=False,
433
- privilege="USAGE",
434
- roles=[
435
- "role1",
436
- "role2",
437
- ],
438
- schema_name="schema",
439
- stage_name="stage",
440
- with_grant_option=False)
441
- ```
442
- <!--End PulumiCodeChooser -->
443
-
444
- ## Import
445
-
446
- format is database_name|schema_name|stage_name|privilege|with_grant_option|on_future|on_all|roles
447
-
448
- ```sh
449
- $ pulumi import snowflake:index/stageGrant:StageGrant example "MY_DATABASE|MY_SCHEMA|MY_STAGE|USAGE|false|false|false|role1,role2"
450
- ```
451
-
452
- :param str resource_name: The name of the resource.
453
- :param StageGrantArgs args: The arguments to use to populate this resource's properties.
454
- :param pulumi.ResourceOptions opts: Options for the resource.
455
- """
456
- ...
457
- def __init__(__self__, resource_name: str, *args, **kwargs):
458
- resource_args, opts = _utilities.get_resource_args_opts(StageGrantArgs, pulumi.ResourceOptions, *args, **kwargs)
459
- if resource_args is not None:
460
- __self__._internal_init(resource_name, opts, **resource_args.__dict__)
461
- else:
462
- __self__._internal_init(resource_name, *args, **kwargs)
463
-
464
- def _internal_init(__self__,
465
- resource_name: str,
466
- opts: Optional[pulumi.ResourceOptions] = None,
467
- database_name: Optional[pulumi.Input[str]] = None,
468
- enable_multiple_grants: Optional[pulumi.Input[bool]] = None,
469
- on_all: Optional[pulumi.Input[bool]] = None,
470
- on_future: Optional[pulumi.Input[bool]] = None,
471
- privilege: Optional[pulumi.Input[str]] = None,
472
- revert_ownership_to_role_name: Optional[pulumi.Input[str]] = None,
473
- roles: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
474
- schema_name: Optional[pulumi.Input[str]] = None,
475
- stage_name: Optional[pulumi.Input[str]] = None,
476
- with_grant_option: Optional[pulumi.Input[bool]] = None,
477
- __props__=None):
478
- opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
479
- if not isinstance(opts, pulumi.ResourceOptions):
480
- raise TypeError('Expected resource options to be a ResourceOptions instance')
481
- if opts.id is None:
482
- if __props__ is not None:
483
- raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
484
- __props__ = StageGrantArgs.__new__(StageGrantArgs)
485
-
486
- if database_name is None and not opts.urn:
487
- raise TypeError("Missing required property 'database_name'")
488
- __props__.__dict__["database_name"] = database_name
489
- __props__.__dict__["enable_multiple_grants"] = enable_multiple_grants
490
- __props__.__dict__["on_all"] = on_all
491
- __props__.__dict__["on_future"] = on_future
492
- __props__.__dict__["privilege"] = privilege
493
- __props__.__dict__["revert_ownership_to_role_name"] = revert_ownership_to_role_name
494
- if roles is None and not opts.urn:
495
- raise TypeError("Missing required property 'roles'")
496
- __props__.__dict__["roles"] = roles
497
- __props__.__dict__["schema_name"] = schema_name
498
- __props__.__dict__["stage_name"] = stage_name
499
- __props__.__dict__["with_grant_option"] = with_grant_option
500
- super(StageGrant, __self__).__init__(
501
- 'snowflake:index/stageGrant:StageGrant',
502
- resource_name,
503
- __props__,
504
- opts)
505
-
506
- @staticmethod
507
- def get(resource_name: str,
508
- id: pulumi.Input[str],
509
- opts: Optional[pulumi.ResourceOptions] = None,
510
- database_name: Optional[pulumi.Input[str]] = None,
511
- enable_multiple_grants: Optional[pulumi.Input[bool]] = None,
512
- on_all: Optional[pulumi.Input[bool]] = None,
513
- on_future: Optional[pulumi.Input[bool]] = None,
514
- privilege: Optional[pulumi.Input[str]] = None,
515
- revert_ownership_to_role_name: Optional[pulumi.Input[str]] = None,
516
- roles: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
517
- schema_name: Optional[pulumi.Input[str]] = None,
518
- stage_name: Optional[pulumi.Input[str]] = None,
519
- with_grant_option: Optional[pulumi.Input[bool]] = None) -> 'StageGrant':
520
- """
521
- Get an existing StageGrant resource's state with the given name, id, and optional extra
522
- properties used to qualify the lookup.
523
-
524
- :param str resource_name: The unique name of the resulting resource.
525
- :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
526
- :param pulumi.ResourceOptions opts: Options for the resource.
527
- :param pulumi.Input[str] database_name: The name of the database containing the current stage on which to grant privileges.
528
- :param pulumi.Input[bool] enable_multiple_grants: When this is set to true, multiple grants of the same type can be created. This will cause Terraform to not revoke
529
- grants applied to roles and objects outside Terraform.
530
- :param pulumi.Input[bool] on_all: When this is set to true and a schema*name is provided, apply this grant on all stages in the given schema. When this is true and no schema*name is provided apply this grant on all stages in the given database. The stage*name field must be unset in order to use on*all. Cannot be used together with on_future.
531
- :param pulumi.Input[bool] on_future: When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name field must be unset in order to use on*future. Cannot be used together with on_all.
532
- :param pulumi.Input[str] privilege: The privilege to grant on the stage. To grant all privileges, use the value `ALL PRIVILEGES`.
533
- :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`
534
- :param pulumi.Input[Sequence[pulumi.Input[str]]] roles: Grants privilege to these roles.
535
- :param pulumi.Input[str] schema_name: The name of the schema containing the current stage on which to grant privileges.
536
- :param pulumi.Input[str] stage_name: The name of the stage on which to grant privilege (only valid if on*future and on*all are false).
537
- :param pulumi.Input[bool] with_grant_option: When this is set to true, allows the recipient role to grant the privileges to other roles.
538
- """
539
- opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
540
-
541
- __props__ = _StageGrantState.__new__(_StageGrantState)
542
-
543
- __props__.__dict__["database_name"] = database_name
544
- __props__.__dict__["enable_multiple_grants"] = enable_multiple_grants
545
- __props__.__dict__["on_all"] = on_all
546
- __props__.__dict__["on_future"] = on_future
547
- __props__.__dict__["privilege"] = privilege
548
- __props__.__dict__["revert_ownership_to_role_name"] = revert_ownership_to_role_name
549
- __props__.__dict__["roles"] = roles
550
- __props__.__dict__["schema_name"] = schema_name
551
- __props__.__dict__["stage_name"] = stage_name
552
- __props__.__dict__["with_grant_option"] = with_grant_option
553
- return StageGrant(resource_name, opts=opts, __props__=__props__)
554
-
555
- @property
556
- @pulumi.getter(name="databaseName")
557
- def database_name(self) -> pulumi.Output[str]:
558
- """
559
- The name of the database containing the current stage on which to grant privileges.
560
- """
561
- return pulumi.get(self, "database_name")
562
-
563
- @property
564
- @pulumi.getter(name="enableMultipleGrants")
565
- def enable_multiple_grants(self) -> pulumi.Output[Optional[bool]]:
566
- """
567
- When this is set to true, multiple grants of the same type can be created. This will cause Terraform to not revoke
568
- grants applied to roles and objects outside Terraform.
569
- """
570
- return pulumi.get(self, "enable_multiple_grants")
571
-
572
- @property
573
- @pulumi.getter(name="onAll")
574
- def on_all(self) -> pulumi.Output[Optional[bool]]:
575
- """
576
- When this is set to true and a schema*name is provided, apply this grant on all stages in the given schema. When this is true and no schema*name is provided apply this grant on all stages in the given database. The stage*name field must be unset in order to use on*all. Cannot be used together with on_future.
577
- """
578
- return pulumi.get(self, "on_all")
579
-
580
- @property
581
- @pulumi.getter(name="onFuture")
582
- def on_future(self) -> pulumi.Output[Optional[bool]]:
583
- """
584
- When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name field must be unset in order to use on*future. Cannot be used together with on_all.
585
- """
586
- return pulumi.get(self, "on_future")
587
-
588
- @property
589
- @pulumi.getter
590
- def privilege(self) -> pulumi.Output[Optional[str]]:
591
- """
592
- The privilege to grant on the stage. To grant all privileges, use the value `ALL PRIVILEGES`.
593
- """
594
- return pulumi.get(self, "privilege")
595
-
596
- @property
597
- @pulumi.getter(name="revertOwnershipToRoleName")
598
- def revert_ownership_to_role_name(self) -> pulumi.Output[Optional[str]]:
599
- """
600
- The name of the role to revert ownership to on destroy. Has no effect unless `privilege` is set to `OWNERSHIP`
601
- """
602
- return pulumi.get(self, "revert_ownership_to_role_name")
603
-
604
- @property
605
- @pulumi.getter
606
- def roles(self) -> pulumi.Output[Sequence[str]]:
607
- """
608
- Grants privilege to these roles.
609
- """
610
- return pulumi.get(self, "roles")
611
-
612
- @property
613
- @pulumi.getter(name="schemaName")
614
- def schema_name(self) -> pulumi.Output[Optional[str]]:
615
- """
616
- The name of the schema containing the current stage on which to grant privileges.
617
- """
618
- return pulumi.get(self, "schema_name")
619
-
620
- @property
621
- @pulumi.getter(name="stageName")
622
- def stage_name(self) -> pulumi.Output[Optional[str]]:
623
- """
624
- The name of the stage on which to grant privilege (only valid if on*future and on*all are false).
625
- """
626
- return pulumi.get(self, "stage_name")
627
-
628
- @property
629
- @pulumi.getter(name="withGrantOption")
630
- def with_grant_option(self) -> pulumi.Output[Optional[bool]]:
631
- """
632
- When this is set to true, allows the recipient role to grant the privileges to other roles.
633
- """
634
- return pulumi.get(self, "with_grant_option")
635
-