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.
- pulumi_snowflake/_inputs.py +30 -863
- pulumi_snowflake/get_database_roles.py +0 -4
- pulumi_snowflake/get_masking_policies.py +48 -73
- pulumi_snowflake/get_resource_monitors.py +16 -28
- pulumi_snowflake/get_row_access_policies.py +48 -73
- pulumi_snowflake/get_views.py +0 -4
- pulumi_snowflake/masking_policy.py +234 -192
- pulumi_snowflake/outputs.py +65 -1092
- pulumi_snowflake/pulumi-plugin.json +1 -1
- pulumi_snowflake/resource_monitor.py +259 -83
- pulumi_snowflake/row_access_policy.py +114 -168
- pulumi_snowflake/view.py +7 -7
- pulumi_snowflake/warehouse.py +4 -4
- {pulumi_snowflake-0.59.0.dist-info → pulumi_snowflake-0.59.0a1726294094.dist-info}/METADATA +1 -1
- {pulumi_snowflake-0.59.0.dist-info → pulumi_snowflake-0.59.0a1726294094.dist-info}/RECORD +17 -17
- {pulumi_snowflake-0.59.0.dist-info → pulumi_snowflake-0.59.0a1726294094.dist-info}/WHEEL +1 -1
- {pulumi_snowflake-0.59.0.dist-info → pulumi_snowflake-0.59.0a1726294094.dist-info}/top_level.txt +0 -0
|
@@ -8,33 +8,31 @@ import pulumi
|
|
|
8
8
|
import pulumi.runtime
|
|
9
9
|
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
10
10
|
from . import _utilities
|
|
11
|
-
from . import outputs
|
|
12
|
-
from ._inputs import *
|
|
13
11
|
|
|
14
12
|
__all__ = ['RowAccessPolicyArgs', 'RowAccessPolicy']
|
|
15
13
|
|
|
16
14
|
@pulumi.input_type
|
|
17
15
|
class RowAccessPolicyArgs:
|
|
18
16
|
def __init__(__self__, *,
|
|
19
|
-
arguments: pulumi.Input[Sequence[pulumi.Input['RowAccessPolicyArgumentArgs']]],
|
|
20
|
-
body: pulumi.Input[str],
|
|
21
17
|
database: pulumi.Input[str],
|
|
18
|
+
row_access_expression: pulumi.Input[str],
|
|
22
19
|
schema: pulumi.Input[str],
|
|
20
|
+
signature: pulumi.Input[Mapping[str, pulumi.Input[str]]],
|
|
23
21
|
comment: Optional[pulumi.Input[str]] = None,
|
|
24
22
|
name: Optional[pulumi.Input[str]] = None):
|
|
25
23
|
"""
|
|
26
24
|
The set of arguments for constructing a RowAccessPolicy resource.
|
|
27
|
-
:param pulumi.Input[
|
|
28
|
-
:param pulumi.Input[str]
|
|
29
|
-
:param pulumi.Input[str]
|
|
30
|
-
:param pulumi.Input[str]
|
|
25
|
+
:param pulumi.Input[str] database: The database in which to create the row access policy.
|
|
26
|
+
:param pulumi.Input[str] row_access_expression: Specifies the SQL expression. The expression can be any boolean-valued SQL expression.
|
|
27
|
+
:param pulumi.Input[str] schema: The schema in which to create the row access policy.
|
|
28
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] signature: Specifies signature (arguments) for the row access policy (uppercase and sorted to avoid recreation of resource). A signature specifies a set of attributes that must be considered to determine whether the row is accessible. The attribute values come from the database object (e.g. table or view) to be protected by the row access policy.
|
|
31
29
|
:param pulumi.Input[str] comment: Specifies a comment for the row access policy.
|
|
32
|
-
:param pulumi.Input[str] name: Specifies the identifier for the row access policy; must be unique for the database and schema in which the row access policy is created.
|
|
30
|
+
:param pulumi.Input[str] name: Specifies the identifier for the row access policy; must be unique for the database and schema in which the row access policy is created.
|
|
33
31
|
"""
|
|
34
|
-
pulumi.set(__self__, "arguments", arguments)
|
|
35
|
-
pulumi.set(__self__, "body", body)
|
|
36
32
|
pulumi.set(__self__, "database", database)
|
|
33
|
+
pulumi.set(__self__, "row_access_expression", row_access_expression)
|
|
37
34
|
pulumi.set(__self__, "schema", schema)
|
|
35
|
+
pulumi.set(__self__, "signature", signature)
|
|
38
36
|
if comment is not None:
|
|
39
37
|
pulumi.set(__self__, "comment", comment)
|
|
40
38
|
if name is not None:
|
|
@@ -42,51 +40,51 @@ class RowAccessPolicyArgs:
|
|
|
42
40
|
|
|
43
41
|
@property
|
|
44
42
|
@pulumi.getter
|
|
45
|
-
def
|
|
43
|
+
def database(self) -> pulumi.Input[str]:
|
|
46
44
|
"""
|
|
47
|
-
|
|
45
|
+
The database in which to create the row access policy.
|
|
48
46
|
"""
|
|
49
|
-
return pulumi.get(self, "
|
|
47
|
+
return pulumi.get(self, "database")
|
|
50
48
|
|
|
51
|
-
@
|
|
52
|
-
def
|
|
53
|
-
pulumi.set(self, "
|
|
49
|
+
@database.setter
|
|
50
|
+
def database(self, value: pulumi.Input[str]):
|
|
51
|
+
pulumi.set(self, "database", value)
|
|
54
52
|
|
|
55
53
|
@property
|
|
56
|
-
@pulumi.getter
|
|
57
|
-
def
|
|
54
|
+
@pulumi.getter(name="rowAccessExpression")
|
|
55
|
+
def row_access_expression(self) -> pulumi.Input[str]:
|
|
58
56
|
"""
|
|
59
|
-
Specifies the SQL expression. The expression can be any boolean-valued SQL expression.
|
|
57
|
+
Specifies the SQL expression. The expression can be any boolean-valued SQL expression.
|
|
60
58
|
"""
|
|
61
|
-
return pulumi.get(self, "
|
|
59
|
+
return pulumi.get(self, "row_access_expression")
|
|
62
60
|
|
|
63
|
-
@
|
|
64
|
-
def
|
|
65
|
-
pulumi.set(self, "
|
|
61
|
+
@row_access_expression.setter
|
|
62
|
+
def row_access_expression(self, value: pulumi.Input[str]):
|
|
63
|
+
pulumi.set(self, "row_access_expression", value)
|
|
66
64
|
|
|
67
65
|
@property
|
|
68
66
|
@pulumi.getter
|
|
69
|
-
def
|
|
67
|
+
def schema(self) -> pulumi.Input[str]:
|
|
70
68
|
"""
|
|
71
|
-
The
|
|
69
|
+
The schema in which to create the row access policy.
|
|
72
70
|
"""
|
|
73
|
-
return pulumi.get(self, "
|
|
71
|
+
return pulumi.get(self, "schema")
|
|
74
72
|
|
|
75
|
-
@
|
|
76
|
-
def
|
|
77
|
-
pulumi.set(self, "
|
|
73
|
+
@schema.setter
|
|
74
|
+
def schema(self, value: pulumi.Input[str]):
|
|
75
|
+
pulumi.set(self, "schema", value)
|
|
78
76
|
|
|
79
77
|
@property
|
|
80
78
|
@pulumi.getter
|
|
81
|
-
def
|
|
79
|
+
def signature(self) -> pulumi.Input[Mapping[str, pulumi.Input[str]]]:
|
|
82
80
|
"""
|
|
83
|
-
|
|
81
|
+
Specifies signature (arguments) for the row access policy (uppercase and sorted to avoid recreation of resource). A signature specifies a set of attributes that must be considered to determine whether the row is accessible. The attribute values come from the database object (e.g. table or view) to be protected by the row access policy.
|
|
84
82
|
"""
|
|
85
|
-
return pulumi.get(self, "
|
|
83
|
+
return pulumi.get(self, "signature")
|
|
86
84
|
|
|
87
|
-
@
|
|
88
|
-
def
|
|
89
|
-
pulumi.set(self, "
|
|
85
|
+
@signature.setter
|
|
86
|
+
def signature(self, value: pulumi.Input[Mapping[str, pulumi.Input[str]]]):
|
|
87
|
+
pulumi.set(self, "signature", value)
|
|
90
88
|
|
|
91
89
|
@property
|
|
92
90
|
@pulumi.getter
|
|
@@ -104,7 +102,7 @@ class RowAccessPolicyArgs:
|
|
|
104
102
|
@pulumi.getter
|
|
105
103
|
def name(self) -> Optional[pulumi.Input[str]]:
|
|
106
104
|
"""
|
|
107
|
-
Specifies the identifier for the row access policy; must be unique for the database and schema in which the row access policy is created.
|
|
105
|
+
Specifies the identifier for the row access policy; must be unique for the database and schema in which the row access policy is created.
|
|
108
106
|
"""
|
|
109
107
|
return pulumi.get(self, "name")
|
|
110
108
|
|
|
@@ -116,69 +114,37 @@ class RowAccessPolicyArgs:
|
|
|
116
114
|
@pulumi.input_type
|
|
117
115
|
class _RowAccessPolicyState:
|
|
118
116
|
def __init__(__self__, *,
|
|
119
|
-
arguments: Optional[pulumi.Input[Sequence[pulumi.Input['RowAccessPolicyArgumentArgs']]]] = None,
|
|
120
|
-
body: Optional[pulumi.Input[str]] = None,
|
|
121
117
|
comment: Optional[pulumi.Input[str]] = None,
|
|
122
118
|
database: Optional[pulumi.Input[str]] = None,
|
|
123
|
-
describe_outputs: Optional[pulumi.Input[Sequence[pulumi.Input['RowAccessPolicyDescribeOutputArgs']]]] = None,
|
|
124
119
|
fully_qualified_name: Optional[pulumi.Input[str]] = None,
|
|
125
120
|
name: Optional[pulumi.Input[str]] = None,
|
|
121
|
+
row_access_expression: Optional[pulumi.Input[str]] = None,
|
|
126
122
|
schema: Optional[pulumi.Input[str]] = None,
|
|
127
|
-
|
|
123
|
+
signature: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None):
|
|
128
124
|
"""
|
|
129
125
|
Input properties used for looking up and filtering RowAccessPolicy resources.
|
|
130
|
-
:param pulumi.Input[Sequence[pulumi.Input['RowAccessPolicyArgumentArgs']]] arguments: List of the arguments for the row access policy. A signature specifies a set of attributes that must be considered to determine whether the row is accessible. The attribute values come from the database object (e.g. table or view) to be protected by the row access policy. If any argument name or type is changed, the resource is recreated.
|
|
131
|
-
:param pulumi.Input[str] body: Specifies the SQL expression. The expression can be any boolean-valued SQL expression. 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.
|
|
132
126
|
:param pulumi.Input[str] comment: Specifies a comment for the row access policy.
|
|
133
|
-
:param pulumi.Input[str] database: The database in which to create the row access policy.
|
|
134
|
-
:param pulumi.Input[Sequence[pulumi.Input['RowAccessPolicyDescribeOutputArgs']]] describe_outputs: Outputs the result of `DESCRIBE ROW ACCESS POLICY` for the given row access policy.
|
|
127
|
+
:param pulumi.Input[str] database: The database in which to create the row access policy.
|
|
135
128
|
: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).
|
|
136
|
-
:param pulumi.Input[str] name: Specifies the identifier for the row access policy; must be unique for the database and schema in which the row access policy is created.
|
|
137
|
-
:param pulumi.Input[str]
|
|
138
|
-
:param pulumi.Input[
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
pulumi.set(__self__, "arguments", arguments)
|
|
142
|
-
if body is not None:
|
|
143
|
-
pulumi.set(__self__, "body", body)
|
|
129
|
+
:param pulumi.Input[str] name: Specifies the identifier for the row access policy; must be unique for the database and schema in which the row access policy is created.
|
|
130
|
+
:param pulumi.Input[str] row_access_expression: Specifies the SQL expression. The expression can be any boolean-valued SQL expression.
|
|
131
|
+
:param pulumi.Input[str] schema: The schema in which to create the row access policy.
|
|
132
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] signature: Specifies signature (arguments) for the row access policy (uppercase and sorted to avoid recreation of resource). A signature specifies a set of attributes that must be considered to determine whether the row is accessible. The attribute values come from the database object (e.g. table or view) to be protected by the row access policy.
|
|
133
|
+
"""
|
|
144
134
|
if comment is not None:
|
|
145
135
|
pulumi.set(__self__, "comment", comment)
|
|
146
136
|
if database is not None:
|
|
147
137
|
pulumi.set(__self__, "database", database)
|
|
148
|
-
if describe_outputs is not None:
|
|
149
|
-
pulumi.set(__self__, "describe_outputs", describe_outputs)
|
|
150
138
|
if fully_qualified_name is not None:
|
|
151
139
|
pulumi.set(__self__, "fully_qualified_name", fully_qualified_name)
|
|
152
140
|
if name is not None:
|
|
153
141
|
pulumi.set(__self__, "name", name)
|
|
142
|
+
if row_access_expression is not None:
|
|
143
|
+
pulumi.set(__self__, "row_access_expression", row_access_expression)
|
|
154
144
|
if schema is not None:
|
|
155
145
|
pulumi.set(__self__, "schema", schema)
|
|
156
|
-
if
|
|
157
|
-
pulumi.set(__self__, "
|
|
158
|
-
|
|
159
|
-
@property
|
|
160
|
-
@pulumi.getter
|
|
161
|
-
def arguments(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['RowAccessPolicyArgumentArgs']]]]:
|
|
162
|
-
"""
|
|
163
|
-
List of the arguments for the row access policy. A signature specifies a set of attributes that must be considered to determine whether the row is accessible. The attribute values come from the database object (e.g. table or view) to be protected by the row access policy. If any argument name or type is changed, the resource is recreated.
|
|
164
|
-
"""
|
|
165
|
-
return pulumi.get(self, "arguments")
|
|
166
|
-
|
|
167
|
-
@arguments.setter
|
|
168
|
-
def arguments(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['RowAccessPolicyArgumentArgs']]]]):
|
|
169
|
-
pulumi.set(self, "arguments", value)
|
|
170
|
-
|
|
171
|
-
@property
|
|
172
|
-
@pulumi.getter
|
|
173
|
-
def body(self) -> Optional[pulumi.Input[str]]:
|
|
174
|
-
"""
|
|
175
|
-
Specifies the SQL expression. The expression can be any boolean-valued SQL expression. 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.
|
|
176
|
-
"""
|
|
177
|
-
return pulumi.get(self, "body")
|
|
178
|
-
|
|
179
|
-
@body.setter
|
|
180
|
-
def body(self, value: Optional[pulumi.Input[str]]):
|
|
181
|
-
pulumi.set(self, "body", value)
|
|
146
|
+
if signature is not None:
|
|
147
|
+
pulumi.set(__self__, "signature", signature)
|
|
182
148
|
|
|
183
149
|
@property
|
|
184
150
|
@pulumi.getter
|
|
@@ -196,7 +162,7 @@ class _RowAccessPolicyState:
|
|
|
196
162
|
@pulumi.getter
|
|
197
163
|
def database(self) -> Optional[pulumi.Input[str]]:
|
|
198
164
|
"""
|
|
199
|
-
The database in which to create the row access policy.
|
|
165
|
+
The database in which to create the row access policy.
|
|
200
166
|
"""
|
|
201
167
|
return pulumi.get(self, "database")
|
|
202
168
|
|
|
@@ -204,18 +170,6 @@ class _RowAccessPolicyState:
|
|
|
204
170
|
def database(self, value: Optional[pulumi.Input[str]]):
|
|
205
171
|
pulumi.set(self, "database", value)
|
|
206
172
|
|
|
207
|
-
@property
|
|
208
|
-
@pulumi.getter(name="describeOutputs")
|
|
209
|
-
def describe_outputs(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['RowAccessPolicyDescribeOutputArgs']]]]:
|
|
210
|
-
"""
|
|
211
|
-
Outputs the result of `DESCRIBE ROW ACCESS POLICY` for the given row access policy.
|
|
212
|
-
"""
|
|
213
|
-
return pulumi.get(self, "describe_outputs")
|
|
214
|
-
|
|
215
|
-
@describe_outputs.setter
|
|
216
|
-
def describe_outputs(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['RowAccessPolicyDescribeOutputArgs']]]]):
|
|
217
|
-
pulumi.set(self, "describe_outputs", value)
|
|
218
|
-
|
|
219
173
|
@property
|
|
220
174
|
@pulumi.getter(name="fullyQualifiedName")
|
|
221
175
|
def fully_qualified_name(self) -> Optional[pulumi.Input[str]]:
|
|
@@ -232,7 +186,7 @@ class _RowAccessPolicyState:
|
|
|
232
186
|
@pulumi.getter
|
|
233
187
|
def name(self) -> Optional[pulumi.Input[str]]:
|
|
234
188
|
"""
|
|
235
|
-
Specifies the identifier for the row access policy; must be unique for the database and schema in which the row access policy is created.
|
|
189
|
+
Specifies the identifier for the row access policy; must be unique for the database and schema in which the row access policy is created.
|
|
236
190
|
"""
|
|
237
191
|
return pulumi.get(self, "name")
|
|
238
192
|
|
|
@@ -240,11 +194,23 @@ class _RowAccessPolicyState:
|
|
|
240
194
|
def name(self, value: Optional[pulumi.Input[str]]):
|
|
241
195
|
pulumi.set(self, "name", value)
|
|
242
196
|
|
|
197
|
+
@property
|
|
198
|
+
@pulumi.getter(name="rowAccessExpression")
|
|
199
|
+
def row_access_expression(self) -> Optional[pulumi.Input[str]]:
|
|
200
|
+
"""
|
|
201
|
+
Specifies the SQL expression. The expression can be any boolean-valued SQL expression.
|
|
202
|
+
"""
|
|
203
|
+
return pulumi.get(self, "row_access_expression")
|
|
204
|
+
|
|
205
|
+
@row_access_expression.setter
|
|
206
|
+
def row_access_expression(self, value: Optional[pulumi.Input[str]]):
|
|
207
|
+
pulumi.set(self, "row_access_expression", value)
|
|
208
|
+
|
|
243
209
|
@property
|
|
244
210
|
@pulumi.getter
|
|
245
211
|
def schema(self) -> Optional[pulumi.Input[str]]:
|
|
246
212
|
"""
|
|
247
|
-
The schema in which to create the row access policy.
|
|
213
|
+
The schema in which to create the row access policy.
|
|
248
214
|
"""
|
|
249
215
|
return pulumi.get(self, "schema")
|
|
250
216
|
|
|
@@ -253,16 +219,16 @@ class _RowAccessPolicyState:
|
|
|
253
219
|
pulumi.set(self, "schema", value)
|
|
254
220
|
|
|
255
221
|
@property
|
|
256
|
-
@pulumi.getter
|
|
257
|
-
def
|
|
222
|
+
@pulumi.getter
|
|
223
|
+
def signature(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
|
|
258
224
|
"""
|
|
259
|
-
|
|
225
|
+
Specifies signature (arguments) for the row access policy (uppercase and sorted to avoid recreation of resource). A signature specifies a set of attributes that must be considered to determine whether the row is accessible. The attribute values come from the database object (e.g. table or view) to be protected by the row access policy.
|
|
260
226
|
"""
|
|
261
|
-
return pulumi.get(self, "
|
|
227
|
+
return pulumi.get(self, "signature")
|
|
262
228
|
|
|
263
|
-
@
|
|
264
|
-
def
|
|
265
|
-
pulumi.set(self, "
|
|
229
|
+
@signature.setter
|
|
230
|
+
def signature(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
|
|
231
|
+
pulumi.set(self, "signature", value)
|
|
266
232
|
|
|
267
233
|
|
|
268
234
|
class RowAccessPolicy(pulumi.CustomResource):
|
|
@@ -270,28 +236,30 @@ class RowAccessPolicy(pulumi.CustomResource):
|
|
|
270
236
|
def __init__(__self__,
|
|
271
237
|
resource_name: str,
|
|
272
238
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
273
|
-
arguments: Optional[pulumi.Input[Sequence[pulumi.Input[Union['RowAccessPolicyArgumentArgs', 'RowAccessPolicyArgumentArgsDict']]]]] = None,
|
|
274
|
-
body: Optional[pulumi.Input[str]] = None,
|
|
275
239
|
comment: Optional[pulumi.Input[str]] = None,
|
|
276
240
|
database: Optional[pulumi.Input[str]] = None,
|
|
277
241
|
name: Optional[pulumi.Input[str]] = None,
|
|
242
|
+
row_access_expression: Optional[pulumi.Input[str]] = None,
|
|
278
243
|
schema: Optional[pulumi.Input[str]] = None,
|
|
244
|
+
signature: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
|
|
279
245
|
__props__=None):
|
|
280
246
|
"""
|
|
281
247
|
## Import
|
|
282
248
|
|
|
249
|
+
format is database name | schema name | policy name
|
|
250
|
+
|
|
283
251
|
```sh
|
|
284
|
-
$ pulumi import snowflake:index/rowAccessPolicy:RowAccessPolicy example '
|
|
252
|
+
$ pulumi import snowflake:index/rowAccessPolicy:RowAccessPolicy example 'dbName|schemaName|policyName'
|
|
285
253
|
```
|
|
286
254
|
|
|
287
255
|
:param str resource_name: The name of the resource.
|
|
288
256
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
289
|
-
:param pulumi.Input[Sequence[pulumi.Input[Union['RowAccessPolicyArgumentArgs', 'RowAccessPolicyArgumentArgsDict']]]] arguments: List of the arguments for the row access policy. A signature specifies a set of attributes that must be considered to determine whether the row is accessible. The attribute values come from the database object (e.g. table or view) to be protected by the row access policy. If any argument name or type is changed, the resource is recreated.
|
|
290
|
-
:param pulumi.Input[str] body: Specifies the SQL expression. The expression can be any boolean-valued SQL expression. 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.
|
|
291
257
|
:param pulumi.Input[str] comment: Specifies a comment for the row access policy.
|
|
292
|
-
:param pulumi.Input[str] database: The database in which to create the row access policy.
|
|
293
|
-
:param pulumi.Input[str] name: Specifies the identifier for the row access policy; must be unique for the database and schema in which the row access policy is created.
|
|
294
|
-
:param pulumi.Input[str]
|
|
258
|
+
:param pulumi.Input[str] database: The database in which to create the row access policy.
|
|
259
|
+
:param pulumi.Input[str] name: Specifies the identifier for the row access policy; must be unique for the database and schema in which the row access policy is created.
|
|
260
|
+
:param pulumi.Input[str] row_access_expression: Specifies the SQL expression. The expression can be any boolean-valued SQL expression.
|
|
261
|
+
:param pulumi.Input[str] schema: The schema in which to create the row access policy.
|
|
262
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] signature: Specifies signature (arguments) for the row access policy (uppercase and sorted to avoid recreation of resource). A signature specifies a set of attributes that must be considered to determine whether the row is accessible. The attribute values come from the database object (e.g. table or view) to be protected by the row access policy.
|
|
295
263
|
"""
|
|
296
264
|
...
|
|
297
265
|
@overload
|
|
@@ -302,8 +270,10 @@ class RowAccessPolicy(pulumi.CustomResource):
|
|
|
302
270
|
"""
|
|
303
271
|
## Import
|
|
304
272
|
|
|
273
|
+
format is database name | schema name | policy name
|
|
274
|
+
|
|
305
275
|
```sh
|
|
306
|
-
$ pulumi import snowflake:index/rowAccessPolicy:RowAccessPolicy example '
|
|
276
|
+
$ pulumi import snowflake:index/rowAccessPolicy:RowAccessPolicy example 'dbName|schemaName|policyName'
|
|
307
277
|
```
|
|
308
278
|
|
|
309
279
|
:param str resource_name: The name of the resource.
|
|
@@ -321,12 +291,12 @@ class RowAccessPolicy(pulumi.CustomResource):
|
|
|
321
291
|
def _internal_init(__self__,
|
|
322
292
|
resource_name: str,
|
|
323
293
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
324
|
-
arguments: Optional[pulumi.Input[Sequence[pulumi.Input[Union['RowAccessPolicyArgumentArgs', 'RowAccessPolicyArgumentArgsDict']]]]] = None,
|
|
325
|
-
body: Optional[pulumi.Input[str]] = None,
|
|
326
294
|
comment: Optional[pulumi.Input[str]] = None,
|
|
327
295
|
database: Optional[pulumi.Input[str]] = None,
|
|
328
296
|
name: Optional[pulumi.Input[str]] = None,
|
|
297
|
+
row_access_expression: Optional[pulumi.Input[str]] = None,
|
|
329
298
|
schema: Optional[pulumi.Input[str]] = None,
|
|
299
|
+
signature: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
|
|
330
300
|
__props__=None):
|
|
331
301
|
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
|
|
332
302
|
if not isinstance(opts, pulumi.ResourceOptions):
|
|
@@ -336,23 +306,21 @@ class RowAccessPolicy(pulumi.CustomResource):
|
|
|
336
306
|
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
|
|
337
307
|
__props__ = RowAccessPolicyArgs.__new__(RowAccessPolicyArgs)
|
|
338
308
|
|
|
339
|
-
if arguments is None and not opts.urn:
|
|
340
|
-
raise TypeError("Missing required property 'arguments'")
|
|
341
|
-
__props__.__dict__["arguments"] = arguments
|
|
342
|
-
if body is None and not opts.urn:
|
|
343
|
-
raise TypeError("Missing required property 'body'")
|
|
344
|
-
__props__.__dict__["body"] = body
|
|
345
309
|
__props__.__dict__["comment"] = comment
|
|
346
310
|
if database is None and not opts.urn:
|
|
347
311
|
raise TypeError("Missing required property 'database'")
|
|
348
312
|
__props__.__dict__["database"] = database
|
|
349
313
|
__props__.__dict__["name"] = name
|
|
314
|
+
if row_access_expression is None and not opts.urn:
|
|
315
|
+
raise TypeError("Missing required property 'row_access_expression'")
|
|
316
|
+
__props__.__dict__["row_access_expression"] = row_access_expression
|
|
350
317
|
if schema is None and not opts.urn:
|
|
351
318
|
raise TypeError("Missing required property 'schema'")
|
|
352
319
|
__props__.__dict__["schema"] = schema
|
|
353
|
-
|
|
320
|
+
if signature is None and not opts.urn:
|
|
321
|
+
raise TypeError("Missing required property 'signature'")
|
|
322
|
+
__props__.__dict__["signature"] = signature
|
|
354
323
|
__props__.__dict__["fully_qualified_name"] = None
|
|
355
|
-
__props__.__dict__["show_outputs"] = None
|
|
356
324
|
super(RowAccessPolicy, __self__).__init__(
|
|
357
325
|
'snowflake:index/rowAccessPolicy:RowAccessPolicy',
|
|
358
326
|
resource_name,
|
|
@@ -363,15 +331,13 @@ class RowAccessPolicy(pulumi.CustomResource):
|
|
|
363
331
|
def get(resource_name: str,
|
|
364
332
|
id: pulumi.Input[str],
|
|
365
333
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
366
|
-
arguments: Optional[pulumi.Input[Sequence[pulumi.Input[Union['RowAccessPolicyArgumentArgs', 'RowAccessPolicyArgumentArgsDict']]]]] = None,
|
|
367
|
-
body: Optional[pulumi.Input[str]] = None,
|
|
368
334
|
comment: Optional[pulumi.Input[str]] = None,
|
|
369
335
|
database: Optional[pulumi.Input[str]] = None,
|
|
370
|
-
describe_outputs: Optional[pulumi.Input[Sequence[pulumi.Input[Union['RowAccessPolicyDescribeOutputArgs', 'RowAccessPolicyDescribeOutputArgsDict']]]]] = None,
|
|
371
336
|
fully_qualified_name: Optional[pulumi.Input[str]] = None,
|
|
372
337
|
name: Optional[pulumi.Input[str]] = None,
|
|
338
|
+
row_access_expression: Optional[pulumi.Input[str]] = None,
|
|
373
339
|
schema: Optional[pulumi.Input[str]] = None,
|
|
374
|
-
|
|
340
|
+
signature: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None) -> 'RowAccessPolicy':
|
|
375
341
|
"""
|
|
376
342
|
Get an existing RowAccessPolicy resource's state with the given name, id, and optional extra
|
|
377
343
|
properties used to qualify the lookup.
|
|
@@ -379,47 +345,27 @@ class RowAccessPolicy(pulumi.CustomResource):
|
|
|
379
345
|
:param str resource_name: The unique name of the resulting resource.
|
|
380
346
|
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
|
381
347
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
382
|
-
:param pulumi.Input[Sequence[pulumi.Input[Union['RowAccessPolicyArgumentArgs', 'RowAccessPolicyArgumentArgsDict']]]] arguments: List of the arguments for the row access policy. A signature specifies a set of attributes that must be considered to determine whether the row is accessible. The attribute values come from the database object (e.g. table or view) to be protected by the row access policy. If any argument name or type is changed, the resource is recreated.
|
|
383
|
-
:param pulumi.Input[str] body: Specifies the SQL expression. The expression can be any boolean-valued SQL expression. 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.
|
|
384
348
|
:param pulumi.Input[str] comment: Specifies a comment for the row access policy.
|
|
385
|
-
:param pulumi.Input[str] database: The database in which to create the row access policy.
|
|
386
|
-
:param pulumi.Input[Sequence[pulumi.Input[Union['RowAccessPolicyDescribeOutputArgs', 'RowAccessPolicyDescribeOutputArgsDict']]]] describe_outputs: Outputs the result of `DESCRIBE ROW ACCESS POLICY` for the given row access policy.
|
|
349
|
+
:param pulumi.Input[str] database: The database in which to create the row access policy.
|
|
387
350
|
: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).
|
|
388
|
-
:param pulumi.Input[str] name: Specifies the identifier for the row access policy; must be unique for the database and schema in which the row access policy is created.
|
|
389
|
-
:param pulumi.Input[str]
|
|
390
|
-
:param pulumi.Input[
|
|
351
|
+
:param pulumi.Input[str] name: Specifies the identifier for the row access policy; must be unique for the database and schema in which the row access policy is created.
|
|
352
|
+
:param pulumi.Input[str] row_access_expression: Specifies the SQL expression. The expression can be any boolean-valued SQL expression.
|
|
353
|
+
:param pulumi.Input[str] schema: The schema in which to create the row access policy.
|
|
354
|
+
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] signature: Specifies signature (arguments) for the row access policy (uppercase and sorted to avoid recreation of resource). A signature specifies a set of attributes that must be considered to determine whether the row is accessible. The attribute values come from the database object (e.g. table or view) to be protected by the row access policy.
|
|
391
355
|
"""
|
|
392
356
|
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
|
393
357
|
|
|
394
358
|
__props__ = _RowAccessPolicyState.__new__(_RowAccessPolicyState)
|
|
395
359
|
|
|
396
|
-
__props__.__dict__["arguments"] = arguments
|
|
397
|
-
__props__.__dict__["body"] = body
|
|
398
360
|
__props__.__dict__["comment"] = comment
|
|
399
361
|
__props__.__dict__["database"] = database
|
|
400
|
-
__props__.__dict__["describe_outputs"] = describe_outputs
|
|
401
362
|
__props__.__dict__["fully_qualified_name"] = fully_qualified_name
|
|
402
363
|
__props__.__dict__["name"] = name
|
|
364
|
+
__props__.__dict__["row_access_expression"] = row_access_expression
|
|
403
365
|
__props__.__dict__["schema"] = schema
|
|
404
|
-
__props__.__dict__["
|
|
366
|
+
__props__.__dict__["signature"] = signature
|
|
405
367
|
return RowAccessPolicy(resource_name, opts=opts, __props__=__props__)
|
|
406
368
|
|
|
407
|
-
@property
|
|
408
|
-
@pulumi.getter
|
|
409
|
-
def arguments(self) -> pulumi.Output[Sequence['outputs.RowAccessPolicyArgument']]:
|
|
410
|
-
"""
|
|
411
|
-
List of the arguments for the row access policy. A signature specifies a set of attributes that must be considered to determine whether the row is accessible. The attribute values come from the database object (e.g. table or view) to be protected by the row access policy. If any argument name or type is changed, the resource is recreated.
|
|
412
|
-
"""
|
|
413
|
-
return pulumi.get(self, "arguments")
|
|
414
|
-
|
|
415
|
-
@property
|
|
416
|
-
@pulumi.getter
|
|
417
|
-
def body(self) -> pulumi.Output[str]:
|
|
418
|
-
"""
|
|
419
|
-
Specifies the SQL expression. The expression can be any boolean-valued SQL expression. 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.
|
|
420
|
-
"""
|
|
421
|
-
return pulumi.get(self, "body")
|
|
422
|
-
|
|
423
369
|
@property
|
|
424
370
|
@pulumi.getter
|
|
425
371
|
def comment(self) -> pulumi.Output[Optional[str]]:
|
|
@@ -432,18 +378,10 @@ class RowAccessPolicy(pulumi.CustomResource):
|
|
|
432
378
|
@pulumi.getter
|
|
433
379
|
def database(self) -> pulumi.Output[str]:
|
|
434
380
|
"""
|
|
435
|
-
The database in which to create the row access policy.
|
|
381
|
+
The database in which to create the row access policy.
|
|
436
382
|
"""
|
|
437
383
|
return pulumi.get(self, "database")
|
|
438
384
|
|
|
439
|
-
@property
|
|
440
|
-
@pulumi.getter(name="describeOutputs")
|
|
441
|
-
def describe_outputs(self) -> pulumi.Output[Sequence['outputs.RowAccessPolicyDescribeOutput']]:
|
|
442
|
-
"""
|
|
443
|
-
Outputs the result of `DESCRIBE ROW ACCESS POLICY` for the given row access policy.
|
|
444
|
-
"""
|
|
445
|
-
return pulumi.get(self, "describe_outputs")
|
|
446
|
-
|
|
447
385
|
@property
|
|
448
386
|
@pulumi.getter(name="fullyQualifiedName")
|
|
449
387
|
def fully_qualified_name(self) -> pulumi.Output[str]:
|
|
@@ -456,23 +394,31 @@ class RowAccessPolicy(pulumi.CustomResource):
|
|
|
456
394
|
@pulumi.getter
|
|
457
395
|
def name(self) -> pulumi.Output[str]:
|
|
458
396
|
"""
|
|
459
|
-
Specifies the identifier for the row access policy; must be unique for the database and schema in which the row access policy is created.
|
|
397
|
+
Specifies the identifier for the row access policy; must be unique for the database and schema in which the row access policy is created.
|
|
460
398
|
"""
|
|
461
399
|
return pulumi.get(self, "name")
|
|
462
400
|
|
|
401
|
+
@property
|
|
402
|
+
@pulumi.getter(name="rowAccessExpression")
|
|
403
|
+
def row_access_expression(self) -> pulumi.Output[str]:
|
|
404
|
+
"""
|
|
405
|
+
Specifies the SQL expression. The expression can be any boolean-valued SQL expression.
|
|
406
|
+
"""
|
|
407
|
+
return pulumi.get(self, "row_access_expression")
|
|
408
|
+
|
|
463
409
|
@property
|
|
464
410
|
@pulumi.getter
|
|
465
411
|
def schema(self) -> pulumi.Output[str]:
|
|
466
412
|
"""
|
|
467
|
-
The schema in which to create the row access policy.
|
|
413
|
+
The schema in which to create the row access policy.
|
|
468
414
|
"""
|
|
469
415
|
return pulumi.get(self, "schema")
|
|
470
416
|
|
|
471
417
|
@property
|
|
472
|
-
@pulumi.getter
|
|
473
|
-
def
|
|
418
|
+
@pulumi.getter
|
|
419
|
+
def signature(self) -> pulumi.Output[Mapping[str, str]]:
|
|
474
420
|
"""
|
|
475
|
-
|
|
421
|
+
Specifies signature (arguments) for the row access policy (uppercase and sorted to avoid recreation of resource). A signature specifies a set of attributes that must be considered to determine whether the row is accessible. The attribute values come from the database object (e.g. table or view) to be protected by the row access policy.
|
|
476
422
|
"""
|
|
477
|
-
return pulumi.get(self, "
|
|
423
|
+
return pulumi.get(self, "signature")
|
|
478
424
|
|
pulumi_snowflake/view.py
CHANGED
|
@@ -38,7 +38,7 @@ class ViewArgs:
|
|
|
38
38
|
:param pulumi.Input[str] statement: Specifies the query used to create the view.
|
|
39
39
|
:param pulumi.Input['ViewAggregationPolicyArgs'] aggregation_policy: Specifies the aggregation policy to set on a view.
|
|
40
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.
|
|
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
42
|
:param pulumi.Input[str] comment: Specifies a comment for the view.
|
|
43
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
44
|
:param pulumi.Input[Sequence[pulumi.Input['ViewDataMetricFunctionArgs']]] data_metric_functions: Data metric functions used for the view.
|
|
@@ -139,7 +139,7 @@ class ViewArgs:
|
|
|
139
139
|
@pulumi.getter
|
|
140
140
|
def columns(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ViewColumnArgs']]]]:
|
|
141
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.
|
|
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
143
|
"""
|
|
144
144
|
return pulumi.get(self, "columns")
|
|
145
145
|
|
|
@@ -275,7 +275,7 @@ class _ViewState:
|
|
|
275
275
|
Input properties used for looking up and filtering View resources.
|
|
276
276
|
:param pulumi.Input['ViewAggregationPolicyArgs'] aggregation_policy: Specifies the aggregation policy to set on a view.
|
|
277
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.
|
|
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
279
|
:param pulumi.Input[str] comment: Specifies a comment for the view.
|
|
280
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
281
|
:param pulumi.Input[Sequence[pulumi.Input['ViewDataMetricFunctionArgs']]] data_metric_functions: Data metric functions used for the view.
|
|
@@ -355,7 +355,7 @@ class _ViewState:
|
|
|
355
355
|
@pulumi.getter
|
|
356
356
|
def columns(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ViewColumnArgs']]]]:
|
|
357
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.
|
|
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
359
|
"""
|
|
360
360
|
return pulumi.get(self, "columns")
|
|
361
361
|
|
|
@@ -570,7 +570,7 @@ class View(pulumi.CustomResource):
|
|
|
570
570
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
571
571
|
:param pulumi.Input[Union['ViewAggregationPolicyArgs', 'ViewAggregationPolicyArgsDict']] aggregation_policy: Specifies the aggregation policy to set on a view.
|
|
572
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.
|
|
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
574
|
:param pulumi.Input[str] comment: Specifies a comment for the view.
|
|
575
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
576
|
:param pulumi.Input[Sequence[pulumi.Input[Union['ViewDataMetricFunctionArgs', 'ViewDataMetricFunctionArgsDict']]]] data_metric_functions: Data metric functions used for the view.
|
|
@@ -695,7 +695,7 @@ class View(pulumi.CustomResource):
|
|
|
695
695
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
696
696
|
:param pulumi.Input[Union['ViewAggregationPolicyArgs', 'ViewAggregationPolicyArgsDict']] aggregation_policy: Specifies the aggregation policy to set on a view.
|
|
697
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.
|
|
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
699
|
:param pulumi.Input[str] comment: Specifies a comment for the view.
|
|
700
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
701
|
:param pulumi.Input[Sequence[pulumi.Input[Union['ViewDataMetricFunctionArgs', 'ViewDataMetricFunctionArgsDict']]]] data_metric_functions: Data metric functions used for the view.
|
|
@@ -754,7 +754,7 @@ class View(pulumi.CustomResource):
|
|
|
754
754
|
@pulumi.getter
|
|
755
755
|
def columns(self) -> pulumi.Output[Optional[Sequence['outputs.ViewColumn']]]:
|
|
756
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.
|
|
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
758
|
"""
|
|
759
759
|
return pulumi.get(self, "columns")
|
|
760
760
|
|