pulumi-snowflake 0.59.0__py3-none-any.whl → 0.59.0a1726294094__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.

@@ -16,66 +16,50 @@ __all__ = ['MaskingPolicyArgs', 'MaskingPolicy']
16
16
  @pulumi.input_type
17
17
  class MaskingPolicyArgs:
18
18
  def __init__(__self__, *,
19
- arguments: pulumi.Input[Sequence[pulumi.Input['MaskingPolicyArgumentArgs']]],
20
- body: pulumi.Input[str],
21
19
  database: pulumi.Input[str],
20
+ masking_expression: pulumi.Input[str],
22
21
  return_data_type: pulumi.Input[str],
23
22
  schema: pulumi.Input[str],
23
+ signature: pulumi.Input['MaskingPolicySignatureArgs'],
24
24
  comment: Optional[pulumi.Input[str]] = None,
25
- exempt_other_policies: Optional[pulumi.Input[str]] = None,
26
- name: Optional[pulumi.Input[str]] = None):
25
+ exempt_other_policies: Optional[pulumi.Input[bool]] = None,
26
+ if_not_exists: Optional[pulumi.Input[bool]] = None,
27
+ name: Optional[pulumi.Input[str]] = None,
28
+ or_replace: Optional[pulumi.Input[bool]] = None):
27
29
  """
28
30
  The set of arguments for constructing a MaskingPolicy resource.
29
- :param pulumi.Input[Sequence[pulumi.Input['MaskingPolicyArgumentArgs']]] arguments: List of the arguments for the masking policy. The first column and its data type always indicate the column data type values to mask or tokenize in the subsequent policy conditions. Note that you can not specify a virtual column as the first column argument in a conditional masking policy.
30
- :param pulumi.Input[str] body: Specifies the SQL expression that transforms the data. To mitigate permadiff on this field, the provider replaces blank characters with a space. This can lead to false positives in cases where a change in case or run of whitespace is semantically significant.
31
- :param pulumi.Input[str] database: The database in which to create the masking policy. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
32
- :param pulumi.Input[str] return_data_type: The return data type must match the input data type of the first column that is specified as an input column. For more information about data types, check [Snowflake docs](https://docs.snowflake.com/en/sql-reference/intro-summary-data-types).
33
- :param pulumi.Input[str] schema: The schema in which to create the masking policy. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
31
+ :param pulumi.Input[str] database: The database in which to create the masking policy.
32
+ :param pulumi.Input[str] masking_expression: Specifies the SQL expression that transforms the data.
33
+ :param pulumi.Input[str] return_data_type: Specifies the data type to return.
34
+ :param pulumi.Input[str] schema: The schema in which to create the masking policy.
35
+ :param pulumi.Input['MaskingPolicySignatureArgs'] signature: The signature for the masking policy; specifies the input columns and data types to evaluate at query runtime.
34
36
  :param pulumi.Input[str] comment: Specifies a comment for the masking policy.
35
- :param pulumi.Input[str] exempt_other_policies: Specifies whether the row access policy or conditional masking policy can reference a column that is already protected by a masking policy. Due to Snowflake limitations, when value is chenged, the resource is recreated. 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.
36
- :param pulumi.Input[str] name: Specifies the identifier for the masking policy; must be unique for the database and schema in which the masking policy is created. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
37
+ :param pulumi.Input[bool] exempt_other_policies: Specifies whether the row access policy or conditional masking policy can reference a column that is already protected by a masking policy.
38
+ :param pulumi.Input[bool] if_not_exists: Prevent overwriting a previous masking policy with the same name.
39
+ :param pulumi.Input[str] name: Specifies the identifier for the masking policy; must be unique for the database and schema in which the masking policy is created.
40
+ :param pulumi.Input[bool] or_replace: Whether to override a previous masking policy with the same name.
37
41
  """
38
- pulumi.set(__self__, "arguments", arguments)
39
- pulumi.set(__self__, "body", body)
40
42
  pulumi.set(__self__, "database", database)
43
+ pulumi.set(__self__, "masking_expression", masking_expression)
41
44
  pulumi.set(__self__, "return_data_type", return_data_type)
42
45
  pulumi.set(__self__, "schema", schema)
46
+ pulumi.set(__self__, "signature", signature)
43
47
  if comment is not None:
44
48
  pulumi.set(__self__, "comment", comment)
45
49
  if exempt_other_policies is not None:
46
50
  pulumi.set(__self__, "exempt_other_policies", exempt_other_policies)
51
+ if if_not_exists is not None:
52
+ pulumi.set(__self__, "if_not_exists", if_not_exists)
47
53
  if name is not None:
48
54
  pulumi.set(__self__, "name", name)
49
-
50
- @property
51
- @pulumi.getter
52
- def arguments(self) -> pulumi.Input[Sequence[pulumi.Input['MaskingPolicyArgumentArgs']]]:
53
- """
54
- List of the arguments for the masking policy. The first column and its data type always indicate the column data type values to mask or tokenize in the subsequent policy conditions. Note that you can not specify a virtual column as the first column argument in a conditional masking policy.
55
- """
56
- return pulumi.get(self, "arguments")
57
-
58
- @arguments.setter
59
- def arguments(self, value: pulumi.Input[Sequence[pulumi.Input['MaskingPolicyArgumentArgs']]]):
60
- pulumi.set(self, "arguments", value)
61
-
62
- @property
63
- @pulumi.getter
64
- def body(self) -> pulumi.Input[str]:
65
- """
66
- Specifies the SQL expression that transforms the data. To mitigate permadiff on this field, the provider replaces blank characters with a space. This can lead to false positives in cases where a change in case or run of whitespace is semantically significant.
67
- """
68
- return pulumi.get(self, "body")
69
-
70
- @body.setter
71
- def body(self, value: pulumi.Input[str]):
72
- pulumi.set(self, "body", value)
55
+ if or_replace is not None:
56
+ pulumi.set(__self__, "or_replace", or_replace)
73
57
 
74
58
  @property
75
59
  @pulumi.getter
76
60
  def database(self) -> pulumi.Input[str]:
77
61
  """
78
- The database in which to create the masking policy. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
62
+ The database in which to create the masking policy.
79
63
  """
80
64
  return pulumi.get(self, "database")
81
65
 
@@ -83,11 +67,23 @@ class MaskingPolicyArgs:
83
67
  def database(self, value: pulumi.Input[str]):
84
68
  pulumi.set(self, "database", value)
85
69
 
70
+ @property
71
+ @pulumi.getter(name="maskingExpression")
72
+ def masking_expression(self) -> pulumi.Input[str]:
73
+ """
74
+ Specifies the SQL expression that transforms the data.
75
+ """
76
+ return pulumi.get(self, "masking_expression")
77
+
78
+ @masking_expression.setter
79
+ def masking_expression(self, value: pulumi.Input[str]):
80
+ pulumi.set(self, "masking_expression", value)
81
+
86
82
  @property
87
83
  @pulumi.getter(name="returnDataType")
88
84
  def return_data_type(self) -> pulumi.Input[str]:
89
85
  """
90
- The return data type must match the input data type of the first column that is specified as an input column. For more information about data types, check [Snowflake docs](https://docs.snowflake.com/en/sql-reference/intro-summary-data-types).
86
+ Specifies the data type to return.
91
87
  """
92
88
  return pulumi.get(self, "return_data_type")
93
89
 
@@ -99,7 +95,7 @@ class MaskingPolicyArgs:
99
95
  @pulumi.getter
100
96
  def schema(self) -> pulumi.Input[str]:
101
97
  """
102
- The schema in which to create the masking policy. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
98
+ The schema in which to create the masking policy.
103
99
  """
104
100
  return pulumi.get(self, "schema")
105
101
 
@@ -107,6 +103,18 @@ class MaskingPolicyArgs:
107
103
  def schema(self, value: pulumi.Input[str]):
108
104
  pulumi.set(self, "schema", value)
109
105
 
106
+ @property
107
+ @pulumi.getter
108
+ def signature(self) -> pulumi.Input['MaskingPolicySignatureArgs']:
109
+ """
110
+ The signature for the masking policy; specifies the input columns and data types to evaluate at query runtime.
111
+ """
112
+ return pulumi.get(self, "signature")
113
+
114
+ @signature.setter
115
+ def signature(self, value: pulumi.Input['MaskingPolicySignatureArgs']):
116
+ pulumi.set(self, "signature", value)
117
+
110
118
  @property
111
119
  @pulumi.getter
112
120
  def comment(self) -> Optional[pulumi.Input[str]]:
@@ -121,21 +129,33 @@ class MaskingPolicyArgs:
121
129
 
122
130
  @property
123
131
  @pulumi.getter(name="exemptOtherPolicies")
124
- def exempt_other_policies(self) -> Optional[pulumi.Input[str]]:
132
+ def exempt_other_policies(self) -> Optional[pulumi.Input[bool]]:
125
133
  """
126
- Specifies whether the row access policy or conditional masking policy can reference a column that is already protected by a masking policy. Due to Snowflake limitations, when value is chenged, the resource is recreated. 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.
134
+ Specifies whether the row access policy or conditional masking policy can reference a column that is already protected by a masking policy.
127
135
  """
128
136
  return pulumi.get(self, "exempt_other_policies")
129
137
 
130
138
  @exempt_other_policies.setter
131
- def exempt_other_policies(self, value: Optional[pulumi.Input[str]]):
139
+ def exempt_other_policies(self, value: Optional[pulumi.Input[bool]]):
132
140
  pulumi.set(self, "exempt_other_policies", value)
133
141
 
142
+ @property
143
+ @pulumi.getter(name="ifNotExists")
144
+ def if_not_exists(self) -> Optional[pulumi.Input[bool]]:
145
+ """
146
+ Prevent overwriting a previous masking policy with the same name.
147
+ """
148
+ return pulumi.get(self, "if_not_exists")
149
+
150
+ @if_not_exists.setter
151
+ def if_not_exists(self, value: Optional[pulumi.Input[bool]]):
152
+ pulumi.set(self, "if_not_exists", value)
153
+
134
154
  @property
135
155
  @pulumi.getter
136
156
  def name(self) -> Optional[pulumi.Input[str]]:
137
157
  """
138
- Specifies the identifier for the masking policy; must be unique for the database and schema in which the masking policy is created. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
158
+ Specifies the identifier for the masking policy; must be unique for the database and schema in which the masking policy is created.
139
159
  """
140
160
  return pulumi.get(self, "name")
141
161
 
@@ -143,81 +163,69 @@ class MaskingPolicyArgs:
143
163
  def name(self, value: Optional[pulumi.Input[str]]):
144
164
  pulumi.set(self, "name", value)
145
165
 
166
+ @property
167
+ @pulumi.getter(name="orReplace")
168
+ def or_replace(self) -> Optional[pulumi.Input[bool]]:
169
+ """
170
+ Whether to override a previous masking policy with the same name.
171
+ """
172
+ return pulumi.get(self, "or_replace")
173
+
174
+ @or_replace.setter
175
+ def or_replace(self, value: Optional[pulumi.Input[bool]]):
176
+ pulumi.set(self, "or_replace", value)
177
+
146
178
 
147
179
  @pulumi.input_type
148
180
  class _MaskingPolicyState:
149
181
  def __init__(__self__, *,
150
- arguments: Optional[pulumi.Input[Sequence[pulumi.Input['MaskingPolicyArgumentArgs']]]] = None,
151
- body: Optional[pulumi.Input[str]] = None,
152
182
  comment: Optional[pulumi.Input[str]] = None,
153
183
  database: Optional[pulumi.Input[str]] = None,
154
- describe_outputs: Optional[pulumi.Input[Sequence[pulumi.Input['MaskingPolicyDescribeOutputArgs']]]] = None,
155
- exempt_other_policies: Optional[pulumi.Input[str]] = None,
184
+ exempt_other_policies: Optional[pulumi.Input[bool]] = None,
156
185
  fully_qualified_name: Optional[pulumi.Input[str]] = None,
186
+ if_not_exists: Optional[pulumi.Input[bool]] = None,
187
+ masking_expression: Optional[pulumi.Input[str]] = None,
157
188
  name: Optional[pulumi.Input[str]] = None,
189
+ or_replace: Optional[pulumi.Input[bool]] = None,
158
190
  return_data_type: Optional[pulumi.Input[str]] = None,
159
191
  schema: Optional[pulumi.Input[str]] = None,
160
- show_outputs: Optional[pulumi.Input[Sequence[pulumi.Input['MaskingPolicyShowOutputArgs']]]] = None):
192
+ signature: Optional[pulumi.Input['MaskingPolicySignatureArgs']] = None):
161
193
  """
162
194
  Input properties used for looking up and filtering MaskingPolicy resources.
163
- :param pulumi.Input[Sequence[pulumi.Input['MaskingPolicyArgumentArgs']]] arguments: List of the arguments for the masking policy. The first column and its data type always indicate the column data type values to mask or tokenize in the subsequent policy conditions. Note that you can not specify a virtual column as the first column argument in a conditional masking policy.
164
- :param pulumi.Input[str] body: Specifies the SQL expression that transforms the data. To mitigate permadiff on this field, the provider replaces blank characters with a space. This can lead to false positives in cases where a change in case or run of whitespace is semantically significant.
165
195
  :param pulumi.Input[str] comment: Specifies a comment for the masking policy.
166
- :param pulumi.Input[str] database: The database in which to create the masking policy. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
167
- :param pulumi.Input[Sequence[pulumi.Input['MaskingPolicyDescribeOutputArgs']]] describe_outputs: Outputs the result of `DESCRIBE MASKING POLICY` for the given masking policy.
168
- :param pulumi.Input[str] exempt_other_policies: Specifies whether the row access policy or conditional masking policy can reference a column that is already protected by a masking policy. Due to Snowflake limitations, when value is chenged, the resource is recreated. 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.
196
+ :param pulumi.Input[str] database: The database in which to create the masking policy.
197
+ :param pulumi.Input[bool] exempt_other_policies: Specifies whether the row access policy or conditional masking policy can reference a column that is already protected by a masking policy.
169
198
  :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).
170
- :param pulumi.Input[str] name: Specifies the identifier for the masking policy; must be unique for the database and schema in which the masking policy is created. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
171
- :param pulumi.Input[str] return_data_type: The return data type must match the input data type of the first column that is specified as an input column. For more information about data types, check [Snowflake docs](https://docs.snowflake.com/en/sql-reference/intro-summary-data-types).
172
- :param pulumi.Input[str] schema: The schema in which to create the masking policy. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
173
- :param pulumi.Input[Sequence[pulumi.Input['MaskingPolicyShowOutputArgs']]] show_outputs: Outputs the result of `SHOW MASKING POLICY` for the given masking policy.
174
- """
175
- if arguments is not None:
176
- pulumi.set(__self__, "arguments", arguments)
177
- if body is not None:
178
- pulumi.set(__self__, "body", body)
199
+ :param pulumi.Input[bool] if_not_exists: Prevent overwriting a previous masking policy with the same name.
200
+ :param pulumi.Input[str] masking_expression: Specifies the SQL expression that transforms the data.
201
+ :param pulumi.Input[str] name: Specifies the identifier for the masking policy; must be unique for the database and schema in which the masking policy is created.
202
+ :param pulumi.Input[bool] or_replace: Whether to override a previous masking policy with the same name.
203
+ :param pulumi.Input[str] return_data_type: Specifies the data type to return.
204
+ :param pulumi.Input[str] schema: The schema in which to create the masking policy.
205
+ :param pulumi.Input['MaskingPolicySignatureArgs'] signature: The signature for the masking policy; specifies the input columns and data types to evaluate at query runtime.
206
+ """
179
207
  if comment is not None:
180
208
  pulumi.set(__self__, "comment", comment)
181
209
  if database is not None:
182
210
  pulumi.set(__self__, "database", database)
183
- if describe_outputs is not None:
184
- pulumi.set(__self__, "describe_outputs", describe_outputs)
185
211
  if exempt_other_policies is not None:
186
212
  pulumi.set(__self__, "exempt_other_policies", exempt_other_policies)
187
213
  if fully_qualified_name is not None:
188
214
  pulumi.set(__self__, "fully_qualified_name", fully_qualified_name)
215
+ if if_not_exists is not None:
216
+ pulumi.set(__self__, "if_not_exists", if_not_exists)
217
+ if masking_expression is not None:
218
+ pulumi.set(__self__, "masking_expression", masking_expression)
189
219
  if name is not None:
190
220
  pulumi.set(__self__, "name", name)
221
+ if or_replace is not None:
222
+ pulumi.set(__self__, "or_replace", or_replace)
191
223
  if return_data_type is not None:
192
224
  pulumi.set(__self__, "return_data_type", return_data_type)
193
225
  if schema is not None:
194
226
  pulumi.set(__self__, "schema", schema)
195
- if show_outputs is not None:
196
- pulumi.set(__self__, "show_outputs", show_outputs)
197
-
198
- @property
199
- @pulumi.getter
200
- def arguments(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['MaskingPolicyArgumentArgs']]]]:
201
- """
202
- List of the arguments for the masking policy. The first column and its data type always indicate the column data type values to mask or tokenize in the subsequent policy conditions. Note that you can not specify a virtual column as the first column argument in a conditional masking policy.
203
- """
204
- return pulumi.get(self, "arguments")
205
-
206
- @arguments.setter
207
- def arguments(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['MaskingPolicyArgumentArgs']]]]):
208
- pulumi.set(self, "arguments", value)
209
-
210
- @property
211
- @pulumi.getter
212
- def body(self) -> Optional[pulumi.Input[str]]:
213
- """
214
- Specifies the SQL expression that transforms the data. To mitigate permadiff on this field, the provider replaces blank characters with a space. This can lead to false positives in cases where a change in case or run of whitespace is semantically significant.
215
- """
216
- return pulumi.get(self, "body")
217
-
218
- @body.setter
219
- def body(self, value: Optional[pulumi.Input[str]]):
220
- pulumi.set(self, "body", value)
227
+ if signature is not None:
228
+ pulumi.set(__self__, "signature", signature)
221
229
 
222
230
  @property
223
231
  @pulumi.getter
@@ -235,7 +243,7 @@ class _MaskingPolicyState:
235
243
  @pulumi.getter
236
244
  def database(self) -> Optional[pulumi.Input[str]]:
237
245
  """
238
- The database in which to create the masking policy. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
246
+ The database in which to create the masking policy.
239
247
  """
240
248
  return pulumi.get(self, "database")
241
249
 
@@ -243,28 +251,16 @@ class _MaskingPolicyState:
243
251
  def database(self, value: Optional[pulumi.Input[str]]):
244
252
  pulumi.set(self, "database", value)
245
253
 
246
- @property
247
- @pulumi.getter(name="describeOutputs")
248
- def describe_outputs(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['MaskingPolicyDescribeOutputArgs']]]]:
249
- """
250
- Outputs the result of `DESCRIBE MASKING POLICY` for the given masking policy.
251
- """
252
- return pulumi.get(self, "describe_outputs")
253
-
254
- @describe_outputs.setter
255
- def describe_outputs(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['MaskingPolicyDescribeOutputArgs']]]]):
256
- pulumi.set(self, "describe_outputs", value)
257
-
258
254
  @property
259
255
  @pulumi.getter(name="exemptOtherPolicies")
260
- def exempt_other_policies(self) -> Optional[pulumi.Input[str]]:
256
+ def exempt_other_policies(self) -> Optional[pulumi.Input[bool]]:
261
257
  """
262
- Specifies whether the row access policy or conditional masking policy can reference a column that is already protected by a masking policy. Due to Snowflake limitations, when value is chenged, the resource is recreated. 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.
258
+ Specifies whether the row access policy or conditional masking policy can reference a column that is already protected by a masking policy.
263
259
  """
264
260
  return pulumi.get(self, "exempt_other_policies")
265
261
 
266
262
  @exempt_other_policies.setter
267
- def exempt_other_policies(self, value: Optional[pulumi.Input[str]]):
263
+ def exempt_other_policies(self, value: Optional[pulumi.Input[bool]]):
268
264
  pulumi.set(self, "exempt_other_policies", value)
269
265
 
270
266
  @property
@@ -279,11 +275,35 @@ class _MaskingPolicyState:
279
275
  def fully_qualified_name(self, value: Optional[pulumi.Input[str]]):
280
276
  pulumi.set(self, "fully_qualified_name", value)
281
277
 
278
+ @property
279
+ @pulumi.getter(name="ifNotExists")
280
+ def if_not_exists(self) -> Optional[pulumi.Input[bool]]:
281
+ """
282
+ Prevent overwriting a previous masking policy with the same name.
283
+ """
284
+ return pulumi.get(self, "if_not_exists")
285
+
286
+ @if_not_exists.setter
287
+ def if_not_exists(self, value: Optional[pulumi.Input[bool]]):
288
+ pulumi.set(self, "if_not_exists", value)
289
+
290
+ @property
291
+ @pulumi.getter(name="maskingExpression")
292
+ def masking_expression(self) -> Optional[pulumi.Input[str]]:
293
+ """
294
+ Specifies the SQL expression that transforms the data.
295
+ """
296
+ return pulumi.get(self, "masking_expression")
297
+
298
+ @masking_expression.setter
299
+ def masking_expression(self, value: Optional[pulumi.Input[str]]):
300
+ pulumi.set(self, "masking_expression", value)
301
+
282
302
  @property
283
303
  @pulumi.getter
284
304
  def name(self) -> Optional[pulumi.Input[str]]:
285
305
  """
286
- Specifies the identifier for the masking policy; must be unique for the database and schema in which the masking policy is created. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
306
+ Specifies the identifier for the masking policy; must be unique for the database and schema in which the masking policy is created.
287
307
  """
288
308
  return pulumi.get(self, "name")
289
309
 
@@ -291,11 +311,23 @@ class _MaskingPolicyState:
291
311
  def name(self, value: Optional[pulumi.Input[str]]):
292
312
  pulumi.set(self, "name", value)
293
313
 
314
+ @property
315
+ @pulumi.getter(name="orReplace")
316
+ def or_replace(self) -> Optional[pulumi.Input[bool]]:
317
+ """
318
+ Whether to override a previous masking policy with the same name.
319
+ """
320
+ return pulumi.get(self, "or_replace")
321
+
322
+ @or_replace.setter
323
+ def or_replace(self, value: Optional[pulumi.Input[bool]]):
324
+ pulumi.set(self, "or_replace", value)
325
+
294
326
  @property
295
327
  @pulumi.getter(name="returnDataType")
296
328
  def return_data_type(self) -> Optional[pulumi.Input[str]]:
297
329
  """
298
- The return data type must match the input data type of the first column that is specified as an input column. For more information about data types, check [Snowflake docs](https://docs.snowflake.com/en/sql-reference/intro-summary-data-types).
330
+ Specifies the data type to return.
299
331
  """
300
332
  return pulumi.get(self, "return_data_type")
301
333
 
@@ -307,7 +339,7 @@ class _MaskingPolicyState:
307
339
  @pulumi.getter
308
340
  def schema(self) -> Optional[pulumi.Input[str]]:
309
341
  """
310
- The schema in which to create the masking policy. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
342
+ The schema in which to create the masking policy.
311
343
  """
312
344
  return pulumi.get(self, "schema")
313
345
 
@@ -316,16 +348,16 @@ class _MaskingPolicyState:
316
348
  pulumi.set(self, "schema", value)
317
349
 
318
350
  @property
319
- @pulumi.getter(name="showOutputs")
320
- def show_outputs(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['MaskingPolicyShowOutputArgs']]]]:
351
+ @pulumi.getter
352
+ def signature(self) -> Optional[pulumi.Input['MaskingPolicySignatureArgs']]:
321
353
  """
322
- Outputs the result of `SHOW MASKING POLICY` for the given masking policy.
354
+ The signature for the masking policy; specifies the input columns and data types to evaluate at query runtime.
323
355
  """
324
- return pulumi.get(self, "show_outputs")
356
+ return pulumi.get(self, "signature")
325
357
 
326
- @show_outputs.setter
327
- def show_outputs(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['MaskingPolicyShowOutputArgs']]]]):
328
- pulumi.set(self, "show_outputs", value)
358
+ @signature.setter
359
+ def signature(self, value: Optional[pulumi.Input['MaskingPolicySignatureArgs']]):
360
+ pulumi.set(self, "signature", value)
329
361
 
330
362
 
331
363
  class MaskingPolicy(pulumi.CustomResource):
@@ -333,32 +365,38 @@ class MaskingPolicy(pulumi.CustomResource):
333
365
  def __init__(__self__,
334
366
  resource_name: str,
335
367
  opts: Optional[pulumi.ResourceOptions] = None,
336
- arguments: Optional[pulumi.Input[Sequence[pulumi.Input[Union['MaskingPolicyArgumentArgs', 'MaskingPolicyArgumentArgsDict']]]]] = None,
337
- body: Optional[pulumi.Input[str]] = None,
338
368
  comment: Optional[pulumi.Input[str]] = None,
339
369
  database: Optional[pulumi.Input[str]] = None,
340
- exempt_other_policies: Optional[pulumi.Input[str]] = None,
370
+ exempt_other_policies: Optional[pulumi.Input[bool]] = None,
371
+ if_not_exists: Optional[pulumi.Input[bool]] = None,
372
+ masking_expression: Optional[pulumi.Input[str]] = None,
341
373
  name: Optional[pulumi.Input[str]] = None,
374
+ or_replace: Optional[pulumi.Input[bool]] = None,
342
375
  return_data_type: Optional[pulumi.Input[str]] = None,
343
376
  schema: Optional[pulumi.Input[str]] = None,
377
+ signature: Optional[pulumi.Input[Union['MaskingPolicySignatureArgs', 'MaskingPolicySignatureArgsDict']]] = None,
344
378
  __props__=None):
345
379
  """
346
380
  ## Import
347
381
 
382
+ format is database name | schema name | policy name
383
+
348
384
  ```sh
349
- $ pulumi import snowflake:index/maskingPolicy:MaskingPolicy example '"<database_name>"."<schema_name>"."<masking_policy_name>"'
385
+ $ pulumi import snowflake:index/maskingPolicy:MaskingPolicy example 'dbName|schemaName|policyName'
350
386
  ```
351
387
 
352
388
  :param str resource_name: The name of the resource.
353
389
  :param pulumi.ResourceOptions opts: Options for the resource.
354
- :param pulumi.Input[Sequence[pulumi.Input[Union['MaskingPolicyArgumentArgs', 'MaskingPolicyArgumentArgsDict']]]] arguments: List of the arguments for the masking policy. The first column and its data type always indicate the column data type values to mask or tokenize in the subsequent policy conditions. Note that you can not specify a virtual column as the first column argument in a conditional masking policy.
355
- :param pulumi.Input[str] body: Specifies the SQL expression that transforms the data. To mitigate permadiff on this field, the provider replaces blank characters with a space. This can lead to false positives in cases where a change in case or run of whitespace is semantically significant.
356
390
  :param pulumi.Input[str] comment: Specifies a comment for the masking policy.
357
- :param pulumi.Input[str] database: The database in which to create the masking policy. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
358
- :param pulumi.Input[str] exempt_other_policies: Specifies whether the row access policy or conditional masking policy can reference a column that is already protected by a masking policy. Due to Snowflake limitations, when value is chenged, the resource is recreated. 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.
359
- :param pulumi.Input[str] name: Specifies the identifier for the masking policy; must be unique for the database and schema in which the masking policy is created. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
360
- :param pulumi.Input[str] return_data_type: The return data type must match the input data type of the first column that is specified as an input column. For more information about data types, check [Snowflake docs](https://docs.snowflake.com/en/sql-reference/intro-summary-data-types).
361
- :param pulumi.Input[str] schema: The schema in which to create the masking policy. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
391
+ :param pulumi.Input[str] database: The database in which to create the masking policy.
392
+ :param pulumi.Input[bool] exempt_other_policies: Specifies whether the row access policy or conditional masking policy can reference a column that is already protected by a masking policy.
393
+ :param pulumi.Input[bool] if_not_exists: Prevent overwriting a previous masking policy with the same name.
394
+ :param pulumi.Input[str] masking_expression: Specifies the SQL expression that transforms the data.
395
+ :param pulumi.Input[str] name: Specifies the identifier for the masking policy; must be unique for the database and schema in which the masking policy is created.
396
+ :param pulumi.Input[bool] or_replace: Whether to override a previous masking policy with the same name.
397
+ :param pulumi.Input[str] return_data_type: Specifies the data type to return.
398
+ :param pulumi.Input[str] schema: The schema in which to create the masking policy.
399
+ :param pulumi.Input[Union['MaskingPolicySignatureArgs', 'MaskingPolicySignatureArgsDict']] signature: The signature for the masking policy; specifies the input columns and data types to evaluate at query runtime.
362
400
  """
363
401
  ...
364
402
  @overload
@@ -369,8 +407,10 @@ class MaskingPolicy(pulumi.CustomResource):
369
407
  """
370
408
  ## Import
371
409
 
410
+ format is database name | schema name | policy name
411
+
372
412
  ```sh
373
- $ pulumi import snowflake:index/maskingPolicy:MaskingPolicy example '"<database_name>"."<schema_name>"."<masking_policy_name>"'
413
+ $ pulumi import snowflake:index/maskingPolicy:MaskingPolicy example 'dbName|schemaName|policyName'
374
414
  ```
375
415
 
376
416
  :param str resource_name: The name of the resource.
@@ -388,14 +428,16 @@ class MaskingPolicy(pulumi.CustomResource):
388
428
  def _internal_init(__self__,
389
429
  resource_name: str,
390
430
  opts: Optional[pulumi.ResourceOptions] = None,
391
- arguments: Optional[pulumi.Input[Sequence[pulumi.Input[Union['MaskingPolicyArgumentArgs', 'MaskingPolicyArgumentArgsDict']]]]] = None,
392
- body: Optional[pulumi.Input[str]] = None,
393
431
  comment: Optional[pulumi.Input[str]] = None,
394
432
  database: Optional[pulumi.Input[str]] = None,
395
- exempt_other_policies: Optional[pulumi.Input[str]] = None,
433
+ exempt_other_policies: Optional[pulumi.Input[bool]] = None,
434
+ if_not_exists: Optional[pulumi.Input[bool]] = None,
435
+ masking_expression: Optional[pulumi.Input[str]] = None,
396
436
  name: Optional[pulumi.Input[str]] = None,
437
+ or_replace: Optional[pulumi.Input[bool]] = None,
397
438
  return_data_type: Optional[pulumi.Input[str]] = None,
398
439
  schema: Optional[pulumi.Input[str]] = None,
440
+ signature: Optional[pulumi.Input[Union['MaskingPolicySignatureArgs', 'MaskingPolicySignatureArgsDict']]] = None,
399
441
  __props__=None):
400
442
  opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
401
443
  if not isinstance(opts, pulumi.ResourceOptions):
@@ -405,27 +447,27 @@ class MaskingPolicy(pulumi.CustomResource):
405
447
  raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
406
448
  __props__ = MaskingPolicyArgs.__new__(MaskingPolicyArgs)
407
449
 
408
- if arguments is None and not opts.urn:
409
- raise TypeError("Missing required property 'arguments'")
410
- __props__.__dict__["arguments"] = arguments
411
- if body is None and not opts.urn:
412
- raise TypeError("Missing required property 'body'")
413
- __props__.__dict__["body"] = body
414
450
  __props__.__dict__["comment"] = comment
415
451
  if database is None and not opts.urn:
416
452
  raise TypeError("Missing required property 'database'")
417
453
  __props__.__dict__["database"] = database
418
454
  __props__.__dict__["exempt_other_policies"] = exempt_other_policies
455
+ __props__.__dict__["if_not_exists"] = if_not_exists
456
+ if masking_expression is None and not opts.urn:
457
+ raise TypeError("Missing required property 'masking_expression'")
458
+ __props__.__dict__["masking_expression"] = masking_expression
419
459
  __props__.__dict__["name"] = name
460
+ __props__.__dict__["or_replace"] = or_replace
420
461
  if return_data_type is None and not opts.urn:
421
462
  raise TypeError("Missing required property 'return_data_type'")
422
463
  __props__.__dict__["return_data_type"] = return_data_type
423
464
  if schema is None and not opts.urn:
424
465
  raise TypeError("Missing required property 'schema'")
425
466
  __props__.__dict__["schema"] = schema
426
- __props__.__dict__["describe_outputs"] = None
467
+ if signature is None and not opts.urn:
468
+ raise TypeError("Missing required property 'signature'")
469
+ __props__.__dict__["signature"] = signature
427
470
  __props__.__dict__["fully_qualified_name"] = None
428
- __props__.__dict__["show_outputs"] = None
429
471
  super(MaskingPolicy, __self__).__init__(
430
472
  'snowflake:index/maskingPolicy:MaskingPolicy',
431
473
  resource_name,
@@ -436,17 +478,17 @@ class MaskingPolicy(pulumi.CustomResource):
436
478
  def get(resource_name: str,
437
479
  id: pulumi.Input[str],
438
480
  opts: Optional[pulumi.ResourceOptions] = None,
439
- arguments: Optional[pulumi.Input[Sequence[pulumi.Input[Union['MaskingPolicyArgumentArgs', 'MaskingPolicyArgumentArgsDict']]]]] = None,
440
- body: Optional[pulumi.Input[str]] = None,
441
481
  comment: Optional[pulumi.Input[str]] = None,
442
482
  database: Optional[pulumi.Input[str]] = None,
443
- describe_outputs: Optional[pulumi.Input[Sequence[pulumi.Input[Union['MaskingPolicyDescribeOutputArgs', 'MaskingPolicyDescribeOutputArgsDict']]]]] = None,
444
- exempt_other_policies: Optional[pulumi.Input[str]] = None,
483
+ exempt_other_policies: Optional[pulumi.Input[bool]] = None,
445
484
  fully_qualified_name: Optional[pulumi.Input[str]] = None,
485
+ if_not_exists: Optional[pulumi.Input[bool]] = None,
486
+ masking_expression: Optional[pulumi.Input[str]] = None,
446
487
  name: Optional[pulumi.Input[str]] = None,
488
+ or_replace: Optional[pulumi.Input[bool]] = None,
447
489
  return_data_type: Optional[pulumi.Input[str]] = None,
448
490
  schema: Optional[pulumi.Input[str]] = None,
449
- show_outputs: Optional[pulumi.Input[Sequence[pulumi.Input[Union['MaskingPolicyShowOutputArgs', 'MaskingPolicyShowOutputArgsDict']]]]] = None) -> 'MaskingPolicy':
491
+ signature: Optional[pulumi.Input[Union['MaskingPolicySignatureArgs', 'MaskingPolicySignatureArgsDict']]] = None) -> 'MaskingPolicy':
450
492
  """
451
493
  Get an existing MaskingPolicy resource's state with the given name, id, and optional extra
452
494
  properties used to qualify the lookup.
@@ -454,51 +496,35 @@ class MaskingPolicy(pulumi.CustomResource):
454
496
  :param str resource_name: The unique name of the resulting resource.
455
497
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
456
498
  :param pulumi.ResourceOptions opts: Options for the resource.
457
- :param pulumi.Input[Sequence[pulumi.Input[Union['MaskingPolicyArgumentArgs', 'MaskingPolicyArgumentArgsDict']]]] arguments: List of the arguments for the masking policy. The first column and its data type always indicate the column data type values to mask or tokenize in the subsequent policy conditions. Note that you can not specify a virtual column as the first column argument in a conditional masking policy.
458
- :param pulumi.Input[str] body: Specifies the SQL expression that transforms the data. To mitigate permadiff on this field, the provider replaces blank characters with a space. This can lead to false positives in cases where a change in case or run of whitespace is semantically significant.
459
499
  :param pulumi.Input[str] comment: Specifies a comment for the masking policy.
460
- :param pulumi.Input[str] database: The database in which to create the masking policy. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
461
- :param pulumi.Input[Sequence[pulumi.Input[Union['MaskingPolicyDescribeOutputArgs', 'MaskingPolicyDescribeOutputArgsDict']]]] describe_outputs: Outputs the result of `DESCRIBE MASKING POLICY` for the given masking policy.
462
- :param pulumi.Input[str] exempt_other_policies: Specifies whether the row access policy or conditional masking policy can reference a column that is already protected by a masking policy. Due to Snowflake limitations, when value is chenged, the resource is recreated. 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.
500
+ :param pulumi.Input[str] database: The database in which to create the masking policy.
501
+ :param pulumi.Input[bool] exempt_other_policies: Specifies whether the row access policy or conditional masking policy can reference a column that is already protected by a masking policy.
463
502
  :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).
464
- :param pulumi.Input[str] name: Specifies the identifier for the masking policy; must be unique for the database and schema in which the masking policy is created. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
465
- :param pulumi.Input[str] return_data_type: The return data type must match the input data type of the first column that is specified as an input column. For more information about data types, check [Snowflake docs](https://docs.snowflake.com/en/sql-reference/intro-summary-data-types).
466
- :param pulumi.Input[str] schema: The schema in which to create the masking policy. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
467
- :param pulumi.Input[Sequence[pulumi.Input[Union['MaskingPolicyShowOutputArgs', 'MaskingPolicyShowOutputArgsDict']]]] show_outputs: Outputs the result of `SHOW MASKING POLICY` for the given masking policy.
503
+ :param pulumi.Input[bool] if_not_exists: Prevent overwriting a previous masking policy with the same name.
504
+ :param pulumi.Input[str] masking_expression: Specifies the SQL expression that transforms the data.
505
+ :param pulumi.Input[str] name: Specifies the identifier for the masking policy; must be unique for the database and schema in which the masking policy is created.
506
+ :param pulumi.Input[bool] or_replace: Whether to override a previous masking policy with the same name.
507
+ :param pulumi.Input[str] return_data_type: Specifies the data type to return.
508
+ :param pulumi.Input[str] schema: The schema in which to create the masking policy.
509
+ :param pulumi.Input[Union['MaskingPolicySignatureArgs', 'MaskingPolicySignatureArgsDict']] signature: The signature for the masking policy; specifies the input columns and data types to evaluate at query runtime.
468
510
  """
469
511
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
470
512
 
471
513
  __props__ = _MaskingPolicyState.__new__(_MaskingPolicyState)
472
514
 
473
- __props__.__dict__["arguments"] = arguments
474
- __props__.__dict__["body"] = body
475
515
  __props__.__dict__["comment"] = comment
476
516
  __props__.__dict__["database"] = database
477
- __props__.__dict__["describe_outputs"] = describe_outputs
478
517
  __props__.__dict__["exempt_other_policies"] = exempt_other_policies
479
518
  __props__.__dict__["fully_qualified_name"] = fully_qualified_name
519
+ __props__.__dict__["if_not_exists"] = if_not_exists
520
+ __props__.__dict__["masking_expression"] = masking_expression
480
521
  __props__.__dict__["name"] = name
522
+ __props__.__dict__["or_replace"] = or_replace
481
523
  __props__.__dict__["return_data_type"] = return_data_type
482
524
  __props__.__dict__["schema"] = schema
483
- __props__.__dict__["show_outputs"] = show_outputs
525
+ __props__.__dict__["signature"] = signature
484
526
  return MaskingPolicy(resource_name, opts=opts, __props__=__props__)
485
527
 
486
- @property
487
- @pulumi.getter
488
- def arguments(self) -> pulumi.Output[Sequence['outputs.MaskingPolicyArgument']]:
489
- """
490
- List of the arguments for the masking policy. The first column and its data type always indicate the column data type values to mask or tokenize in the subsequent policy conditions. Note that you can not specify a virtual column as the first column argument in a conditional masking policy.
491
- """
492
- return pulumi.get(self, "arguments")
493
-
494
- @property
495
- @pulumi.getter
496
- def body(self) -> pulumi.Output[str]:
497
- """
498
- Specifies the SQL expression that transforms the data. To mitigate permadiff on this field, the provider replaces blank characters with a space. This can lead to false positives in cases where a change in case or run of whitespace is semantically significant.
499
- """
500
- return pulumi.get(self, "body")
501
-
502
528
  @property
503
529
  @pulumi.getter
504
530
  def comment(self) -> pulumi.Output[Optional[str]]:
@@ -511,23 +537,15 @@ class MaskingPolicy(pulumi.CustomResource):
511
537
  @pulumi.getter
512
538
  def database(self) -> pulumi.Output[str]:
513
539
  """
514
- The database in which to create the masking policy. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
540
+ The database in which to create the masking policy.
515
541
  """
516
542
  return pulumi.get(self, "database")
517
543
 
518
- @property
519
- @pulumi.getter(name="describeOutputs")
520
- def describe_outputs(self) -> pulumi.Output[Sequence['outputs.MaskingPolicyDescribeOutput']]:
521
- """
522
- Outputs the result of `DESCRIBE MASKING POLICY` for the given masking policy.
523
- """
524
- return pulumi.get(self, "describe_outputs")
525
-
526
544
  @property
527
545
  @pulumi.getter(name="exemptOtherPolicies")
528
- def exempt_other_policies(self) -> pulumi.Output[Optional[str]]:
546
+ def exempt_other_policies(self) -> pulumi.Output[Optional[bool]]:
529
547
  """
530
- Specifies whether the row access policy or conditional masking policy can reference a column that is already protected by a masking policy. Due to Snowflake limitations, when value is chenged, the resource is recreated. 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.
548
+ Specifies whether the row access policy or conditional masking policy can reference a column that is already protected by a masking policy.
531
549
  """
532
550
  return pulumi.get(self, "exempt_other_policies")
533
551
 
@@ -539,19 +557,43 @@ class MaskingPolicy(pulumi.CustomResource):
539
557
  """
540
558
  return pulumi.get(self, "fully_qualified_name")
541
559
 
560
+ @property
561
+ @pulumi.getter(name="ifNotExists")
562
+ def if_not_exists(self) -> pulumi.Output[Optional[bool]]:
563
+ """
564
+ Prevent overwriting a previous masking policy with the same name.
565
+ """
566
+ return pulumi.get(self, "if_not_exists")
567
+
568
+ @property
569
+ @pulumi.getter(name="maskingExpression")
570
+ def masking_expression(self) -> pulumi.Output[str]:
571
+ """
572
+ Specifies the SQL expression that transforms the data.
573
+ """
574
+ return pulumi.get(self, "masking_expression")
575
+
542
576
  @property
543
577
  @pulumi.getter
544
578
  def name(self) -> pulumi.Output[str]:
545
579
  """
546
- Specifies the identifier for the masking policy; must be unique for the database and schema in which the masking policy is created. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
580
+ Specifies the identifier for the masking policy; must be unique for the database and schema in which the masking policy is created.
547
581
  """
548
582
  return pulumi.get(self, "name")
549
583
 
584
+ @property
585
+ @pulumi.getter(name="orReplace")
586
+ def or_replace(self) -> pulumi.Output[Optional[bool]]:
587
+ """
588
+ Whether to override a previous masking policy with the same name.
589
+ """
590
+ return pulumi.get(self, "or_replace")
591
+
550
592
  @property
551
593
  @pulumi.getter(name="returnDataType")
552
594
  def return_data_type(self) -> pulumi.Output[str]:
553
595
  """
554
- The return data type must match the input data type of the first column that is specified as an input column. For more information about data types, check [Snowflake docs](https://docs.snowflake.com/en/sql-reference/intro-summary-data-types).
596
+ Specifies the data type to return.
555
597
  """
556
598
  return pulumi.get(self, "return_data_type")
557
599
 
@@ -559,15 +601,15 @@ class MaskingPolicy(pulumi.CustomResource):
559
601
  @pulumi.getter
560
602
  def schema(self) -> pulumi.Output[str]:
561
603
  """
562
- The schema in which to create the masking policy. Due to technical limitations (read more here), avoid using the following characters: `|`, `.`, `(`, `)`, `"`
604
+ The schema in which to create the masking policy.
563
605
  """
564
606
  return pulumi.get(self, "schema")
565
607
 
566
608
  @property
567
- @pulumi.getter(name="showOutputs")
568
- def show_outputs(self) -> pulumi.Output[Sequence['outputs.MaskingPolicyShowOutput']]:
609
+ @pulumi.getter
610
+ def signature(self) -> pulumi.Output['outputs.MaskingPolicySignature']:
569
611
  """
570
- Outputs the result of `SHOW MASKING POLICY` for the given masking policy.
612
+ The signature for the masking policy; specifies the input columns and data types to evaluate at query runtime.
571
613
  """
572
- return pulumi.get(self, "show_outputs")
614
+ return pulumi.get(self, "signature")
573
615