pulumi-snowflake 0.50.2a1709892015__py3-none-any.whl → 1.2.0a1736835738__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 +52854 -1662
  3. pulumi_snowflake/_utilities.py +41 -5
  4. pulumi_snowflake/account.py +188 -214
  5. pulumi_snowflake/account_authentication_policy_attachment.py +149 -0
  6. pulumi_snowflake/account_parameter.py +21 -44
  7. pulumi_snowflake/account_password_policy_attachment.py +7 -28
  8. pulumi_snowflake/account_role.py +250 -0
  9. pulumi_snowflake/alert.py +38 -43
  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 +35 -50
  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 -209
  20. pulumi_snowflake/database_role.py +81 -40
  21. pulumi_snowflake/dynamic_table.py +44 -47
  22. pulumi_snowflake/email_notification_integration.py +35 -26
  23. pulumi_snowflake/{unsafe_execute.py → execute.py} +36 -139
  24. pulumi_snowflake/external_function.py +54 -71
  25. pulumi_snowflake/external_oauth_integration.py +593 -538
  26. pulumi_snowflake/external_table.py +67 -86
  27. pulumi_snowflake/external_volume.py +382 -0
  28. pulumi_snowflake/failover_group.py +59 -96
  29. pulumi_snowflake/file_format.py +33 -24
  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 -5
  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 -9
  41. pulumi_snowflake/get_current_role.py +14 -7
  42. pulumi_snowflake/get_database.py +25 -5
  43. pulumi_snowflake/get_database_role.py +162 -0
  44. pulumi_snowflake/get_database_roles.py +79 -43
  45. pulumi_snowflake/get_databases.py +91 -69
  46. pulumi_snowflake/get_dynamic_tables.py +36 -19
  47. pulumi_snowflake/get_external_functions.py +28 -5
  48. pulumi_snowflake/get_external_tables.py +28 -5
  49. pulumi_snowflake/get_failover_groups.py +18 -7
  50. pulumi_snowflake/get_file_formats.py +28 -5
  51. pulumi_snowflake/get_functions.py +28 -5
  52. pulumi_snowflake/get_grants.py +207 -80
  53. pulumi_snowflake/get_masking_policies.py +91 -47
  54. pulumi_snowflake/get_materialized_views.py +28 -5
  55. pulumi_snowflake/get_network_policies.py +129 -0
  56. pulumi_snowflake/get_parameters.py +38 -11
  57. pulumi_snowflake/get_pipes.py +28 -5
  58. pulumi_snowflake/get_procedures.py +28 -5
  59. pulumi_snowflake/get_resource_monitors.py +37 -20
  60. pulumi_snowflake/get_row_access_policies.py +91 -47
  61. pulumi_snowflake/get_schemas.py +145 -37
  62. pulumi_snowflake/get_secrets.py +200 -0
  63. pulumi_snowflake/get_security_integrations.py +129 -0
  64. pulumi_snowflake/get_sequences.py +28 -5
  65. pulumi_snowflake/get_shares.py +18 -5
  66. pulumi_snowflake/get_stages.py +28 -5
  67. pulumi_snowflake/get_storage_integrations.py +16 -5
  68. pulumi_snowflake/get_streamlits.py +170 -0
  69. pulumi_snowflake/get_streams.py +114 -50
  70. pulumi_snowflake/get_system_generate_scim_access_token.py +18 -5
  71. pulumi_snowflake/get_system_get_aws_sns_iam_policy.py +32 -7
  72. pulumi_snowflake/get_system_get_private_link_config.py +121 -6
  73. pulumi_snowflake/get_system_get_snowflake_platform_info.py +15 -7
  74. pulumi_snowflake/get_tables.py +28 -5
  75. pulumi_snowflake/get_tags.py +130 -0
  76. pulumi_snowflake/get_tasks.py +134 -50
  77. pulumi_snowflake/get_users.py +116 -40
  78. pulumi_snowflake/get_views.py +114 -50
  79. pulumi_snowflake/get_warehouses.py +79 -22
  80. pulumi_snowflake/grant_account_role.py +28 -61
  81. pulumi_snowflake/grant_application_role.py +257 -0
  82. pulumi_snowflake/grant_database_role.py +35 -108
  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 -223
  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 +42 -9
  89. pulumi_snowflake/masking_policy.py +213 -306
  90. pulumi_snowflake/materialized_view.py +62 -67
  91. pulumi_snowflake/network_policy.py +217 -57
  92. pulumi_snowflake/network_policy_attachment.py +7 -32
  93. pulumi_snowflake/network_rule.py +473 -0
  94. pulumi_snowflake/notification_integration.py +51 -82
  95. pulumi_snowflake/oauth_integration_for_custom_clients.py +906 -0
  96. pulumi_snowflake/{oauth_integration.py → oauth_integration_for_partner_applications.py} +191 -188
  97. pulumi_snowflake/object_parameter.py +12 -99
  98. pulumi_snowflake/outputs.py +49200 -2928
  99. pulumi_snowflake/password_policy.py +41 -28
  100. pulumi_snowflake/pipe.py +33 -0
  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 -323
  110. pulumi_snowflake/row_access_policy.py +200 -145
  111. pulumi_snowflake/{saml_integration.py → saml2_integration.py} +356 -295
  112. pulumi_snowflake/schema.py +949 -174
  113. pulumi_snowflake/scim_integration.py +286 -105
  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 -30
  121. pulumi_snowflake/service_user.py +3585 -0
  122. pulumi_snowflake/share.py +35 -26
  123. pulumi_snowflake/shared_database.py +939 -0
  124. pulumi_snowflake/stage.py +95 -80
  125. pulumi_snowflake/storage_integration.py +48 -2
  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 -93
  132. pulumi_snowflake/table_column_masking_policy_application.py +7 -14
  133. pulumi_snowflake/table_constraint.py +29 -168
  134. pulumi_snowflake/tag.py +142 -70
  135. pulumi_snowflake/tag_association.py +40 -211
  136. pulumi_snowflake/task.py +3048 -414
  137. pulumi_snowflake/user.py +3351 -380
  138. pulumi_snowflake/user_authentication_policy_attachment.py +197 -0
  139. pulumi_snowflake/user_password_policy_attachment.py +7 -6
  140. pulumi_snowflake/user_public_keys.py +5 -0
  141. pulumi_snowflake/view.py +466 -211
  142. pulumi_snowflake/warehouse.py +184 -164
  143. {pulumi_snowflake-0.50.2a1709892015.dist-info → pulumi_snowflake-1.2.0a1736835738.dist-info}/METADATA +7 -6
  144. pulumi_snowflake-1.2.0a1736835738.dist-info/RECORD +148 -0
  145. {pulumi_snowflake-0.50.2a1709892015.dist-info → pulumi_snowflake-1.2.0a1736835738.dist-info}/WHEEL +1 -1
  146. pulumi_snowflake/account_grant.py +0 -339
  147. pulumi_snowflake/database_grant.py +0 -491
  148. pulumi_snowflake/external_table_grant.py +0 -686
  149. pulumi_snowflake/failover_group_grant.py +0 -388
  150. pulumi_snowflake/file_format_grant.py +0 -631
  151. pulumi_snowflake/function.py +0 -868
  152. pulumi_snowflake/function_grant.py +0 -741
  153. pulumi_snowflake/get_role.py +0 -117
  154. pulumi_snowflake/get_roles.py +0 -116
  155. pulumi_snowflake/grant_privileges_to_role.py +0 -667
  156. pulumi_snowflake/integration_grant.py +0 -436
  157. pulumi_snowflake/masking_policy_grant.py +0 -538
  158. pulumi_snowflake/materialized_view_grant.py +0 -685
  159. pulumi_snowflake/pipe_grant.py +0 -583
  160. pulumi_snowflake/procedure.py +0 -883
  161. pulumi_snowflake/procedure_grant.py +0 -741
  162. pulumi_snowflake/resource_monitor_grant.py +0 -383
  163. pulumi_snowflake/role.py +0 -269
  164. pulumi_snowflake/role_grants.py +0 -348
  165. pulumi_snowflake/role_ownership_grant.py +0 -334
  166. pulumi_snowflake/row_access_policy_grant.py +0 -536
  167. pulumi_snowflake/schema_grant.py +0 -643
  168. pulumi_snowflake/sequence_grant.py +0 -631
  169. pulumi_snowflake/session_parameter.py +0 -328
  170. pulumi_snowflake/stage_grant.py +0 -631
  171. pulumi_snowflake/stream.py +0 -610
  172. pulumi_snowflake/stream_grant.py +0 -631
  173. pulumi_snowflake/table_grant.py +0 -673
  174. pulumi_snowflake/tag_grant.py +0 -528
  175. pulumi_snowflake/tag_masking_policy_association.py +0 -210
  176. pulumi_snowflake/task_grant.py +0 -631
  177. pulumi_snowflake/user_grant.py +0 -390
  178. pulumi_snowflake/user_ownership_grant.py +0 -286
  179. pulumi_snowflake/view_grant.py +0 -701
  180. pulumi_snowflake/warehouse_grant.py +0 -436
  181. pulumi_snowflake-0.50.2a1709892015.dist-info/RECORD +0 -136
  182. {pulumi_snowflake-0.50.2a1709892015.dist-info → pulumi_snowflake-1.2.0a1736835738.dist-info}/top_level.txt +0 -0
@@ -4,9 +4,14 @@
4
4
 
5
5
  import copy
6
6
  import warnings
7
+ import sys
7
8
  import pulumi
8
9
  import pulumi.runtime
9
10
  from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
10
15
  from . import _utilities
11
16
  from . import outputs
12
17
 
@@ -85,6 +90,8 @@ def get_functions(database: Optional[str] = None,
85
90
  schema: Optional[str] = None,
86
91
  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetFunctionsResult:
87
92
  """
93
+ !> **Caution: Preview Feature** This feature is considered a preview feature in the provider, regardless of the state of the resource in Snowflake. We do not guarantee its stability. It will be reworked and marked as a stable feature in future releases. Breaking changes are expected, even without bumping the major version. To use this feature, add the relevant feature name to `preview_features_enabled field` in the provider configuration. Please always refer to the Getting Help section in our Github repo to best determine how to get help for your questions.
94
+
88
95
  ## Example Usage
89
96
 
90
97
  ```python
@@ -94,6 +101,10 @@ def get_functions(database: Optional[str] = None,
94
101
  current = snowflake.get_functions(database="MYDB",
95
102
  schema="MYSCHEMA")
96
103
  ```
104
+
105
+
106
+ :param str database: The database from which to return the schemas from.
107
+ :param str schema: The schema from which to return the functions from.
97
108
  """
98
109
  __args__ = dict()
99
110
  __args__['database'] = database
@@ -106,13 +117,12 @@ def get_functions(database: Optional[str] = None,
106
117
  functions=pulumi.get(__ret__, 'functions'),
107
118
  id=pulumi.get(__ret__, 'id'),
108
119
  schema=pulumi.get(__ret__, 'schema'))
109
-
110
-
111
- @_utilities.lift_output_func(get_functions)
112
120
  def get_functions_output(database: Optional[pulumi.Input[str]] = None,
113
121
  schema: Optional[pulumi.Input[str]] = None,
114
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetFunctionsResult]:
122
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetFunctionsResult]:
115
123
  """
124
+ !> **Caution: Preview Feature** This feature is considered a preview feature in the provider, regardless of the state of the resource in Snowflake. We do not guarantee its stability. It will be reworked and marked as a stable feature in future releases. Breaking changes are expected, even without bumping the major version. To use this feature, add the relevant feature name to `preview_features_enabled field` in the provider configuration. Please always refer to the Getting Help section in our Github repo to best determine how to get help for your questions.
125
+
116
126
  ## Example Usage
117
127
 
118
128
  ```python
@@ -122,5 +132,18 @@ def get_functions_output(database: Optional[pulumi.Input[str]] = None,
122
132
  current = snowflake.get_functions(database="MYDB",
123
133
  schema="MYSCHEMA")
124
134
  ```
135
+
136
+
137
+ :param str database: The database from which to return the schemas from.
138
+ :param str schema: The schema from which to return the functions from.
125
139
  """
126
- ...
140
+ __args__ = dict()
141
+ __args__['database'] = database
142
+ __args__['schema'] = schema
143
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
144
+ __ret__ = pulumi.runtime.invoke_output('snowflake:index/getFunctions:getFunctions', __args__, opts=opts, typ=GetFunctionsResult)
145
+ return __ret__.apply(lambda __response__: GetFunctionsResult(
146
+ database=pulumi.get(__response__, 'database'),
147
+ functions=pulumi.get(__response__, 'functions'),
148
+ id=pulumi.get(__response__, 'id'),
149
+ schema=pulumi.get(__response__, 'schema')))
@@ -4,9 +4,14 @@
4
4
 
5
5
  import copy
6
6
  import warnings
7
+ import sys
7
8
  import pulumi
8
9
  import pulumi.runtime
9
10
  from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
10
15
  from . import _utilities
11
16
  from . import outputs
12
17
  from ._inputs import *
@@ -50,7 +55,7 @@ class GetGrantsResult:
50
55
  @pulumi.getter(name="futureGrantsIn")
51
56
  def future_grants_in(self) -> Optional['outputs.GetGrantsFutureGrantsInResult']:
52
57
  """
53
- Lists all privileges on new (i.e. future) objects
58
+ Lists all privileges on new (i.e. future) objects.
54
59
  """
55
60
  return pulumi.get(self, "future_grants_in")
56
61
 
@@ -58,7 +63,7 @@ class GetGrantsResult:
58
63
  @pulumi.getter(name="futureGrantsTo")
59
64
  def future_grants_to(self) -> Optional['outputs.GetGrantsFutureGrantsToResult']:
60
65
  """
61
- Lists all privileges granted to the object on new (i.e. future) objects
66
+ Lists all privileges granted to the object on new (i.e. future) objects.
62
67
  """
63
68
  return pulumi.get(self, "future_grants_to")
64
69
 
@@ -74,7 +79,7 @@ class GetGrantsResult:
74
79
  @pulumi.getter(name="grantsOf")
75
80
  def grants_of(self) -> Optional['outputs.GetGrantsGrantsOfResult']:
76
81
  """
77
- Lists all objects to which the given object has been granted
82
+ Lists all objects to which the given object has been granted.
78
83
  """
79
84
  return pulumi.get(self, "grants_of")
80
85
 
@@ -82,7 +87,7 @@ class GetGrantsResult:
82
87
  @pulumi.getter(name="grantsOn")
83
88
  def grants_on(self) -> Optional['outputs.GetGrantsGrantsOnResult']:
84
89
  """
85
- Lists all privileges that have been granted on an object or account
90
+ Lists all privileges that have been granted on an object or on an account.
86
91
  """
87
92
  return pulumi.get(self, "grants_on")
88
93
 
@@ -90,7 +95,7 @@ class GetGrantsResult:
90
95
  @pulumi.getter(name="grantsTo")
91
96
  def grants_to(self) -> Optional['outputs.GetGrantsGrantsToResult']:
92
97
  """
93
- Lists all privileges granted to the object
98
+ Lists all privileges granted to the object.
94
99
  """
95
100
  return pulumi.get(self, "grants_to")
96
101
 
@@ -118,11 +123,11 @@ class AwaitableGetGrantsResult(GetGrantsResult):
118
123
  id=self.id)
119
124
 
120
125
 
121
- def get_grants(future_grants_in: Optional[pulumi.InputType['GetGrantsFutureGrantsInArgs']] = None,
122
- future_grants_to: Optional[pulumi.InputType['GetGrantsFutureGrantsToArgs']] = None,
123
- grants_of: Optional[pulumi.InputType['GetGrantsGrantsOfArgs']] = None,
124
- grants_on: Optional[pulumi.InputType['GetGrantsGrantsOnArgs']] = None,
125
- grants_to: Optional[pulumi.InputType['GetGrantsGrantsToArgs']] = None,
126
+ def get_grants(future_grants_in: Optional[Union['GetGrantsFutureGrantsInArgs', 'GetGrantsFutureGrantsInArgsDict']] = None,
127
+ future_grants_to: Optional[Union['GetGrantsFutureGrantsToArgs', 'GetGrantsFutureGrantsToArgsDict']] = None,
128
+ grants_of: Optional[Union['GetGrantsGrantsOfArgs', 'GetGrantsGrantsOfArgsDict']] = None,
129
+ grants_on: Optional[Union['GetGrantsGrantsOnArgs', 'GetGrantsGrantsOnArgsDict']] = None,
130
+ grants_to: Optional[Union['GetGrantsGrantsToArgs', 'GetGrantsGrantsToArgsDict']] = None,
126
131
  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetGrantsResult:
127
132
  """
128
133
  ## Example Usage
@@ -131,39 +136,94 @@ def get_grants(future_grants_in: Optional[pulumi.InputType['GetGrantsFutureGrant
131
136
  import pulumi
132
137
  import pulumi_snowflake as snowflake
133
138
 
134
- grants = snowflake.get_grants(grants_on=snowflake.GetGrantsGrantsOnArgs(
135
- account=True,
136
- ))
137
- grants2 = snowflake.get_grants(grants_on=snowflake.GetGrantsGrantsOnArgs(
138
- object_name="\\"tst\\"",
139
- object_type="DATABASE",
140
- ))
141
- grants3 = snowflake.get_grants(grants_to=snowflake.GetGrantsGrantsToArgs(
142
- role="ACCOUNTADMIN",
143
- ))
144
- grants4 = snowflake.get_grants(grants_of=snowflake.GetGrantsGrantsOfArgs(
145
- role="ACCOUNTADMIN",
146
- ))
147
- grants5 = snowflake.get_grants(future_grants_in=snowflake.GetGrantsFutureGrantsInArgs(
148
- database="\\"tst\\"",
149
- ))
150
- grants6 = snowflake.get_grants(future_grants_in=snowflake.GetGrantsFutureGrantsInArgs(
151
- schema=snowflake.GetGrantsFutureGrantsInSchemaArgs(
152
- database_name="\\"mydatabase\\"",
153
- schema_name="\\"myschema\\"",
154
- ),
155
- ))
156
- grants7 = snowflake.get_grants(future_grants_to=snowflake.GetGrantsFutureGrantsToArgs(
157
- role="ACCOUNTADMIN",
158
- ))
139
+ ##################################
140
+ ### SHOW GRANTS ON ...
141
+ ##################################
142
+ # account
143
+ example_on_account = snowflake.get_grants(grants_on={
144
+ "account": True,
145
+ })
146
+ # account object (e.g. database)
147
+ example_on_account_object = snowflake.get_grants(grants_on={
148
+ "object_name": "some_database",
149
+ "object_type": "DATABASE",
150
+ })
151
+ # database object (e.g. schema)
152
+ example_on_database_object = snowflake.get_grants(grants_on={
153
+ "object_name": "\\"some_database\\".\\"some_schema\\"",
154
+ "object_type": "SCHEMA",
155
+ })
156
+ # schema object (e.g. table)
157
+ example_on_schema_object = snowflake.get_grants(grants_on={
158
+ "object_name": "\\"some_database\\".\\"some_schema\\".\\"some_table\\"",
159
+ "object_type": "TABLE",
160
+ })
161
+ # application
162
+ example_to_application = snowflake.get_grants(grants_to={
163
+ "application": "some_application",
164
+ })
165
+ # application role
166
+ example_to_application_role = snowflake.get_grants(grants_to={
167
+ "application_role": "\\"some_application\\".\\"some_application_role\\"",
168
+ })
169
+ # account role
170
+ example_to_role = snowflake.get_grants(grants_to={
171
+ "account_role": "some_role",
172
+ })
173
+ # database role
174
+ example_to_database_role = snowflake.get_grants(grants_to={
175
+ "database_role": "\\"some_database\\".\\"some_database_role\\"",
176
+ })
177
+ # share
178
+ example_to_share = snowflake.get_grants(grants_to={
179
+ "share": {
180
+ "share_name": "some_share",
181
+ },
182
+ })
183
+ # user
184
+ example_to_user = snowflake.get_grants(grants_to={
185
+ "user": "some_user",
186
+ })
187
+ # application role
188
+ example_of_application_role = snowflake.get_grants(grants_of={
189
+ "application_role": "\\"some_application\\".\\"some_application_role\\"",
190
+ })
191
+ # database role
192
+ example_of_database_role = snowflake.get_grants(grants_of={
193
+ "database_role": "\\"some_database\\".\\"some_database_role\\"",
194
+ })
195
+ # account role
196
+ example_of_role = snowflake.get_grants(grants_of={
197
+ "account_role": "some_role",
198
+ })
199
+ # share
200
+ example_of_share = snowflake.get_grants(grants_of={
201
+ "share": "some_share",
202
+ })
203
+ # database
204
+ example_future_in_database = snowflake.get_grants(future_grants_in={
205
+ "database": "some_database",
206
+ })
207
+ # schema
208
+ example_future_in_schema = snowflake.get_grants(future_grants_in={
209
+ "schema": "\\"some_database\\".\\"some_schema\\"",
210
+ })
211
+ # account role
212
+ example_future_to_role = snowflake.get_grants(future_grants_to={
213
+ "account_role": "some_role",
214
+ })
215
+ # database role
216
+ example_future_to_database_role = snowflake.get_grants(future_grants_to={
217
+ "database_role": "\\"some_database\\".\\"some_database_role\\"",
218
+ })
159
219
  ```
160
220
 
161
221
 
162
- :param pulumi.InputType['GetGrantsFutureGrantsInArgs'] future_grants_in: Lists all privileges on new (i.e. future) objects
163
- :param pulumi.InputType['GetGrantsFutureGrantsToArgs'] future_grants_to: Lists all privileges granted to the object on new (i.e. future) objects
164
- :param pulumi.InputType['GetGrantsGrantsOfArgs'] grants_of: Lists all objects to which the given object has been granted
165
- :param pulumi.InputType['GetGrantsGrantsOnArgs'] grants_on: Lists all privileges that have been granted on an object or account
166
- :param pulumi.InputType['GetGrantsGrantsToArgs'] grants_to: Lists all privileges granted to the object
222
+ :param Union['GetGrantsFutureGrantsInArgs', 'GetGrantsFutureGrantsInArgsDict'] future_grants_in: Lists all privileges on new (i.e. future) objects.
223
+ :param Union['GetGrantsFutureGrantsToArgs', 'GetGrantsFutureGrantsToArgsDict'] future_grants_to: Lists all privileges granted to the object on new (i.e. future) objects.
224
+ :param Union['GetGrantsGrantsOfArgs', 'GetGrantsGrantsOfArgsDict'] grants_of: Lists all objects to which the given object has been granted.
225
+ :param Union['GetGrantsGrantsOnArgs', 'GetGrantsGrantsOnArgsDict'] grants_on: Lists all privileges that have been granted on an object or on an account.
226
+ :param Union['GetGrantsGrantsToArgs', 'GetGrantsGrantsToArgsDict'] grants_to: Lists all privileges granted to the object.
167
227
  """
168
228
  __args__ = dict()
169
229
  __args__['futureGrantsIn'] = future_grants_in
@@ -182,15 +242,12 @@ def get_grants(future_grants_in: Optional[pulumi.InputType['GetGrantsFutureGrant
182
242
  grants_on=pulumi.get(__ret__, 'grants_on'),
183
243
  grants_to=pulumi.get(__ret__, 'grants_to'),
184
244
  id=pulumi.get(__ret__, 'id'))
185
-
186
-
187
- @_utilities.lift_output_func(get_grants)
188
- def get_grants_output(future_grants_in: Optional[pulumi.Input[Optional[pulumi.InputType['GetGrantsFutureGrantsInArgs']]]] = None,
189
- future_grants_to: Optional[pulumi.Input[Optional[pulumi.InputType['GetGrantsFutureGrantsToArgs']]]] = None,
190
- grants_of: Optional[pulumi.Input[Optional[pulumi.InputType['GetGrantsGrantsOfArgs']]]] = None,
191
- grants_on: Optional[pulumi.Input[Optional[pulumi.InputType['GetGrantsGrantsOnArgs']]]] = None,
192
- grants_to: Optional[pulumi.Input[Optional[pulumi.InputType['GetGrantsGrantsToArgs']]]] = None,
193
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetGrantsResult]:
245
+ def get_grants_output(future_grants_in: Optional[pulumi.Input[Optional[Union['GetGrantsFutureGrantsInArgs', 'GetGrantsFutureGrantsInArgsDict']]]] = None,
246
+ future_grants_to: Optional[pulumi.Input[Optional[Union['GetGrantsFutureGrantsToArgs', 'GetGrantsFutureGrantsToArgsDict']]]] = None,
247
+ grants_of: Optional[pulumi.Input[Optional[Union['GetGrantsGrantsOfArgs', 'GetGrantsGrantsOfArgsDict']]]] = None,
248
+ grants_on: Optional[pulumi.Input[Optional[Union['GetGrantsGrantsOnArgs', 'GetGrantsGrantsOnArgsDict']]]] = None,
249
+ grants_to: Optional[pulumi.Input[Optional[Union['GetGrantsGrantsToArgs', 'GetGrantsGrantsToArgsDict']]]] = None,
250
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetGrantsResult]:
194
251
  """
195
252
  ## Example Usage
196
253
 
@@ -198,38 +255,108 @@ def get_grants_output(future_grants_in: Optional[pulumi.Input[Optional[pulumi.In
198
255
  import pulumi
199
256
  import pulumi_snowflake as snowflake
200
257
 
201
- grants = snowflake.get_grants(grants_on=snowflake.GetGrantsGrantsOnArgs(
202
- account=True,
203
- ))
204
- grants2 = snowflake.get_grants(grants_on=snowflake.GetGrantsGrantsOnArgs(
205
- object_name="\\"tst\\"",
206
- object_type="DATABASE",
207
- ))
208
- grants3 = snowflake.get_grants(grants_to=snowflake.GetGrantsGrantsToArgs(
209
- role="ACCOUNTADMIN",
210
- ))
211
- grants4 = snowflake.get_grants(grants_of=snowflake.GetGrantsGrantsOfArgs(
212
- role="ACCOUNTADMIN",
213
- ))
214
- grants5 = snowflake.get_grants(future_grants_in=snowflake.GetGrantsFutureGrantsInArgs(
215
- database="\\"tst\\"",
216
- ))
217
- grants6 = snowflake.get_grants(future_grants_in=snowflake.GetGrantsFutureGrantsInArgs(
218
- schema=snowflake.GetGrantsFutureGrantsInSchemaArgs(
219
- database_name="\\"mydatabase\\"",
220
- schema_name="\\"myschema\\"",
221
- ),
222
- ))
223
- grants7 = snowflake.get_grants(future_grants_to=snowflake.GetGrantsFutureGrantsToArgs(
224
- role="ACCOUNTADMIN",
225
- ))
258
+ ##################################
259
+ ### SHOW GRANTS ON ...
260
+ ##################################
261
+ # account
262
+ example_on_account = snowflake.get_grants(grants_on={
263
+ "account": True,
264
+ })
265
+ # account object (e.g. database)
266
+ example_on_account_object = snowflake.get_grants(grants_on={
267
+ "object_name": "some_database",
268
+ "object_type": "DATABASE",
269
+ })
270
+ # database object (e.g. schema)
271
+ example_on_database_object = snowflake.get_grants(grants_on={
272
+ "object_name": "\\"some_database\\".\\"some_schema\\"",
273
+ "object_type": "SCHEMA",
274
+ })
275
+ # schema object (e.g. table)
276
+ example_on_schema_object = snowflake.get_grants(grants_on={
277
+ "object_name": "\\"some_database\\".\\"some_schema\\".\\"some_table\\"",
278
+ "object_type": "TABLE",
279
+ })
280
+ # application
281
+ example_to_application = snowflake.get_grants(grants_to={
282
+ "application": "some_application",
283
+ })
284
+ # application role
285
+ example_to_application_role = snowflake.get_grants(grants_to={
286
+ "application_role": "\\"some_application\\".\\"some_application_role\\"",
287
+ })
288
+ # account role
289
+ example_to_role = snowflake.get_grants(grants_to={
290
+ "account_role": "some_role",
291
+ })
292
+ # database role
293
+ example_to_database_role = snowflake.get_grants(grants_to={
294
+ "database_role": "\\"some_database\\".\\"some_database_role\\"",
295
+ })
296
+ # share
297
+ example_to_share = snowflake.get_grants(grants_to={
298
+ "share": {
299
+ "share_name": "some_share",
300
+ },
301
+ })
302
+ # user
303
+ example_to_user = snowflake.get_grants(grants_to={
304
+ "user": "some_user",
305
+ })
306
+ # application role
307
+ example_of_application_role = snowflake.get_grants(grants_of={
308
+ "application_role": "\\"some_application\\".\\"some_application_role\\"",
309
+ })
310
+ # database role
311
+ example_of_database_role = snowflake.get_grants(grants_of={
312
+ "database_role": "\\"some_database\\".\\"some_database_role\\"",
313
+ })
314
+ # account role
315
+ example_of_role = snowflake.get_grants(grants_of={
316
+ "account_role": "some_role",
317
+ })
318
+ # share
319
+ example_of_share = snowflake.get_grants(grants_of={
320
+ "share": "some_share",
321
+ })
322
+ # database
323
+ example_future_in_database = snowflake.get_grants(future_grants_in={
324
+ "database": "some_database",
325
+ })
326
+ # schema
327
+ example_future_in_schema = snowflake.get_grants(future_grants_in={
328
+ "schema": "\\"some_database\\".\\"some_schema\\"",
329
+ })
330
+ # account role
331
+ example_future_to_role = snowflake.get_grants(future_grants_to={
332
+ "account_role": "some_role",
333
+ })
334
+ # database role
335
+ example_future_to_database_role = snowflake.get_grants(future_grants_to={
336
+ "database_role": "\\"some_database\\".\\"some_database_role\\"",
337
+ })
226
338
  ```
227
339
 
228
340
 
229
- :param pulumi.InputType['GetGrantsFutureGrantsInArgs'] future_grants_in: Lists all privileges on new (i.e. future) objects
230
- :param pulumi.InputType['GetGrantsFutureGrantsToArgs'] future_grants_to: Lists all privileges granted to the object on new (i.e. future) objects
231
- :param pulumi.InputType['GetGrantsGrantsOfArgs'] grants_of: Lists all objects to which the given object has been granted
232
- :param pulumi.InputType['GetGrantsGrantsOnArgs'] grants_on: Lists all privileges that have been granted on an object or account
233
- :param pulumi.InputType['GetGrantsGrantsToArgs'] grants_to: Lists all privileges granted to the object
341
+ :param Union['GetGrantsFutureGrantsInArgs', 'GetGrantsFutureGrantsInArgsDict'] future_grants_in: Lists all privileges on new (i.e. future) objects.
342
+ :param Union['GetGrantsFutureGrantsToArgs', 'GetGrantsFutureGrantsToArgsDict'] future_grants_to: Lists all privileges granted to the object on new (i.e. future) objects.
343
+ :param Union['GetGrantsGrantsOfArgs', 'GetGrantsGrantsOfArgsDict'] grants_of: Lists all objects to which the given object has been granted.
344
+ :param Union['GetGrantsGrantsOnArgs', 'GetGrantsGrantsOnArgsDict'] grants_on: Lists all privileges that have been granted on an object or on an account.
345
+ :param Union['GetGrantsGrantsToArgs', 'GetGrantsGrantsToArgsDict'] grants_to: Lists all privileges granted to the object.
234
346
  """
235
- ...
347
+ __args__ = dict()
348
+ __args__['futureGrantsIn'] = future_grants_in
349
+ __args__['futureGrantsTo'] = future_grants_to
350
+ __args__['grantsOf'] = grants_of
351
+ __args__['grantsOn'] = grants_on
352
+ __args__['grantsTo'] = grants_to
353
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
354
+ __ret__ = pulumi.runtime.invoke_output('snowflake:index/getGrants:getGrants', __args__, opts=opts, typ=GetGrantsResult)
355
+ return __ret__.apply(lambda __response__: GetGrantsResult(
356
+ future_grants_in=pulumi.get(__response__, 'future_grants_in'),
357
+ future_grants_to=pulumi.get(__response__, 'future_grants_to'),
358
+ grants=pulumi.get(__response__, 'grants'),
359
+ grants_of=pulumi.get(__response__, 'grants_of'),
360
+ grants_on=pulumi.get(__response__, 'grants_on'),
361
+ grants_to=pulumi.get(__response__, 'grants_to'),
362
+ id=pulumi.get(__response__, 'id')))
@@ -4,11 +4,17 @@
4
4
 
5
5
  import copy
6
6
  import warnings
7
+ import sys
7
8
  import pulumi
8
9
  import pulumi.runtime
9
10
  from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
10
15
  from . import _utilities
11
16
  from . import outputs
17
+ from ._inputs import *
12
18
 
13
19
  __all__ = [
14
20
  'GetMaskingPoliciesResult',
@@ -22,51 +28,73 @@ class GetMaskingPoliciesResult:
22
28
  """
23
29
  A collection of values returned by getMaskingPolicies.
24
30
  """
25
- def __init__(__self__, database=None, id=None, masking_policies=None, schema=None):
26
- if database and not isinstance(database, str):
27
- raise TypeError("Expected argument 'database' to be a str")
28
- pulumi.set(__self__, "database", database)
31
+ def __init__(__self__, id=None, in_=None, like=None, limit=None, masking_policies=None, with_describe=None):
29
32
  if id and not isinstance(id, str):
30
33
  raise TypeError("Expected argument 'id' to be a str")
31
34
  pulumi.set(__self__, "id", id)
35
+ if in_ and not isinstance(in_, dict):
36
+ raise TypeError("Expected argument 'in_' to be a dict")
37
+ pulumi.set(__self__, "in_", in_)
38
+ if like and not isinstance(like, str):
39
+ raise TypeError("Expected argument 'like' to be a str")
40
+ pulumi.set(__self__, "like", like)
41
+ if limit and not isinstance(limit, dict):
42
+ raise TypeError("Expected argument 'limit' to be a dict")
43
+ pulumi.set(__self__, "limit", limit)
32
44
  if masking_policies and not isinstance(masking_policies, list):
33
45
  raise TypeError("Expected argument 'masking_policies' to be a list")
34
46
  pulumi.set(__self__, "masking_policies", masking_policies)
35
- if schema and not isinstance(schema, str):
36
- raise TypeError("Expected argument 'schema' to be a str")
37
- pulumi.set(__self__, "schema", schema)
47
+ if with_describe and not isinstance(with_describe, bool):
48
+ raise TypeError("Expected argument 'with_describe' to be a bool")
49
+ pulumi.set(__self__, "with_describe", with_describe)
38
50
 
39
51
  @property
40
52
  @pulumi.getter
41
- def database(self) -> str:
53
+ def id(self) -> str:
54
+ """
55
+ The provider-assigned unique ID for this managed resource.
56
+ """
57
+ return pulumi.get(self, "id")
58
+
59
+ @property
60
+ @pulumi.getter(name="in")
61
+ def in_(self) -> Optional['outputs.GetMaskingPoliciesInResult']:
42
62
  """
43
- The database from which to return the schemas from.
63
+ IN clause to filter the list of masking policies
44
64
  """
45
- return pulumi.get(self, "database")
65
+ return pulumi.get(self, "in_")
46
66
 
47
67
  @property
48
68
  @pulumi.getter
49
- def id(self) -> str:
69
+ def like(self) -> Optional[str]:
50
70
  """
51
- The provider-assigned unique ID for this managed resource.
71
+ Filters the output with **case-insensitive** pattern, with support for SQL wildcard characters (`%` and `_`).
52
72
  """
53
- return pulumi.get(self, "id")
73
+ return pulumi.get(self, "like")
74
+
75
+ @property
76
+ @pulumi.getter
77
+ def limit(self) -> Optional['outputs.GetMaskingPoliciesLimitResult']:
78
+ """
79
+ Limits the number of rows returned. If the `limit.from` is set, then the limit wll start from the first element matched by the expression. The expression is only used to match with the first element, later on the elements are not matched by the prefix, but you can enforce a certain pattern with `starts_with` or `like`.
80
+ """
81
+ return pulumi.get(self, "limit")
54
82
 
55
83
  @property
56
84
  @pulumi.getter(name="maskingPolicies")
57
85
  def masking_policies(self) -> Sequence['outputs.GetMaskingPoliciesMaskingPolicyResult']:
58
86
  """
59
- The maskingPolicies in the schema
87
+ Holds the aggregated output of all views details queries.
60
88
  """
61
89
  return pulumi.get(self, "masking_policies")
62
90
 
63
91
  @property
64
- @pulumi.getter
65
- def schema(self) -> str:
92
+ @pulumi.getter(name="withDescribe")
93
+ def with_describe(self) -> Optional[bool]:
66
94
  """
67
- The schema from which to return the maskingPolicies from.
95
+ Runs DESC MASKING POLICY for each masking policy returned by SHOW MASKING POLICIES. The output of describe is saved to the description field. By default this value is set to true.
68
96
  """
69
- return pulumi.get(self, "schema")
97
+ return pulumi.get(self, "with_describe")
70
98
 
71
99
 
72
100
  class AwaitableGetMaskingPoliciesResult(GetMaskingPoliciesResult):
@@ -75,52 +103,68 @@ class AwaitableGetMaskingPoliciesResult(GetMaskingPoliciesResult):
75
103
  if False:
76
104
  yield self
77
105
  return GetMaskingPoliciesResult(
78
- database=self.database,
79
106
  id=self.id,
107
+ in_=self.in_,
108
+ like=self.like,
109
+ limit=self.limit,
80
110
  masking_policies=self.masking_policies,
81
- schema=self.schema)
111
+ with_describe=self.with_describe)
82
112
 
83
113
 
84
- def get_masking_policies(database: Optional[str] = None,
85
- schema: Optional[str] = None,
114
+ def get_masking_policies(in_: Optional[Union['GetMaskingPoliciesInArgs', 'GetMaskingPoliciesInArgsDict']] = None,
115
+ like: Optional[str] = None,
116
+ limit: Optional[Union['GetMaskingPoliciesLimitArgs', 'GetMaskingPoliciesLimitArgsDict']] = None,
117
+ with_describe: Optional[bool] = None,
86
118
  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetMaskingPoliciesResult:
87
119
  """
88
- ## Example Usage
120
+ Data source used to get details of filtered masking policies. Filtering is aligned with the current possibilities for [SHOW MASKING POLICIES](https://docs.snowflake.com/en/sql-reference/sql/show-masking-policies) query. The results of SHOW and DESCRIBE are encapsulated in one output collection `masking_policies`.
89
121
 
90
- ```python
91
- import pulumi
92
- import pulumi_snowflake as snowflake
93
122
 
94
- current = snowflake.get_masking_policies(database="MYDB",
95
- schema="MYSCHEMA")
96
- ```
123
+ :param Union['GetMaskingPoliciesInArgs', 'GetMaskingPoliciesInArgsDict'] in_: IN clause to filter the list of masking policies
124
+ :param str like: Filters the output with **case-insensitive** pattern, with support for SQL wildcard characters (`%` and `_`).
125
+ :param Union['GetMaskingPoliciesLimitArgs', 'GetMaskingPoliciesLimitArgsDict'] limit: Limits the number of rows returned. If the `limit.from` is set, then the limit wll start from the first element matched by the expression. The expression is only used to match with the first element, later on the elements are not matched by the prefix, but you can enforce a certain pattern with `starts_with` or `like`.
126
+ :param bool with_describe: Runs DESC MASKING POLICY for each masking policy returned by SHOW MASKING POLICIES. The output of describe is saved to the description field. By default this value is set to true.
97
127
  """
98
128
  __args__ = dict()
99
- __args__['database'] = database
100
- __args__['schema'] = schema
129
+ __args__['in'] = in_
130
+ __args__['like'] = like
131
+ __args__['limit'] = limit
132
+ __args__['withDescribe'] = with_describe
101
133
  opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
102
134
  __ret__ = pulumi.runtime.invoke('snowflake:index/getMaskingPolicies:getMaskingPolicies', __args__, opts=opts, typ=GetMaskingPoliciesResult).value
103
135
 
104
136
  return AwaitableGetMaskingPoliciesResult(
105
- database=pulumi.get(__ret__, 'database'),
106
137
  id=pulumi.get(__ret__, 'id'),
138
+ in_=pulumi.get(__ret__, 'in_'),
139
+ like=pulumi.get(__ret__, 'like'),
140
+ limit=pulumi.get(__ret__, 'limit'),
107
141
  masking_policies=pulumi.get(__ret__, 'masking_policies'),
108
- schema=pulumi.get(__ret__, 'schema'))
109
-
110
-
111
- @_utilities.lift_output_func(get_masking_policies)
112
- def get_masking_policies_output(database: Optional[pulumi.Input[str]] = None,
113
- schema: Optional[pulumi.Input[str]] = None,
114
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetMaskingPoliciesResult]:
142
+ with_describe=pulumi.get(__ret__, 'with_describe'))
143
+ def get_masking_policies_output(in_: Optional[pulumi.Input[Optional[Union['GetMaskingPoliciesInArgs', 'GetMaskingPoliciesInArgsDict']]]] = None,
144
+ like: Optional[pulumi.Input[Optional[str]]] = None,
145
+ limit: Optional[pulumi.Input[Optional[Union['GetMaskingPoliciesLimitArgs', 'GetMaskingPoliciesLimitArgsDict']]]] = None,
146
+ with_describe: Optional[pulumi.Input[Optional[bool]]] = None,
147
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetMaskingPoliciesResult]:
115
148
  """
116
- ## Example Usage
149
+ Data source used to get details of filtered masking policies. Filtering is aligned with the current possibilities for [SHOW MASKING POLICIES](https://docs.snowflake.com/en/sql-reference/sql/show-masking-policies) query. The results of SHOW and DESCRIBE are encapsulated in one output collection `masking_policies`.
117
150
 
118
- ```python
119
- import pulumi
120
- import pulumi_snowflake as snowflake
121
151
 
122
- current = snowflake.get_masking_policies(database="MYDB",
123
- schema="MYSCHEMA")
124
- ```
152
+ :param Union['GetMaskingPoliciesInArgs', 'GetMaskingPoliciesInArgsDict'] in_: IN clause to filter the list of masking policies
153
+ :param str like: Filters the output with **case-insensitive** pattern, with support for SQL wildcard characters (`%` and `_`).
154
+ :param Union['GetMaskingPoliciesLimitArgs', 'GetMaskingPoliciesLimitArgsDict'] limit: Limits the number of rows returned. If the `limit.from` is set, then the limit wll start from the first element matched by the expression. The expression is only used to match with the first element, later on the elements are not matched by the prefix, but you can enforce a certain pattern with `starts_with` or `like`.
155
+ :param bool with_describe: Runs DESC MASKING POLICY for each masking policy returned by SHOW MASKING POLICIES. The output of describe is saved to the description field. By default this value is set to true.
125
156
  """
126
- ...
157
+ __args__ = dict()
158
+ __args__['in'] = in_
159
+ __args__['like'] = like
160
+ __args__['limit'] = limit
161
+ __args__['withDescribe'] = with_describe
162
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
163
+ __ret__ = pulumi.runtime.invoke_output('snowflake:index/getMaskingPolicies:getMaskingPolicies', __args__, opts=opts, typ=GetMaskingPoliciesResult)
164
+ return __ret__.apply(lambda __response__: GetMaskingPoliciesResult(
165
+ id=pulumi.get(__response__, 'id'),
166
+ in_=pulumi.get(__response__, 'in_'),
167
+ like=pulumi.get(__response__, 'like'),
168
+ limit=pulumi.get(__response__, 'limit'),
169
+ masking_policies=pulumi.get(__response__, 'masking_policies'),
170
+ with_describe=pulumi.get(__response__, 'with_describe')))