pulumi-snowflake 0.58.0__py3-none-any.whl → 0.58.0a1722527984__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 (92) hide show
  1. pulumi_snowflake/_inputs.py +125 -5857
  2. pulumi_snowflake/account.py +50 -28
  3. pulumi_snowflake/account_parameter.py +28 -0
  4. pulumi_snowflake/account_password_policy_attachment.py +30 -2
  5. pulumi_snowflake/account_role.py +32 -51
  6. pulumi_snowflake/alert.py +45 -33
  7. pulumi_snowflake/api_authentication_integration_with_authorization_code_grant.py +19 -39
  8. pulumi_snowflake/api_authentication_integration_with_client_credentials.py +19 -39
  9. pulumi_snowflake/api_authentication_integration_with_jwt_bearer.py +19 -39
  10. pulumi_snowflake/api_integration.py +54 -28
  11. pulumi_snowflake/cortex_search_service.py +0 -28
  12. pulumi_snowflake/database.py +148 -97
  13. pulumi_snowflake/database_old.py +77 -5
  14. pulumi_snowflake/database_role.py +42 -76
  15. pulumi_snowflake/dynamic_table.py +43 -33
  16. pulumi_snowflake/email_notification_integration.py +26 -28
  17. pulumi_snowflake/external_function.py +62 -38
  18. pulumi_snowflake/external_oauth_integration.py +21 -41
  19. pulumi_snowflake/external_table.py +58 -38
  20. pulumi_snowflake/failover_group.py +82 -38
  21. pulumi_snowflake/file_format.py +26 -28
  22. pulumi_snowflake/function.py +9 -33
  23. pulumi_snowflake/get_cortex_search_services.py +16 -16
  24. pulumi_snowflake/get_database_roles.py +38 -61
  25. pulumi_snowflake/get_databases.py +6 -6
  26. pulumi_snowflake/get_dynamic_tables.py +12 -12
  27. pulumi_snowflake/get_grants.py +138 -138
  28. pulumi_snowflake/get_network_policies.py +2 -2
  29. pulumi_snowflake/get_roles.py +2 -2
  30. pulumi_snowflake/get_schemas.py +8 -12
  31. pulumi_snowflake/get_security_integrations.py +2 -2
  32. pulumi_snowflake/get_streamlits.py +10 -10
  33. pulumi_snowflake/get_users.py +33 -96
  34. pulumi_snowflake/get_views.py +53 -92
  35. pulumi_snowflake/get_warehouses.py +2 -2
  36. pulumi_snowflake/grant_account_role.py +4 -0
  37. pulumi_snowflake/grant_application_role.py +4 -0
  38. pulumi_snowflake/grant_database_role.py +4 -0
  39. pulumi_snowflake/grant_ownership.py +5 -5
  40. pulumi_snowflake/grant_privileges_to_account_role.py +15 -15
  41. pulumi_snowflake/grant_privileges_to_database_role.py +12 -16
  42. pulumi_snowflake/grant_privileges_to_share.py +0 -47
  43. pulumi_snowflake/managed_account.py +4 -28
  44. pulumi_snowflake/masking_policy.py +89 -33
  45. pulumi_snowflake/materialized_view.py +39 -33
  46. pulumi_snowflake/network_policy.py +49 -47
  47. pulumi_snowflake/network_policy_attachment.py +30 -0
  48. pulumi_snowflake/network_rule.py +66 -28
  49. pulumi_snowflake/notification_integration.py +34 -28
  50. pulumi_snowflake/oauth_integration.py +34 -0
  51. pulumi_snowflake/oauth_integration_for_custom_clients.py +105 -39
  52. pulumi_snowflake/oauth_integration_for_partner_applications.py +19 -39
  53. pulumi_snowflake/object_parameter.py +103 -5
  54. pulumi_snowflake/outputs.py +4207 -12013
  55. pulumi_snowflake/password_policy.py +28 -28
  56. pulumi_snowflake/pipe.py +4 -28
  57. pulumi_snowflake/procedure.py +9 -33
  58. pulumi_snowflake/provider.py +16 -16
  59. pulumi_snowflake/pulumi-plugin.json +1 -1
  60. pulumi_snowflake/resource_monitor.py +48 -28
  61. pulumi_snowflake/role.py +32 -51
  62. pulumi_snowflake/row_access_policy.py +34 -28
  63. pulumi_snowflake/saml2_integration.py +19 -39
  64. pulumi_snowflake/saml_integration.py +34 -0
  65. pulumi_snowflake/schema.py +28 -52
  66. pulumi_snowflake/scim_integration.py +19 -39
  67. pulumi_snowflake/secondary_database.py +19 -35
  68. pulumi_snowflake/sequence.py +36 -4
  69. pulumi_snowflake/session_parameter.py +32 -0
  70. pulumi_snowflake/share.py +28 -28
  71. pulumi_snowflake/shared_database.py +15 -35
  72. pulumi_snowflake/stage.py +33 -33
  73. pulumi_snowflake/storage_integration.py +4 -28
  74. pulumi_snowflake/stream.py +4 -28
  75. pulumi_snowflake/streamlit.py +19 -39
  76. pulumi_snowflake/table.py +47 -43
  77. pulumi_snowflake/table_column_masking_policy_application.py +14 -2
  78. pulumi_snowflake/table_constraint.py +157 -5
  79. pulumi_snowflake/tag.py +40 -28
  80. pulumi_snowflake/tag_association.py +125 -5
  81. pulumi_snowflake/tag_masking_policy_association.py +4 -0
  82. pulumi_snowflake/task.py +92 -28
  83. pulumi_snowflake/unsafe_execute.py +20 -2
  84. pulumi_snowflake/user.py +373 -3346
  85. pulumi_snowflake/user_password_policy_attachment.py +36 -0
  86. pulumi_snowflake/view.py +185 -465
  87. pulumi_snowflake/warehouse.py +43 -39
  88. {pulumi_snowflake-0.58.0.dist-info → pulumi_snowflake-0.58.0a1722527984.dist-info}/METADATA +1 -1
  89. pulumi_snowflake-0.58.0a1722527984.dist-info/RECORD +129 -0
  90. {pulumi_snowflake-0.58.0.dist-info → pulumi_snowflake-0.58.0a1722527984.dist-info}/WHEEL +1 -1
  91. pulumi_snowflake-0.58.0.dist-info/RECORD +0 -129
  92. {pulumi_snowflake-0.58.0.dist-info → pulumi_snowflake-0.58.0a1722527984.dist-info}/top_level.txt +0 -0
pulumi_snowflake/view.py CHANGED
@@ -19,67 +19,47 @@ class ViewArgs:
19
19
  database: pulumi.Input[str],
20
20
  schema: pulumi.Input[str],
21
21
  statement: pulumi.Input[str],
22
- aggregation_policy: Optional[pulumi.Input['ViewAggregationPolicyArgs']] = None,
23
- change_tracking: Optional[pulumi.Input[str]] = None,
24
- columns: Optional[pulumi.Input[Sequence[pulumi.Input['ViewColumnArgs']]]] = None,
25
22
  comment: Optional[pulumi.Input[str]] = None,
26
23
  copy_grants: Optional[pulumi.Input[bool]] = None,
27
- data_metric_functions: Optional[pulumi.Input[Sequence[pulumi.Input['ViewDataMetricFunctionArgs']]]] = None,
28
- data_metric_schedule: Optional[pulumi.Input['ViewDataMetricScheduleArgs']] = None,
29
- is_recursive: Optional[pulumi.Input[str]] = None,
30
- is_secure: Optional[pulumi.Input[str]] = None,
31
- is_temporary: Optional[pulumi.Input[str]] = None,
24
+ is_secure: Optional[pulumi.Input[bool]] = None,
32
25
  name: Optional[pulumi.Input[str]] = None,
33
- row_access_policy: Optional[pulumi.Input['ViewRowAccessPolicyArgs']] = None):
26
+ or_replace: Optional[pulumi.Input[bool]] = None,
27
+ tags: Optional[pulumi.Input[Sequence[pulumi.Input['ViewTagArgs']]]] = None):
34
28
  """
35
29
  The set of arguments for constructing a View resource.
36
- :param pulumi.Input[str] database: The database in which to create the view. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
37
- :param pulumi.Input[str] schema: The schema in which to create the view. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
30
+ :param pulumi.Input[str] database: The database in which to create the view. Don't use the | character.
31
+ :param pulumi.Input[str] schema: The schema in which to create the view. Don't use the | character.
38
32
  :param pulumi.Input[str] statement: Specifies the query used to create the view.
39
- :param pulumi.Input['ViewAggregationPolicyArgs'] aggregation_policy: Specifies the aggregation policy to set on a view.
40
- :param pulumi.Input[str] change_tracking: Specifies to enable or disable change tracking on the table. Available options are: "true" or "false". When the value is not set in the configuration the provider will put "default" there which means to use the Snowflake default for this value.
41
- :param pulumi.Input[Sequence[pulumi.Input['ViewColumnArgs']]] columns: If you want to change the name of a column or add a comment to a column in the new view, include a column list that specifies the column names and (if needed) comments about the columns. (You do not need to specify the data types of the columns.)
42
33
  :param pulumi.Input[str] comment: Specifies a comment for the view.
43
- :param pulumi.Input[bool] copy_grants: Retains the access permissions from the original view when a new view is created using the OR REPLACE clause.
44
- :param pulumi.Input[Sequence[pulumi.Input['ViewDataMetricFunctionArgs']]] data_metric_functions: Data metric functions used for the view.
45
- :param pulumi.Input['ViewDataMetricScheduleArgs'] data_metric_schedule: Specifies the schedule to run the data metric functions periodically.
46
- :param pulumi.Input[str] is_recursive: Specifies that the view can refer to itself using recursive syntax without necessarily using a CTE (common table expression). Available options are: "true" or "false". When the value is not set in the configuration the provider will put "default" there which means to use the Snowflake default for this value.
47
- :param pulumi.Input[str] name: Specifies the identifier for the view; must be unique for the schema in which the view is created. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
48
- :param pulumi.Input['ViewRowAccessPolicyArgs'] row_access_policy: Specifies the row access policy to set on a view.
34
+ :param pulumi.Input[bool] copy_grants: Retains the access permissions from the original view when a new view is created using the OR REPLACE clause. OR REPLACE must be set when COPY GRANTS is set.
35
+ :param pulumi.Input[str] name: Specifies the identifier for the view; must be unique for the schema in which the view is created. Don't use the | character.
36
+ :param pulumi.Input[bool] or_replace: Overwrites the View if it exists.
37
+ :param pulumi.Input[Sequence[pulumi.Input['ViewTagArgs']]] tags: Definitions of a tag to associate with the resource.
49
38
  """
50
39
  pulumi.set(__self__, "database", database)
51
40
  pulumi.set(__self__, "schema", schema)
52
41
  pulumi.set(__self__, "statement", statement)
53
- if aggregation_policy is not None:
54
- pulumi.set(__self__, "aggregation_policy", aggregation_policy)
55
- if change_tracking is not None:
56
- pulumi.set(__self__, "change_tracking", change_tracking)
57
- if columns is not None:
58
- pulumi.set(__self__, "columns", columns)
59
42
  if comment is not None:
60
43
  pulumi.set(__self__, "comment", comment)
61
44
  if copy_grants is not None:
62
45
  pulumi.set(__self__, "copy_grants", copy_grants)
63
- if data_metric_functions is not None:
64
- pulumi.set(__self__, "data_metric_functions", data_metric_functions)
65
- if data_metric_schedule is not None:
66
- pulumi.set(__self__, "data_metric_schedule", data_metric_schedule)
67
- if is_recursive is not None:
68
- pulumi.set(__self__, "is_recursive", is_recursive)
69
46
  if is_secure is not None:
70
47
  pulumi.set(__self__, "is_secure", is_secure)
71
- if is_temporary is not None:
72
- pulumi.set(__self__, "is_temporary", is_temporary)
73
48
  if name is not None:
74
49
  pulumi.set(__self__, "name", name)
75
- if row_access_policy is not None:
76
- pulumi.set(__self__, "row_access_policy", row_access_policy)
50
+ if or_replace is not None:
51
+ pulumi.set(__self__, "or_replace", or_replace)
52
+ if tags is not None:
53
+ warnings.warn("""Use the 'snowflake_tag_association' resource instead.""", DeprecationWarning)
54
+ pulumi.log.warn("""tags is deprecated: Use the 'snowflake_tag_association' resource instead.""")
55
+ if tags is not None:
56
+ pulumi.set(__self__, "tags", tags)
77
57
 
78
58
  @property
79
59
  @pulumi.getter
80
60
  def database(self) -> pulumi.Input[str]:
81
61
  """
82
- The database in which to create the view. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
62
+ The database in which to create the view. Don't use the | character.
83
63
  """
84
64
  return pulumi.get(self, "database")
85
65
 
@@ -91,7 +71,7 @@ class ViewArgs:
91
71
  @pulumi.getter
92
72
  def schema(self) -> pulumi.Input[str]:
93
73
  """
94
- The schema in which to create the view. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
74
+ The schema in which to create the view. Don't use the | character.
95
75
  """
96
76
  return pulumi.get(self, "schema")
97
77
 
@@ -111,42 +91,6 @@ class ViewArgs:
111
91
  def statement(self, value: pulumi.Input[str]):
112
92
  pulumi.set(self, "statement", value)
113
93
 
114
- @property
115
- @pulumi.getter(name="aggregationPolicy")
116
- def aggregation_policy(self) -> Optional[pulumi.Input['ViewAggregationPolicyArgs']]:
117
- """
118
- Specifies the aggregation policy to set on a view.
119
- """
120
- return pulumi.get(self, "aggregation_policy")
121
-
122
- @aggregation_policy.setter
123
- def aggregation_policy(self, value: Optional[pulumi.Input['ViewAggregationPolicyArgs']]):
124
- pulumi.set(self, "aggregation_policy", value)
125
-
126
- @property
127
- @pulumi.getter(name="changeTracking")
128
- def change_tracking(self) -> Optional[pulumi.Input[str]]:
129
- """
130
- Specifies to enable or disable change tracking on the table. Available options are: "true" or "false". When the value is not set in the configuration the provider will put "default" there which means to use the Snowflake default for this value.
131
- """
132
- return pulumi.get(self, "change_tracking")
133
-
134
- @change_tracking.setter
135
- def change_tracking(self, value: Optional[pulumi.Input[str]]):
136
- pulumi.set(self, "change_tracking", value)
137
-
138
- @property
139
- @pulumi.getter
140
- def columns(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ViewColumnArgs']]]]:
141
- """
142
- If you want to change the name of a column or add a comment to a column in the new view, include a column list that specifies the column names and (if needed) comments about the columns. (You do not need to specify the data types of the columns.)
143
- """
144
- return pulumi.get(self, "columns")
145
-
146
- @columns.setter
147
- def columns(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ViewColumnArgs']]]]):
148
- pulumi.set(self, "columns", value)
149
-
150
94
  @property
151
95
  @pulumi.getter
152
96
  def comment(self) -> Optional[pulumi.Input[str]]:
@@ -163,7 +107,7 @@ class ViewArgs:
163
107
  @pulumi.getter(name="copyGrants")
164
108
  def copy_grants(self) -> Optional[pulumi.Input[bool]]:
165
109
  """
166
- Retains the access permissions from the original view when a new view is created using the OR REPLACE clause.
110
+ Retains the access permissions from the original view when a new view is created using the OR REPLACE clause. OR REPLACE must be set when COPY GRANTS is set.
167
111
  """
168
112
  return pulumi.get(self, "copy_grants")
169
113
 
@@ -171,65 +115,20 @@ class ViewArgs:
171
115
  def copy_grants(self, value: Optional[pulumi.Input[bool]]):
172
116
  pulumi.set(self, "copy_grants", value)
173
117
 
174
- @property
175
- @pulumi.getter(name="dataMetricFunctions")
176
- def data_metric_functions(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ViewDataMetricFunctionArgs']]]]:
177
- """
178
- Data metric functions used for the view.
179
- """
180
- return pulumi.get(self, "data_metric_functions")
181
-
182
- @data_metric_functions.setter
183
- def data_metric_functions(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ViewDataMetricFunctionArgs']]]]):
184
- pulumi.set(self, "data_metric_functions", value)
185
-
186
- @property
187
- @pulumi.getter(name="dataMetricSchedule")
188
- def data_metric_schedule(self) -> Optional[pulumi.Input['ViewDataMetricScheduleArgs']]:
189
- """
190
- Specifies the schedule to run the data metric functions periodically.
191
- """
192
- return pulumi.get(self, "data_metric_schedule")
193
-
194
- @data_metric_schedule.setter
195
- def data_metric_schedule(self, value: Optional[pulumi.Input['ViewDataMetricScheduleArgs']]):
196
- pulumi.set(self, "data_metric_schedule", value)
197
-
198
- @property
199
- @pulumi.getter(name="isRecursive")
200
- def is_recursive(self) -> Optional[pulumi.Input[str]]:
201
- """
202
- Specifies that the view can refer to itself using recursive syntax without necessarily using a CTE (common table expression). Available options are: "true" or "false". When the value is not set in the configuration the provider will put "default" there which means to use the Snowflake default for this value.
203
- """
204
- return pulumi.get(self, "is_recursive")
205
-
206
- @is_recursive.setter
207
- def is_recursive(self, value: Optional[pulumi.Input[str]]):
208
- pulumi.set(self, "is_recursive", value)
209
-
210
118
  @property
211
119
  @pulumi.getter(name="isSecure")
212
- def is_secure(self) -> Optional[pulumi.Input[str]]:
120
+ def is_secure(self) -> Optional[pulumi.Input[bool]]:
213
121
  return pulumi.get(self, "is_secure")
214
122
 
215
123
  @is_secure.setter
216
- def is_secure(self, value: Optional[pulumi.Input[str]]):
124
+ def is_secure(self, value: Optional[pulumi.Input[bool]]):
217
125
  pulumi.set(self, "is_secure", value)
218
126
 
219
- @property
220
- @pulumi.getter(name="isTemporary")
221
- def is_temporary(self) -> Optional[pulumi.Input[str]]:
222
- return pulumi.get(self, "is_temporary")
223
-
224
- @is_temporary.setter
225
- def is_temporary(self, value: Optional[pulumi.Input[str]]):
226
- pulumi.set(self, "is_temporary", value)
227
-
228
127
  @property
229
128
  @pulumi.getter
230
129
  def name(self) -> Optional[pulumi.Input[str]]:
231
130
  """
232
- Specifies the identifier for the view; must be unique for the schema in which the view is created. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
131
+ Specifies the identifier for the view; must be unique for the schema in which the view is created. Don't use the | character.
233
132
  """
234
133
  return pulumi.get(self, "name")
235
134
 
@@ -238,130 +137,79 @@ class ViewArgs:
238
137
  pulumi.set(self, "name", value)
239
138
 
240
139
  @property
241
- @pulumi.getter(name="rowAccessPolicy")
242
- def row_access_policy(self) -> Optional[pulumi.Input['ViewRowAccessPolicyArgs']]:
140
+ @pulumi.getter(name="orReplace")
141
+ def or_replace(self) -> Optional[pulumi.Input[bool]]:
142
+ """
143
+ Overwrites the View if it exists.
144
+ """
145
+ return pulumi.get(self, "or_replace")
146
+
147
+ @or_replace.setter
148
+ def or_replace(self, value: Optional[pulumi.Input[bool]]):
149
+ pulumi.set(self, "or_replace", value)
150
+
151
+ @property
152
+ @pulumi.getter
153
+ @_utilities.deprecated("""Use the 'snowflake_tag_association' resource instead.""")
154
+ def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ViewTagArgs']]]]:
243
155
  """
244
- Specifies the row access policy to set on a view.
156
+ Definitions of a tag to associate with the resource.
245
157
  """
246
- return pulumi.get(self, "row_access_policy")
158
+ return pulumi.get(self, "tags")
247
159
 
248
- @row_access_policy.setter
249
- def row_access_policy(self, value: Optional[pulumi.Input['ViewRowAccessPolicyArgs']]):
250
- pulumi.set(self, "row_access_policy", value)
160
+ @tags.setter
161
+ def tags(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ViewTagArgs']]]]):
162
+ pulumi.set(self, "tags", value)
251
163
 
252
164
 
253
165
  @pulumi.input_type
254
166
  class _ViewState:
255
167
  def __init__(__self__, *,
256
- aggregation_policy: Optional[pulumi.Input['ViewAggregationPolicyArgs']] = None,
257
- change_tracking: Optional[pulumi.Input[str]] = None,
258
- columns: Optional[pulumi.Input[Sequence[pulumi.Input['ViewColumnArgs']]]] = None,
259
168
  comment: Optional[pulumi.Input[str]] = None,
260
169
  copy_grants: Optional[pulumi.Input[bool]] = None,
261
- data_metric_functions: Optional[pulumi.Input[Sequence[pulumi.Input['ViewDataMetricFunctionArgs']]]] = None,
262
- data_metric_schedule: Optional[pulumi.Input['ViewDataMetricScheduleArgs']] = None,
170
+ created_on: Optional[pulumi.Input[str]] = None,
263
171
  database: Optional[pulumi.Input[str]] = None,
264
- describe_outputs: Optional[pulumi.Input[Sequence[pulumi.Input['ViewDescribeOutputArgs']]]] = None,
265
- fully_qualified_name: Optional[pulumi.Input[str]] = None,
266
- is_recursive: Optional[pulumi.Input[str]] = None,
267
- is_secure: Optional[pulumi.Input[str]] = None,
268
- is_temporary: Optional[pulumi.Input[str]] = None,
172
+ is_secure: Optional[pulumi.Input[bool]] = None,
269
173
  name: Optional[pulumi.Input[str]] = None,
270
- row_access_policy: Optional[pulumi.Input['ViewRowAccessPolicyArgs']] = None,
174
+ or_replace: Optional[pulumi.Input[bool]] = None,
271
175
  schema: Optional[pulumi.Input[str]] = None,
272
- show_outputs: Optional[pulumi.Input[Sequence[pulumi.Input['ViewShowOutputArgs']]]] = None,
273
- statement: Optional[pulumi.Input[str]] = None):
176
+ statement: Optional[pulumi.Input[str]] = None,
177
+ tags: Optional[pulumi.Input[Sequence[pulumi.Input['ViewTagArgs']]]] = None):
274
178
  """
275
179
  Input properties used for looking up and filtering View resources.
276
- :param pulumi.Input['ViewAggregationPolicyArgs'] aggregation_policy: Specifies the aggregation policy to set on a view.
277
- :param pulumi.Input[str] change_tracking: Specifies to enable or disable change tracking on the table. Available options are: "true" or "false". When the value is not set in the configuration the provider will put "default" there which means to use the Snowflake default for this value.
278
- :param pulumi.Input[Sequence[pulumi.Input['ViewColumnArgs']]] columns: If you want to change the name of a column or add a comment to a column in the new view, include a column list that specifies the column names and (if needed) comments about the columns. (You do not need to specify the data types of the columns.)
279
180
  :param pulumi.Input[str] comment: Specifies a comment for the view.
280
- :param pulumi.Input[bool] copy_grants: Retains the access permissions from the original view when a new view is created using the OR REPLACE clause.
281
- :param pulumi.Input[Sequence[pulumi.Input['ViewDataMetricFunctionArgs']]] data_metric_functions: Data metric functions used for the view.
282
- :param pulumi.Input['ViewDataMetricScheduleArgs'] data_metric_schedule: Specifies the schedule to run the data metric functions periodically.
283
- :param pulumi.Input[str] database: The database in which to create the view. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
284
- :param pulumi.Input[Sequence[pulumi.Input['ViewDescribeOutputArgs']]] describe_outputs: Outputs the result of `DESCRIBE VIEW` for the given view.
285
- :param pulumi.Input[str] fully_qualified_name: Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
286
- :param pulumi.Input[str] is_recursive: Specifies that the view can refer to itself using recursive syntax without necessarily using a CTE (common table expression). Available options are: "true" or "false". When the value is not set in the configuration the provider will put "default" there which means to use the Snowflake default for this value.
287
- :param pulumi.Input[str] name: Specifies the identifier for the view; must be unique for the schema in which the view is created. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
288
- :param pulumi.Input['ViewRowAccessPolicyArgs'] row_access_policy: Specifies the row access policy to set on a view.
289
- :param pulumi.Input[str] schema: The schema in which to create the view. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
290
- :param pulumi.Input[Sequence[pulumi.Input['ViewShowOutputArgs']]] show_outputs: Outputs the result of `SHOW VIEW` for the given view.
181
+ :param pulumi.Input[bool] copy_grants: Retains the access permissions from the original view when a new view is created using the OR REPLACE clause. OR REPLACE must be set when COPY GRANTS is set.
182
+ :param pulumi.Input[str] created_on: The timestamp at which the view was created.
183
+ :param pulumi.Input[str] database: The database in which to create the view. Don't use the | character.
184
+ :param pulumi.Input[str] name: Specifies the identifier for the view; must be unique for the schema in which the view is created. Don't use the | character.
185
+ :param pulumi.Input[bool] or_replace: Overwrites the View if it exists.
186
+ :param pulumi.Input[str] schema: The schema in which to create the view. Don't use the | character.
291
187
  :param pulumi.Input[str] statement: Specifies the query used to create the view.
188
+ :param pulumi.Input[Sequence[pulumi.Input['ViewTagArgs']]] tags: Definitions of a tag to associate with the resource.
292
189
  """
293
- if aggregation_policy is not None:
294
- pulumi.set(__self__, "aggregation_policy", aggregation_policy)
295
- if change_tracking is not None:
296
- pulumi.set(__self__, "change_tracking", change_tracking)
297
- if columns is not None:
298
- pulumi.set(__self__, "columns", columns)
299
190
  if comment is not None:
300
191
  pulumi.set(__self__, "comment", comment)
301
192
  if copy_grants is not None:
302
193
  pulumi.set(__self__, "copy_grants", copy_grants)
303
- if data_metric_functions is not None:
304
- pulumi.set(__self__, "data_metric_functions", data_metric_functions)
305
- if data_metric_schedule is not None:
306
- pulumi.set(__self__, "data_metric_schedule", data_metric_schedule)
194
+ if created_on is not None:
195
+ pulumi.set(__self__, "created_on", created_on)
307
196
  if database is not None:
308
197
  pulumi.set(__self__, "database", database)
309
- if describe_outputs is not None:
310
- pulumi.set(__self__, "describe_outputs", describe_outputs)
311
- if fully_qualified_name is not None:
312
- pulumi.set(__self__, "fully_qualified_name", fully_qualified_name)
313
- if is_recursive is not None:
314
- pulumi.set(__self__, "is_recursive", is_recursive)
315
198
  if is_secure is not None:
316
199
  pulumi.set(__self__, "is_secure", is_secure)
317
- if is_temporary is not None:
318
- pulumi.set(__self__, "is_temporary", is_temporary)
319
200
  if name is not None:
320
201
  pulumi.set(__self__, "name", name)
321
- if row_access_policy is not None:
322
- pulumi.set(__self__, "row_access_policy", row_access_policy)
202
+ if or_replace is not None:
203
+ pulumi.set(__self__, "or_replace", or_replace)
323
204
  if schema is not None:
324
205
  pulumi.set(__self__, "schema", schema)
325
- if show_outputs is not None:
326
- pulumi.set(__self__, "show_outputs", show_outputs)
327
206
  if statement is not None:
328
207
  pulumi.set(__self__, "statement", statement)
329
-
330
- @property
331
- @pulumi.getter(name="aggregationPolicy")
332
- def aggregation_policy(self) -> Optional[pulumi.Input['ViewAggregationPolicyArgs']]:
333
- """
334
- Specifies the aggregation policy to set on a view.
335
- """
336
- return pulumi.get(self, "aggregation_policy")
337
-
338
- @aggregation_policy.setter
339
- def aggregation_policy(self, value: Optional[pulumi.Input['ViewAggregationPolicyArgs']]):
340
- pulumi.set(self, "aggregation_policy", value)
341
-
342
- @property
343
- @pulumi.getter(name="changeTracking")
344
- def change_tracking(self) -> Optional[pulumi.Input[str]]:
345
- """
346
- Specifies to enable or disable change tracking on the table. Available options are: "true" or "false". When the value is not set in the configuration the provider will put "default" there which means to use the Snowflake default for this value.
347
- """
348
- return pulumi.get(self, "change_tracking")
349
-
350
- @change_tracking.setter
351
- def change_tracking(self, value: Optional[pulumi.Input[str]]):
352
- pulumi.set(self, "change_tracking", value)
353
-
354
- @property
355
- @pulumi.getter
356
- def columns(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ViewColumnArgs']]]]:
357
- """
358
- If you want to change the name of a column or add a comment to a column in the new view, include a column list that specifies the column names and (if needed) comments about the columns. (You do not need to specify the data types of the columns.)
359
- """
360
- return pulumi.get(self, "columns")
361
-
362
- @columns.setter
363
- def columns(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ViewColumnArgs']]]]):
364
- pulumi.set(self, "columns", value)
208
+ if tags is not None:
209
+ warnings.warn("""Use the 'snowflake_tag_association' resource instead.""", DeprecationWarning)
210
+ pulumi.log.warn("""tags is deprecated: Use the 'snowflake_tag_association' resource instead.""")
211
+ if tags is not None:
212
+ pulumi.set(__self__, "tags", tags)
365
213
 
366
214
  @property
367
215
  @pulumi.getter
@@ -379,7 +227,7 @@ class _ViewState:
379
227
  @pulumi.getter(name="copyGrants")
380
228
  def copy_grants(self) -> Optional[pulumi.Input[bool]]:
381
229
  """
382
- Retains the access permissions from the original view when a new view is created using the OR REPLACE clause.
230
+ Retains the access permissions from the original view when a new view is created using the OR REPLACE clause. OR REPLACE must be set when COPY GRANTS is set.
383
231
  """
384
232
  return pulumi.get(self, "copy_grants")
385
233
 
@@ -388,34 +236,22 @@ class _ViewState:
388
236
  pulumi.set(self, "copy_grants", value)
389
237
 
390
238
  @property
391
- @pulumi.getter(name="dataMetricFunctions")
392
- def data_metric_functions(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ViewDataMetricFunctionArgs']]]]:
393
- """
394
- Data metric functions used for the view.
395
- """
396
- return pulumi.get(self, "data_metric_functions")
397
-
398
- @data_metric_functions.setter
399
- def data_metric_functions(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ViewDataMetricFunctionArgs']]]]):
400
- pulumi.set(self, "data_metric_functions", value)
401
-
402
- @property
403
- @pulumi.getter(name="dataMetricSchedule")
404
- def data_metric_schedule(self) -> Optional[pulumi.Input['ViewDataMetricScheduleArgs']]:
239
+ @pulumi.getter(name="createdOn")
240
+ def created_on(self) -> Optional[pulumi.Input[str]]:
405
241
  """
406
- Specifies the schedule to run the data metric functions periodically.
242
+ The timestamp at which the view was created.
407
243
  """
408
- return pulumi.get(self, "data_metric_schedule")
244
+ return pulumi.get(self, "created_on")
409
245
 
410
- @data_metric_schedule.setter
411
- def data_metric_schedule(self, value: Optional[pulumi.Input['ViewDataMetricScheduleArgs']]):
412
- pulumi.set(self, "data_metric_schedule", value)
246
+ @created_on.setter
247
+ def created_on(self, value: Optional[pulumi.Input[str]]):
248
+ pulumi.set(self, "created_on", value)
413
249
 
414
250
  @property
415
251
  @pulumi.getter
416
252
  def database(self) -> Optional[pulumi.Input[str]]:
417
253
  """
418
- The database in which to create the view. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
254
+ The database in which to create the view. Don't use the | character.
419
255
  """
420
256
  return pulumi.get(self, "database")
421
257
 
@@ -423,65 +259,20 @@ class _ViewState:
423
259
  def database(self, value: Optional[pulumi.Input[str]]):
424
260
  pulumi.set(self, "database", value)
425
261
 
426
- @property
427
- @pulumi.getter(name="describeOutputs")
428
- def describe_outputs(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ViewDescribeOutputArgs']]]]:
429
- """
430
- Outputs the result of `DESCRIBE VIEW` for the given view.
431
- """
432
- return pulumi.get(self, "describe_outputs")
433
-
434
- @describe_outputs.setter
435
- def describe_outputs(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ViewDescribeOutputArgs']]]]):
436
- pulumi.set(self, "describe_outputs", value)
437
-
438
- @property
439
- @pulumi.getter(name="fullyQualifiedName")
440
- def fully_qualified_name(self) -> Optional[pulumi.Input[str]]:
441
- """
442
- Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
443
- """
444
- return pulumi.get(self, "fully_qualified_name")
445
-
446
- @fully_qualified_name.setter
447
- def fully_qualified_name(self, value: Optional[pulumi.Input[str]]):
448
- pulumi.set(self, "fully_qualified_name", value)
449
-
450
- @property
451
- @pulumi.getter(name="isRecursive")
452
- def is_recursive(self) -> Optional[pulumi.Input[str]]:
453
- """
454
- Specifies that the view can refer to itself using recursive syntax without necessarily using a CTE (common table expression). Available options are: "true" or "false". When the value is not set in the configuration the provider will put "default" there which means to use the Snowflake default for this value.
455
- """
456
- return pulumi.get(self, "is_recursive")
457
-
458
- @is_recursive.setter
459
- def is_recursive(self, value: Optional[pulumi.Input[str]]):
460
- pulumi.set(self, "is_recursive", value)
461
-
462
262
  @property
463
263
  @pulumi.getter(name="isSecure")
464
- def is_secure(self) -> Optional[pulumi.Input[str]]:
264
+ def is_secure(self) -> Optional[pulumi.Input[bool]]:
465
265
  return pulumi.get(self, "is_secure")
466
266
 
467
267
  @is_secure.setter
468
- def is_secure(self, value: Optional[pulumi.Input[str]]):
268
+ def is_secure(self, value: Optional[pulumi.Input[bool]]):
469
269
  pulumi.set(self, "is_secure", value)
470
270
 
471
- @property
472
- @pulumi.getter(name="isTemporary")
473
- def is_temporary(self) -> Optional[pulumi.Input[str]]:
474
- return pulumi.get(self, "is_temporary")
475
-
476
- @is_temporary.setter
477
- def is_temporary(self, value: Optional[pulumi.Input[str]]):
478
- pulumi.set(self, "is_temporary", value)
479
-
480
271
  @property
481
272
  @pulumi.getter
482
273
  def name(self) -> Optional[pulumi.Input[str]]:
483
274
  """
484
- Specifies the identifier for the view; must be unique for the schema in which the view is created. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
275
+ Specifies the identifier for the view; must be unique for the schema in which the view is created. Don't use the | character.
485
276
  """
486
277
  return pulumi.get(self, "name")
487
278
 
@@ -490,22 +281,22 @@ class _ViewState:
490
281
  pulumi.set(self, "name", value)
491
282
 
492
283
  @property
493
- @pulumi.getter(name="rowAccessPolicy")
494
- def row_access_policy(self) -> Optional[pulumi.Input['ViewRowAccessPolicyArgs']]:
284
+ @pulumi.getter(name="orReplace")
285
+ def or_replace(self) -> Optional[pulumi.Input[bool]]:
495
286
  """
496
- Specifies the row access policy to set on a view.
287
+ Overwrites the View if it exists.
497
288
  """
498
- return pulumi.get(self, "row_access_policy")
289
+ return pulumi.get(self, "or_replace")
499
290
 
500
- @row_access_policy.setter
501
- def row_access_policy(self, value: Optional[pulumi.Input['ViewRowAccessPolicyArgs']]):
502
- pulumi.set(self, "row_access_policy", value)
291
+ @or_replace.setter
292
+ def or_replace(self, value: Optional[pulumi.Input[bool]]):
293
+ pulumi.set(self, "or_replace", value)
503
294
 
504
295
  @property
505
296
  @pulumi.getter
506
297
  def schema(self) -> Optional[pulumi.Input[str]]:
507
298
  """
508
- The schema in which to create the view. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
299
+ The schema in which to create the view. Don't use the | character.
509
300
  """
510
301
  return pulumi.get(self, "schema")
511
302
 
@@ -513,18 +304,6 @@ class _ViewState:
513
304
  def schema(self, value: Optional[pulumi.Input[str]]):
514
305
  pulumi.set(self, "schema", value)
515
306
 
516
- @property
517
- @pulumi.getter(name="showOutputs")
518
- def show_outputs(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ViewShowOutputArgs']]]]:
519
- """
520
- Outputs the result of `SHOW VIEW` for the given view.
521
- """
522
- return pulumi.get(self, "show_outputs")
523
-
524
- @show_outputs.setter
525
- def show_outputs(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ViewShowOutputArgs']]]]):
526
- pulumi.set(self, "show_outputs", value)
527
-
528
307
  @property
529
308
  @pulumi.getter
530
309
  def statement(self) -> Optional[pulumi.Input[str]]:
@@ -537,50 +316,70 @@ class _ViewState:
537
316
  def statement(self, value: Optional[pulumi.Input[str]]):
538
317
  pulumi.set(self, "statement", value)
539
318
 
319
+ @property
320
+ @pulumi.getter
321
+ @_utilities.deprecated("""Use the 'snowflake_tag_association' resource instead.""")
322
+ def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ViewTagArgs']]]]:
323
+ """
324
+ Definitions of a tag to associate with the resource.
325
+ """
326
+ return pulumi.get(self, "tags")
327
+
328
+ @tags.setter
329
+ def tags(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ViewTagArgs']]]]):
330
+ pulumi.set(self, "tags", value)
331
+
540
332
 
541
333
  class View(pulumi.CustomResource):
542
334
  @overload
543
335
  def __init__(__self__,
544
336
  resource_name: str,
545
337
  opts: Optional[pulumi.ResourceOptions] = None,
546
- aggregation_policy: Optional[pulumi.Input[Union['ViewAggregationPolicyArgs', 'ViewAggregationPolicyArgsDict']]] = None,
547
- change_tracking: Optional[pulumi.Input[str]] = None,
548
- columns: Optional[pulumi.Input[Sequence[pulumi.Input[Union['ViewColumnArgs', 'ViewColumnArgsDict']]]]] = None,
549
338
  comment: Optional[pulumi.Input[str]] = None,
550
339
  copy_grants: Optional[pulumi.Input[bool]] = None,
551
- data_metric_functions: Optional[pulumi.Input[Sequence[pulumi.Input[Union['ViewDataMetricFunctionArgs', 'ViewDataMetricFunctionArgsDict']]]]] = None,
552
- data_metric_schedule: Optional[pulumi.Input[Union['ViewDataMetricScheduleArgs', 'ViewDataMetricScheduleArgsDict']]] = None,
553
340
  database: Optional[pulumi.Input[str]] = None,
554
- is_recursive: Optional[pulumi.Input[str]] = None,
555
- is_secure: Optional[pulumi.Input[str]] = None,
556
- is_temporary: Optional[pulumi.Input[str]] = None,
341
+ is_secure: Optional[pulumi.Input[bool]] = None,
557
342
  name: Optional[pulumi.Input[str]] = None,
558
- row_access_policy: Optional[pulumi.Input[Union['ViewRowAccessPolicyArgs', 'ViewRowAccessPolicyArgsDict']]] = None,
343
+ or_replace: Optional[pulumi.Input[bool]] = None,
559
344
  schema: Optional[pulumi.Input[str]] = None,
560
345
  statement: Optional[pulumi.Input[str]] = None,
346
+ tags: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ViewTagArgs']]]]] = None,
561
347
  __props__=None):
562
348
  """
349
+ ## Example Usage
350
+
351
+ ```python
352
+ import pulumi
353
+ import pulumi_snowflake as snowflake
354
+
355
+ view = snowflake.View("view",
356
+ database="database",
357
+ schema="schema",
358
+ name="view",
359
+ comment="comment",
360
+ statement="select * from foo;\\n",
361
+ or_replace=False,
362
+ is_secure=False)
363
+ ```
364
+
563
365
  ## Import
564
366
 
367
+ format is database name | schema name | view name
368
+
565
369
  ```sh
566
- $ pulumi import snowflake:index/view:View example '"<database_name>"."<schema_name>"."<view_name>"'
370
+ $ pulumi import snowflake:index/view:View example 'dbName|schemaName|viewName'
567
371
  ```
568
372
 
569
373
  :param str resource_name: The name of the resource.
570
374
  :param pulumi.ResourceOptions opts: Options for the resource.
571
- :param pulumi.Input[Union['ViewAggregationPolicyArgs', 'ViewAggregationPolicyArgsDict']] aggregation_policy: Specifies the aggregation policy to set on a view.
572
- :param pulumi.Input[str] change_tracking: Specifies to enable or disable change tracking on the table. Available options are: "true" or "false". When the value is not set in the configuration the provider will put "default" there which means to use the Snowflake default for this value.
573
- :param pulumi.Input[Sequence[pulumi.Input[Union['ViewColumnArgs', 'ViewColumnArgsDict']]]] columns: If you want to change the name of a column or add a comment to a column in the new view, include a column list that specifies the column names and (if needed) comments about the columns. (You do not need to specify the data types of the columns.)
574
375
  :param pulumi.Input[str] comment: Specifies a comment for the view.
575
- :param pulumi.Input[bool] copy_grants: Retains the access permissions from the original view when a new view is created using the OR REPLACE clause.
576
- :param pulumi.Input[Sequence[pulumi.Input[Union['ViewDataMetricFunctionArgs', 'ViewDataMetricFunctionArgsDict']]]] data_metric_functions: Data metric functions used for the view.
577
- :param pulumi.Input[Union['ViewDataMetricScheduleArgs', 'ViewDataMetricScheduleArgsDict']] data_metric_schedule: Specifies the schedule to run the data metric functions periodically.
578
- :param pulumi.Input[str] database: The database in which to create the view. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
579
- :param pulumi.Input[str] is_recursive: Specifies that the view can refer to itself using recursive syntax without necessarily using a CTE (common table expression). Available options are: "true" or "false". When the value is not set in the configuration the provider will put "default" there which means to use the Snowflake default for this value.
580
- :param pulumi.Input[str] name: Specifies the identifier for the view; must be unique for the schema in which the view is created. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
581
- :param pulumi.Input[Union['ViewRowAccessPolicyArgs', 'ViewRowAccessPolicyArgsDict']] row_access_policy: Specifies the row access policy to set on a view.
582
- :param pulumi.Input[str] schema: The schema in which to create the view. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
376
+ :param pulumi.Input[bool] copy_grants: Retains the access permissions from the original view when a new view is created using the OR REPLACE clause. OR REPLACE must be set when COPY GRANTS is set.
377
+ :param pulumi.Input[str] database: The database in which to create the view. Don't use the | character.
378
+ :param pulumi.Input[str] name: Specifies the identifier for the view; must be unique for the schema in which the view is created. Don't use the | character.
379
+ :param pulumi.Input[bool] or_replace: Overwrites the View if it exists.
380
+ :param pulumi.Input[str] schema: The schema in which to create the view. Don't use the | character.
583
381
  :param pulumi.Input[str] statement: Specifies the query used to create the view.
382
+ :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ViewTagArgs']]]] tags: Definitions of a tag to associate with the resource.
584
383
  """
585
384
  ...
586
385
  @overload
@@ -589,10 +388,28 @@ class View(pulumi.CustomResource):
589
388
  args: ViewArgs,
590
389
  opts: Optional[pulumi.ResourceOptions] = None):
591
390
  """
391
+ ## Example Usage
392
+
393
+ ```python
394
+ import pulumi
395
+ import pulumi_snowflake as snowflake
396
+
397
+ view = snowflake.View("view",
398
+ database="database",
399
+ schema="schema",
400
+ name="view",
401
+ comment="comment",
402
+ statement="select * from foo;\\n",
403
+ or_replace=False,
404
+ is_secure=False)
405
+ ```
406
+
592
407
  ## Import
593
408
 
409
+ format is database name | schema name | view name
410
+
594
411
  ```sh
595
- $ pulumi import snowflake:index/view:View example '"<database_name>"."<schema_name>"."<view_name>"'
412
+ $ pulumi import snowflake:index/view:View example 'dbName|schemaName|viewName'
596
413
  ```
597
414
 
598
415
  :param str resource_name: The name of the resource.
@@ -610,21 +427,15 @@ class View(pulumi.CustomResource):
610
427
  def _internal_init(__self__,
611
428
  resource_name: str,
612
429
  opts: Optional[pulumi.ResourceOptions] = None,
613
- aggregation_policy: Optional[pulumi.Input[Union['ViewAggregationPolicyArgs', 'ViewAggregationPolicyArgsDict']]] = None,
614
- change_tracking: Optional[pulumi.Input[str]] = None,
615
- columns: Optional[pulumi.Input[Sequence[pulumi.Input[Union['ViewColumnArgs', 'ViewColumnArgsDict']]]]] = None,
616
430
  comment: Optional[pulumi.Input[str]] = None,
617
431
  copy_grants: Optional[pulumi.Input[bool]] = None,
618
- data_metric_functions: Optional[pulumi.Input[Sequence[pulumi.Input[Union['ViewDataMetricFunctionArgs', 'ViewDataMetricFunctionArgsDict']]]]] = None,
619
- data_metric_schedule: Optional[pulumi.Input[Union['ViewDataMetricScheduleArgs', 'ViewDataMetricScheduleArgsDict']]] = None,
620
432
  database: Optional[pulumi.Input[str]] = None,
621
- is_recursive: Optional[pulumi.Input[str]] = None,
622
- is_secure: Optional[pulumi.Input[str]] = None,
623
- is_temporary: Optional[pulumi.Input[str]] = None,
433
+ is_secure: Optional[pulumi.Input[bool]] = None,
624
434
  name: Optional[pulumi.Input[str]] = None,
625
- row_access_policy: Optional[pulumi.Input[Union['ViewRowAccessPolicyArgs', 'ViewRowAccessPolicyArgsDict']]] = None,
435
+ or_replace: Optional[pulumi.Input[bool]] = None,
626
436
  schema: Optional[pulumi.Input[str]] = None,
627
437
  statement: Optional[pulumi.Input[str]] = None,
438
+ tags: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ViewTagArgs']]]]] = None,
628
439
  __props__=None):
629
440
  opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
630
441
  if not isinstance(opts, pulumi.ResourceOptions):
@@ -634,30 +445,22 @@ class View(pulumi.CustomResource):
634
445
  raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
635
446
  __props__ = ViewArgs.__new__(ViewArgs)
636
447
 
637
- __props__.__dict__["aggregation_policy"] = aggregation_policy
638
- __props__.__dict__["change_tracking"] = change_tracking
639
- __props__.__dict__["columns"] = columns
640
448
  __props__.__dict__["comment"] = comment
641
449
  __props__.__dict__["copy_grants"] = copy_grants
642
- __props__.__dict__["data_metric_functions"] = data_metric_functions
643
- __props__.__dict__["data_metric_schedule"] = data_metric_schedule
644
450
  if database is None and not opts.urn:
645
451
  raise TypeError("Missing required property 'database'")
646
452
  __props__.__dict__["database"] = database
647
- __props__.__dict__["is_recursive"] = is_recursive
648
453
  __props__.__dict__["is_secure"] = is_secure
649
- __props__.__dict__["is_temporary"] = is_temporary
650
454
  __props__.__dict__["name"] = name
651
- __props__.__dict__["row_access_policy"] = row_access_policy
455
+ __props__.__dict__["or_replace"] = or_replace
652
456
  if schema is None and not opts.urn:
653
457
  raise TypeError("Missing required property 'schema'")
654
458
  __props__.__dict__["schema"] = schema
655
459
  if statement is None and not opts.urn:
656
460
  raise TypeError("Missing required property 'statement'")
657
461
  __props__.__dict__["statement"] = statement
658
- __props__.__dict__["describe_outputs"] = None
659
- __props__.__dict__["fully_qualified_name"] = None
660
- __props__.__dict__["show_outputs"] = None
462
+ __props__.__dict__["tags"] = tags
463
+ __props__.__dict__["created_on"] = None
661
464
  super(View, __self__).__init__(
662
465
  'snowflake:index/view:View',
663
466
  resource_name,
@@ -668,24 +471,16 @@ class View(pulumi.CustomResource):
668
471
  def get(resource_name: str,
669
472
  id: pulumi.Input[str],
670
473
  opts: Optional[pulumi.ResourceOptions] = None,
671
- aggregation_policy: Optional[pulumi.Input[Union['ViewAggregationPolicyArgs', 'ViewAggregationPolicyArgsDict']]] = None,
672
- change_tracking: Optional[pulumi.Input[str]] = None,
673
- columns: Optional[pulumi.Input[Sequence[pulumi.Input[Union['ViewColumnArgs', 'ViewColumnArgsDict']]]]] = None,
674
474
  comment: Optional[pulumi.Input[str]] = None,
675
475
  copy_grants: Optional[pulumi.Input[bool]] = None,
676
- data_metric_functions: Optional[pulumi.Input[Sequence[pulumi.Input[Union['ViewDataMetricFunctionArgs', 'ViewDataMetricFunctionArgsDict']]]]] = None,
677
- data_metric_schedule: Optional[pulumi.Input[Union['ViewDataMetricScheduleArgs', 'ViewDataMetricScheduleArgsDict']]] = None,
476
+ created_on: Optional[pulumi.Input[str]] = None,
678
477
  database: Optional[pulumi.Input[str]] = None,
679
- describe_outputs: Optional[pulumi.Input[Sequence[pulumi.Input[Union['ViewDescribeOutputArgs', 'ViewDescribeOutputArgsDict']]]]] = None,
680
- fully_qualified_name: Optional[pulumi.Input[str]] = None,
681
- is_recursive: Optional[pulumi.Input[str]] = None,
682
- is_secure: Optional[pulumi.Input[str]] = None,
683
- is_temporary: Optional[pulumi.Input[str]] = None,
478
+ is_secure: Optional[pulumi.Input[bool]] = None,
684
479
  name: Optional[pulumi.Input[str]] = None,
685
- row_access_policy: Optional[pulumi.Input[Union['ViewRowAccessPolicyArgs', 'ViewRowAccessPolicyArgsDict']]] = None,
480
+ or_replace: Optional[pulumi.Input[bool]] = None,
686
481
  schema: Optional[pulumi.Input[str]] = None,
687
- show_outputs: Optional[pulumi.Input[Sequence[pulumi.Input[Union['ViewShowOutputArgs', 'ViewShowOutputArgsDict']]]]] = None,
688
- statement: Optional[pulumi.Input[str]] = None) -> 'View':
482
+ statement: Optional[pulumi.Input[str]] = None,
483
+ tags: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ViewTagArgs']]]]] = None) -> 'View':
689
484
  """
690
485
  Get an existing View resource's state with the given name, id, and optional extra
691
486
  properties used to qualify the lookup.
@@ -693,71 +488,32 @@ class View(pulumi.CustomResource):
693
488
  :param str resource_name: The unique name of the resulting resource.
694
489
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
695
490
  :param pulumi.ResourceOptions opts: Options for the resource.
696
- :param pulumi.Input[Union['ViewAggregationPolicyArgs', 'ViewAggregationPolicyArgsDict']] aggregation_policy: Specifies the aggregation policy to set on a view.
697
- :param pulumi.Input[str] change_tracking: Specifies to enable or disable change tracking on the table. Available options are: "true" or "false". When the value is not set in the configuration the provider will put "default" there which means to use the Snowflake default for this value.
698
- :param pulumi.Input[Sequence[pulumi.Input[Union['ViewColumnArgs', 'ViewColumnArgsDict']]]] columns: If you want to change the name of a column or add a comment to a column in the new view, include a column list that specifies the column names and (if needed) comments about the columns. (You do not need to specify the data types of the columns.)
699
491
  :param pulumi.Input[str] comment: Specifies a comment for the view.
700
- :param pulumi.Input[bool] copy_grants: Retains the access permissions from the original view when a new view is created using the OR REPLACE clause.
701
- :param pulumi.Input[Sequence[pulumi.Input[Union['ViewDataMetricFunctionArgs', 'ViewDataMetricFunctionArgsDict']]]] data_metric_functions: Data metric functions used for the view.
702
- :param pulumi.Input[Union['ViewDataMetricScheduleArgs', 'ViewDataMetricScheduleArgsDict']] data_metric_schedule: Specifies the schedule to run the data metric functions periodically.
703
- :param pulumi.Input[str] database: The database in which to create the view. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
704
- :param pulumi.Input[Sequence[pulumi.Input[Union['ViewDescribeOutputArgs', 'ViewDescribeOutputArgsDict']]]] describe_outputs: Outputs the result of `DESCRIBE VIEW` for the given view.
705
- :param pulumi.Input[str] fully_qualified_name: Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
706
- :param pulumi.Input[str] is_recursive: Specifies that the view can refer to itself using recursive syntax without necessarily using a CTE (common table expression). Available options are: "true" or "false". When the value is not set in the configuration the provider will put "default" there which means to use the Snowflake default for this value.
707
- :param pulumi.Input[str] name: Specifies the identifier for the view; must be unique for the schema in which the view is created. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
708
- :param pulumi.Input[Union['ViewRowAccessPolicyArgs', 'ViewRowAccessPolicyArgsDict']] row_access_policy: Specifies the row access policy to set on a view.
709
- :param pulumi.Input[str] schema: The schema in which to create the view. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
710
- :param pulumi.Input[Sequence[pulumi.Input[Union['ViewShowOutputArgs', 'ViewShowOutputArgsDict']]]] show_outputs: Outputs the result of `SHOW VIEW` for the given view.
492
+ :param pulumi.Input[bool] copy_grants: Retains the access permissions from the original view when a new view is created using the OR REPLACE clause. OR REPLACE must be set when COPY GRANTS is set.
493
+ :param pulumi.Input[str] created_on: The timestamp at which the view was created.
494
+ :param pulumi.Input[str] database: The database in which to create the view. Don't use the | character.
495
+ :param pulumi.Input[str] name: Specifies the identifier for the view; must be unique for the schema in which the view is created. Don't use the | character.
496
+ :param pulumi.Input[bool] or_replace: Overwrites the View if it exists.
497
+ :param pulumi.Input[str] schema: The schema in which to create the view. Don't use the | character.
711
498
  :param pulumi.Input[str] statement: Specifies the query used to create the view.
499
+ :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ViewTagArgs']]]] tags: Definitions of a tag to associate with the resource.
712
500
  """
713
501
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
714
502
 
715
503
  __props__ = _ViewState.__new__(_ViewState)
716
504
 
717
- __props__.__dict__["aggregation_policy"] = aggregation_policy
718
- __props__.__dict__["change_tracking"] = change_tracking
719
- __props__.__dict__["columns"] = columns
720
505
  __props__.__dict__["comment"] = comment
721
506
  __props__.__dict__["copy_grants"] = copy_grants
722
- __props__.__dict__["data_metric_functions"] = data_metric_functions
723
- __props__.__dict__["data_metric_schedule"] = data_metric_schedule
507
+ __props__.__dict__["created_on"] = created_on
724
508
  __props__.__dict__["database"] = database
725
- __props__.__dict__["describe_outputs"] = describe_outputs
726
- __props__.__dict__["fully_qualified_name"] = fully_qualified_name
727
- __props__.__dict__["is_recursive"] = is_recursive
728
509
  __props__.__dict__["is_secure"] = is_secure
729
- __props__.__dict__["is_temporary"] = is_temporary
730
510
  __props__.__dict__["name"] = name
731
- __props__.__dict__["row_access_policy"] = row_access_policy
511
+ __props__.__dict__["or_replace"] = or_replace
732
512
  __props__.__dict__["schema"] = schema
733
- __props__.__dict__["show_outputs"] = show_outputs
734
513
  __props__.__dict__["statement"] = statement
514
+ __props__.__dict__["tags"] = tags
735
515
  return View(resource_name, opts=opts, __props__=__props__)
736
516
 
737
- @property
738
- @pulumi.getter(name="aggregationPolicy")
739
- def aggregation_policy(self) -> pulumi.Output[Optional['outputs.ViewAggregationPolicy']]:
740
- """
741
- Specifies the aggregation policy to set on a view.
742
- """
743
- return pulumi.get(self, "aggregation_policy")
744
-
745
- @property
746
- @pulumi.getter(name="changeTracking")
747
- def change_tracking(self) -> pulumi.Output[Optional[str]]:
748
- """
749
- Specifies to enable or disable change tracking on the table. Available options are: "true" or "false". When the value is not set in the configuration the provider will put "default" there which means to use the Snowflake default for this value.
750
- """
751
- return pulumi.get(self, "change_tracking")
752
-
753
- @property
754
- @pulumi.getter
755
- def columns(self) -> pulumi.Output[Optional[Sequence['outputs.ViewColumn']]]:
756
- """
757
- If you want to change the name of a column or add a comment to a column in the new view, include a column list that specifies the column names and (if needed) comments about the columns. (You do not need to specify the data types of the columns.)
758
- """
759
- return pulumi.get(self, "columns")
760
-
761
517
  @property
762
518
  @pulumi.getter
763
519
  def comment(self) -> pulumi.Output[Optional[str]]:
@@ -770,105 +526,69 @@ class View(pulumi.CustomResource):
770
526
  @pulumi.getter(name="copyGrants")
771
527
  def copy_grants(self) -> pulumi.Output[Optional[bool]]:
772
528
  """
773
- Retains the access permissions from the original view when a new view is created using the OR REPLACE clause.
529
+ Retains the access permissions from the original view when a new view is created using the OR REPLACE clause. OR REPLACE must be set when COPY GRANTS is set.
774
530
  """
775
531
  return pulumi.get(self, "copy_grants")
776
532
 
777
533
  @property
778
- @pulumi.getter(name="dataMetricFunctions")
779
- def data_metric_functions(self) -> pulumi.Output[Optional[Sequence['outputs.ViewDataMetricFunction']]]:
534
+ @pulumi.getter(name="createdOn")
535
+ def created_on(self) -> pulumi.Output[str]:
780
536
  """
781
- Data metric functions used for the view.
537
+ The timestamp at which the view was created.
782
538
  """
783
- return pulumi.get(self, "data_metric_functions")
784
-
785
- @property
786
- @pulumi.getter(name="dataMetricSchedule")
787
- def data_metric_schedule(self) -> pulumi.Output[Optional['outputs.ViewDataMetricSchedule']]:
788
- """
789
- Specifies the schedule to run the data metric functions periodically.
790
- """
791
- return pulumi.get(self, "data_metric_schedule")
539
+ return pulumi.get(self, "created_on")
792
540
 
793
541
  @property
794
542
  @pulumi.getter
795
543
  def database(self) -> pulumi.Output[str]:
796
544
  """
797
- The database in which to create the view. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
545
+ The database in which to create the view. Don't use the | character.
798
546
  """
799
547
  return pulumi.get(self, "database")
800
548
 
801
- @property
802
- @pulumi.getter(name="describeOutputs")
803
- def describe_outputs(self) -> pulumi.Output[Sequence['outputs.ViewDescribeOutput']]:
804
- """
805
- Outputs the result of `DESCRIBE VIEW` for the given view.
806
- """
807
- return pulumi.get(self, "describe_outputs")
808
-
809
- @property
810
- @pulumi.getter(name="fullyQualifiedName")
811
- def fully_qualified_name(self) -> pulumi.Output[str]:
812
- """
813
- Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
814
- """
815
- return pulumi.get(self, "fully_qualified_name")
816
-
817
- @property
818
- @pulumi.getter(name="isRecursive")
819
- def is_recursive(self) -> pulumi.Output[Optional[str]]:
820
- """
821
- Specifies that the view can refer to itself using recursive syntax without necessarily using a CTE (common table expression). Available options are: "true" or "false". When the value is not set in the configuration the provider will put "default" there which means to use the Snowflake default for this value.
822
- """
823
- return pulumi.get(self, "is_recursive")
824
-
825
549
  @property
826
550
  @pulumi.getter(name="isSecure")
827
- def is_secure(self) -> pulumi.Output[Optional[str]]:
551
+ def is_secure(self) -> pulumi.Output[Optional[bool]]:
828
552
  return pulumi.get(self, "is_secure")
829
553
 
830
- @property
831
- @pulumi.getter(name="isTemporary")
832
- def is_temporary(self) -> pulumi.Output[Optional[str]]:
833
- return pulumi.get(self, "is_temporary")
834
-
835
554
  @property
836
555
  @pulumi.getter
837
556
  def name(self) -> pulumi.Output[str]:
838
557
  """
839
- Specifies the identifier for the view; must be unique for the schema in which the view is created. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
558
+ Specifies the identifier for the view; must be unique for the schema in which the view is created. Don't use the | character.
840
559
  """
841
560
  return pulumi.get(self, "name")
842
561
 
843
562
  @property
844
- @pulumi.getter(name="rowAccessPolicy")
845
- def row_access_policy(self) -> pulumi.Output[Optional['outputs.ViewRowAccessPolicy']]:
563
+ @pulumi.getter(name="orReplace")
564
+ def or_replace(self) -> pulumi.Output[Optional[bool]]:
846
565
  """
847
- Specifies the row access policy to set on a view.
566
+ Overwrites the View if it exists.
848
567
  """
849
- return pulumi.get(self, "row_access_policy")
568
+ return pulumi.get(self, "or_replace")
850
569
 
851
570
  @property
852
571
  @pulumi.getter
853
572
  def schema(self) -> pulumi.Output[str]:
854
573
  """
855
- The schema in which to create the view. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
574
+ The schema in which to create the view. Don't use the | character.
856
575
  """
857
576
  return pulumi.get(self, "schema")
858
577
 
859
578
  @property
860
- @pulumi.getter(name="showOutputs")
861
- def show_outputs(self) -> pulumi.Output[Sequence['outputs.ViewShowOutput']]:
579
+ @pulumi.getter
580
+ def statement(self) -> pulumi.Output[str]:
862
581
  """
863
- Outputs the result of `SHOW VIEW` for the given view.
582
+ Specifies the query used to create the view.
864
583
  """
865
- return pulumi.get(self, "show_outputs")
584
+ return pulumi.get(self, "statement")
866
585
 
867
586
  @property
868
587
  @pulumi.getter
869
- def statement(self) -> pulumi.Output[str]:
588
+ @_utilities.deprecated("""Use the 'snowflake_tag_association' resource instead.""")
589
+ def tags(self) -> pulumi.Output[Optional[Sequence['outputs.ViewTag']]]:
870
590
  """
871
- Specifies the query used to create the view.
591
+ Definitions of a tag to associate with the resource.
872
592
  """
873
- return pulumi.get(self, "statement")
593
+ return pulumi.get(self, "tags")
874
594