pulumi-snowflake 0.50.3a1710160126__py3-none-any.whl → 1.2.0a1736849992__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.0a1736849992.dist-info}/METADATA +7 -6
- pulumi_snowflake-1.2.0a1736849992.dist-info/RECORD +148 -0
- {pulumi_snowflake-0.50.3a1710160126.dist-info → pulumi_snowflake-1.2.0a1736849992.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.0a1736849992.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
|
|
|
12
17
|
__all__ = ['GrantDatabaseRoleArgs', 'GrantDatabaseRole']
|
|
@@ -20,10 +25,10 @@ class GrantDatabaseRoleArgs:
|
|
|
20
25
|
share_name: Optional[pulumi.Input[str]] = None):
|
|
21
26
|
"""
|
|
22
27
|
The set of arguments for constructing a GrantDatabaseRole resource.
|
|
23
|
-
:param pulumi.Input[str] database_role_name: The fully qualified name of the database role which will be granted to share or parent role.
|
|
24
|
-
:param pulumi.Input[str] parent_database_role_name: The fully qualified name of the parent database role which will create a parent-child relationship between the roles.
|
|
25
|
-
:param pulumi.Input[str] parent_role_name: The fully qualified name of the parent account role which will create a parent-child relationship between the roles.
|
|
26
|
-
:param pulumi.Input[str] share_name: The fully qualified name of the share on which privileges will be granted.
|
|
28
|
+
:param pulumi.Input[str] database_role_name: The fully qualified name of the database role which will be granted to share or parent role. For more information about this resource, see docs.
|
|
29
|
+
:param pulumi.Input[str] parent_database_role_name: The fully qualified name of the parent database role which will create a parent-child relationship between the roles. For more information about this resource, see docs.
|
|
30
|
+
:param pulumi.Input[str] parent_role_name: The fully qualified name of the parent account role which will create a parent-child relationship between the roles. For more information about this resource, see docs.
|
|
31
|
+
:param pulumi.Input[str] share_name: The fully qualified name of the share on which privileges will be granted. For more information about this resource, see docs.
|
|
27
32
|
"""
|
|
28
33
|
pulumi.set(__self__, "database_role_name", database_role_name)
|
|
29
34
|
if parent_database_role_name is not None:
|
|
@@ -37,7 +42,7 @@ class GrantDatabaseRoleArgs:
|
|
|
37
42
|
@pulumi.getter(name="databaseRoleName")
|
|
38
43
|
def database_role_name(self) -> pulumi.Input[str]:
|
|
39
44
|
"""
|
|
40
|
-
The fully qualified name of the database role which will be granted to share or parent role.
|
|
45
|
+
The fully qualified name of the database role which will be granted to share or parent role. For more information about this resource, see docs.
|
|
41
46
|
"""
|
|
42
47
|
return pulumi.get(self, "database_role_name")
|
|
43
48
|
|
|
@@ -49,7 +54,7 @@ class GrantDatabaseRoleArgs:
|
|
|
49
54
|
@pulumi.getter(name="parentDatabaseRoleName")
|
|
50
55
|
def parent_database_role_name(self) -> Optional[pulumi.Input[str]]:
|
|
51
56
|
"""
|
|
52
|
-
The fully qualified name of the parent database role which will create a parent-child relationship between the roles.
|
|
57
|
+
The fully qualified name of the parent database role which will create a parent-child relationship between the roles. For more information about this resource, see docs.
|
|
53
58
|
"""
|
|
54
59
|
return pulumi.get(self, "parent_database_role_name")
|
|
55
60
|
|
|
@@ -61,7 +66,7 @@ class GrantDatabaseRoleArgs:
|
|
|
61
66
|
@pulumi.getter(name="parentRoleName")
|
|
62
67
|
def parent_role_name(self) -> Optional[pulumi.Input[str]]:
|
|
63
68
|
"""
|
|
64
|
-
The fully qualified name of the parent account role which will create a parent-child relationship between the roles.
|
|
69
|
+
The fully qualified name of the parent account role which will create a parent-child relationship between the roles. For more information about this resource, see docs.
|
|
65
70
|
"""
|
|
66
71
|
return pulumi.get(self, "parent_role_name")
|
|
67
72
|
|
|
@@ -73,7 +78,7 @@ class GrantDatabaseRoleArgs:
|
|
|
73
78
|
@pulumi.getter(name="shareName")
|
|
74
79
|
def share_name(self) -> Optional[pulumi.Input[str]]:
|
|
75
80
|
"""
|
|
76
|
-
The fully qualified name of the share on which privileges will be granted.
|
|
81
|
+
The fully qualified name of the share on which privileges will be granted. For more information about this resource, see docs.
|
|
77
82
|
"""
|
|
78
83
|
return pulumi.get(self, "share_name")
|
|
79
84
|
|
|
@@ -91,10 +96,10 @@ class _GrantDatabaseRoleState:
|
|
|
91
96
|
share_name: Optional[pulumi.Input[str]] = None):
|
|
92
97
|
"""
|
|
93
98
|
Input properties used for looking up and filtering GrantDatabaseRole resources.
|
|
94
|
-
:param pulumi.Input[str] database_role_name: The fully qualified name of the database role which will be granted to share or parent role.
|
|
95
|
-
:param pulumi.Input[str] parent_database_role_name: The fully qualified name of the parent database role which will create a parent-child relationship between the roles.
|
|
96
|
-
:param pulumi.Input[str] parent_role_name: The fully qualified name of the parent account role which will create a parent-child relationship between the roles.
|
|
97
|
-
:param pulumi.Input[str] share_name: The fully qualified name of the share on which privileges will be granted.
|
|
99
|
+
:param pulumi.Input[str] database_role_name: The fully qualified name of the database role which will be granted to share or parent role. For more information about this resource, see docs.
|
|
100
|
+
:param pulumi.Input[str] parent_database_role_name: The fully qualified name of the parent database role which will create a parent-child relationship between the roles. For more information about this resource, see docs.
|
|
101
|
+
:param pulumi.Input[str] parent_role_name: The fully qualified name of the parent account role which will create a parent-child relationship between the roles. For more information about this resource, see docs.
|
|
102
|
+
:param pulumi.Input[str] share_name: The fully qualified name of the share on which privileges will be granted. For more information about this resource, see docs.
|
|
98
103
|
"""
|
|
99
104
|
if database_role_name is not None:
|
|
100
105
|
pulumi.set(__self__, "database_role_name", database_role_name)
|
|
@@ -109,7 +114,7 @@ class _GrantDatabaseRoleState:
|
|
|
109
114
|
@pulumi.getter(name="databaseRoleName")
|
|
110
115
|
def database_role_name(self) -> Optional[pulumi.Input[str]]:
|
|
111
116
|
"""
|
|
112
|
-
The fully qualified name of the database role which will be granted to share or parent role.
|
|
117
|
+
The fully qualified name of the database role which will be granted to share or parent role. For more information about this resource, see docs.
|
|
113
118
|
"""
|
|
114
119
|
return pulumi.get(self, "database_role_name")
|
|
115
120
|
|
|
@@ -121,7 +126,7 @@ class _GrantDatabaseRoleState:
|
|
|
121
126
|
@pulumi.getter(name="parentDatabaseRoleName")
|
|
122
127
|
def parent_database_role_name(self) -> Optional[pulumi.Input[str]]:
|
|
123
128
|
"""
|
|
124
|
-
The fully qualified name of the parent database role which will create a parent-child relationship between the roles.
|
|
129
|
+
The fully qualified name of the parent database role which will create a parent-child relationship between the roles. For more information about this resource, see docs.
|
|
125
130
|
"""
|
|
126
131
|
return pulumi.get(self, "parent_database_role_name")
|
|
127
132
|
|
|
@@ -133,7 +138,7 @@ class _GrantDatabaseRoleState:
|
|
|
133
138
|
@pulumi.getter(name="parentRoleName")
|
|
134
139
|
def parent_role_name(self) -> Optional[pulumi.Input[str]]:
|
|
135
140
|
"""
|
|
136
|
-
The fully qualified name of the parent account role which will create a parent-child relationship between the roles.
|
|
141
|
+
The fully qualified name of the parent account role which will create a parent-child relationship between the roles. For more information about this resource, see docs.
|
|
137
142
|
"""
|
|
138
143
|
return pulumi.get(self, "parent_role_name")
|
|
139
144
|
|
|
@@ -145,7 +150,7 @@ class _GrantDatabaseRoleState:
|
|
|
145
150
|
@pulumi.getter(name="shareName")
|
|
146
151
|
def share_name(self) -> Optional[pulumi.Input[str]]:
|
|
147
152
|
"""
|
|
148
|
-
The fully qualified name of the share on which privileges will be granted.
|
|
153
|
+
The fully qualified name of the share on which privileges will be granted. For more information about this resource, see docs.
|
|
149
154
|
"""
|
|
150
155
|
return pulumi.get(self, "share_name")
|
|
151
156
|
|
|
@@ -165,52 +170,20 @@ class GrantDatabaseRole(pulumi.CustomResource):
|
|
|
165
170
|
share_name: Optional[pulumi.Input[str]] = None,
|
|
166
171
|
__props__=None):
|
|
167
172
|
"""
|
|
168
|
-
## Example Usage
|
|
169
|
-
|
|
170
|
-
<!--Start PulumiCodeChooser -->
|
|
171
|
-
```python
|
|
172
|
-
import pulumi
|
|
173
|
-
import pulumi_snowflake as snowflake
|
|
174
|
-
|
|
175
|
-
##################################
|
|
176
|
-
### grant database role to account role
|
|
177
|
-
##################################
|
|
178
|
-
database_role_database_role = snowflake.DatabaseRole("databaseRoleDatabaseRole", database=var["database"])
|
|
179
|
-
parent_role = snowflake.Role("parentRole")
|
|
180
|
-
grant_database_role = snowflake.GrantDatabaseRole("grantDatabaseRole",
|
|
181
|
-
database_role_name=database_role_database_role.name.apply(lambda name: f"\\"{var['database']}\\".\\"{name}\\""),
|
|
182
|
-
parent_role_name=parent_role.name)
|
|
183
|
-
##################################
|
|
184
|
-
### grant database role to database role
|
|
185
|
-
##################################
|
|
186
|
-
database_role_index_database_role_database_role = snowflake.DatabaseRole("databaseRoleIndex/databaseRoleDatabaseRole", database=var["database"])
|
|
187
|
-
parent_database_role = snowflake.DatabaseRole("parentDatabaseRole", database=var["database"])
|
|
188
|
-
index_grant_database_role_grant_database_role = snowflake.GrantDatabaseRole("index/grantDatabaseRoleGrantDatabaseRole",
|
|
189
|
-
database_role_name=database_role_database_role.name.apply(lambda name: f"\\"{var['database']}\\".\\"{name}\\""),
|
|
190
|
-
parent_database_role_name=parent_database_role.name.apply(lambda name: f"\\"{var['database']}\\".\\"{name}\\""))
|
|
191
|
-
##################################
|
|
192
|
-
### grant database role to share
|
|
193
|
-
##################################
|
|
194
|
-
snowflake_index_grant_database_role_grant_database_role = snowflake.GrantDatabaseRole("snowflakeIndex/grantDatabaseRoleGrantDatabaseRole",
|
|
195
|
-
database_role_name=database_role_database_role.name.apply(lambda name: f"\\"{var['database']}\\".\\"{name}\\""),
|
|
196
|
-
share_name=snowflake_share["share"]["name"])
|
|
197
|
-
```
|
|
198
|
-
<!--End PulumiCodeChooser -->
|
|
199
|
-
|
|
200
173
|
## Import
|
|
201
174
|
|
|
202
175
|
format is database_role_name (string) | object_type (ROLE|DATABASE ROLE|SHARE) | grantee_name (string)
|
|
203
176
|
|
|
204
177
|
```sh
|
|
205
|
-
$ pulumi import snowflake:index/grantDatabaseRole:GrantDatabaseRole
|
|
178
|
+
$ pulumi import snowflake:index/grantDatabaseRole:GrantDatabaseRole example '"ABC"."test_db_role"|ROLE|"test_parent_role"'
|
|
206
179
|
```
|
|
207
180
|
|
|
208
181
|
:param str resource_name: The name of the resource.
|
|
209
182
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
210
|
-
:param pulumi.Input[str] database_role_name: The fully qualified name of the database role which will be granted to share or parent role.
|
|
211
|
-
:param pulumi.Input[str] parent_database_role_name: The fully qualified name of the parent database role which will create a parent-child relationship between the roles.
|
|
212
|
-
:param pulumi.Input[str] parent_role_name: The fully qualified name of the parent account role which will create a parent-child relationship between the roles.
|
|
213
|
-
:param pulumi.Input[str] share_name: The fully qualified name of the share on which privileges will be granted.
|
|
183
|
+
:param pulumi.Input[str] database_role_name: The fully qualified name of the database role which will be granted to share or parent role. For more information about this resource, see docs.
|
|
184
|
+
:param pulumi.Input[str] parent_database_role_name: The fully qualified name of the parent database role which will create a parent-child relationship between the roles. For more information about this resource, see docs.
|
|
185
|
+
:param pulumi.Input[str] parent_role_name: The fully qualified name of the parent account role which will create a parent-child relationship between the roles. For more information about this resource, see docs.
|
|
186
|
+
:param pulumi.Input[str] share_name: The fully qualified name of the share on which privileges will be granted. For more information about this resource, see docs.
|
|
214
187
|
"""
|
|
215
188
|
...
|
|
216
189
|
@overload
|
|
@@ -219,44 +192,12 @@ class GrantDatabaseRole(pulumi.CustomResource):
|
|
|
219
192
|
args: GrantDatabaseRoleArgs,
|
|
220
193
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
221
194
|
"""
|
|
222
|
-
## Example Usage
|
|
223
|
-
|
|
224
|
-
<!--Start PulumiCodeChooser -->
|
|
225
|
-
```python
|
|
226
|
-
import pulumi
|
|
227
|
-
import pulumi_snowflake as snowflake
|
|
228
|
-
|
|
229
|
-
##################################
|
|
230
|
-
### grant database role to account role
|
|
231
|
-
##################################
|
|
232
|
-
database_role_database_role = snowflake.DatabaseRole("databaseRoleDatabaseRole", database=var["database"])
|
|
233
|
-
parent_role = snowflake.Role("parentRole")
|
|
234
|
-
grant_database_role = snowflake.GrantDatabaseRole("grantDatabaseRole",
|
|
235
|
-
database_role_name=database_role_database_role.name.apply(lambda name: f"\\"{var['database']}\\".\\"{name}\\""),
|
|
236
|
-
parent_role_name=parent_role.name)
|
|
237
|
-
##################################
|
|
238
|
-
### grant database role to database role
|
|
239
|
-
##################################
|
|
240
|
-
database_role_index_database_role_database_role = snowflake.DatabaseRole("databaseRoleIndex/databaseRoleDatabaseRole", database=var["database"])
|
|
241
|
-
parent_database_role = snowflake.DatabaseRole("parentDatabaseRole", database=var["database"])
|
|
242
|
-
index_grant_database_role_grant_database_role = snowflake.GrantDatabaseRole("index/grantDatabaseRoleGrantDatabaseRole",
|
|
243
|
-
database_role_name=database_role_database_role.name.apply(lambda name: f"\\"{var['database']}\\".\\"{name}\\""),
|
|
244
|
-
parent_database_role_name=parent_database_role.name.apply(lambda name: f"\\"{var['database']}\\".\\"{name}\\""))
|
|
245
|
-
##################################
|
|
246
|
-
### grant database role to share
|
|
247
|
-
##################################
|
|
248
|
-
snowflake_index_grant_database_role_grant_database_role = snowflake.GrantDatabaseRole("snowflakeIndex/grantDatabaseRoleGrantDatabaseRole",
|
|
249
|
-
database_role_name=database_role_database_role.name.apply(lambda name: f"\\"{var['database']}\\".\\"{name}\\""),
|
|
250
|
-
share_name=snowflake_share["share"]["name"])
|
|
251
|
-
```
|
|
252
|
-
<!--End PulumiCodeChooser -->
|
|
253
|
-
|
|
254
195
|
## Import
|
|
255
196
|
|
|
256
197
|
format is database_role_name (string) | object_type (ROLE|DATABASE ROLE|SHARE) | grantee_name (string)
|
|
257
198
|
|
|
258
199
|
```sh
|
|
259
|
-
$ pulumi import snowflake:index/grantDatabaseRole:GrantDatabaseRole
|
|
200
|
+
$ pulumi import snowflake:index/grantDatabaseRole:GrantDatabaseRole example '"ABC"."test_db_role"|ROLE|"test_parent_role"'
|
|
260
201
|
```
|
|
261
202
|
|
|
262
203
|
:param str resource_name: The name of the resource.
|
|
@@ -314,10 +255,10 @@ class GrantDatabaseRole(pulumi.CustomResource):
|
|
|
314
255
|
:param str resource_name: The unique name of the resulting resource.
|
|
315
256
|
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
|
316
257
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
317
|
-
:param pulumi.Input[str] database_role_name: The fully qualified name of the database role which will be granted to share or parent role.
|
|
318
|
-
:param pulumi.Input[str] parent_database_role_name: The fully qualified name of the parent database role which will create a parent-child relationship between the roles.
|
|
319
|
-
:param pulumi.Input[str] parent_role_name: The fully qualified name of the parent account role which will create a parent-child relationship between the roles.
|
|
320
|
-
:param pulumi.Input[str] share_name: The fully qualified name of the share on which privileges will be granted.
|
|
258
|
+
:param pulumi.Input[str] database_role_name: The fully qualified name of the database role which will be granted to share or parent role. For more information about this resource, see docs.
|
|
259
|
+
:param pulumi.Input[str] parent_database_role_name: The fully qualified name of the parent database role which will create a parent-child relationship between the roles. For more information about this resource, see docs.
|
|
260
|
+
:param pulumi.Input[str] parent_role_name: The fully qualified name of the parent account role which will create a parent-child relationship between the roles. For more information about this resource, see docs.
|
|
261
|
+
:param pulumi.Input[str] share_name: The fully qualified name of the share on which privileges will be granted. For more information about this resource, see docs.
|
|
321
262
|
"""
|
|
322
263
|
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
|
323
264
|
|
|
@@ -333,7 +274,7 @@ class GrantDatabaseRole(pulumi.CustomResource):
|
|
|
333
274
|
@pulumi.getter(name="databaseRoleName")
|
|
334
275
|
def database_role_name(self) -> pulumi.Output[str]:
|
|
335
276
|
"""
|
|
336
|
-
The fully qualified name of the database role which will be granted to share or parent role.
|
|
277
|
+
The fully qualified name of the database role which will be granted to share or parent role. For more information about this resource, see docs.
|
|
337
278
|
"""
|
|
338
279
|
return pulumi.get(self, "database_role_name")
|
|
339
280
|
|
|
@@ -341,7 +282,7 @@ class GrantDatabaseRole(pulumi.CustomResource):
|
|
|
341
282
|
@pulumi.getter(name="parentDatabaseRoleName")
|
|
342
283
|
def parent_database_role_name(self) -> pulumi.Output[Optional[str]]:
|
|
343
284
|
"""
|
|
344
|
-
The fully qualified name of the parent database role which will create a parent-child relationship between the roles.
|
|
285
|
+
The fully qualified name of the parent database role which will create a parent-child relationship between the roles. For more information about this resource, see docs.
|
|
345
286
|
"""
|
|
346
287
|
return pulumi.get(self, "parent_database_role_name")
|
|
347
288
|
|
|
@@ -349,7 +290,7 @@ class GrantDatabaseRole(pulumi.CustomResource):
|
|
|
349
290
|
@pulumi.getter(name="parentRoleName")
|
|
350
291
|
def parent_role_name(self) -> pulumi.Output[Optional[str]]:
|
|
351
292
|
"""
|
|
352
|
-
The fully qualified name of the parent account role which will create a parent-child relationship between the roles.
|
|
293
|
+
The fully qualified name of the parent account role which will create a parent-child relationship between the roles. For more information about this resource, see docs.
|
|
353
294
|
"""
|
|
354
295
|
return pulumi.get(self, "parent_role_name")
|
|
355
296
|
|
|
@@ -357,7 +298,7 @@ class GrantDatabaseRole(pulumi.CustomResource):
|
|
|
357
298
|
@pulumi.getter(name="shareName")
|
|
358
299
|
def share_name(self) -> pulumi.Output[Optional[str]]:
|
|
359
300
|
"""
|
|
360
|
-
The fully qualified name of the share on which privileges will be granted.
|
|
301
|
+
The fully qualified name of the share on which privileges will be granted. For more information about this resource, see docs.
|
|
361
302
|
"""
|
|
362
303
|
return pulumi.get(self, "share_name")
|
|
363
304
|
|
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
# coding=utf-8
|
|
2
|
+
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
|
3
|
+
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
|
|
5
|
+
import copy
|
|
6
|
+
import warnings
|
|
7
|
+
import sys
|
|
8
|
+
import pulumi
|
|
9
|
+
import pulumi.runtime
|
|
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
|
|
15
|
+
from . import _utilities
|
|
16
|
+
from . import outputs
|
|
17
|
+
from ._inputs import *
|
|
18
|
+
|
|
19
|
+
__all__ = ['GrantOwnershipArgs', 'GrantOwnership']
|
|
20
|
+
|
|
21
|
+
@pulumi.input_type
|
|
22
|
+
class GrantOwnershipArgs:
|
|
23
|
+
def __init__(__self__, *,
|
|
24
|
+
on: pulumi.Input['GrantOwnershipOnArgs'],
|
|
25
|
+
account_role_name: Optional[pulumi.Input[str]] = None,
|
|
26
|
+
database_role_name: Optional[pulumi.Input[str]] = None,
|
|
27
|
+
outbound_privileges: Optional[pulumi.Input[str]] = None):
|
|
28
|
+
"""
|
|
29
|
+
The set of arguments for constructing a GrantOwnership resource.
|
|
30
|
+
:param pulumi.Input['GrantOwnershipOnArgs'] on: Configures which object(s) should transfer their ownership to the specified role.
|
|
31
|
+
:param pulumi.Input[str] account_role_name: The fully qualified name of the account role to which privileges will be granted. For more information about this resource, see docs.
|
|
32
|
+
:param pulumi.Input[str] database_role_name: The fully qualified name of the database role to which privileges will be granted. For more information about this resource, see docs.
|
|
33
|
+
:param pulumi.Input[str] outbound_privileges: Specifies whether to remove or transfer all existing outbound privileges on the object when ownership is transferred to a new role. Available options are: REVOKE for removing existing privileges and COPY to transfer them with ownership. For more information head over to [Snowflake documentation](https://docs.snowflake.com/en/sql-reference/sql/grant-ownership#optional-parameters).
|
|
34
|
+
"""
|
|
35
|
+
pulumi.set(__self__, "on", on)
|
|
36
|
+
if account_role_name is not None:
|
|
37
|
+
pulumi.set(__self__, "account_role_name", account_role_name)
|
|
38
|
+
if database_role_name is not None:
|
|
39
|
+
pulumi.set(__self__, "database_role_name", database_role_name)
|
|
40
|
+
if outbound_privileges is not None:
|
|
41
|
+
pulumi.set(__self__, "outbound_privileges", outbound_privileges)
|
|
42
|
+
|
|
43
|
+
@property
|
|
44
|
+
@pulumi.getter
|
|
45
|
+
def on(self) -> pulumi.Input['GrantOwnershipOnArgs']:
|
|
46
|
+
"""
|
|
47
|
+
Configures which object(s) should transfer their ownership to the specified role.
|
|
48
|
+
"""
|
|
49
|
+
return pulumi.get(self, "on")
|
|
50
|
+
|
|
51
|
+
@on.setter
|
|
52
|
+
def on(self, value: pulumi.Input['GrantOwnershipOnArgs']):
|
|
53
|
+
pulumi.set(self, "on", value)
|
|
54
|
+
|
|
55
|
+
@property
|
|
56
|
+
@pulumi.getter(name="accountRoleName")
|
|
57
|
+
def account_role_name(self) -> Optional[pulumi.Input[str]]:
|
|
58
|
+
"""
|
|
59
|
+
The fully qualified name of the account role to which privileges will be granted. For more information about this resource, see docs.
|
|
60
|
+
"""
|
|
61
|
+
return pulumi.get(self, "account_role_name")
|
|
62
|
+
|
|
63
|
+
@account_role_name.setter
|
|
64
|
+
def account_role_name(self, value: Optional[pulumi.Input[str]]):
|
|
65
|
+
pulumi.set(self, "account_role_name", value)
|
|
66
|
+
|
|
67
|
+
@property
|
|
68
|
+
@pulumi.getter(name="databaseRoleName")
|
|
69
|
+
def database_role_name(self) -> Optional[pulumi.Input[str]]:
|
|
70
|
+
"""
|
|
71
|
+
The fully qualified name of the database role to which privileges will be granted. For more information about this resource, see docs.
|
|
72
|
+
"""
|
|
73
|
+
return pulumi.get(self, "database_role_name")
|
|
74
|
+
|
|
75
|
+
@database_role_name.setter
|
|
76
|
+
def database_role_name(self, value: Optional[pulumi.Input[str]]):
|
|
77
|
+
pulumi.set(self, "database_role_name", value)
|
|
78
|
+
|
|
79
|
+
@property
|
|
80
|
+
@pulumi.getter(name="outboundPrivileges")
|
|
81
|
+
def outbound_privileges(self) -> Optional[pulumi.Input[str]]:
|
|
82
|
+
"""
|
|
83
|
+
Specifies whether to remove or transfer all existing outbound privileges on the object when ownership is transferred to a new role. Available options are: REVOKE for removing existing privileges and COPY to transfer them with ownership. For more information head over to [Snowflake documentation](https://docs.snowflake.com/en/sql-reference/sql/grant-ownership#optional-parameters).
|
|
84
|
+
"""
|
|
85
|
+
return pulumi.get(self, "outbound_privileges")
|
|
86
|
+
|
|
87
|
+
@outbound_privileges.setter
|
|
88
|
+
def outbound_privileges(self, value: Optional[pulumi.Input[str]]):
|
|
89
|
+
pulumi.set(self, "outbound_privileges", value)
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
@pulumi.input_type
|
|
93
|
+
class _GrantOwnershipState:
|
|
94
|
+
def __init__(__self__, *,
|
|
95
|
+
account_role_name: Optional[pulumi.Input[str]] = None,
|
|
96
|
+
database_role_name: Optional[pulumi.Input[str]] = None,
|
|
97
|
+
on: Optional[pulumi.Input['GrantOwnershipOnArgs']] = None,
|
|
98
|
+
outbound_privileges: Optional[pulumi.Input[str]] = None):
|
|
99
|
+
"""
|
|
100
|
+
Input properties used for looking up and filtering GrantOwnership resources.
|
|
101
|
+
:param pulumi.Input[str] account_role_name: The fully qualified name of the account role to which privileges will be granted. For more information about this resource, see docs.
|
|
102
|
+
:param pulumi.Input[str] database_role_name: The fully qualified name of the database role to which privileges will be granted. For more information about this resource, see docs.
|
|
103
|
+
:param pulumi.Input['GrantOwnershipOnArgs'] on: Configures which object(s) should transfer their ownership to the specified role.
|
|
104
|
+
:param pulumi.Input[str] outbound_privileges: Specifies whether to remove or transfer all existing outbound privileges on the object when ownership is transferred to a new role. Available options are: REVOKE for removing existing privileges and COPY to transfer them with ownership. For more information head over to [Snowflake documentation](https://docs.snowflake.com/en/sql-reference/sql/grant-ownership#optional-parameters).
|
|
105
|
+
"""
|
|
106
|
+
if account_role_name is not None:
|
|
107
|
+
pulumi.set(__self__, "account_role_name", account_role_name)
|
|
108
|
+
if database_role_name is not None:
|
|
109
|
+
pulumi.set(__self__, "database_role_name", database_role_name)
|
|
110
|
+
if on is not None:
|
|
111
|
+
pulumi.set(__self__, "on", on)
|
|
112
|
+
if outbound_privileges is not None:
|
|
113
|
+
pulumi.set(__self__, "outbound_privileges", outbound_privileges)
|
|
114
|
+
|
|
115
|
+
@property
|
|
116
|
+
@pulumi.getter(name="accountRoleName")
|
|
117
|
+
def account_role_name(self) -> Optional[pulumi.Input[str]]:
|
|
118
|
+
"""
|
|
119
|
+
The fully qualified name of the account role to which privileges will be granted. For more information about this resource, see docs.
|
|
120
|
+
"""
|
|
121
|
+
return pulumi.get(self, "account_role_name")
|
|
122
|
+
|
|
123
|
+
@account_role_name.setter
|
|
124
|
+
def account_role_name(self, value: Optional[pulumi.Input[str]]):
|
|
125
|
+
pulumi.set(self, "account_role_name", value)
|
|
126
|
+
|
|
127
|
+
@property
|
|
128
|
+
@pulumi.getter(name="databaseRoleName")
|
|
129
|
+
def database_role_name(self) -> Optional[pulumi.Input[str]]:
|
|
130
|
+
"""
|
|
131
|
+
The fully qualified name of the database role to which privileges will be granted. For more information about this resource, see docs.
|
|
132
|
+
"""
|
|
133
|
+
return pulumi.get(self, "database_role_name")
|
|
134
|
+
|
|
135
|
+
@database_role_name.setter
|
|
136
|
+
def database_role_name(self, value: Optional[pulumi.Input[str]]):
|
|
137
|
+
pulumi.set(self, "database_role_name", value)
|
|
138
|
+
|
|
139
|
+
@property
|
|
140
|
+
@pulumi.getter
|
|
141
|
+
def on(self) -> Optional[pulumi.Input['GrantOwnershipOnArgs']]:
|
|
142
|
+
"""
|
|
143
|
+
Configures which object(s) should transfer their ownership to the specified role.
|
|
144
|
+
"""
|
|
145
|
+
return pulumi.get(self, "on")
|
|
146
|
+
|
|
147
|
+
@on.setter
|
|
148
|
+
def on(self, value: Optional[pulumi.Input['GrantOwnershipOnArgs']]):
|
|
149
|
+
pulumi.set(self, "on", value)
|
|
150
|
+
|
|
151
|
+
@property
|
|
152
|
+
@pulumi.getter(name="outboundPrivileges")
|
|
153
|
+
def outbound_privileges(self) -> Optional[pulumi.Input[str]]:
|
|
154
|
+
"""
|
|
155
|
+
Specifies whether to remove or transfer all existing outbound privileges on the object when ownership is transferred to a new role. Available options are: REVOKE for removing existing privileges and COPY to transfer them with ownership. For more information head over to [Snowflake documentation](https://docs.snowflake.com/en/sql-reference/sql/grant-ownership#optional-parameters).
|
|
156
|
+
"""
|
|
157
|
+
return pulumi.get(self, "outbound_privileges")
|
|
158
|
+
|
|
159
|
+
@outbound_privileges.setter
|
|
160
|
+
def outbound_privileges(self, value: Optional[pulumi.Input[str]]):
|
|
161
|
+
pulumi.set(self, "outbound_privileges", value)
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
class GrantOwnership(pulumi.CustomResource):
|
|
165
|
+
@overload
|
|
166
|
+
def __init__(__self__,
|
|
167
|
+
resource_name: str,
|
|
168
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
|
169
|
+
account_role_name: Optional[pulumi.Input[str]] = None,
|
|
170
|
+
database_role_name: Optional[pulumi.Input[str]] = None,
|
|
171
|
+
on: Optional[pulumi.Input[Union['GrantOwnershipOnArgs', 'GrantOwnershipOnArgsDict']]] = None,
|
|
172
|
+
outbound_privileges: Optional[pulumi.Input[str]] = None,
|
|
173
|
+
__props__=None):
|
|
174
|
+
"""
|
|
175
|
+
## Import
|
|
176
|
+
|
|
177
|
+
### Import examples
|
|
178
|
+
|
|
179
|
+
#### OnObject on Schema ToAccountRole
|
|
180
|
+
|
|
181
|
+
```sh
|
|
182
|
+
$ pulumi import snowflake:index/grantOwnership:GrantOwnership example 'ToAccountRole|"account_role"|COPY|OnObject|SCHEMA|"database_name"."schema_name"'`
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
#### OnObject on Schema ToDatabaseRole
|
|
186
|
+
|
|
187
|
+
```sh
|
|
188
|
+
$ pulumi import snowflake:index/grantOwnership:GrantOwnership example 'ToDatabaseRole|"database_name"."database_role_name"|COPY|OnObject|SCHEMA|"database_name"."schema_name"'`
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
#### OnObject on Table
|
|
192
|
+
|
|
193
|
+
```sh
|
|
194
|
+
$ pulumi import snowflake:index/grantOwnership:GrantOwnership example 'ToAccountRole|"account_role"|COPY|OnObject|TABLE|"database_name"."schema_name"."table_name"'`
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
#### OnAll InDatabase
|
|
198
|
+
|
|
199
|
+
```sh
|
|
200
|
+
$ pulumi import snowflake:index/grantOwnership:GrantOwnership example 'ToAccountRole|"account_role"|REVOKE|OnAll|TABLES|InDatabase|"database_name"'`
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
#### OnAll InSchema
|
|
204
|
+
|
|
205
|
+
```sh
|
|
206
|
+
$ pulumi import snowflake:index/grantOwnership:GrantOwnership example 'ToAccountRole|"account_role"||OnAll|TABLES|InSchema|"database_name"."schema_name"'`
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
#### OnFuture InDatabase
|
|
210
|
+
|
|
211
|
+
```sh
|
|
212
|
+
$ pulumi import snowflake:index/grantOwnership:GrantOwnership example 'ToAccountRole|"account_role"||OnFuture|TABLES|InDatabase|"database_name"'`
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
#### OnFuture InSchema
|
|
216
|
+
|
|
217
|
+
```sh
|
|
218
|
+
$ pulumi import snowflake:index/grantOwnership:GrantOwnership example 'ToAccountRole|"account_role"|COPY|OnFuture|TABLES|InSchema|"database_name"."schema_name"'`
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
:param str resource_name: The name of the resource.
|
|
222
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
223
|
+
:param pulumi.Input[str] account_role_name: The fully qualified name of the account role to which privileges will be granted. For more information about this resource, see docs.
|
|
224
|
+
:param pulumi.Input[str] database_role_name: The fully qualified name of the database role to which privileges will be granted. For more information about this resource, see docs.
|
|
225
|
+
:param pulumi.Input[Union['GrantOwnershipOnArgs', 'GrantOwnershipOnArgsDict']] on: Configures which object(s) should transfer their ownership to the specified role.
|
|
226
|
+
:param pulumi.Input[str] outbound_privileges: Specifies whether to remove or transfer all existing outbound privileges on the object when ownership is transferred to a new role. Available options are: REVOKE for removing existing privileges and COPY to transfer them with ownership. For more information head over to [Snowflake documentation](https://docs.snowflake.com/en/sql-reference/sql/grant-ownership#optional-parameters).
|
|
227
|
+
"""
|
|
228
|
+
...
|
|
229
|
+
@overload
|
|
230
|
+
def __init__(__self__,
|
|
231
|
+
resource_name: str,
|
|
232
|
+
args: GrantOwnershipArgs,
|
|
233
|
+
opts: Optional[pulumi.ResourceOptions] = None):
|
|
234
|
+
"""
|
|
235
|
+
## Import
|
|
236
|
+
|
|
237
|
+
### Import examples
|
|
238
|
+
|
|
239
|
+
#### OnObject on Schema ToAccountRole
|
|
240
|
+
|
|
241
|
+
```sh
|
|
242
|
+
$ pulumi import snowflake:index/grantOwnership:GrantOwnership example 'ToAccountRole|"account_role"|COPY|OnObject|SCHEMA|"database_name"."schema_name"'`
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
#### OnObject on Schema ToDatabaseRole
|
|
246
|
+
|
|
247
|
+
```sh
|
|
248
|
+
$ pulumi import snowflake:index/grantOwnership:GrantOwnership example 'ToDatabaseRole|"database_name"."database_role_name"|COPY|OnObject|SCHEMA|"database_name"."schema_name"'`
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
#### OnObject on Table
|
|
252
|
+
|
|
253
|
+
```sh
|
|
254
|
+
$ pulumi import snowflake:index/grantOwnership:GrantOwnership example 'ToAccountRole|"account_role"|COPY|OnObject|TABLE|"database_name"."schema_name"."table_name"'`
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
#### OnAll InDatabase
|
|
258
|
+
|
|
259
|
+
```sh
|
|
260
|
+
$ pulumi import snowflake:index/grantOwnership:GrantOwnership example 'ToAccountRole|"account_role"|REVOKE|OnAll|TABLES|InDatabase|"database_name"'`
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
#### OnAll InSchema
|
|
264
|
+
|
|
265
|
+
```sh
|
|
266
|
+
$ pulumi import snowflake:index/grantOwnership:GrantOwnership example 'ToAccountRole|"account_role"||OnAll|TABLES|InSchema|"database_name"."schema_name"'`
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
#### OnFuture InDatabase
|
|
270
|
+
|
|
271
|
+
```sh
|
|
272
|
+
$ pulumi import snowflake:index/grantOwnership:GrantOwnership example 'ToAccountRole|"account_role"||OnFuture|TABLES|InDatabase|"database_name"'`
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
#### OnFuture InSchema
|
|
276
|
+
|
|
277
|
+
```sh
|
|
278
|
+
$ pulumi import snowflake:index/grantOwnership:GrantOwnership example 'ToAccountRole|"account_role"|COPY|OnFuture|TABLES|InSchema|"database_name"."schema_name"'`
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
:param str resource_name: The name of the resource.
|
|
282
|
+
:param GrantOwnershipArgs args: The arguments to use to populate this resource's properties.
|
|
283
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
284
|
+
"""
|
|
285
|
+
...
|
|
286
|
+
def __init__(__self__, resource_name: str, *args, **kwargs):
|
|
287
|
+
resource_args, opts = _utilities.get_resource_args_opts(GrantOwnershipArgs, pulumi.ResourceOptions, *args, **kwargs)
|
|
288
|
+
if resource_args is not None:
|
|
289
|
+
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
|
|
290
|
+
else:
|
|
291
|
+
__self__._internal_init(resource_name, *args, **kwargs)
|
|
292
|
+
|
|
293
|
+
def _internal_init(__self__,
|
|
294
|
+
resource_name: str,
|
|
295
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
|
296
|
+
account_role_name: Optional[pulumi.Input[str]] = None,
|
|
297
|
+
database_role_name: Optional[pulumi.Input[str]] = None,
|
|
298
|
+
on: Optional[pulumi.Input[Union['GrantOwnershipOnArgs', 'GrantOwnershipOnArgsDict']]] = None,
|
|
299
|
+
outbound_privileges: Optional[pulumi.Input[str]] = None,
|
|
300
|
+
__props__=None):
|
|
301
|
+
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
|
|
302
|
+
if not isinstance(opts, pulumi.ResourceOptions):
|
|
303
|
+
raise TypeError('Expected resource options to be a ResourceOptions instance')
|
|
304
|
+
if opts.id is None:
|
|
305
|
+
if __props__ is not None:
|
|
306
|
+
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
|
|
307
|
+
__props__ = GrantOwnershipArgs.__new__(GrantOwnershipArgs)
|
|
308
|
+
|
|
309
|
+
__props__.__dict__["account_role_name"] = account_role_name
|
|
310
|
+
__props__.__dict__["database_role_name"] = database_role_name
|
|
311
|
+
if on is None and not opts.urn:
|
|
312
|
+
raise TypeError("Missing required property 'on'")
|
|
313
|
+
__props__.__dict__["on"] = on
|
|
314
|
+
__props__.__dict__["outbound_privileges"] = outbound_privileges
|
|
315
|
+
super(GrantOwnership, __self__).__init__(
|
|
316
|
+
'snowflake:index/grantOwnership:GrantOwnership',
|
|
317
|
+
resource_name,
|
|
318
|
+
__props__,
|
|
319
|
+
opts)
|
|
320
|
+
|
|
321
|
+
@staticmethod
|
|
322
|
+
def get(resource_name: str,
|
|
323
|
+
id: pulumi.Input[str],
|
|
324
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
|
325
|
+
account_role_name: Optional[pulumi.Input[str]] = None,
|
|
326
|
+
database_role_name: Optional[pulumi.Input[str]] = None,
|
|
327
|
+
on: Optional[pulumi.Input[Union['GrantOwnershipOnArgs', 'GrantOwnershipOnArgsDict']]] = None,
|
|
328
|
+
outbound_privileges: Optional[pulumi.Input[str]] = None) -> 'GrantOwnership':
|
|
329
|
+
"""
|
|
330
|
+
Get an existing GrantOwnership resource's state with the given name, id, and optional extra
|
|
331
|
+
properties used to qualify the lookup.
|
|
332
|
+
|
|
333
|
+
:param str resource_name: The unique name of the resulting resource.
|
|
334
|
+
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
|
335
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
336
|
+
:param pulumi.Input[str] account_role_name: The fully qualified name of the account role to which privileges will be granted. For more information about this resource, see docs.
|
|
337
|
+
:param pulumi.Input[str] database_role_name: The fully qualified name of the database role to which privileges will be granted. For more information about this resource, see docs.
|
|
338
|
+
:param pulumi.Input[Union['GrantOwnershipOnArgs', 'GrantOwnershipOnArgsDict']] on: Configures which object(s) should transfer their ownership to the specified role.
|
|
339
|
+
:param pulumi.Input[str] outbound_privileges: Specifies whether to remove or transfer all existing outbound privileges on the object when ownership is transferred to a new role. Available options are: REVOKE for removing existing privileges and COPY to transfer them with ownership. For more information head over to [Snowflake documentation](https://docs.snowflake.com/en/sql-reference/sql/grant-ownership#optional-parameters).
|
|
340
|
+
"""
|
|
341
|
+
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
|
342
|
+
|
|
343
|
+
__props__ = _GrantOwnershipState.__new__(_GrantOwnershipState)
|
|
344
|
+
|
|
345
|
+
__props__.__dict__["account_role_name"] = account_role_name
|
|
346
|
+
__props__.__dict__["database_role_name"] = database_role_name
|
|
347
|
+
__props__.__dict__["on"] = on
|
|
348
|
+
__props__.__dict__["outbound_privileges"] = outbound_privileges
|
|
349
|
+
return GrantOwnership(resource_name, opts=opts, __props__=__props__)
|
|
350
|
+
|
|
351
|
+
@property
|
|
352
|
+
@pulumi.getter(name="accountRoleName")
|
|
353
|
+
def account_role_name(self) -> pulumi.Output[Optional[str]]:
|
|
354
|
+
"""
|
|
355
|
+
The fully qualified name of the account role to which privileges will be granted. For more information about this resource, see docs.
|
|
356
|
+
"""
|
|
357
|
+
return pulumi.get(self, "account_role_name")
|
|
358
|
+
|
|
359
|
+
@property
|
|
360
|
+
@pulumi.getter(name="databaseRoleName")
|
|
361
|
+
def database_role_name(self) -> pulumi.Output[Optional[str]]:
|
|
362
|
+
"""
|
|
363
|
+
The fully qualified name of the database role to which privileges will be granted. For more information about this resource, see docs.
|
|
364
|
+
"""
|
|
365
|
+
return pulumi.get(self, "database_role_name")
|
|
366
|
+
|
|
367
|
+
@property
|
|
368
|
+
@pulumi.getter
|
|
369
|
+
def on(self) -> pulumi.Output['outputs.GrantOwnershipOn']:
|
|
370
|
+
"""
|
|
371
|
+
Configures which object(s) should transfer their ownership to the specified role.
|
|
372
|
+
"""
|
|
373
|
+
return pulumi.get(self, "on")
|
|
374
|
+
|
|
375
|
+
@property
|
|
376
|
+
@pulumi.getter(name="outboundPrivileges")
|
|
377
|
+
def outbound_privileges(self) -> pulumi.Output[Optional[str]]:
|
|
378
|
+
"""
|
|
379
|
+
Specifies whether to remove or transfer all existing outbound privileges on the object when ownership is transferred to a new role. Available options are: REVOKE for removing existing privileges and COPY to transfer them with ownership. For more information head over to [Snowflake documentation](https://docs.snowflake.com/en/sql-reference/sql/grant-ownership#optional-parameters).
|
|
380
|
+
"""
|
|
381
|
+
return pulumi.get(self, "outbound_privileges")
|
|
382
|
+
|