pulumi-snowflake 0.58.0a1726035035__py3-none-any.whl → 0.59.0__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.
- pulumi_snowflake/_inputs.py +8587 -2022
- pulumi_snowflake/account.py +28 -50
- pulumi_snowflake/account_parameter.py +0 -28
- pulumi_snowflake/account_password_policy_attachment.py +2 -30
- pulumi_snowflake/account_role.py +41 -36
- pulumi_snowflake/alert.py +28 -40
- pulumi_snowflake/api_authentication_integration_with_authorization_code_grant.py +35 -15
- pulumi_snowflake/api_authentication_integration_with_client_credentials.py +35 -15
- pulumi_snowflake/api_authentication_integration_with_jwt_bearer.py +35 -15
- pulumi_snowflake/api_integration.py +28 -54
- pulumi_snowflake/cortex_search_service.py +28 -76
- pulumi_snowflake/database.py +82 -15
- pulumi_snowflake/database_old.py +0 -72
- pulumi_snowflake/database_role.py +76 -42
- pulumi_snowflake/dynamic_table.py +28 -38
- pulumi_snowflake/email_notification_integration.py +28 -26
- pulumi_snowflake/external_function.py +28 -52
- pulumi_snowflake/external_oauth_integration.py +35 -15
- pulumi_snowflake/external_table.py +28 -48
- pulumi_snowflake/failover_group.py +28 -72
- pulumi_snowflake/file_format.py +28 -26
- pulumi_snowflake/function.py +28 -4
- pulumi_snowflake/get_database_roles.py +63 -36
- pulumi_snowflake/get_masking_policies.py +73 -48
- pulumi_snowflake/get_resource_monitors.py +28 -16
- pulumi_snowflake/get_row_access_policies.py +73 -48
- pulumi_snowflake/get_users.py +96 -33
- pulumi_snowflake/get_views.py +94 -51
- pulumi_snowflake/grant_account_role.py +0 -4
- pulumi_snowflake/grant_application_role.py +0 -4
- pulumi_snowflake/grant_database_role.py +0 -4
- pulumi_snowflake/grant_privileges_to_account_role.py +4 -4
- pulumi_snowflake/grant_privileges_to_database_role.py +6 -2
- pulumi_snowflake/grant_privileges_to_share.py +49 -2
- pulumi_snowflake/managed_account.py +28 -4
- pulumi_snowflake/masking_policy.py +208 -306
- pulumi_snowflake/materialized_view.py +28 -34
- pulumi_snowflake/network_policy.py +35 -15
- pulumi_snowflake/network_policy_attachment.py +0 -30
- pulumi_snowflake/network_rule.py +28 -66
- pulumi_snowflake/notification_integration.py +28 -34
- pulumi_snowflake/oauth_integration.py +0 -34
- pulumi_snowflake/oauth_integration_for_custom_clients.py +35 -101
- pulumi_snowflake/oauth_integration_for_partner_applications.py +35 -15
- pulumi_snowflake/object_parameter.py +0 -98
- pulumi_snowflake/outputs.py +13035 -4202
- pulumi_snowflake/password_policy.py +28 -28
- pulumi_snowflake/pipe.py +28 -4
- pulumi_snowflake/procedure.py +28 -4
- pulumi_snowflake/pulumi-plugin.json +1 -1
- pulumi_snowflake/resource_monitor.py +111 -307
- pulumi_snowflake/role.py +41 -36
- pulumi_snowflake/row_access_policy.py +195 -147
- pulumi_snowflake/saml2_integration.py +35 -15
- pulumi_snowflake/saml_integration.py +0 -34
- pulumi_snowflake/schema.py +39 -19
- pulumi_snowflake/scim_integration.py +35 -15
- pulumi_snowflake/secondary_database.py +35 -19
- pulumi_snowflake/sequence.py +4 -36
- pulumi_snowflake/session_parameter.py +0 -32
- pulumi_snowflake/share.py +28 -28
- pulumi_snowflake/shared_database.py +35 -15
- pulumi_snowflake/stage.py +28 -28
- pulumi_snowflake/storage_integration.py +28 -4
- pulumi_snowflake/stream.py +28 -4
- pulumi_snowflake/streamlit.py +36 -16
- pulumi_snowflake/table.py +28 -32
- pulumi_snowflake/table_column_masking_policy_application.py +2 -14
- pulumi_snowflake/table_constraint.py +0 -152
- pulumi_snowflake/tag.py +28 -40
- pulumi_snowflake/tag_association.py +0 -120
- pulumi_snowflake/tag_masking_policy_association.py +0 -4
- pulumi_snowflake/task.py +28 -92
- pulumi_snowflake/unsafe_execute.py +2 -20
- pulumi_snowflake/user.py +3341 -368
- pulumi_snowflake/user_password_policy_attachment.py +0 -46
- pulumi_snowflake/view.py +465 -185
- pulumi_snowflake/warehouse.py +39 -43
- {pulumi_snowflake-0.58.0a1726035035.dist-info → pulumi_snowflake-0.59.0.dist-info}/METADATA +1 -1
- pulumi_snowflake-0.59.0.dist-info/RECORD +129 -0
- {pulumi_snowflake-0.58.0a1726035035.dist-info → pulumi_snowflake-0.59.0.dist-info}/WHEEL +1 -1
- pulumi_snowflake-0.58.0a1726035035.dist-info/RECORD +0 -129
- {pulumi_snowflake-0.58.0a1726035035.dist-info → pulumi_snowflake-0.59.0.dist-info}/top_level.txt +0 -0
pulumi_snowflake/table.py
CHANGED
|
@@ -195,10 +195,10 @@ class _TableState:
|
|
|
195
195
|
comment: Optional[pulumi.Input[str]] = None,
|
|
196
196
|
data_retention_time_in_days: Optional[pulumi.Input[int]] = None,
|
|
197
197
|
database: Optional[pulumi.Input[str]] = None,
|
|
198
|
+
fully_qualified_name: Optional[pulumi.Input[str]] = None,
|
|
198
199
|
name: Optional[pulumi.Input[str]] = None,
|
|
199
200
|
owner: Optional[pulumi.Input[str]] = None,
|
|
200
201
|
primary_key: Optional[pulumi.Input['TablePrimaryKeyArgs']] = None,
|
|
201
|
-
qualified_name: Optional[pulumi.Input[str]] = None,
|
|
202
202
|
schema: Optional[pulumi.Input[str]] = None,
|
|
203
203
|
tags: Optional[pulumi.Input[Sequence[pulumi.Input['TableTagArgs']]]] = None):
|
|
204
204
|
"""
|
|
@@ -209,10 +209,10 @@ class _TableState:
|
|
|
209
209
|
:param pulumi.Input[str] comment: Specifies a comment for the table.
|
|
210
210
|
:param pulumi.Input[int] data_retention_time_in_days: Specifies the retention period for the table so that Time Travel actions (SELECT, CLONE, UNDROP) can be performed on historical data in the table. If you wish to inherit the parent schema setting then pass in the schema attribute to this argument or do not fill this parameter at all; the default value for this field is -1, which is a fallback to use Snowflake default - in this case the schema value
|
|
211
211
|
:param pulumi.Input[str] database: The database in which to create the table.
|
|
212
|
+
: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).
|
|
212
213
|
:param pulumi.Input[str] name: Specifies the identifier for the table; must be unique for the database and schema in which the table is created.
|
|
213
214
|
:param pulumi.Input[str] owner: Name of the role that owns the table.
|
|
214
215
|
:param pulumi.Input['TablePrimaryKeyArgs'] primary_key: Definitions of primary key constraint to create on table
|
|
215
|
-
:param pulumi.Input[str] qualified_name: Qualified name of the table.
|
|
216
216
|
:param pulumi.Input[str] schema: The schema in which to create the table.
|
|
217
217
|
:param pulumi.Input[Sequence[pulumi.Input['TableTagArgs']]] tags: Definitions of a tag to associate with the resource.
|
|
218
218
|
"""
|
|
@@ -228,6 +228,8 @@ class _TableState:
|
|
|
228
228
|
pulumi.set(__self__, "data_retention_time_in_days", data_retention_time_in_days)
|
|
229
229
|
if database is not None:
|
|
230
230
|
pulumi.set(__self__, "database", database)
|
|
231
|
+
if fully_qualified_name is not None:
|
|
232
|
+
pulumi.set(__self__, "fully_qualified_name", fully_qualified_name)
|
|
231
233
|
if name is not None:
|
|
232
234
|
pulumi.set(__self__, "name", name)
|
|
233
235
|
if owner is not None:
|
|
@@ -237,8 +239,6 @@ class _TableState:
|
|
|
237
239
|
pulumi.log.warn("""primary_key is deprecated: Use TableConstraint instead""")
|
|
238
240
|
if primary_key is not None:
|
|
239
241
|
pulumi.set(__self__, "primary_key", primary_key)
|
|
240
|
-
if qualified_name is not None:
|
|
241
|
-
pulumi.set(__self__, "qualified_name", qualified_name)
|
|
242
242
|
if schema is not None:
|
|
243
243
|
pulumi.set(__self__, "schema", schema)
|
|
244
244
|
if tags is not None:
|
|
@@ -319,6 +319,18 @@ class _TableState:
|
|
|
319
319
|
def database(self, value: Optional[pulumi.Input[str]]):
|
|
320
320
|
pulumi.set(self, "database", value)
|
|
321
321
|
|
|
322
|
+
@property
|
|
323
|
+
@pulumi.getter(name="fullyQualifiedName")
|
|
324
|
+
def fully_qualified_name(self) -> Optional[pulumi.Input[str]]:
|
|
325
|
+
"""
|
|
326
|
+
Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
|
|
327
|
+
"""
|
|
328
|
+
return pulumi.get(self, "fully_qualified_name")
|
|
329
|
+
|
|
330
|
+
@fully_qualified_name.setter
|
|
331
|
+
def fully_qualified_name(self, value: Optional[pulumi.Input[str]]):
|
|
332
|
+
pulumi.set(self, "fully_qualified_name", value)
|
|
333
|
+
|
|
322
334
|
@property
|
|
323
335
|
@pulumi.getter
|
|
324
336
|
def name(self) -> Optional[pulumi.Input[str]]:
|
|
@@ -356,18 +368,6 @@ class _TableState:
|
|
|
356
368
|
def primary_key(self, value: Optional[pulumi.Input['TablePrimaryKeyArgs']]):
|
|
357
369
|
pulumi.set(self, "primary_key", value)
|
|
358
370
|
|
|
359
|
-
@property
|
|
360
|
-
@pulumi.getter(name="qualifiedName")
|
|
361
|
-
def qualified_name(self) -> Optional[pulumi.Input[str]]:
|
|
362
|
-
"""
|
|
363
|
-
Qualified name of the table.
|
|
364
|
-
"""
|
|
365
|
-
return pulumi.get(self, "qualified_name")
|
|
366
|
-
|
|
367
|
-
@qualified_name.setter
|
|
368
|
-
def qualified_name(self, value: Optional[pulumi.Input[str]]):
|
|
369
|
-
pulumi.set(self, "qualified_name", value)
|
|
370
|
-
|
|
371
371
|
@property
|
|
372
372
|
@pulumi.getter
|
|
373
373
|
def schema(self) -> Optional[pulumi.Input[str]]:
|
|
@@ -411,8 +411,6 @@ class Table(pulumi.CustomResource):
|
|
|
411
411
|
tags: Optional[pulumi.Input[Sequence[pulumi.Input[Union['TableTagArgs', 'TableTagArgsDict']]]]] = None,
|
|
412
412
|
__props__=None):
|
|
413
413
|
"""
|
|
414
|
-
## Example Usage
|
|
415
|
-
|
|
416
414
|
## Import
|
|
417
415
|
|
|
418
416
|
format is database name | schema name | table name
|
|
@@ -441,8 +439,6 @@ class Table(pulumi.CustomResource):
|
|
|
441
439
|
args: TableArgs,
|
|
442
440
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
443
441
|
"""
|
|
444
|
-
## Example Usage
|
|
445
|
-
|
|
446
442
|
## Import
|
|
447
443
|
|
|
448
444
|
format is database name | schema name | table name
|
|
@@ -501,8 +497,8 @@ class Table(pulumi.CustomResource):
|
|
|
501
497
|
raise TypeError("Missing required property 'schema'")
|
|
502
498
|
__props__.__dict__["schema"] = schema
|
|
503
499
|
__props__.__dict__["tags"] = tags
|
|
500
|
+
__props__.__dict__["fully_qualified_name"] = None
|
|
504
501
|
__props__.__dict__["owner"] = None
|
|
505
|
-
__props__.__dict__["qualified_name"] = None
|
|
506
502
|
super(Table, __self__).__init__(
|
|
507
503
|
'snowflake:index/table:Table',
|
|
508
504
|
resource_name,
|
|
@@ -519,10 +515,10 @@ class Table(pulumi.CustomResource):
|
|
|
519
515
|
comment: Optional[pulumi.Input[str]] = None,
|
|
520
516
|
data_retention_time_in_days: Optional[pulumi.Input[int]] = None,
|
|
521
517
|
database: Optional[pulumi.Input[str]] = None,
|
|
518
|
+
fully_qualified_name: Optional[pulumi.Input[str]] = None,
|
|
522
519
|
name: Optional[pulumi.Input[str]] = None,
|
|
523
520
|
owner: Optional[pulumi.Input[str]] = None,
|
|
524
521
|
primary_key: Optional[pulumi.Input[Union['TablePrimaryKeyArgs', 'TablePrimaryKeyArgsDict']]] = None,
|
|
525
|
-
qualified_name: Optional[pulumi.Input[str]] = None,
|
|
526
522
|
schema: Optional[pulumi.Input[str]] = None,
|
|
527
523
|
tags: Optional[pulumi.Input[Sequence[pulumi.Input[Union['TableTagArgs', 'TableTagArgsDict']]]]] = None) -> 'Table':
|
|
528
524
|
"""
|
|
@@ -538,10 +534,10 @@ class Table(pulumi.CustomResource):
|
|
|
538
534
|
:param pulumi.Input[str] comment: Specifies a comment for the table.
|
|
539
535
|
:param pulumi.Input[int] data_retention_time_in_days: Specifies the retention period for the table so that Time Travel actions (SELECT, CLONE, UNDROP) can be performed on historical data in the table. If you wish to inherit the parent schema setting then pass in the schema attribute to this argument or do not fill this parameter at all; the default value for this field is -1, which is a fallback to use Snowflake default - in this case the schema value
|
|
540
536
|
:param pulumi.Input[str] database: The database in which to create the table.
|
|
537
|
+
: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).
|
|
541
538
|
:param pulumi.Input[str] name: Specifies the identifier for the table; must be unique for the database and schema in which the table is created.
|
|
542
539
|
:param pulumi.Input[str] owner: Name of the role that owns the table.
|
|
543
540
|
:param pulumi.Input[Union['TablePrimaryKeyArgs', 'TablePrimaryKeyArgsDict']] primary_key: Definitions of primary key constraint to create on table
|
|
544
|
-
:param pulumi.Input[str] qualified_name: Qualified name of the table.
|
|
545
541
|
:param pulumi.Input[str] schema: The schema in which to create the table.
|
|
546
542
|
:param pulumi.Input[Sequence[pulumi.Input[Union['TableTagArgs', 'TableTagArgsDict']]]] tags: Definitions of a tag to associate with the resource.
|
|
547
543
|
"""
|
|
@@ -555,10 +551,10 @@ class Table(pulumi.CustomResource):
|
|
|
555
551
|
__props__.__dict__["comment"] = comment
|
|
556
552
|
__props__.__dict__["data_retention_time_in_days"] = data_retention_time_in_days
|
|
557
553
|
__props__.__dict__["database"] = database
|
|
554
|
+
__props__.__dict__["fully_qualified_name"] = fully_qualified_name
|
|
558
555
|
__props__.__dict__["name"] = name
|
|
559
556
|
__props__.__dict__["owner"] = owner
|
|
560
557
|
__props__.__dict__["primary_key"] = primary_key
|
|
561
|
-
__props__.__dict__["qualified_name"] = qualified_name
|
|
562
558
|
__props__.__dict__["schema"] = schema
|
|
563
559
|
__props__.__dict__["tags"] = tags
|
|
564
560
|
return Table(resource_name, opts=opts, __props__=__props__)
|
|
@@ -611,6 +607,14 @@ class Table(pulumi.CustomResource):
|
|
|
611
607
|
"""
|
|
612
608
|
return pulumi.get(self, "database")
|
|
613
609
|
|
|
610
|
+
@property
|
|
611
|
+
@pulumi.getter(name="fullyQualifiedName")
|
|
612
|
+
def fully_qualified_name(self) -> pulumi.Output[str]:
|
|
613
|
+
"""
|
|
614
|
+
Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
|
|
615
|
+
"""
|
|
616
|
+
return pulumi.get(self, "fully_qualified_name")
|
|
617
|
+
|
|
614
618
|
@property
|
|
615
619
|
@pulumi.getter
|
|
616
620
|
def name(self) -> pulumi.Output[str]:
|
|
@@ -636,14 +640,6 @@ class Table(pulumi.CustomResource):
|
|
|
636
640
|
"""
|
|
637
641
|
return pulumi.get(self, "primary_key")
|
|
638
642
|
|
|
639
|
-
@property
|
|
640
|
-
@pulumi.getter(name="qualifiedName")
|
|
641
|
-
def qualified_name(self) -> pulumi.Output[str]:
|
|
642
|
-
"""
|
|
643
|
-
Qualified name of the table.
|
|
644
|
-
"""
|
|
645
|
-
return pulumi.get(self, "qualified_name")
|
|
646
|
-
|
|
647
643
|
@property
|
|
648
644
|
@pulumi.getter
|
|
649
645
|
def schema(self) -> pulumi.Output[str]:
|
|
@@ -130,13 +130,7 @@ class TableColumnMaskingPolicyApplication(pulumi.CustomResource):
|
|
|
130
130
|
table: Optional[pulumi.Input[str]] = None,
|
|
131
131
|
__props__=None):
|
|
132
132
|
"""
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
Only one masking policy may be applied per table column, hence only one `TableColumnMaskingPolicyApplication` resources may be present per table column.
|
|
136
|
-
Using two or more `TableColumnMaskingPolicyApplication` resources for the same table column will result in the last one overriding any previously applied masking policies and unresolvable diffs in pulumi preview.
|
|
137
|
-
|
|
138
|
-
When using this resource to manage a table column's masking policy make sure to ignore changes to the column's masking policy in the table definition, otherwise the two resources would conflict. See example below.
|
|
139
|
-
|
|
133
|
+
Create a TableColumnMaskingPolicyApplication resource with the given unique name, props, and options.
|
|
140
134
|
:param str resource_name: The name of the resource.
|
|
141
135
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
142
136
|
:param pulumi.Input[str] column: The column to apply the masking policy to.
|
|
@@ -150,13 +144,7 @@ class TableColumnMaskingPolicyApplication(pulumi.CustomResource):
|
|
|
150
144
|
args: TableColumnMaskingPolicyApplicationArgs,
|
|
151
145
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
152
146
|
"""
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
Only one masking policy may be applied per table column, hence only one `TableColumnMaskingPolicyApplication` resources may be present per table column.
|
|
156
|
-
Using two or more `TableColumnMaskingPolicyApplication` resources for the same table column will result in the last one overriding any previously applied masking policies and unresolvable diffs in pulumi preview.
|
|
157
|
-
|
|
158
|
-
When using this resource to manage a table column's masking policy make sure to ignore changes to the column's masking policy in the table definition, otherwise the two resources would conflict. See example below.
|
|
159
|
-
|
|
147
|
+
Create a TableColumnMaskingPolicyApplication resource with the given unique name, props, and options.
|
|
160
148
|
:param str resource_name: The name of the resource.
|
|
161
149
|
:param TableColumnMaskingPolicyApplicationArgs args: The arguments to use to populate this resource's properties.
|
|
162
150
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
@@ -437,82 +437,6 @@ class TableConstraint(pulumi.CustomResource):
|
|
|
437
437
|
validate: Optional[pulumi.Input[bool]] = None,
|
|
438
438
|
__props__=None):
|
|
439
439
|
"""
|
|
440
|
-
## Example Usage
|
|
441
|
-
|
|
442
|
-
```python
|
|
443
|
-
import pulumi
|
|
444
|
-
import pulumi_snowflake as snowflake
|
|
445
|
-
|
|
446
|
-
d = snowflake.Database("d", name="some_db")
|
|
447
|
-
s = snowflake.Schema("s",
|
|
448
|
-
name="some_schema",
|
|
449
|
-
database=d.name)
|
|
450
|
-
t = snowflake.Table("t",
|
|
451
|
-
database=d.name,
|
|
452
|
-
schema=s.name,
|
|
453
|
-
name="some_table",
|
|
454
|
-
columns=[
|
|
455
|
-
{
|
|
456
|
-
"name": "col1",
|
|
457
|
-
"type": "text",
|
|
458
|
-
"nullable": False,
|
|
459
|
-
},
|
|
460
|
-
{
|
|
461
|
-
"name": "col2",
|
|
462
|
-
"type": "text",
|
|
463
|
-
"nullable": False,
|
|
464
|
-
},
|
|
465
|
-
{
|
|
466
|
-
"name": "col3",
|
|
467
|
-
"type": "text",
|
|
468
|
-
"nullable": False,
|
|
469
|
-
},
|
|
470
|
-
])
|
|
471
|
-
fk_t = snowflake.Table("fk_t",
|
|
472
|
-
database=d.name,
|
|
473
|
-
schema=s.name,
|
|
474
|
-
name="fk_table",
|
|
475
|
-
columns=[
|
|
476
|
-
{
|
|
477
|
-
"name": "fk_col1",
|
|
478
|
-
"type": "text",
|
|
479
|
-
"nullable": False,
|
|
480
|
-
},
|
|
481
|
-
{
|
|
482
|
-
"name": "fk_col2",
|
|
483
|
-
"type": "text",
|
|
484
|
-
"nullable": False,
|
|
485
|
-
},
|
|
486
|
-
])
|
|
487
|
-
primary_key = snowflake.TableConstraint("primary_key",
|
|
488
|
-
name="myconstraint",
|
|
489
|
-
type="PRIMARY KEY",
|
|
490
|
-
table_id=t.qualified_name,
|
|
491
|
-
columns=["col1"],
|
|
492
|
-
comment="hello world")
|
|
493
|
-
foreign_key = snowflake.TableConstraint("foreign_key",
|
|
494
|
-
name="myconstraintfk",
|
|
495
|
-
type="FOREIGN KEY",
|
|
496
|
-
table_id=t.qualified_name,
|
|
497
|
-
columns=["col2"],
|
|
498
|
-
foreign_key_properties={
|
|
499
|
-
"references": {
|
|
500
|
-
"table_id": fk_t.qualified_name,
|
|
501
|
-
"columns": ["fk_col1"],
|
|
502
|
-
},
|
|
503
|
-
},
|
|
504
|
-
enforced=False,
|
|
505
|
-
deferrable=False,
|
|
506
|
-
initially="IMMEDIATE",
|
|
507
|
-
comment="hello fk")
|
|
508
|
-
unique = snowflake.TableConstraint("unique",
|
|
509
|
-
name="unique",
|
|
510
|
-
type="UNIQUE",
|
|
511
|
-
table_id=t.qualified_name,
|
|
512
|
-
columns=["col3"],
|
|
513
|
-
comment="hello unique")
|
|
514
|
-
```
|
|
515
|
-
|
|
516
440
|
## Import
|
|
517
441
|
|
|
518
442
|
```sh
|
|
@@ -541,82 +465,6 @@ class TableConstraint(pulumi.CustomResource):
|
|
|
541
465
|
args: TableConstraintArgs,
|
|
542
466
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
543
467
|
"""
|
|
544
|
-
## Example Usage
|
|
545
|
-
|
|
546
|
-
```python
|
|
547
|
-
import pulumi
|
|
548
|
-
import pulumi_snowflake as snowflake
|
|
549
|
-
|
|
550
|
-
d = snowflake.Database("d", name="some_db")
|
|
551
|
-
s = snowflake.Schema("s",
|
|
552
|
-
name="some_schema",
|
|
553
|
-
database=d.name)
|
|
554
|
-
t = snowflake.Table("t",
|
|
555
|
-
database=d.name,
|
|
556
|
-
schema=s.name,
|
|
557
|
-
name="some_table",
|
|
558
|
-
columns=[
|
|
559
|
-
{
|
|
560
|
-
"name": "col1",
|
|
561
|
-
"type": "text",
|
|
562
|
-
"nullable": False,
|
|
563
|
-
},
|
|
564
|
-
{
|
|
565
|
-
"name": "col2",
|
|
566
|
-
"type": "text",
|
|
567
|
-
"nullable": False,
|
|
568
|
-
},
|
|
569
|
-
{
|
|
570
|
-
"name": "col3",
|
|
571
|
-
"type": "text",
|
|
572
|
-
"nullable": False,
|
|
573
|
-
},
|
|
574
|
-
])
|
|
575
|
-
fk_t = snowflake.Table("fk_t",
|
|
576
|
-
database=d.name,
|
|
577
|
-
schema=s.name,
|
|
578
|
-
name="fk_table",
|
|
579
|
-
columns=[
|
|
580
|
-
{
|
|
581
|
-
"name": "fk_col1",
|
|
582
|
-
"type": "text",
|
|
583
|
-
"nullable": False,
|
|
584
|
-
},
|
|
585
|
-
{
|
|
586
|
-
"name": "fk_col2",
|
|
587
|
-
"type": "text",
|
|
588
|
-
"nullable": False,
|
|
589
|
-
},
|
|
590
|
-
])
|
|
591
|
-
primary_key = snowflake.TableConstraint("primary_key",
|
|
592
|
-
name="myconstraint",
|
|
593
|
-
type="PRIMARY KEY",
|
|
594
|
-
table_id=t.qualified_name,
|
|
595
|
-
columns=["col1"],
|
|
596
|
-
comment="hello world")
|
|
597
|
-
foreign_key = snowflake.TableConstraint("foreign_key",
|
|
598
|
-
name="myconstraintfk",
|
|
599
|
-
type="FOREIGN KEY",
|
|
600
|
-
table_id=t.qualified_name,
|
|
601
|
-
columns=["col2"],
|
|
602
|
-
foreign_key_properties={
|
|
603
|
-
"references": {
|
|
604
|
-
"table_id": fk_t.qualified_name,
|
|
605
|
-
"columns": ["fk_col1"],
|
|
606
|
-
},
|
|
607
|
-
},
|
|
608
|
-
enforced=False,
|
|
609
|
-
deferrable=False,
|
|
610
|
-
initially="IMMEDIATE",
|
|
611
|
-
comment="hello fk")
|
|
612
|
-
unique = snowflake.TableConstraint("unique",
|
|
613
|
-
name="unique",
|
|
614
|
-
type="UNIQUE",
|
|
615
|
-
table_id=t.qualified_name,
|
|
616
|
-
columns=["col3"],
|
|
617
|
-
comment="hello unique")
|
|
618
|
-
```
|
|
619
|
-
|
|
620
468
|
## Import
|
|
621
469
|
|
|
622
470
|
```sh
|
pulumi_snowflake/tag.py
CHANGED
|
@@ -103,6 +103,7 @@ class _TagState:
|
|
|
103
103
|
allowed_values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
|
104
104
|
comment: Optional[pulumi.Input[str]] = None,
|
|
105
105
|
database: Optional[pulumi.Input[str]] = None,
|
|
106
|
+
fully_qualified_name: Optional[pulumi.Input[str]] = None,
|
|
106
107
|
name: Optional[pulumi.Input[str]] = None,
|
|
107
108
|
schema: Optional[pulumi.Input[str]] = None):
|
|
108
109
|
"""
|
|
@@ -110,6 +111,7 @@ class _TagState:
|
|
|
110
111
|
:param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_values: List of allowed values for the tag.
|
|
111
112
|
:param pulumi.Input[str] comment: Specifies a comment for the tag.
|
|
112
113
|
:param pulumi.Input[str] database: The database in which to create the tag.
|
|
114
|
+
: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).
|
|
113
115
|
:param pulumi.Input[str] name: Specifies the identifier for the tag; must be unique for the database in which the tag is created.
|
|
114
116
|
:param pulumi.Input[str] schema: The schema in which to create the tag.
|
|
115
117
|
"""
|
|
@@ -119,6 +121,8 @@ class _TagState:
|
|
|
119
121
|
pulumi.set(__self__, "comment", comment)
|
|
120
122
|
if database is not None:
|
|
121
123
|
pulumi.set(__self__, "database", database)
|
|
124
|
+
if fully_qualified_name is not None:
|
|
125
|
+
pulumi.set(__self__, "fully_qualified_name", fully_qualified_name)
|
|
122
126
|
if name is not None:
|
|
123
127
|
pulumi.set(__self__, "name", name)
|
|
124
128
|
if schema is not None:
|
|
@@ -160,6 +164,18 @@ class _TagState:
|
|
|
160
164
|
def database(self, value: Optional[pulumi.Input[str]]):
|
|
161
165
|
pulumi.set(self, "database", value)
|
|
162
166
|
|
|
167
|
+
@property
|
|
168
|
+
@pulumi.getter(name="fullyQualifiedName")
|
|
169
|
+
def fully_qualified_name(self) -> Optional[pulumi.Input[str]]:
|
|
170
|
+
"""
|
|
171
|
+
Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
|
|
172
|
+
"""
|
|
173
|
+
return pulumi.get(self, "fully_qualified_name")
|
|
174
|
+
|
|
175
|
+
@fully_qualified_name.setter
|
|
176
|
+
def fully_qualified_name(self, value: Optional[pulumi.Input[str]]):
|
|
177
|
+
pulumi.set(self, "fully_qualified_name", value)
|
|
178
|
+
|
|
163
179
|
@property
|
|
164
180
|
@pulumi.getter
|
|
165
181
|
def name(self) -> Optional[pulumi.Input[str]]:
|
|
@@ -197,26 +213,6 @@ class Tag(pulumi.CustomResource):
|
|
|
197
213
|
schema: Optional[pulumi.Input[str]] = None,
|
|
198
214
|
__props__=None):
|
|
199
215
|
"""
|
|
200
|
-
## Example Usage
|
|
201
|
-
|
|
202
|
-
```python
|
|
203
|
-
import pulumi
|
|
204
|
-
import pulumi_snowflake as snowflake
|
|
205
|
-
|
|
206
|
-
database = snowflake.Database("database", name="database")
|
|
207
|
-
schema = snowflake.Schema("schema",
|
|
208
|
-
name="schema",
|
|
209
|
-
database=database.name)
|
|
210
|
-
tag = snowflake.Tag("tag",
|
|
211
|
-
name="cost_center",
|
|
212
|
-
database=database.name,
|
|
213
|
-
schema=schema.name,
|
|
214
|
-
allowed_values=[
|
|
215
|
-
"finance",
|
|
216
|
-
"engineering",
|
|
217
|
-
])
|
|
218
|
-
```
|
|
219
|
-
|
|
220
216
|
## Import
|
|
221
217
|
|
|
222
218
|
format is database name | schema name | tag name
|
|
@@ -240,26 +236,6 @@ class Tag(pulumi.CustomResource):
|
|
|
240
236
|
args: TagArgs,
|
|
241
237
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
242
238
|
"""
|
|
243
|
-
## Example Usage
|
|
244
|
-
|
|
245
|
-
```python
|
|
246
|
-
import pulumi
|
|
247
|
-
import pulumi_snowflake as snowflake
|
|
248
|
-
|
|
249
|
-
database = snowflake.Database("database", name="database")
|
|
250
|
-
schema = snowflake.Schema("schema",
|
|
251
|
-
name="schema",
|
|
252
|
-
database=database.name)
|
|
253
|
-
tag = snowflake.Tag("tag",
|
|
254
|
-
name="cost_center",
|
|
255
|
-
database=database.name,
|
|
256
|
-
schema=schema.name,
|
|
257
|
-
allowed_values=[
|
|
258
|
-
"finance",
|
|
259
|
-
"engineering",
|
|
260
|
-
])
|
|
261
|
-
```
|
|
262
|
-
|
|
263
239
|
## Import
|
|
264
240
|
|
|
265
241
|
format is database name | schema name | tag name
|
|
@@ -306,6 +282,7 @@ class Tag(pulumi.CustomResource):
|
|
|
306
282
|
if schema is None and not opts.urn:
|
|
307
283
|
raise TypeError("Missing required property 'schema'")
|
|
308
284
|
__props__.__dict__["schema"] = schema
|
|
285
|
+
__props__.__dict__["fully_qualified_name"] = None
|
|
309
286
|
super(Tag, __self__).__init__(
|
|
310
287
|
'snowflake:index/tag:Tag',
|
|
311
288
|
resource_name,
|
|
@@ -319,6 +296,7 @@ class Tag(pulumi.CustomResource):
|
|
|
319
296
|
allowed_values: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
|
320
297
|
comment: Optional[pulumi.Input[str]] = None,
|
|
321
298
|
database: Optional[pulumi.Input[str]] = None,
|
|
299
|
+
fully_qualified_name: Optional[pulumi.Input[str]] = None,
|
|
322
300
|
name: Optional[pulumi.Input[str]] = None,
|
|
323
301
|
schema: Optional[pulumi.Input[str]] = None) -> 'Tag':
|
|
324
302
|
"""
|
|
@@ -331,6 +309,7 @@ class Tag(pulumi.CustomResource):
|
|
|
331
309
|
:param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_values: List of allowed values for the tag.
|
|
332
310
|
:param pulumi.Input[str] comment: Specifies a comment for the tag.
|
|
333
311
|
:param pulumi.Input[str] database: The database in which to create the tag.
|
|
312
|
+
: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).
|
|
334
313
|
:param pulumi.Input[str] name: Specifies the identifier for the tag; must be unique for the database in which the tag is created.
|
|
335
314
|
:param pulumi.Input[str] schema: The schema in which to create the tag.
|
|
336
315
|
"""
|
|
@@ -341,6 +320,7 @@ class Tag(pulumi.CustomResource):
|
|
|
341
320
|
__props__.__dict__["allowed_values"] = allowed_values
|
|
342
321
|
__props__.__dict__["comment"] = comment
|
|
343
322
|
__props__.__dict__["database"] = database
|
|
323
|
+
__props__.__dict__["fully_qualified_name"] = fully_qualified_name
|
|
344
324
|
__props__.__dict__["name"] = name
|
|
345
325
|
__props__.__dict__["schema"] = schema
|
|
346
326
|
return Tag(resource_name, opts=opts, __props__=__props__)
|
|
@@ -369,6 +349,14 @@ class Tag(pulumi.CustomResource):
|
|
|
369
349
|
"""
|
|
370
350
|
return pulumi.get(self, "database")
|
|
371
351
|
|
|
352
|
+
@property
|
|
353
|
+
@pulumi.getter(name="fullyQualifiedName")
|
|
354
|
+
def fully_qualified_name(self) -> pulumi.Output[str]:
|
|
355
|
+
"""
|
|
356
|
+
Fully qualified name of the resource. For more information, see [object name resolution](https://docs.snowflake.com/en/sql-reference/name-resolution).
|
|
357
|
+
"""
|
|
358
|
+
return pulumi.get(self, "fully_qualified_name")
|
|
359
|
+
|
|
372
360
|
@property
|
|
373
361
|
@pulumi.getter
|
|
374
362
|
def name(self) -> pulumi.Output[str]:
|
|
@@ -238,66 +238,6 @@ class TagAssociation(pulumi.CustomResource):
|
|
|
238
238
|
tag_value: Optional[pulumi.Input[str]] = None,
|
|
239
239
|
__props__=None):
|
|
240
240
|
"""
|
|
241
|
-
## Example Usage
|
|
242
|
-
|
|
243
|
-
```python
|
|
244
|
-
import pulumi
|
|
245
|
-
import pulumi_snowflake as snowflake
|
|
246
|
-
|
|
247
|
-
test = snowflake.Database("test", name="database")
|
|
248
|
-
test_schema = snowflake.Schema("test",
|
|
249
|
-
name="schema",
|
|
250
|
-
database=test.name)
|
|
251
|
-
test_tag = snowflake.Tag("test",
|
|
252
|
-
name="cost_center",
|
|
253
|
-
database=test.name,
|
|
254
|
-
schema=test_schema.name,
|
|
255
|
-
allowed_values=[
|
|
256
|
-
"finance",
|
|
257
|
-
"engineering",
|
|
258
|
-
])
|
|
259
|
-
db_association = snowflake.TagAssociation("db_association",
|
|
260
|
-
object_identifiers=[{
|
|
261
|
-
"name": test.name,
|
|
262
|
-
}],
|
|
263
|
-
object_type="DATABASE",
|
|
264
|
-
tag_id=test_tag.id,
|
|
265
|
-
tag_value="finance")
|
|
266
|
-
test_table = snowflake.Table("test",
|
|
267
|
-
database=test.name,
|
|
268
|
-
schema=test_schema.name,
|
|
269
|
-
name="TABLE_NAME",
|
|
270
|
-
comment="Terraform example table",
|
|
271
|
-
columns=[
|
|
272
|
-
{
|
|
273
|
-
"name": "column1",
|
|
274
|
-
"type": "VARIANT",
|
|
275
|
-
},
|
|
276
|
-
{
|
|
277
|
-
"name": "column2",
|
|
278
|
-
"type": "VARCHAR(16)",
|
|
279
|
-
},
|
|
280
|
-
])
|
|
281
|
-
table_association = snowflake.TagAssociation("table_association",
|
|
282
|
-
object_identifiers=[{
|
|
283
|
-
"name": test_table.name,
|
|
284
|
-
"database": test.name,
|
|
285
|
-
"schema": test_schema.name,
|
|
286
|
-
}],
|
|
287
|
-
object_type="TABLE",
|
|
288
|
-
tag_id=test_tag.id,
|
|
289
|
-
tag_value="engineering")
|
|
290
|
-
column_association = snowflake.TagAssociation("column_association",
|
|
291
|
-
object_identifiers=[{
|
|
292
|
-
"name": test_table.name.apply(lambda name: f"{name}.column_name"),
|
|
293
|
-
"database": test.name,
|
|
294
|
-
"schema": test_schema.name,
|
|
295
|
-
}],
|
|
296
|
-
object_type="COLUMN",
|
|
297
|
-
tag_id=test_tag.id,
|
|
298
|
-
tag_value="engineering")
|
|
299
|
-
```
|
|
300
|
-
|
|
301
241
|
## Import
|
|
302
242
|
|
|
303
243
|
format is dbName.schemaName.tagName or dbName.schemaName.tagName
|
|
@@ -322,66 +262,6 @@ class TagAssociation(pulumi.CustomResource):
|
|
|
322
262
|
args: TagAssociationArgs,
|
|
323
263
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
324
264
|
"""
|
|
325
|
-
## Example Usage
|
|
326
|
-
|
|
327
|
-
```python
|
|
328
|
-
import pulumi
|
|
329
|
-
import pulumi_snowflake as snowflake
|
|
330
|
-
|
|
331
|
-
test = snowflake.Database("test", name="database")
|
|
332
|
-
test_schema = snowflake.Schema("test",
|
|
333
|
-
name="schema",
|
|
334
|
-
database=test.name)
|
|
335
|
-
test_tag = snowflake.Tag("test",
|
|
336
|
-
name="cost_center",
|
|
337
|
-
database=test.name,
|
|
338
|
-
schema=test_schema.name,
|
|
339
|
-
allowed_values=[
|
|
340
|
-
"finance",
|
|
341
|
-
"engineering",
|
|
342
|
-
])
|
|
343
|
-
db_association = snowflake.TagAssociation("db_association",
|
|
344
|
-
object_identifiers=[{
|
|
345
|
-
"name": test.name,
|
|
346
|
-
}],
|
|
347
|
-
object_type="DATABASE",
|
|
348
|
-
tag_id=test_tag.id,
|
|
349
|
-
tag_value="finance")
|
|
350
|
-
test_table = snowflake.Table("test",
|
|
351
|
-
database=test.name,
|
|
352
|
-
schema=test_schema.name,
|
|
353
|
-
name="TABLE_NAME",
|
|
354
|
-
comment="Terraform example table",
|
|
355
|
-
columns=[
|
|
356
|
-
{
|
|
357
|
-
"name": "column1",
|
|
358
|
-
"type": "VARIANT",
|
|
359
|
-
},
|
|
360
|
-
{
|
|
361
|
-
"name": "column2",
|
|
362
|
-
"type": "VARCHAR(16)",
|
|
363
|
-
},
|
|
364
|
-
])
|
|
365
|
-
table_association = snowflake.TagAssociation("table_association",
|
|
366
|
-
object_identifiers=[{
|
|
367
|
-
"name": test_table.name,
|
|
368
|
-
"database": test.name,
|
|
369
|
-
"schema": test_schema.name,
|
|
370
|
-
}],
|
|
371
|
-
object_type="TABLE",
|
|
372
|
-
tag_id=test_tag.id,
|
|
373
|
-
tag_value="engineering")
|
|
374
|
-
column_association = snowflake.TagAssociation("column_association",
|
|
375
|
-
object_identifiers=[{
|
|
376
|
-
"name": test_table.name.apply(lambda name: f"{name}.column_name"),
|
|
377
|
-
"database": test.name,
|
|
378
|
-
"schema": test_schema.name,
|
|
379
|
-
}],
|
|
380
|
-
object_type="COLUMN",
|
|
381
|
-
tag_id=test_tag.id,
|
|
382
|
-
tag_value="engineering")
|
|
383
|
-
```
|
|
384
|
-
|
|
385
265
|
## Import
|
|
386
266
|
|
|
387
267
|
format is dbName.schemaName.tagName or dbName.schemaName.tagName
|
|
@@ -98,8 +98,6 @@ class TagMaskingPolicyAssociation(pulumi.CustomResource):
|
|
|
98
98
|
tag_id: Optional[pulumi.Input[str]] = None,
|
|
99
99
|
__props__=None):
|
|
100
100
|
"""
|
|
101
|
-
Attach a masking policy to a tag. Requires a current warehouse to be set. Either with SNOWFLAKE_WAREHOUSE env variable or in current session. If no warehouse is provided, a temporary warehouse will be created.
|
|
102
|
-
|
|
103
101
|
## Import
|
|
104
102
|
|
|
105
103
|
format is tag database name | tag schema name | tag name | masking policy database | masking policy schema | masking policy name
|
|
@@ -120,8 +118,6 @@ class TagMaskingPolicyAssociation(pulumi.CustomResource):
|
|
|
120
118
|
args: TagMaskingPolicyAssociationArgs,
|
|
121
119
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
122
120
|
"""
|
|
123
|
-
Attach a masking policy to a tag. Requires a current warehouse to be set. Either with SNOWFLAKE_WAREHOUSE env variable or in current session. If no warehouse is provided, a temporary warehouse will be created.
|
|
124
|
-
|
|
125
121
|
## Import
|
|
126
122
|
|
|
127
123
|
format is tag database name | tag schema name | tag name | masking policy database | masking policy schema | masking policy name
|