pulumi-snowflake 0.50.3a1710160126__py3-none-any.whl → 1.2.0a1736835738__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/__init__.py +224 -172
- pulumi_snowflake/_inputs.py +52857 -1665
- pulumi_snowflake/_utilities.py +41 -5
- pulumi_snowflake/account.py +188 -218
- pulumi_snowflake/account_authentication_policy_attachment.py +149 -0
- pulumi_snowflake/account_parameter.py +21 -48
- pulumi_snowflake/account_password_policy_attachment.py +7 -32
- pulumi_snowflake/account_role.py +250 -0
- pulumi_snowflake/alert.py +38 -47
- pulumi_snowflake/api_authentication_integration_with_authorization_code_grant.py +704 -0
- pulumi_snowflake/api_authentication_integration_with_client_credentials.py +657 -0
- pulumi_snowflake/api_authentication_integration_with_jwt_bearer.py +692 -0
- pulumi_snowflake/api_integration.py +33 -52
- pulumi_snowflake/authentication_policy.py +622 -0
- pulumi_snowflake/config/__init__.pyi +76 -99
- pulumi_snowflake/config/outputs.py +5 -0
- pulumi_snowflake/config/vars.py +93 -124
- pulumi_snowflake/cortex_search_service.py +596 -0
- pulumi_snowflake/database.py +819 -213
- pulumi_snowflake/database_role.py +81 -44
- pulumi_snowflake/dynamic_table.py +42 -49
- pulumi_snowflake/email_notification_integration.py +33 -28
- pulumi_snowflake/{unsafe_execute.py → execute.py} +36 -39
- pulumi_snowflake/external_function.py +54 -75
- pulumi_snowflake/external_oauth_integration.py +593 -542
- pulumi_snowflake/external_table.py +67 -90
- pulumi_snowflake/external_volume.py +382 -0
- pulumi_snowflake/failover_group.py +57 -98
- pulumi_snowflake/file_format.py +33 -28
- pulumi_snowflake/function_java.py +1211 -0
- pulumi_snowflake/function_javascript.py +882 -0
- pulumi_snowflake/function_python.py +1212 -0
- pulumi_snowflake/function_scala.py +1212 -0
- pulumi_snowflake/function_sql.py +835 -0
- pulumi_snowflake/get_account_roles.py +129 -0
- pulumi_snowflake/get_accounts.py +53 -22
- pulumi_snowflake/get_alerts.py +22 -9
- pulumi_snowflake/get_connections.py +109 -0
- pulumi_snowflake/get_cortex_search_services.py +216 -0
- pulumi_snowflake/get_current_account.py +24 -13
- pulumi_snowflake/get_current_role.py +14 -7
- pulumi_snowflake/get_database.py +25 -9
- pulumi_snowflake/get_database_role.py +162 -0
- pulumi_snowflake/get_database_roles.py +79 -47
- pulumi_snowflake/get_databases.py +91 -73
- pulumi_snowflake/get_dynamic_tables.py +36 -19
- pulumi_snowflake/get_external_functions.py +28 -9
- pulumi_snowflake/get_external_tables.py +28 -9
- pulumi_snowflake/get_failover_groups.py +18 -7
- pulumi_snowflake/get_file_formats.py +28 -9
- pulumi_snowflake/get_functions.py +28 -9
- pulumi_snowflake/get_grants.py +207 -84
- pulumi_snowflake/get_masking_policies.py +91 -51
- pulumi_snowflake/get_materialized_views.py +28 -9
- pulumi_snowflake/get_network_policies.py +129 -0
- pulumi_snowflake/get_parameters.py +38 -15
- pulumi_snowflake/get_pipes.py +28 -9
- pulumi_snowflake/get_procedures.py +28 -9
- pulumi_snowflake/get_resource_monitors.py +37 -24
- pulumi_snowflake/get_row_access_policies.py +91 -51
- pulumi_snowflake/get_schemas.py +145 -41
- pulumi_snowflake/get_secrets.py +200 -0
- pulumi_snowflake/get_security_integrations.py +129 -0
- pulumi_snowflake/get_sequences.py +28 -9
- pulumi_snowflake/get_shares.py +18 -9
- pulumi_snowflake/get_stages.py +28 -9
- pulumi_snowflake/get_storage_integrations.py +16 -9
- pulumi_snowflake/get_streamlits.py +170 -0
- pulumi_snowflake/get_streams.py +114 -54
- pulumi_snowflake/get_system_generate_scim_access_token.py +18 -9
- pulumi_snowflake/get_system_get_aws_sns_iam_policy.py +32 -7
- pulumi_snowflake/get_system_get_private_link_config.py +120 -5
- pulumi_snowflake/get_system_get_snowflake_platform_info.py +15 -7
- pulumi_snowflake/get_tables.py +28 -9
- pulumi_snowflake/get_tags.py +130 -0
- pulumi_snowflake/get_tasks.py +134 -54
- pulumi_snowflake/get_users.py +116 -44
- pulumi_snowflake/get_views.py +114 -54
- pulumi_snowflake/get_warehouses.py +79 -26
- pulumi_snowflake/grant_account_role.py +28 -75
- pulumi_snowflake/grant_application_role.py +257 -0
- pulumi_snowflake/grant_database_role.py +35 -94
- pulumi_snowflake/grant_ownership.py +382 -0
- pulumi_snowflake/grant_privileges_to_account_role.py +42 -78
- pulumi_snowflake/grant_privileges_to_database_role.py +37 -383
- pulumi_snowflake/grant_privileges_to_share.py +96 -44
- pulumi_snowflake/legacy_service_user.py +3670 -0
- pulumi_snowflake/managed_account.py +40 -11
- pulumi_snowflake/masking_policy.py +213 -310
- pulumi_snowflake/materialized_view.py +62 -71
- pulumi_snowflake/network_policy.py +217 -61
- pulumi_snowflake/network_policy_attachment.py +5 -34
- pulumi_snowflake/network_rule.py +473 -0
- pulumi_snowflake/notification_integration.py +49 -84
- pulumi_snowflake/oauth_integration_for_custom_clients.py +906 -0
- pulumi_snowflake/{oauth_integration.py → oauth_integration_for_partner_applications.py} +191 -192
- pulumi_snowflake/object_parameter.py +10 -101
- pulumi_snowflake/outputs.py +49200 -2928
- pulumi_snowflake/password_policy.py +41 -28
- pulumi_snowflake/pipe.py +33 -4
- pulumi_snowflake/primary_connection.py +330 -0
- pulumi_snowflake/procedure_java.py +1273 -0
- pulumi_snowflake/procedure_javascript.py +895 -0
- pulumi_snowflake/procedure_python.py +1226 -0
- pulumi_snowflake/procedure_scala.py +1273 -0
- pulumi_snowflake/procedure_sql.py +895 -0
- pulumi_snowflake/provider.py +378 -613
- pulumi_snowflake/pulumi-plugin.json +2 -1
- pulumi_snowflake/resource_monitor.py +118 -327
- pulumi_snowflake/row_access_policy.py +200 -149
- pulumi_snowflake/{saml_integration.py → saml2_integration.py} +356 -299
- pulumi_snowflake/schema.py +949 -178
- pulumi_snowflake/scim_integration.py +286 -109
- pulumi_snowflake/secondary_connection.py +339 -0
- pulumi_snowflake/secondary_database.py +1080 -0
- pulumi_snowflake/secret_with_authorization_code_grant.py +548 -0
- pulumi_snowflake/secret_with_basic_authentication.py +500 -0
- pulumi_snowflake/secret_with_client_credentials.py +511 -0
- pulumi_snowflake/secret_with_generic_string.py +452 -0
- pulumi_snowflake/sequence.py +9 -34
- pulumi_snowflake/service_user.py +3585 -0
- pulumi_snowflake/share.py +33 -28
- pulumi_snowflake/shared_database.py +939 -0
- pulumi_snowflake/stage.py +95 -84
- pulumi_snowflake/storage_integration.py +46 -4
- pulumi_snowflake/stream_on_directory_table.py +517 -0
- pulumi_snowflake/stream_on_external_table.py +632 -0
- pulumi_snowflake/stream_on_table.py +666 -0
- pulumi_snowflake/stream_on_view.py +666 -0
- pulumi_snowflake/streamlit.py +671 -0
- pulumi_snowflake/table.py +86 -97
- pulumi_snowflake/table_column_masking_policy_application.py +7 -14
- pulumi_snowflake/table_constraint.py +29 -172
- pulumi_snowflake/tag.py +142 -74
- pulumi_snowflake/tag_association.py +40 -215
- pulumi_snowflake/task.py +3048 -418
- pulumi_snowflake/user.py +3351 -384
- pulumi_snowflake/user_authentication_policy_attachment.py +197 -0
- pulumi_snowflake/user_password_policy_attachment.py +5 -4
- pulumi_snowflake/user_public_keys.py +5 -0
- pulumi_snowflake/view.py +466 -215
- pulumi_snowflake/warehouse.py +184 -168
- {pulumi_snowflake-0.50.3a1710160126.dist-info → pulumi_snowflake-1.2.0a1736835738.dist-info}/METADATA +7 -6
- pulumi_snowflake-1.2.0a1736835738.dist-info/RECORD +148 -0
- {pulumi_snowflake-0.50.3a1710160126.dist-info → pulumi_snowflake-1.2.0a1736835738.dist-info}/WHEEL +1 -1
- pulumi_snowflake/account_grant.py +0 -343
- pulumi_snowflake/database_grant.py +0 -495
- pulumi_snowflake/external_table_grant.py +0 -690
- pulumi_snowflake/failover_group_grant.py +0 -388
- pulumi_snowflake/file_format_grant.py +0 -635
- pulumi_snowflake/function.py +0 -872
- pulumi_snowflake/function_grant.py +0 -745
- pulumi_snowflake/get_role.py +0 -121
- pulumi_snowflake/get_roles.py +0 -120
- pulumi_snowflake/grant_privileges_to_role.py +0 -825
- pulumi_snowflake/integration_grant.py +0 -440
- pulumi_snowflake/masking_policy_grant.py +0 -542
- pulumi_snowflake/materialized_view_grant.py +0 -689
- pulumi_snowflake/pipe_grant.py +0 -587
- pulumi_snowflake/procedure.py +0 -887
- pulumi_snowflake/procedure_grant.py +0 -745
- pulumi_snowflake/resource_monitor_grant.py +0 -387
- pulumi_snowflake/role.py +0 -273
- pulumi_snowflake/role_grants.py +0 -352
- pulumi_snowflake/role_ownership_grant.py +0 -338
- pulumi_snowflake/row_access_policy_grant.py +0 -540
- pulumi_snowflake/schema_grant.py +0 -647
- pulumi_snowflake/sequence_grant.py +0 -635
- pulumi_snowflake/session_parameter.py +0 -332
- pulumi_snowflake/stage_grant.py +0 -635
- pulumi_snowflake/stream.py +0 -614
- pulumi_snowflake/stream_grant.py +0 -635
- pulumi_snowflake/table_grant.py +0 -677
- pulumi_snowflake/tag_grant.py +0 -532
- pulumi_snowflake/tag_masking_policy_association.py +0 -210
- pulumi_snowflake/task_grant.py +0 -635
- pulumi_snowflake/user_grant.py +0 -394
- pulumi_snowflake/user_ownership_grant.py +0 -286
- pulumi_snowflake/view_grant.py +0 -705
- pulumi_snowflake/warehouse_grant.py +0 -440
- pulumi_snowflake-0.50.3a1710160126.dist-info/RECORD +0 -136
- {pulumi_snowflake-0.50.3a1710160126.dist-info → pulumi_snowflake-1.2.0a1736835738.dist-info}/top_level.txt +0 -0
|
@@ -4,9 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
import copy
|
|
6
6
|
import warnings
|
|
7
|
+
import sys
|
|
7
8
|
import pulumi
|
|
8
9
|
import pulumi.runtime
|
|
9
10
|
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
11
|
+
if sys.version_info >= (3, 11):
|
|
12
|
+
from typing import NotRequired, TypedDict, TypeAlias
|
|
13
|
+
else:
|
|
14
|
+
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
|
10
15
|
from . import _utilities
|
|
11
16
|
from . import outputs
|
|
12
17
|
|
|
@@ -85,9 +90,10 @@ def get_functions(database: Optional[str] = None,
|
|
|
85
90
|
schema: Optional[str] = None,
|
|
86
91
|
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetFunctionsResult:
|
|
87
92
|
"""
|
|
93
|
+
!> **Caution: Preview Feature** This feature is considered a preview feature in the provider, regardless of the state of the resource in Snowflake. We do not guarantee its stability. It will be reworked and marked as a stable feature in future releases. Breaking changes are expected, even without bumping the major version. To use this feature, add the relevant feature name to `preview_features_enabled field` in the provider configuration. Please always refer to the Getting Help section in our Github repo to best determine how to get help for your questions.
|
|
94
|
+
|
|
88
95
|
## Example Usage
|
|
89
96
|
|
|
90
|
-
<!--Start PulumiCodeChooser -->
|
|
91
97
|
```python
|
|
92
98
|
import pulumi
|
|
93
99
|
import pulumi_snowflake as snowflake
|
|
@@ -95,7 +101,10 @@ def get_functions(database: Optional[str] = None,
|
|
|
95
101
|
current = snowflake.get_functions(database="MYDB",
|
|
96
102
|
schema="MYSCHEMA")
|
|
97
103
|
```
|
|
98
|
-
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
:param str database: The database from which to return the schemas from.
|
|
107
|
+
:param str schema: The schema from which to return the functions from.
|
|
99
108
|
"""
|
|
100
109
|
__args__ = dict()
|
|
101
110
|
__args__['database'] = database
|
|
@@ -108,16 +117,14 @@ def get_functions(database: Optional[str] = None,
|
|
|
108
117
|
functions=pulumi.get(__ret__, 'functions'),
|
|
109
118
|
id=pulumi.get(__ret__, 'id'),
|
|
110
119
|
schema=pulumi.get(__ret__, 'schema'))
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
@_utilities.lift_output_func(get_functions)
|
|
114
120
|
def get_functions_output(database: Optional[pulumi.Input[str]] = None,
|
|
115
121
|
schema: Optional[pulumi.Input[str]] = None,
|
|
116
|
-
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetFunctionsResult]:
|
|
122
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetFunctionsResult]:
|
|
117
123
|
"""
|
|
124
|
+
!> **Caution: Preview Feature** This feature is considered a preview feature in the provider, regardless of the state of the resource in Snowflake. We do not guarantee its stability. It will be reworked and marked as a stable feature in future releases. Breaking changes are expected, even without bumping the major version. To use this feature, add the relevant feature name to `preview_features_enabled field` in the provider configuration. Please always refer to the Getting Help section in our Github repo to best determine how to get help for your questions.
|
|
125
|
+
|
|
118
126
|
## Example Usage
|
|
119
127
|
|
|
120
|
-
<!--Start PulumiCodeChooser -->
|
|
121
128
|
```python
|
|
122
129
|
import pulumi
|
|
123
130
|
import pulumi_snowflake as snowflake
|
|
@@ -125,6 +132,18 @@ def get_functions_output(database: Optional[pulumi.Input[str]] = None,
|
|
|
125
132
|
current = snowflake.get_functions(database="MYDB",
|
|
126
133
|
schema="MYSCHEMA")
|
|
127
134
|
```
|
|
128
|
-
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
:param str database: The database from which to return the schemas from.
|
|
138
|
+
:param str schema: The schema from which to return the functions from.
|
|
129
139
|
"""
|
|
130
|
-
|
|
140
|
+
__args__ = dict()
|
|
141
|
+
__args__['database'] = database
|
|
142
|
+
__args__['schema'] = schema
|
|
143
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
|
144
|
+
__ret__ = pulumi.runtime.invoke_output('snowflake:index/getFunctions:getFunctions', __args__, opts=opts, typ=GetFunctionsResult)
|
|
145
|
+
return __ret__.apply(lambda __response__: GetFunctionsResult(
|
|
146
|
+
database=pulumi.get(__response__, 'database'),
|
|
147
|
+
functions=pulumi.get(__response__, 'functions'),
|
|
148
|
+
id=pulumi.get(__response__, 'id'),
|
|
149
|
+
schema=pulumi.get(__response__, 'schema')))
|
pulumi_snowflake/get_grants.py
CHANGED
|
@@ -4,9 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
import copy
|
|
6
6
|
import warnings
|
|
7
|
+
import sys
|
|
7
8
|
import pulumi
|
|
8
9
|
import pulumi.runtime
|
|
9
10
|
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
11
|
+
if sys.version_info >= (3, 11):
|
|
12
|
+
from typing import NotRequired, TypedDict, TypeAlias
|
|
13
|
+
else:
|
|
14
|
+
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
|
10
15
|
from . import _utilities
|
|
11
16
|
from . import outputs
|
|
12
17
|
from ._inputs import *
|
|
@@ -50,7 +55,7 @@ class GetGrantsResult:
|
|
|
50
55
|
@pulumi.getter(name="futureGrantsIn")
|
|
51
56
|
def future_grants_in(self) -> Optional['outputs.GetGrantsFutureGrantsInResult']:
|
|
52
57
|
"""
|
|
53
|
-
Lists all privileges on new (i.e. future) objects
|
|
58
|
+
Lists all privileges on new (i.e. future) objects.
|
|
54
59
|
"""
|
|
55
60
|
return pulumi.get(self, "future_grants_in")
|
|
56
61
|
|
|
@@ -58,7 +63,7 @@ class GetGrantsResult:
|
|
|
58
63
|
@pulumi.getter(name="futureGrantsTo")
|
|
59
64
|
def future_grants_to(self) -> Optional['outputs.GetGrantsFutureGrantsToResult']:
|
|
60
65
|
"""
|
|
61
|
-
Lists all privileges granted to the object on new (i.e. future) objects
|
|
66
|
+
Lists all privileges granted to the object on new (i.e. future) objects.
|
|
62
67
|
"""
|
|
63
68
|
return pulumi.get(self, "future_grants_to")
|
|
64
69
|
|
|
@@ -74,7 +79,7 @@ class GetGrantsResult:
|
|
|
74
79
|
@pulumi.getter(name="grantsOf")
|
|
75
80
|
def grants_of(self) -> Optional['outputs.GetGrantsGrantsOfResult']:
|
|
76
81
|
"""
|
|
77
|
-
Lists all objects to which the given object has been granted
|
|
82
|
+
Lists all objects to which the given object has been granted.
|
|
78
83
|
"""
|
|
79
84
|
return pulumi.get(self, "grants_of")
|
|
80
85
|
|
|
@@ -82,7 +87,7 @@ class GetGrantsResult:
|
|
|
82
87
|
@pulumi.getter(name="grantsOn")
|
|
83
88
|
def grants_on(self) -> Optional['outputs.GetGrantsGrantsOnResult']:
|
|
84
89
|
"""
|
|
85
|
-
Lists all privileges that have been granted on an object or account
|
|
90
|
+
Lists all privileges that have been granted on an object or on an account.
|
|
86
91
|
"""
|
|
87
92
|
return pulumi.get(self, "grants_on")
|
|
88
93
|
|
|
@@ -90,7 +95,7 @@ class GetGrantsResult:
|
|
|
90
95
|
@pulumi.getter(name="grantsTo")
|
|
91
96
|
def grants_to(self) -> Optional['outputs.GetGrantsGrantsToResult']:
|
|
92
97
|
"""
|
|
93
|
-
Lists all privileges granted to the object
|
|
98
|
+
Lists all privileges granted to the object.
|
|
94
99
|
"""
|
|
95
100
|
return pulumi.get(self, "grants_to")
|
|
96
101
|
|
|
@@ -118,54 +123,107 @@ class AwaitableGetGrantsResult(GetGrantsResult):
|
|
|
118
123
|
id=self.id)
|
|
119
124
|
|
|
120
125
|
|
|
121
|
-
def get_grants(future_grants_in: Optional[
|
|
122
|
-
future_grants_to: Optional[
|
|
123
|
-
grants_of: Optional[
|
|
124
|
-
grants_on: Optional[
|
|
125
|
-
grants_to: Optional[
|
|
126
|
+
def get_grants(future_grants_in: Optional[Union['GetGrantsFutureGrantsInArgs', 'GetGrantsFutureGrantsInArgsDict']] = None,
|
|
127
|
+
future_grants_to: Optional[Union['GetGrantsFutureGrantsToArgs', 'GetGrantsFutureGrantsToArgsDict']] = None,
|
|
128
|
+
grants_of: Optional[Union['GetGrantsGrantsOfArgs', 'GetGrantsGrantsOfArgsDict']] = None,
|
|
129
|
+
grants_on: Optional[Union['GetGrantsGrantsOnArgs', 'GetGrantsGrantsOnArgsDict']] = None,
|
|
130
|
+
grants_to: Optional[Union['GetGrantsGrantsToArgs', 'GetGrantsGrantsToArgsDict']] = None,
|
|
126
131
|
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetGrantsResult:
|
|
127
132
|
"""
|
|
128
133
|
## Example Usage
|
|
129
134
|
|
|
130
|
-
<!--Start PulumiCodeChooser -->
|
|
131
135
|
```python
|
|
132
136
|
import pulumi
|
|
133
137
|
import pulumi_snowflake as snowflake
|
|
134
138
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
)
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
)
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
)
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
139
|
+
##################################
|
|
140
|
+
### SHOW GRANTS ON ...
|
|
141
|
+
##################################
|
|
142
|
+
# account
|
|
143
|
+
example_on_account = snowflake.get_grants(grants_on={
|
|
144
|
+
"account": True,
|
|
145
|
+
})
|
|
146
|
+
# account object (e.g. database)
|
|
147
|
+
example_on_account_object = snowflake.get_grants(grants_on={
|
|
148
|
+
"object_name": "some_database",
|
|
149
|
+
"object_type": "DATABASE",
|
|
150
|
+
})
|
|
151
|
+
# database object (e.g. schema)
|
|
152
|
+
example_on_database_object = snowflake.get_grants(grants_on={
|
|
153
|
+
"object_name": "\\"some_database\\".\\"some_schema\\"",
|
|
154
|
+
"object_type": "SCHEMA",
|
|
155
|
+
})
|
|
156
|
+
# schema object (e.g. table)
|
|
157
|
+
example_on_schema_object = snowflake.get_grants(grants_on={
|
|
158
|
+
"object_name": "\\"some_database\\".\\"some_schema\\".\\"some_table\\"",
|
|
159
|
+
"object_type": "TABLE",
|
|
160
|
+
})
|
|
161
|
+
# application
|
|
162
|
+
example_to_application = snowflake.get_grants(grants_to={
|
|
163
|
+
"application": "some_application",
|
|
164
|
+
})
|
|
165
|
+
# application role
|
|
166
|
+
example_to_application_role = snowflake.get_grants(grants_to={
|
|
167
|
+
"application_role": "\\"some_application\\".\\"some_application_role\\"",
|
|
168
|
+
})
|
|
169
|
+
# account role
|
|
170
|
+
example_to_role = snowflake.get_grants(grants_to={
|
|
171
|
+
"account_role": "some_role",
|
|
172
|
+
})
|
|
173
|
+
# database role
|
|
174
|
+
example_to_database_role = snowflake.get_grants(grants_to={
|
|
175
|
+
"database_role": "\\"some_database\\".\\"some_database_role\\"",
|
|
176
|
+
})
|
|
177
|
+
# share
|
|
178
|
+
example_to_share = snowflake.get_grants(grants_to={
|
|
179
|
+
"share": {
|
|
180
|
+
"share_name": "some_share",
|
|
181
|
+
},
|
|
182
|
+
})
|
|
183
|
+
# user
|
|
184
|
+
example_to_user = snowflake.get_grants(grants_to={
|
|
185
|
+
"user": "some_user",
|
|
186
|
+
})
|
|
187
|
+
# application role
|
|
188
|
+
example_of_application_role = snowflake.get_grants(grants_of={
|
|
189
|
+
"application_role": "\\"some_application\\".\\"some_application_role\\"",
|
|
190
|
+
})
|
|
191
|
+
# database role
|
|
192
|
+
example_of_database_role = snowflake.get_grants(grants_of={
|
|
193
|
+
"database_role": "\\"some_database\\".\\"some_database_role\\"",
|
|
194
|
+
})
|
|
195
|
+
# account role
|
|
196
|
+
example_of_role = snowflake.get_grants(grants_of={
|
|
197
|
+
"account_role": "some_role",
|
|
198
|
+
})
|
|
199
|
+
# share
|
|
200
|
+
example_of_share = snowflake.get_grants(grants_of={
|
|
201
|
+
"share": "some_share",
|
|
202
|
+
})
|
|
203
|
+
# database
|
|
204
|
+
example_future_in_database = snowflake.get_grants(future_grants_in={
|
|
205
|
+
"database": "some_database",
|
|
206
|
+
})
|
|
207
|
+
# schema
|
|
208
|
+
example_future_in_schema = snowflake.get_grants(future_grants_in={
|
|
209
|
+
"schema": "\\"some_database\\".\\"some_schema\\"",
|
|
210
|
+
})
|
|
211
|
+
# account role
|
|
212
|
+
example_future_to_role = snowflake.get_grants(future_grants_to={
|
|
213
|
+
"account_role": "some_role",
|
|
214
|
+
})
|
|
215
|
+
# database role
|
|
216
|
+
example_future_to_database_role = snowflake.get_grants(future_grants_to={
|
|
217
|
+
"database_role": "\\"some_database\\".\\"some_database_role\\"",
|
|
218
|
+
})
|
|
160
219
|
```
|
|
161
|
-
<!--End PulumiCodeChooser -->
|
|
162
220
|
|
|
163
221
|
|
|
164
|
-
:param
|
|
165
|
-
:param
|
|
166
|
-
:param
|
|
167
|
-
:param
|
|
168
|
-
:param
|
|
222
|
+
:param Union['GetGrantsFutureGrantsInArgs', 'GetGrantsFutureGrantsInArgsDict'] future_grants_in: Lists all privileges on new (i.e. future) objects.
|
|
223
|
+
:param Union['GetGrantsFutureGrantsToArgs', 'GetGrantsFutureGrantsToArgsDict'] future_grants_to: Lists all privileges granted to the object on new (i.e. future) objects.
|
|
224
|
+
:param Union['GetGrantsGrantsOfArgs', 'GetGrantsGrantsOfArgsDict'] grants_of: Lists all objects to which the given object has been granted.
|
|
225
|
+
:param Union['GetGrantsGrantsOnArgs', 'GetGrantsGrantsOnArgsDict'] grants_on: Lists all privileges that have been granted on an object or on an account.
|
|
226
|
+
:param Union['GetGrantsGrantsToArgs', 'GetGrantsGrantsToArgsDict'] grants_to: Lists all privileges granted to the object.
|
|
169
227
|
"""
|
|
170
228
|
__args__ = dict()
|
|
171
229
|
__args__['futureGrantsIn'] = future_grants_in
|
|
@@ -184,56 +242,121 @@ def get_grants(future_grants_in: Optional[pulumi.InputType['GetGrantsFutureGrant
|
|
|
184
242
|
grants_on=pulumi.get(__ret__, 'grants_on'),
|
|
185
243
|
grants_to=pulumi.get(__ret__, 'grants_to'),
|
|
186
244
|
id=pulumi.get(__ret__, 'id'))
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
grants_on: Optional[pulumi.Input[Optional[pulumi.InputType['GetGrantsGrantsOnArgs']]]] = None,
|
|
194
|
-
grants_to: Optional[pulumi.Input[Optional[pulumi.InputType['GetGrantsGrantsToArgs']]]] = None,
|
|
195
|
-
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetGrantsResult]:
|
|
245
|
+
def get_grants_output(future_grants_in: Optional[pulumi.Input[Optional[Union['GetGrantsFutureGrantsInArgs', 'GetGrantsFutureGrantsInArgsDict']]]] = None,
|
|
246
|
+
future_grants_to: Optional[pulumi.Input[Optional[Union['GetGrantsFutureGrantsToArgs', 'GetGrantsFutureGrantsToArgsDict']]]] = None,
|
|
247
|
+
grants_of: Optional[pulumi.Input[Optional[Union['GetGrantsGrantsOfArgs', 'GetGrantsGrantsOfArgsDict']]]] = None,
|
|
248
|
+
grants_on: Optional[pulumi.Input[Optional[Union['GetGrantsGrantsOnArgs', 'GetGrantsGrantsOnArgsDict']]]] = None,
|
|
249
|
+
grants_to: Optional[pulumi.Input[Optional[Union['GetGrantsGrantsToArgs', 'GetGrantsGrantsToArgsDict']]]] = None,
|
|
250
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetGrantsResult]:
|
|
196
251
|
"""
|
|
197
252
|
## Example Usage
|
|
198
253
|
|
|
199
|
-
<!--Start PulumiCodeChooser -->
|
|
200
254
|
```python
|
|
201
255
|
import pulumi
|
|
202
256
|
import pulumi_snowflake as snowflake
|
|
203
257
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
)
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
)
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
)
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
258
|
+
##################################
|
|
259
|
+
### SHOW GRANTS ON ...
|
|
260
|
+
##################################
|
|
261
|
+
# account
|
|
262
|
+
example_on_account = snowflake.get_grants(grants_on={
|
|
263
|
+
"account": True,
|
|
264
|
+
})
|
|
265
|
+
# account object (e.g. database)
|
|
266
|
+
example_on_account_object = snowflake.get_grants(grants_on={
|
|
267
|
+
"object_name": "some_database",
|
|
268
|
+
"object_type": "DATABASE",
|
|
269
|
+
})
|
|
270
|
+
# database object (e.g. schema)
|
|
271
|
+
example_on_database_object = snowflake.get_grants(grants_on={
|
|
272
|
+
"object_name": "\\"some_database\\".\\"some_schema\\"",
|
|
273
|
+
"object_type": "SCHEMA",
|
|
274
|
+
})
|
|
275
|
+
# schema object (e.g. table)
|
|
276
|
+
example_on_schema_object = snowflake.get_grants(grants_on={
|
|
277
|
+
"object_name": "\\"some_database\\".\\"some_schema\\".\\"some_table\\"",
|
|
278
|
+
"object_type": "TABLE",
|
|
279
|
+
})
|
|
280
|
+
# application
|
|
281
|
+
example_to_application = snowflake.get_grants(grants_to={
|
|
282
|
+
"application": "some_application",
|
|
283
|
+
})
|
|
284
|
+
# application role
|
|
285
|
+
example_to_application_role = snowflake.get_grants(grants_to={
|
|
286
|
+
"application_role": "\\"some_application\\".\\"some_application_role\\"",
|
|
287
|
+
})
|
|
288
|
+
# account role
|
|
289
|
+
example_to_role = snowflake.get_grants(grants_to={
|
|
290
|
+
"account_role": "some_role",
|
|
291
|
+
})
|
|
292
|
+
# database role
|
|
293
|
+
example_to_database_role = snowflake.get_grants(grants_to={
|
|
294
|
+
"database_role": "\\"some_database\\".\\"some_database_role\\"",
|
|
295
|
+
})
|
|
296
|
+
# share
|
|
297
|
+
example_to_share = snowflake.get_grants(grants_to={
|
|
298
|
+
"share": {
|
|
299
|
+
"share_name": "some_share",
|
|
300
|
+
},
|
|
301
|
+
})
|
|
302
|
+
# user
|
|
303
|
+
example_to_user = snowflake.get_grants(grants_to={
|
|
304
|
+
"user": "some_user",
|
|
305
|
+
})
|
|
306
|
+
# application role
|
|
307
|
+
example_of_application_role = snowflake.get_grants(grants_of={
|
|
308
|
+
"application_role": "\\"some_application\\".\\"some_application_role\\"",
|
|
309
|
+
})
|
|
310
|
+
# database role
|
|
311
|
+
example_of_database_role = snowflake.get_grants(grants_of={
|
|
312
|
+
"database_role": "\\"some_database\\".\\"some_database_role\\"",
|
|
313
|
+
})
|
|
314
|
+
# account role
|
|
315
|
+
example_of_role = snowflake.get_grants(grants_of={
|
|
316
|
+
"account_role": "some_role",
|
|
317
|
+
})
|
|
318
|
+
# share
|
|
319
|
+
example_of_share = snowflake.get_grants(grants_of={
|
|
320
|
+
"share": "some_share",
|
|
321
|
+
})
|
|
322
|
+
# database
|
|
323
|
+
example_future_in_database = snowflake.get_grants(future_grants_in={
|
|
324
|
+
"database": "some_database",
|
|
325
|
+
})
|
|
326
|
+
# schema
|
|
327
|
+
example_future_in_schema = snowflake.get_grants(future_grants_in={
|
|
328
|
+
"schema": "\\"some_database\\".\\"some_schema\\"",
|
|
329
|
+
})
|
|
330
|
+
# account role
|
|
331
|
+
example_future_to_role = snowflake.get_grants(future_grants_to={
|
|
332
|
+
"account_role": "some_role",
|
|
333
|
+
})
|
|
334
|
+
# database role
|
|
335
|
+
example_future_to_database_role = snowflake.get_grants(future_grants_to={
|
|
336
|
+
"database_role": "\\"some_database\\".\\"some_database_role\\"",
|
|
337
|
+
})
|
|
229
338
|
```
|
|
230
|
-
<!--End PulumiCodeChooser -->
|
|
231
339
|
|
|
232
340
|
|
|
233
|
-
:param
|
|
234
|
-
:param
|
|
235
|
-
:param
|
|
236
|
-
:param
|
|
237
|
-
:param
|
|
341
|
+
:param Union['GetGrantsFutureGrantsInArgs', 'GetGrantsFutureGrantsInArgsDict'] future_grants_in: Lists all privileges on new (i.e. future) objects.
|
|
342
|
+
:param Union['GetGrantsFutureGrantsToArgs', 'GetGrantsFutureGrantsToArgsDict'] future_grants_to: Lists all privileges granted to the object on new (i.e. future) objects.
|
|
343
|
+
:param Union['GetGrantsGrantsOfArgs', 'GetGrantsGrantsOfArgsDict'] grants_of: Lists all objects to which the given object has been granted.
|
|
344
|
+
:param Union['GetGrantsGrantsOnArgs', 'GetGrantsGrantsOnArgsDict'] grants_on: Lists all privileges that have been granted on an object or on an account.
|
|
345
|
+
:param Union['GetGrantsGrantsToArgs', 'GetGrantsGrantsToArgsDict'] grants_to: Lists all privileges granted to the object.
|
|
238
346
|
"""
|
|
239
|
-
|
|
347
|
+
__args__ = dict()
|
|
348
|
+
__args__['futureGrantsIn'] = future_grants_in
|
|
349
|
+
__args__['futureGrantsTo'] = future_grants_to
|
|
350
|
+
__args__['grantsOf'] = grants_of
|
|
351
|
+
__args__['grantsOn'] = grants_on
|
|
352
|
+
__args__['grantsTo'] = grants_to
|
|
353
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
|
354
|
+
__ret__ = pulumi.runtime.invoke_output('snowflake:index/getGrants:getGrants', __args__, opts=opts, typ=GetGrantsResult)
|
|
355
|
+
return __ret__.apply(lambda __response__: GetGrantsResult(
|
|
356
|
+
future_grants_in=pulumi.get(__response__, 'future_grants_in'),
|
|
357
|
+
future_grants_to=pulumi.get(__response__, 'future_grants_to'),
|
|
358
|
+
grants=pulumi.get(__response__, 'grants'),
|
|
359
|
+
grants_of=pulumi.get(__response__, 'grants_of'),
|
|
360
|
+
grants_on=pulumi.get(__response__, 'grants_on'),
|
|
361
|
+
grants_to=pulumi.get(__response__, 'grants_to'),
|
|
362
|
+
id=pulumi.get(__response__, 'id')))
|