pulumi-snowflake 0.56.0a1721327760__py3-none-any.whl → 0.57.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.
Files changed (74) hide show
  1. pulumi_snowflake/__init__.py +78 -209
  2. pulumi_snowflake/_inputs.py +12188 -1362
  3. pulumi_snowflake/_utilities.py +2 -0
  4. pulumi_snowflake/account_role.py +226 -0
  5. pulumi_snowflake/api_authentication_integration_with_authorization_code_grant.py +692 -0
  6. pulumi_snowflake/api_authentication_integration_with_client_credentials.py +645 -0
  7. pulumi_snowflake/api_authentication_integration_with_jwt_bearer.py +680 -0
  8. pulumi_snowflake/cortex_search_service.py +563 -0
  9. pulumi_snowflake/database.py +854 -232
  10. pulumi_snowflake/database_old.py +556 -0
  11. pulumi_snowflake/external_oauth_integration.py +562 -534
  12. pulumi_snowflake/failover_group.py +2 -2
  13. pulumi_snowflake/get_cortex_search_services.py +197 -0
  14. pulumi_snowflake/get_databases.py +71 -62
  15. pulumi_snowflake/get_network_policies.py +122 -0
  16. pulumi_snowflake/get_roles.py +37 -31
  17. pulumi_snowflake/get_schemas.py +115 -38
  18. pulumi_snowflake/get_security_integrations.py +122 -0
  19. pulumi_snowflake/get_streamlits.py +159 -0
  20. pulumi_snowflake/get_warehouses.py +66 -18
  21. pulumi_snowflake/grant_privileges_to_database_role.py +0 -4
  22. pulumi_snowflake/managed_account.py +7 -7
  23. pulumi_snowflake/network_policy.py +103 -19
  24. pulumi_snowflake/oauth_integration.py +4 -0
  25. pulumi_snowflake/oauth_integration_for_custom_clients.py +940 -0
  26. pulumi_snowflake/oauth_integration_for_partner_applications.py +584 -0
  27. pulumi_snowflake/outputs.py +16178 -2927
  28. pulumi_snowflake/pulumi-plugin.json +1 -1
  29. pulumi_snowflake/role.py +44 -72
  30. pulumi_snowflake/saml2_integration.py +975 -0
  31. pulumi_snowflake/saml_integration.py +4 -0
  32. pulumi_snowflake/schema.py +905 -151
  33. pulumi_snowflake/scim_integration.py +257 -103
  34. pulumi_snowflake/secondary_database.py +1059 -0
  35. pulumi_snowflake/sequence.py +6 -6
  36. pulumi_snowflake/shared_database.py +914 -0
  37. pulumi_snowflake/streamlit.py +650 -0
  38. pulumi_snowflake/table.py +0 -120
  39. pulumi_snowflake/table_constraint.py +2 -2
  40. pulumi_snowflake/tag_association.py +38 -38
  41. pulumi_snowflake/unsafe_execute.py +8 -8
  42. pulumi_snowflake/user_password_policy_attachment.py +32 -0
  43. pulumi_snowflake/warehouse.py +143 -120
  44. {pulumi_snowflake-0.56.0a1721327760.dist-info → pulumi_snowflake-0.57.0.dist-info}/METADATA +1 -1
  45. {pulumi_snowflake-0.56.0a1721327760.dist-info → pulumi_snowflake-0.57.0.dist-info}/RECORD +47 -58
  46. {pulumi_snowflake-0.56.0a1721327760.dist-info → pulumi_snowflake-0.57.0.dist-info}/WHEEL +1 -1
  47. pulumi_snowflake/account_grant.py +0 -319
  48. pulumi_snowflake/database_grant.py +0 -471
  49. pulumi_snowflake/external_table_grant.py +0 -666
  50. pulumi_snowflake/failover_group_grant.py +0 -368
  51. pulumi_snowflake/file_format_grant.py +0 -611
  52. pulumi_snowflake/function_grant.py +0 -721
  53. pulumi_snowflake/grant_privileges_to_role.py +0 -821
  54. pulumi_snowflake/integration_grant.py +0 -416
  55. pulumi_snowflake/masking_policy_grant.py +0 -518
  56. pulumi_snowflake/materialized_view_grant.py +0 -665
  57. pulumi_snowflake/pipe_grant.py +0 -563
  58. pulumi_snowflake/procedure_grant.py +0 -721
  59. pulumi_snowflake/resource_monitor_grant.py +0 -363
  60. pulumi_snowflake/role_grants.py +0 -340
  61. pulumi_snowflake/role_ownership_grant.py +0 -329
  62. pulumi_snowflake/row_access_policy_grant.py +0 -516
  63. pulumi_snowflake/schema_grant.py +0 -603
  64. pulumi_snowflake/sequence_grant.py +0 -611
  65. pulumi_snowflake/stage_grant.py +0 -611
  66. pulumi_snowflake/stream_grant.py +0 -611
  67. pulumi_snowflake/table_grant.py +0 -653
  68. pulumi_snowflake/tag_grant.py +0 -508
  69. pulumi_snowflake/task_grant.py +0 -611
  70. pulumi_snowflake/user_grant.py +0 -370
  71. pulumi_snowflake/user_ownership_grant.py +0 -275
  72. pulumi_snowflake/view_grant.py +0 -685
  73. pulumi_snowflake/warehouse_grant.py +0 -416
  74. {pulumi_snowflake-0.56.0a1721327760.dist-info → pulumi_snowflake-0.57.0.dist-info}/top_level.txt +0 -0
pulumi_snowflake/table.py CHANGED
@@ -413,66 +413,6 @@ class Table(pulumi.CustomResource):
413
413
  """
414
414
  ## Example Usage
415
415
 
416
- ```python
417
- import pulumi
418
- import pulumi_snowflake as snowflake
419
-
420
- schema = snowflake.Schema("schema",
421
- database="database",
422
- name="schema",
423
- data_retention_days=1)
424
- sequence = snowflake.Sequence("sequence",
425
- database=schema.database,
426
- schema=schema.name,
427
- name="sequence")
428
- table = snowflake.Table("table",
429
- database=schema.database,
430
- schema=schema.name,
431
- name="table",
432
- comment="A table.",
433
- cluster_bies=["to_date(DATE)"],
434
- data_retention_time_in_days=schema.data_retention_time_in_days,
435
- change_tracking=False,
436
- columns=[
437
- snowflake.TableColumnArgs(
438
- name="id",
439
- type="int",
440
- nullable=True,
441
- default=snowflake.TableColumnDefaultArgs(
442
- sequence=sequence.fully_qualified_name,
443
- ),
444
- ),
445
- snowflake.TableColumnArgs(
446
- name="identity",
447
- type="NUMBER(38,0)",
448
- nullable=True,
449
- identity=snowflake.TableColumnIdentityArgs(
450
- start_num=1,
451
- step_num=3,
452
- ),
453
- ),
454
- snowflake.TableColumnArgs(
455
- name="data",
456
- type="text",
457
- nullable=False,
458
- collate="en-ci",
459
- ),
460
- snowflake.TableColumnArgs(
461
- name="DATE",
462
- type="TIMESTAMP_NTZ(9)",
463
- ),
464
- snowflake.TableColumnArgs(
465
- name="extra",
466
- type="VARIANT",
467
- comment="extra data",
468
- ),
469
- ],
470
- primary_key=snowflake.TablePrimaryKeyArgs(
471
- name="my_key",
472
- keys=["data"],
473
- ))
474
- ```
475
-
476
416
  ## Import
477
417
 
478
418
  format is database name | schema name | table name
@@ -503,66 +443,6 @@ class Table(pulumi.CustomResource):
503
443
  """
504
444
  ## Example Usage
505
445
 
506
- ```python
507
- import pulumi
508
- import pulumi_snowflake as snowflake
509
-
510
- schema = snowflake.Schema("schema",
511
- database="database",
512
- name="schema",
513
- data_retention_days=1)
514
- sequence = snowflake.Sequence("sequence",
515
- database=schema.database,
516
- schema=schema.name,
517
- name="sequence")
518
- table = snowflake.Table("table",
519
- database=schema.database,
520
- schema=schema.name,
521
- name="table",
522
- comment="A table.",
523
- cluster_bies=["to_date(DATE)"],
524
- data_retention_time_in_days=schema.data_retention_time_in_days,
525
- change_tracking=False,
526
- columns=[
527
- snowflake.TableColumnArgs(
528
- name="id",
529
- type="int",
530
- nullable=True,
531
- default=snowflake.TableColumnDefaultArgs(
532
- sequence=sequence.fully_qualified_name,
533
- ),
534
- ),
535
- snowflake.TableColumnArgs(
536
- name="identity",
537
- type="NUMBER(38,0)",
538
- nullable=True,
539
- identity=snowflake.TableColumnIdentityArgs(
540
- start_num=1,
541
- step_num=3,
542
- ),
543
- ),
544
- snowflake.TableColumnArgs(
545
- name="data",
546
- type="text",
547
- nullable=False,
548
- collate="en-ci",
549
- ),
550
- snowflake.TableColumnArgs(
551
- name="DATE",
552
- type="TIMESTAMP_NTZ(9)",
553
- ),
554
- snowflake.TableColumnArgs(
555
- name="extra",
556
- type="VARIANT",
557
- comment="extra data",
558
- ),
559
- ],
560
- primary_key=snowflake.TablePrimaryKeyArgs(
561
- name="my_key",
562
- keys=["data"],
563
- ))
564
- ```
565
-
566
446
  ## Import
567
447
 
568
448
  format is database name | schema name | table name
@@ -516,7 +516,7 @@ class TableConstraint(pulumi.CustomResource):
516
516
  ## Import
517
517
 
518
518
  ```sh
519
- $ pulumi import snowflake:index/tableConstraint:TableConstraint example 'myconstraintfk❄️FOREIGN KEY❄️test|test|table'
519
+ $ pulumi import snowflake:index/tableConstraint:TableConstraint example 'myconstraintfk❄️FOREIGN KEY❄️databaseName|schemaName|tableName'
520
520
  ```
521
521
 
522
522
  :param str resource_name: The name of the resource.
@@ -620,7 +620,7 @@ class TableConstraint(pulumi.CustomResource):
620
620
  ## Import
621
621
 
622
622
  ```sh
623
- $ pulumi import snowflake:index/tableConstraint:TableConstraint example 'myconstraintfk❄️FOREIGN KEY❄️test|test|table'
623
+ $ pulumi import snowflake:index/tableConstraint:TableConstraint example 'myconstraintfk❄️FOREIGN KEY❄️databaseName|schemaName|tableName'
624
624
  ```
625
625
 
626
626
  :param str resource_name: The name of the resource.
@@ -244,28 +244,28 @@ class TagAssociation(pulumi.CustomResource):
244
244
  import pulumi
245
245
  import pulumi_snowflake as snowflake
246
246
 
247
- database = snowflake.Database("database", name="database")
248
- schema = snowflake.Schema("schema",
247
+ test = snowflake.Database("test", name="database")
248
+ test_schema = snowflake.Schema("test",
249
249
  name="schema",
250
- database=database.name)
251
- tag = snowflake.Tag("tag",
250
+ database=test.name)
251
+ test_tag = snowflake.Tag("test",
252
252
  name="cost_center",
253
- database=database.name,
254
- schema=schema.name,
253
+ database=test.name,
254
+ schema=test_schema.name,
255
255
  allowed_values=[
256
256
  "finance",
257
257
  "engineering",
258
258
  ])
259
259
  db_association = snowflake.TagAssociation("db_association",
260
260
  object_identifiers=[snowflake.TagAssociationObjectIdentifierArgs(
261
- name=database.name,
261
+ name=test.name,
262
262
  )],
263
263
  object_type="DATABASE",
264
- tag_id=tag.id,
264
+ tag_id=test_tag.id,
265
265
  tag_value="finance")
266
- test = snowflake.Table("test",
267
- database=test_snowflake_database["name"],
268
- schema=test_snowflake_schema["name"],
266
+ test_table = snowflake.Table("test",
267
+ database=test.name,
268
+ schema=test_schema.name,
269
269
  name="TABLE_NAME",
270
270
  comment="Terraform example table",
271
271
  columns=[
@@ -280,21 +280,21 @@ class TagAssociation(pulumi.CustomResource):
280
280
  ])
281
281
  table_association = snowflake.TagAssociation("table_association",
282
282
  object_identifiers=[snowflake.TagAssociationObjectIdentifierArgs(
283
- name=test.name,
284
- database=test_snowflake_database["name"],
285
- schema=test_snowflake_schema["name"],
283
+ name=test_table.name,
284
+ database=test.name,
285
+ schema=test_schema.name,
286
286
  )],
287
287
  object_type="TABLE",
288
- tag_id=test_snowflake_tag["id"],
288
+ tag_id=test_tag.id,
289
289
  tag_value="engineering")
290
290
  column_association = snowflake.TagAssociation("column_association",
291
291
  object_identifiers=[snowflake.TagAssociationObjectIdentifierArgs(
292
- name=test.name.apply(lambda name: f"{name}.column_name"),
293
- database=test_snowflake_database["name"],
294
- schema=test_snowflake_schema["name"],
292
+ name=test_table.name.apply(lambda name: f"{name}.column_name"),
293
+ database=test.name,
294
+ schema=test_schema.name,
295
295
  )],
296
296
  object_type="COLUMN",
297
- tag_id=test_snowflake_tag["id"],
297
+ tag_id=test_tag.id,
298
298
  tag_value="engineering")
299
299
  ```
300
300
 
@@ -328,28 +328,28 @@ class TagAssociation(pulumi.CustomResource):
328
328
  import pulumi
329
329
  import pulumi_snowflake as snowflake
330
330
 
331
- database = snowflake.Database("database", name="database")
332
- schema = snowflake.Schema("schema",
331
+ test = snowflake.Database("test", name="database")
332
+ test_schema = snowflake.Schema("test",
333
333
  name="schema",
334
- database=database.name)
335
- tag = snowflake.Tag("tag",
334
+ database=test.name)
335
+ test_tag = snowflake.Tag("test",
336
336
  name="cost_center",
337
- database=database.name,
338
- schema=schema.name,
337
+ database=test.name,
338
+ schema=test_schema.name,
339
339
  allowed_values=[
340
340
  "finance",
341
341
  "engineering",
342
342
  ])
343
343
  db_association = snowflake.TagAssociation("db_association",
344
344
  object_identifiers=[snowflake.TagAssociationObjectIdentifierArgs(
345
- name=database.name,
345
+ name=test.name,
346
346
  )],
347
347
  object_type="DATABASE",
348
- tag_id=tag.id,
348
+ tag_id=test_tag.id,
349
349
  tag_value="finance")
350
- test = snowflake.Table("test",
351
- database=test_snowflake_database["name"],
352
- schema=test_snowflake_schema["name"],
350
+ test_table = snowflake.Table("test",
351
+ database=test.name,
352
+ schema=test_schema.name,
353
353
  name="TABLE_NAME",
354
354
  comment="Terraform example table",
355
355
  columns=[
@@ -364,21 +364,21 @@ class TagAssociation(pulumi.CustomResource):
364
364
  ])
365
365
  table_association = snowflake.TagAssociation("table_association",
366
366
  object_identifiers=[snowflake.TagAssociationObjectIdentifierArgs(
367
- name=test.name,
368
- database=test_snowflake_database["name"],
369
- schema=test_snowflake_schema["name"],
367
+ name=test_table.name,
368
+ database=test.name,
369
+ schema=test_schema.name,
370
370
  )],
371
371
  object_type="TABLE",
372
- tag_id=test_snowflake_tag["id"],
372
+ tag_id=test_tag.id,
373
373
  tag_value="engineering")
374
374
  column_association = snowflake.TagAssociation("column_association",
375
375
  object_identifiers=[snowflake.TagAssociationObjectIdentifierArgs(
376
- name=test.name.apply(lambda name: f"{name}.column_name"),
377
- database=test_snowflake_database["name"],
378
- schema=test_snowflake_schema["name"],
376
+ name=test_table.name.apply(lambda name: f"{name}.column_name"),
377
+ database=test.name,
378
+ schema=test_schema.name,
379
379
  )],
380
380
  object_type="COLUMN",
381
- tag_id=test_snowflake_tag["id"],
381
+ tag_id=test_tag.id,
382
382
  tag_value="engineering")
383
383
  ```
384
384
 
@@ -147,15 +147,15 @@ class UnsafeExecute(pulumi.CustomResource):
147
147
  revert: Optional[pulumi.Input[str]] = None,
148
148
  __props__=None):
149
149
  """
150
- !> **Warning** This is a dangerous resource that allows executing **ANY** SQL statement. It may destroy resources if used incorrectly. It may behave incorrectly combined with other resources. Will be deleted in the upcoming versions. Use at your own risk.
150
+ !> **Warning** This is a dangerous resource that allows executing **ANY** SQL statement. It may destroy resources if used incorrectly. It may behave incorrectly combined with other resources. Use at your own risk.
151
+
152
+ > **Note** This resource will be included in the V1 (check here.
151
153
 
152
154
  > **Note** It can be theoretically used to manage resource that are not supported by the provider. This is risky and may brake other resources if used incorrectly.
153
155
 
154
156
  > **Note** Use `query` parameter with caution. It will fetch **ALL** the results returned by the query provided. Try to limit the number of results by writing query with filters. Query failure does not stop resource creation; it simply results in `query_results` being empty.
155
157
 
156
- > **Deprecation** Experimental resource. Will be deleted in the upcoming versions. Use at your own risk. <deprecation>
157
-
158
- Experimental resource used for testing purposes only. Allows to execute ANY SQL statement.
158
+ Experimental resource allowing execution of ANY SQL statement. It may destroy resources if used incorrectly. It may behave incorrectly combined with other resources. Use at your own risk.
159
159
 
160
160
  :param str resource_name: The name of the resource.
161
161
  :param pulumi.ResourceOptions opts: Options for the resource.
@@ -170,15 +170,15 @@ class UnsafeExecute(pulumi.CustomResource):
170
170
  args: UnsafeExecuteArgs,
171
171
  opts: Optional[pulumi.ResourceOptions] = None):
172
172
  """
173
- !> **Warning** This is a dangerous resource that allows executing **ANY** SQL statement. It may destroy resources if used incorrectly. It may behave incorrectly combined with other resources. Will be deleted in the upcoming versions. Use at your own risk.
173
+ !> **Warning** This is a dangerous resource that allows executing **ANY** SQL statement. It may destroy resources if used incorrectly. It may behave incorrectly combined with other resources. Use at your own risk.
174
+
175
+ > **Note** This resource will be included in the V1 (check here.
174
176
 
175
177
  > **Note** It can be theoretically used to manage resource that are not supported by the provider. This is risky and may brake other resources if used incorrectly.
176
178
 
177
179
  > **Note** Use `query` parameter with caution. It will fetch **ALL** the results returned by the query provided. Try to limit the number of results by writing query with filters. Query failure does not stop resource creation; it simply results in `query_results` being empty.
178
180
 
179
- > **Deprecation** Experimental resource. Will be deleted in the upcoming versions. Use at your own risk. <deprecation>
180
-
181
- Experimental resource used for testing purposes only. Allows to execute ANY SQL statement.
181
+ Experimental resource allowing execution of ANY SQL statement. It may destroy resources if used incorrectly. It may behave incorrectly combined with other resources. Use at your own risk.
182
182
 
183
183
  :param str resource_name: The name of the resource.
184
184
  :param UnsafeExecuteArgs args: The arguments to use to populate this resource's properties.
@@ -100,6 +100,22 @@ class UserPasswordPolicyAttachment(pulumi.CustomResource):
100
100
  """
101
101
  Specifies the password policy to use for a certain user.
102
102
 
103
+ ## Example Usage
104
+
105
+ ```python
106
+ import pulumi
107
+ import pulumi_snowflake as snowflake
108
+
109
+ user = snowflake.User("user", name="USER_NAME")
110
+ pp = snowflake.PasswordPolicy("pp",
111
+ database="prod",
112
+ schema="security",
113
+ name="default_policy")
114
+ ppa = snowflake.UserPasswordPolicyAttachment("ppa",
115
+ password_policy_name=pulumi.Output.all(pp.database, pp.schema, pp.name).apply(lambda database, schema, name: f"\\"{database}\\".\\"{schema}\\".\\"{name}\\""),
116
+ user_name=user.name)
117
+ ```
118
+
103
119
  ## Import
104
120
 
105
121
  ```sh
@@ -120,6 +136,22 @@ class UserPasswordPolicyAttachment(pulumi.CustomResource):
120
136
  """
121
137
  Specifies the password policy to use for a certain user.
122
138
 
139
+ ## Example Usage
140
+
141
+ ```python
142
+ import pulumi
143
+ import pulumi_snowflake as snowflake
144
+
145
+ user = snowflake.User("user", name="USER_NAME")
146
+ pp = snowflake.PasswordPolicy("pp",
147
+ database="prod",
148
+ schema="security",
149
+ name="default_policy")
150
+ ppa = snowflake.UserPasswordPolicyAttachment("ppa",
151
+ password_policy_name=pulumi.Output.all(pp.database, pp.schema, pp.name).apply(lambda database, schema, name: f"\\"{database}\\".\\"{schema}\\".\\"{name}\\""),
152
+ user_name=user.name)
153
+ ```
154
+
123
155
  ## Import
124
156
 
125
157
  ```sh