@pulumi/snowflake 0.50.3-alpha.1712555816 → 0.50.3-alpha.1712742318
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.
- package/database.d.ts +24 -6
- package/database.js.map +1 -1
- package/dynamicTable.d.ts +2 -2
- package/getGrants.d.ts +159 -47
- package/getGrants.js +144 -32
- package/getGrants.js.map +1 -1
- package/grantOwnership.d.ts +133 -0
- package/grantOwnership.js +105 -0
- package/grantOwnership.js.map +1 -0
- package/index.d.ts +3 -0
- package/index.js +8 -3
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/procedure.d.ts +3 -3
- package/stage.d.ts +2 -9
- package/stage.js +2 -9
- package/stage.js.map +1 -1
- package/types/input.d.ts +147 -49
- package/types/output.d.ts +117 -39
- package/view.d.ts +9 -3
- package/view.js.map +1 -1
package/getGrants.js
CHANGED
|
@@ -13,43 +13,99 @@ const utilities = require("./utilities");
|
|
|
13
13
|
* import * as pulumi from "@pulumi/pulumi";
|
|
14
14
|
* import * as snowflake from "@pulumi/snowflake";
|
|
15
15
|
*
|
|
16
|
-
* const
|
|
16
|
+
* const exampleOnAccount = snowflake.getGrants({
|
|
17
17
|
* grantsOn: {
|
|
18
18
|
* account: true,
|
|
19
19
|
* },
|
|
20
20
|
* });
|
|
21
|
-
* const
|
|
21
|
+
* const exampleOnAccountObject = snowflake.getGrants({
|
|
22
22
|
* grantsOn: {
|
|
23
|
-
* objectName: "
|
|
23
|
+
* objectName: "some_database",
|
|
24
24
|
* objectType: "DATABASE",
|
|
25
25
|
* },
|
|
26
26
|
* });
|
|
27
|
-
* const
|
|
27
|
+
* const exampleOnDatabaseObject = snowflake.getGrants({
|
|
28
|
+
* grantsOn: {
|
|
29
|
+
* objectName: "\"some_database\".\"some_schema\"",
|
|
30
|
+
* objectType: "SCHEMA",
|
|
31
|
+
* },
|
|
32
|
+
* });
|
|
33
|
+
* const exampleOnSchemaObject = snowflake.getGrants({
|
|
34
|
+
* grantsOn: {
|
|
35
|
+
* objectName: "\"some_database\".\"some_schema\".\"some_table\"",
|
|
36
|
+
* objectType: "TABLE",
|
|
37
|
+
* },
|
|
38
|
+
* });
|
|
39
|
+
* const exampleToApplication = snowflake.getGrants({
|
|
40
|
+
* grantsTo: {
|
|
41
|
+
* application: "some_application",
|
|
42
|
+
* },
|
|
43
|
+
* });
|
|
44
|
+
* const exampleToApplicationRole = snowflake.getGrants({
|
|
28
45
|
* grantsTo: {
|
|
29
|
-
*
|
|
46
|
+
* applicationRole: "\"some_application\".\"some_application_role\"",
|
|
30
47
|
* },
|
|
31
48
|
* });
|
|
32
|
-
* const
|
|
49
|
+
* const exampleToRole = snowflake.getGrants({
|
|
50
|
+
* grantsTo: {
|
|
51
|
+
* accountRole: "some_role",
|
|
52
|
+
* },
|
|
53
|
+
* });
|
|
54
|
+
* const exampleToDatabaseRole = snowflake.getGrants({
|
|
55
|
+
* grantsTo: {
|
|
56
|
+
* databaseRole: "\"some_database\".\"some_database_role\"",
|
|
57
|
+
* },
|
|
58
|
+
* });
|
|
59
|
+
* const exampleToShare = snowflake.getGrants({
|
|
60
|
+
* grantsTo: {
|
|
61
|
+
* share: {
|
|
62
|
+
* shareName: "some_share",
|
|
63
|
+
* },
|
|
64
|
+
* },
|
|
65
|
+
* });
|
|
66
|
+
* const exampleToUser = snowflake.getGrants({
|
|
67
|
+
* grantsTo: {
|
|
68
|
+
* user: "some_user",
|
|
69
|
+
* },
|
|
70
|
+
* });
|
|
71
|
+
* const exampleOfApplicationRole = snowflake.getGrants({
|
|
33
72
|
* grantsOf: {
|
|
34
|
-
*
|
|
73
|
+
* applicationRole: "\"some_application\".\"some_application_role\"",
|
|
35
74
|
* },
|
|
36
75
|
* });
|
|
37
|
-
* const
|
|
76
|
+
* const exampleOfDatabaseRole = snowflake.getGrants({
|
|
77
|
+
* grantsOf: {
|
|
78
|
+
* databaseRole: "\"some_database\".\"some_database_role\"",
|
|
79
|
+
* },
|
|
80
|
+
* });
|
|
81
|
+
* const exampleOfRole = snowflake.getGrants({
|
|
82
|
+
* grantsOf: {
|
|
83
|
+
* accountRole: "some_role",
|
|
84
|
+
* },
|
|
85
|
+
* });
|
|
86
|
+
* const exampleOfShare = snowflake.getGrants({
|
|
87
|
+
* grantsOf: {
|
|
88
|
+
* share: "some_share",
|
|
89
|
+
* },
|
|
90
|
+
* });
|
|
91
|
+
* const exampleFutureInDatabase = snowflake.getGrants({
|
|
38
92
|
* futureGrantsIn: {
|
|
39
|
-
* database: "
|
|
93
|
+
* database: "some_database",
|
|
40
94
|
* },
|
|
41
95
|
* });
|
|
42
|
-
* const
|
|
96
|
+
* const exampleFutureInSchema = snowflake.getGrants({
|
|
43
97
|
* futureGrantsIn: {
|
|
44
|
-
* schema:
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
98
|
+
* schema: "\"some_database\".\"some_schema\"",
|
|
99
|
+
* },
|
|
100
|
+
* });
|
|
101
|
+
* const exampleFutureToRole = snowflake.getGrants({
|
|
102
|
+
* futureGrantsTo: {
|
|
103
|
+
* accountRole: "some_role",
|
|
48
104
|
* },
|
|
49
105
|
* });
|
|
50
|
-
* const
|
|
106
|
+
* const exampleFutureToDatabaseRole = snowflake.getGrants({
|
|
51
107
|
* futureGrantsTo: {
|
|
52
|
-
*
|
|
108
|
+
* databaseRole: "\"some_database\".\"some_database_role\"",
|
|
53
109
|
* },
|
|
54
110
|
* });
|
|
55
111
|
* ```
|
|
@@ -75,43 +131,99 @@ exports.getGrants = getGrants;
|
|
|
75
131
|
* import * as pulumi from "@pulumi/pulumi";
|
|
76
132
|
* import * as snowflake from "@pulumi/snowflake";
|
|
77
133
|
*
|
|
78
|
-
* const
|
|
134
|
+
* const exampleOnAccount = snowflake.getGrants({
|
|
79
135
|
* grantsOn: {
|
|
80
136
|
* account: true,
|
|
81
137
|
* },
|
|
82
138
|
* });
|
|
83
|
-
* const
|
|
139
|
+
* const exampleOnAccountObject = snowflake.getGrants({
|
|
84
140
|
* grantsOn: {
|
|
85
|
-
* objectName: "
|
|
141
|
+
* objectName: "some_database",
|
|
86
142
|
* objectType: "DATABASE",
|
|
87
143
|
* },
|
|
88
144
|
* });
|
|
89
|
-
* const
|
|
145
|
+
* const exampleOnDatabaseObject = snowflake.getGrants({
|
|
146
|
+
* grantsOn: {
|
|
147
|
+
* objectName: "\"some_database\".\"some_schema\"",
|
|
148
|
+
* objectType: "SCHEMA",
|
|
149
|
+
* },
|
|
150
|
+
* });
|
|
151
|
+
* const exampleOnSchemaObject = snowflake.getGrants({
|
|
152
|
+
* grantsOn: {
|
|
153
|
+
* objectName: "\"some_database\".\"some_schema\".\"some_table\"",
|
|
154
|
+
* objectType: "TABLE",
|
|
155
|
+
* },
|
|
156
|
+
* });
|
|
157
|
+
* const exampleToApplication = snowflake.getGrants({
|
|
158
|
+
* grantsTo: {
|
|
159
|
+
* application: "some_application",
|
|
160
|
+
* },
|
|
161
|
+
* });
|
|
162
|
+
* const exampleToApplicationRole = snowflake.getGrants({
|
|
90
163
|
* grantsTo: {
|
|
91
|
-
*
|
|
164
|
+
* applicationRole: "\"some_application\".\"some_application_role\"",
|
|
92
165
|
* },
|
|
93
166
|
* });
|
|
94
|
-
* const
|
|
167
|
+
* const exampleToRole = snowflake.getGrants({
|
|
168
|
+
* grantsTo: {
|
|
169
|
+
* accountRole: "some_role",
|
|
170
|
+
* },
|
|
171
|
+
* });
|
|
172
|
+
* const exampleToDatabaseRole = snowflake.getGrants({
|
|
173
|
+
* grantsTo: {
|
|
174
|
+
* databaseRole: "\"some_database\".\"some_database_role\"",
|
|
175
|
+
* },
|
|
176
|
+
* });
|
|
177
|
+
* const exampleToShare = snowflake.getGrants({
|
|
178
|
+
* grantsTo: {
|
|
179
|
+
* share: {
|
|
180
|
+
* shareName: "some_share",
|
|
181
|
+
* },
|
|
182
|
+
* },
|
|
183
|
+
* });
|
|
184
|
+
* const exampleToUser = snowflake.getGrants({
|
|
185
|
+
* grantsTo: {
|
|
186
|
+
* user: "some_user",
|
|
187
|
+
* },
|
|
188
|
+
* });
|
|
189
|
+
* const exampleOfApplicationRole = snowflake.getGrants({
|
|
95
190
|
* grantsOf: {
|
|
96
|
-
*
|
|
191
|
+
* applicationRole: "\"some_application\".\"some_application_role\"",
|
|
97
192
|
* },
|
|
98
193
|
* });
|
|
99
|
-
* const
|
|
194
|
+
* const exampleOfDatabaseRole = snowflake.getGrants({
|
|
195
|
+
* grantsOf: {
|
|
196
|
+
* databaseRole: "\"some_database\".\"some_database_role\"",
|
|
197
|
+
* },
|
|
198
|
+
* });
|
|
199
|
+
* const exampleOfRole = snowflake.getGrants({
|
|
200
|
+
* grantsOf: {
|
|
201
|
+
* accountRole: "some_role",
|
|
202
|
+
* },
|
|
203
|
+
* });
|
|
204
|
+
* const exampleOfShare = snowflake.getGrants({
|
|
205
|
+
* grantsOf: {
|
|
206
|
+
* share: "some_share",
|
|
207
|
+
* },
|
|
208
|
+
* });
|
|
209
|
+
* const exampleFutureInDatabase = snowflake.getGrants({
|
|
100
210
|
* futureGrantsIn: {
|
|
101
|
-
* database: "
|
|
211
|
+
* database: "some_database",
|
|
102
212
|
* },
|
|
103
213
|
* });
|
|
104
|
-
* const
|
|
214
|
+
* const exampleFutureInSchema = snowflake.getGrants({
|
|
105
215
|
* futureGrantsIn: {
|
|
106
|
-
* schema:
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
216
|
+
* schema: "\"some_database\".\"some_schema\"",
|
|
217
|
+
* },
|
|
218
|
+
* });
|
|
219
|
+
* const exampleFutureToRole = snowflake.getGrants({
|
|
220
|
+
* futureGrantsTo: {
|
|
221
|
+
* accountRole: "some_role",
|
|
110
222
|
* },
|
|
111
223
|
* });
|
|
112
|
-
* const
|
|
224
|
+
* const exampleFutureToDatabaseRole = snowflake.getGrants({
|
|
113
225
|
* futureGrantsTo: {
|
|
114
|
-
*
|
|
226
|
+
* databaseRole: "\"some_database\".\"some_database_role\"",
|
|
115
227
|
* },
|
|
116
228
|
* });
|
|
117
229
|
* ```
|
package/getGrants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getGrants.js","sourceRoot":"","sources":["../getGrants.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC
|
|
1
|
+
{"version":3,"file":"getGrants.js","sourceRoot":"","sources":["../getGrants.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyGG;AACH,SAAgB,SAAS,CAAC,IAAoB,EAAE,IAA2B;IACvE,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;IAElB,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;IACzE,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,qCAAqC,EAAE;QAChE,gBAAgB,EAAE,IAAI,CAAC,cAAc;QACrC,gBAAgB,EAAE,IAAI,CAAC,cAAc;QACrC,UAAU,EAAE,IAAI,CAAC,QAAQ;QACzB,UAAU,EAAE,IAAI,CAAC,QAAQ;QACzB,UAAU,EAAE,IAAI,CAAC,QAAQ;KAC5B,EAAE,IAAI,CAAC,CAAC;AACb,CAAC;AAXD,8BAWC;AA6DD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyGG;AACH,SAAgB,eAAe,CAAC,IAA0B,EAAE,IAA2B;IACnF,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAA;AACpE,CAAC;AAFD,0CAEC"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
import * as inputs from "./types/input";
|
|
3
|
+
import * as outputs from "./types/output";
|
|
4
|
+
/**
|
|
5
|
+
* ## Import
|
|
6
|
+
*
|
|
7
|
+
* ### Import examples
|
|
8
|
+
*
|
|
9
|
+
* #### OnObject on Schema ToAccountRole
|
|
10
|
+
*
|
|
11
|
+
* ```sh
|
|
12
|
+
* $ pulumi import snowflake:index/grantOwnership:GrantOwnership \"schema_name\""`
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* #### OnObject on Schema ToDatabaseRole
|
|
16
|
+
*
|
|
17
|
+
* ```sh
|
|
18
|
+
* $ pulumi import snowflake:index/grantOwnership:GrantOwnership \"schema_name\""`
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* #### OnObject on Table
|
|
22
|
+
*
|
|
23
|
+
* ```sh
|
|
24
|
+
* $ pulumi import snowflake:index/grantOwnership:GrantOwnership \"table_name\""`
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* #### OnAll InDatabase
|
|
28
|
+
*
|
|
29
|
+
* ```sh
|
|
30
|
+
* $ pulumi import snowflake:index/grantOwnership:GrantOwnership `"ToAccountRole|\"account_role\"|REVOKE|OnAll|TABLES|InDatabase|\"database_name\""`
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* #### OnAll InSchema
|
|
34
|
+
*
|
|
35
|
+
* ```sh
|
|
36
|
+
* $ pulumi import snowflake:index/grantOwnership:GrantOwnership \"schema_name\""`
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* #### OnFuture InDatabase
|
|
40
|
+
*
|
|
41
|
+
* ```sh
|
|
42
|
+
* $ pulumi import snowflake:index/grantOwnership:GrantOwnership `"ToAccountRole|\"account_role\"||OnFuture|TABLES|InDatabase|\"database_name\""`
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* #### OnFuture InSchema
|
|
46
|
+
*
|
|
47
|
+
* ```sh
|
|
48
|
+
* $ pulumi import snowflake:index/grantOwnership:GrantOwnership \"schema_name\""`
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
export declare class GrantOwnership extends pulumi.CustomResource {
|
|
52
|
+
/**
|
|
53
|
+
* Get an existing GrantOwnership resource's state with the given name, ID, and optional extra
|
|
54
|
+
* properties used to qualify the lookup.
|
|
55
|
+
*
|
|
56
|
+
* @param name The _unique_ name of the resulting resource.
|
|
57
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
58
|
+
* @param state Any extra arguments used during the lookup.
|
|
59
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
60
|
+
*/
|
|
61
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: GrantOwnershipState, opts?: pulumi.CustomResourceOptions): GrantOwnership;
|
|
62
|
+
/**
|
|
63
|
+
* Returns true if the given object is an instance of GrantOwnership. This is designed to work even
|
|
64
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
65
|
+
*/
|
|
66
|
+
static isInstance(obj: any): obj is GrantOwnership;
|
|
67
|
+
/**
|
|
68
|
+
* The fully qualified name of the account role to which privileges will be granted.
|
|
69
|
+
*/
|
|
70
|
+
readonly accountRoleName: pulumi.Output<string | undefined>;
|
|
71
|
+
/**
|
|
72
|
+
* The fully qualified name of the database role to which privileges will be granted.
|
|
73
|
+
*/
|
|
74
|
+
readonly databaseRoleName: pulumi.Output<string | undefined>;
|
|
75
|
+
/**
|
|
76
|
+
* Configures which object(s) should transfer their ownership to the specified role.
|
|
77
|
+
*/
|
|
78
|
+
readonly on: pulumi.Output<outputs.GrantOwnershipOn>;
|
|
79
|
+
/**
|
|
80
|
+
* 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).
|
|
81
|
+
*/
|
|
82
|
+
readonly outboundPrivileges: pulumi.Output<string | undefined>;
|
|
83
|
+
/**
|
|
84
|
+
* Create a GrantOwnership resource with the given unique name, arguments, and options.
|
|
85
|
+
*
|
|
86
|
+
* @param name The _unique_ name of the resource.
|
|
87
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
88
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
89
|
+
*/
|
|
90
|
+
constructor(name: string, args: GrantOwnershipArgs, opts?: pulumi.CustomResourceOptions);
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Input properties used for looking up and filtering GrantOwnership resources.
|
|
94
|
+
*/
|
|
95
|
+
export interface GrantOwnershipState {
|
|
96
|
+
/**
|
|
97
|
+
* The fully qualified name of the account role to which privileges will be granted.
|
|
98
|
+
*/
|
|
99
|
+
accountRoleName?: pulumi.Input<string>;
|
|
100
|
+
/**
|
|
101
|
+
* The fully qualified name of the database role to which privileges will be granted.
|
|
102
|
+
*/
|
|
103
|
+
databaseRoleName?: pulumi.Input<string>;
|
|
104
|
+
/**
|
|
105
|
+
* Configures which object(s) should transfer their ownership to the specified role.
|
|
106
|
+
*/
|
|
107
|
+
on?: pulumi.Input<inputs.GrantOwnershipOn>;
|
|
108
|
+
/**
|
|
109
|
+
* 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).
|
|
110
|
+
*/
|
|
111
|
+
outboundPrivileges?: pulumi.Input<string>;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* The set of arguments for constructing a GrantOwnership resource.
|
|
115
|
+
*/
|
|
116
|
+
export interface GrantOwnershipArgs {
|
|
117
|
+
/**
|
|
118
|
+
* The fully qualified name of the account role to which privileges will be granted.
|
|
119
|
+
*/
|
|
120
|
+
accountRoleName?: pulumi.Input<string>;
|
|
121
|
+
/**
|
|
122
|
+
* The fully qualified name of the database role to which privileges will be granted.
|
|
123
|
+
*/
|
|
124
|
+
databaseRoleName?: pulumi.Input<string>;
|
|
125
|
+
/**
|
|
126
|
+
* Configures which object(s) should transfer their ownership to the specified role.
|
|
127
|
+
*/
|
|
128
|
+
on: pulumi.Input<inputs.GrantOwnershipOn>;
|
|
129
|
+
/**
|
|
130
|
+
* 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).
|
|
131
|
+
*/
|
|
132
|
+
outboundPrivileges?: pulumi.Input<string>;
|
|
133
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.GrantOwnership = void 0;
|
|
6
|
+
const pulumi = require("@pulumi/pulumi");
|
|
7
|
+
const utilities = require("./utilities");
|
|
8
|
+
/**
|
|
9
|
+
* ## Import
|
|
10
|
+
*
|
|
11
|
+
* ### Import examples
|
|
12
|
+
*
|
|
13
|
+
* #### OnObject on Schema ToAccountRole
|
|
14
|
+
*
|
|
15
|
+
* ```sh
|
|
16
|
+
* $ pulumi import snowflake:index/grantOwnership:GrantOwnership \"schema_name\""`
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* #### OnObject on Schema ToDatabaseRole
|
|
20
|
+
*
|
|
21
|
+
* ```sh
|
|
22
|
+
* $ pulumi import snowflake:index/grantOwnership:GrantOwnership \"schema_name\""`
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* #### OnObject on Table
|
|
26
|
+
*
|
|
27
|
+
* ```sh
|
|
28
|
+
* $ pulumi import snowflake:index/grantOwnership:GrantOwnership \"table_name\""`
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* #### OnAll InDatabase
|
|
32
|
+
*
|
|
33
|
+
* ```sh
|
|
34
|
+
* $ pulumi import snowflake:index/grantOwnership:GrantOwnership `"ToAccountRole|\"account_role\"|REVOKE|OnAll|TABLES|InDatabase|\"database_name\""`
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* #### OnAll InSchema
|
|
38
|
+
*
|
|
39
|
+
* ```sh
|
|
40
|
+
* $ pulumi import snowflake:index/grantOwnership:GrantOwnership \"schema_name\""`
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* #### OnFuture InDatabase
|
|
44
|
+
*
|
|
45
|
+
* ```sh
|
|
46
|
+
* $ pulumi import snowflake:index/grantOwnership:GrantOwnership `"ToAccountRole|\"account_role\"||OnFuture|TABLES|InDatabase|\"database_name\""`
|
|
47
|
+
* ```
|
|
48
|
+
*
|
|
49
|
+
* #### OnFuture InSchema
|
|
50
|
+
*
|
|
51
|
+
* ```sh
|
|
52
|
+
* $ pulumi import snowflake:index/grantOwnership:GrantOwnership \"schema_name\""`
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
class GrantOwnership extends pulumi.CustomResource {
|
|
56
|
+
/**
|
|
57
|
+
* Get an existing GrantOwnership resource's state with the given name, ID, and optional extra
|
|
58
|
+
* properties used to qualify the lookup.
|
|
59
|
+
*
|
|
60
|
+
* @param name The _unique_ name of the resulting resource.
|
|
61
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
62
|
+
* @param state Any extra arguments used during the lookup.
|
|
63
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
64
|
+
*/
|
|
65
|
+
static get(name, id, state, opts) {
|
|
66
|
+
return new GrantOwnership(name, state, Object.assign(Object.assign({}, opts), { id: id }));
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Returns true if the given object is an instance of GrantOwnership. This is designed to work even
|
|
70
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
71
|
+
*/
|
|
72
|
+
static isInstance(obj) {
|
|
73
|
+
if (obj === undefined || obj === null) {
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
return obj['__pulumiType'] === GrantOwnership.__pulumiType;
|
|
77
|
+
}
|
|
78
|
+
constructor(name, argsOrState, opts) {
|
|
79
|
+
let resourceInputs = {};
|
|
80
|
+
opts = opts || {};
|
|
81
|
+
if (opts.id) {
|
|
82
|
+
const state = argsOrState;
|
|
83
|
+
resourceInputs["accountRoleName"] = state ? state.accountRoleName : undefined;
|
|
84
|
+
resourceInputs["databaseRoleName"] = state ? state.databaseRoleName : undefined;
|
|
85
|
+
resourceInputs["on"] = state ? state.on : undefined;
|
|
86
|
+
resourceInputs["outboundPrivileges"] = state ? state.outboundPrivileges : undefined;
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
const args = argsOrState;
|
|
90
|
+
if ((!args || args.on === undefined) && !opts.urn) {
|
|
91
|
+
throw new Error("Missing required property 'on'");
|
|
92
|
+
}
|
|
93
|
+
resourceInputs["accountRoleName"] = args ? args.accountRoleName : undefined;
|
|
94
|
+
resourceInputs["databaseRoleName"] = args ? args.databaseRoleName : undefined;
|
|
95
|
+
resourceInputs["on"] = args ? args.on : undefined;
|
|
96
|
+
resourceInputs["outboundPrivileges"] = args ? args.outboundPrivileges : undefined;
|
|
97
|
+
}
|
|
98
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
99
|
+
super(GrantOwnership.__pulumiType, name, resourceInputs, opts);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
exports.GrantOwnership = GrantOwnership;
|
|
103
|
+
/** @internal */
|
|
104
|
+
GrantOwnership.__pulumiType = 'snowflake:index/grantOwnership:GrantOwnership';
|
|
105
|
+
//# sourceMappingURL=grantOwnership.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grantOwnership.js","sourceRoot":"","sources":["../grantOwnership.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,MAAa,cAAe,SAAQ,MAAM,CAAC,cAAc;IACrD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAA2B,EAAE,IAAmC;QACzH,OAAO,IAAI,cAAc,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IACrE,CAAC;IAKD;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC7B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE;YACnC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,GAAG,CAAC,cAAc,CAAC,KAAK,cAAc,CAAC,YAAY,CAAC;IAC/D,CAAC;IA2BD,YAAY,IAAY,EAAE,WAAsD,EAAE,IAAmC;QACjH,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;YACT,MAAM,KAAK,GAAG,WAA8C,CAAC;YAC7D,cAAc,CAAC,iBAAiB,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS,CAAC;YAC9E,cAAc,CAAC,kBAAkB,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,SAAS,CAAC;YAChF,cAAc,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;YACpD,cAAc,CAAC,oBAAoB,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC,CAAC,SAAS,CAAC;SACvF;aAAM;YACH,MAAM,IAAI,GAAG,WAA6C,CAAC;YAC3D,IAAI,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,EAAE,KAAK,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;gBAC/C,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;aACrD;YACD,cAAc,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS,CAAC;YAC5E,cAAc,CAAC,kBAAkB,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,SAAS,CAAC;YAC9E,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;YAClD,cAAc,CAAC,oBAAoB,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,SAAS,CAAC;SACrF;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,cAAc,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IACnE,CAAC;;AA1EL,wCA2EC;AA7DG,gBAAgB;AACO,2BAAY,GAAG,+CAA+C,CAAC"}
|
package/index.d.ts
CHANGED
|
@@ -181,6 +181,9 @@ export declare const GrantAccountRole: typeof import("./grantAccountRole").Grant
|
|
|
181
181
|
export { GrantDatabaseRoleArgs, GrantDatabaseRoleState } from "./grantDatabaseRole";
|
|
182
182
|
export type GrantDatabaseRole = import("./grantDatabaseRole").GrantDatabaseRole;
|
|
183
183
|
export declare const GrantDatabaseRole: typeof import("./grantDatabaseRole").GrantDatabaseRole;
|
|
184
|
+
export { GrantOwnershipArgs, GrantOwnershipState } from "./grantOwnership";
|
|
185
|
+
export type GrantOwnership = import("./grantOwnership").GrantOwnership;
|
|
186
|
+
export declare const GrantOwnership: typeof import("./grantOwnership").GrantOwnership;
|
|
184
187
|
export { GrantPrivilegesToAccountRoleArgs, GrantPrivilegesToAccountRoleState } from "./grantPrivilegesToAccountRole";
|
|
185
188
|
export type GrantPrivilegesToAccountRole = import("./grantPrivilegesToAccountRole").GrantPrivilegesToAccountRole;
|
|
186
189
|
export declare const GrantPrivilegesToAccountRole: typeof import("./grantPrivilegesToAccountRole").GrantPrivilegesToAccountRole;
|
package/index.js
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
5
|
exports.getMaskingPolicies = exports.getGrantsOutput = exports.getGrants = exports.getFunctionsOutput = exports.getFunctions = exports.getFileFormatsOutput = exports.getFileFormats = exports.getFailoverGroupsOutput = exports.getFailoverGroups = exports.getExternalTablesOutput = exports.getExternalTables = exports.getExternalFunctionsOutput = exports.getExternalFunctions = exports.getDynamicTablesOutput = exports.getDynamicTables = exports.getDatabasesOutput = exports.getDatabases = exports.getDatabaseRolesOutput = exports.getDatabaseRoles = exports.getDatabaseOutput = exports.getDatabase = exports.getCurrentRoleOutput = exports.getCurrentRole = exports.getCurrentAccountOutput = exports.getCurrentAccount = exports.getAlertsOutput = exports.getAlerts = exports.getAccountsOutput = exports.getAccounts = exports.FunctionGrant = exports.Function = exports.FileFormatGrant = exports.FileFormat = exports.FailoverGroupGrant = exports.FailoverGroup = exports.ExternalTableGrant = exports.ExternalTable = exports.ExternalOauthIntegration = exports.ExternalFunction = exports.EmailNotificationIntegration = exports.DynamicTable = exports.DatabaseRole = exports.DatabaseGrant = exports.Database = exports.ApiIntegration = exports.Alert = exports.AccountPasswordPolicyAttachment = exports.AccountParameter = exports.AccountGrant = exports.Account = void 0;
|
|
6
|
-
exports.
|
|
7
|
-
exports.
|
|
8
|
-
exports.types = exports.config = exports.WarehouseGrant = exports.Warehouse = exports.ViewGrant = exports.View = exports.UserPublicKeys = exports.UserPasswordPolicyAttachment = exports.UserOwnershipGrant = exports.UserGrant = exports.User = exports.UnsafeExecute = void 0;
|
|
6
|
+
exports.GrantOwnership = exports.GrantDatabaseRole = exports.GrantAccountRole = exports.getWarehousesOutput = exports.getWarehouses = exports.getViewsOutput = exports.getViews = exports.getUsersOutput = exports.getUsers = exports.getTasksOutput = exports.getTasks = exports.getTablesOutput = exports.getTables = exports.getSystemGetSnowflakePlatformInfoOutput = exports.getSystemGetSnowflakePlatformInfo = exports.getSystemGetPrivateLinkConfigOutput = exports.getSystemGetPrivateLinkConfig = exports.getSystemGetAwsSnsIamPolicyOutput = exports.getSystemGetAwsSnsIamPolicy = exports.getSystemGenerateScimAccessTokenOutput = exports.getSystemGenerateScimAccessToken = exports.getStreamsOutput = exports.getStreams = exports.getStorageIntegrationsOutput = exports.getStorageIntegrations = exports.getStagesOutput = exports.getStages = exports.getSharesOutput = exports.getShares = exports.getSequencesOutput = exports.getSequences = exports.getSchemasOutput = exports.getSchemas = exports.getRowAccessPoliciesOutput = exports.getRowAccessPolicies = exports.getRolesOutput = exports.getRoles = exports.getRoleOutput = exports.getRole = exports.getResourceMonitorsOutput = exports.getResourceMonitors = exports.getProceduresOutput = exports.getProcedures = exports.getPipesOutput = exports.getPipes = exports.getParametersOutput = exports.getParameters = exports.getMaterializedViewsOutput = exports.getMaterializedViews = exports.getMaskingPoliciesOutput = void 0;
|
|
7
|
+
exports.Task = exports.TagMaskingPolicyAssociation = exports.TagGrant = exports.TagAssociation = exports.Tag = exports.TableGrant = exports.TableConstraint = exports.TableColumnMaskingPolicyApplication = exports.Table = exports.StreamGrant = exports.Stream = exports.StorageIntegration = exports.StageGrant = exports.Stage = exports.Share = exports.SessionParameter = exports.SequenceGrant = exports.Sequence = exports.ScimIntegration = exports.SchemaGrant = exports.Schema = exports.SamlIntegration = exports.RowAccessPolicyGrant = exports.RowAccessPolicy = exports.RoleOwnershipGrant = exports.RoleGrants = exports.Role = exports.ResourceMonitorGrant = exports.ResourceMonitor = exports.Provider = exports.ProcedureGrant = exports.Procedure = exports.PipeGrant = exports.Pipe = exports.PasswordPolicy = exports.ObjectParameter = exports.OauthIntegration = exports.NotificationIntegration = exports.NetworkPolicyAttachment = exports.NetworkPolicy = exports.MaterializedViewGrant = exports.MaterializedView = exports.MaskingPolicyGrant = exports.MaskingPolicy = exports.ManagedAccount = exports.IntegrationGrant = exports.GrantPrivilegesToShare = exports.GrantPrivilegesToRole = exports.GrantPrivilegesToDatabaseRole = exports.GrantPrivilegesToAccountRole = void 0;
|
|
8
|
+
exports.types = exports.config = exports.WarehouseGrant = exports.Warehouse = exports.ViewGrant = exports.View = exports.UserPublicKeys = exports.UserPasswordPolicyAttachment = exports.UserOwnershipGrant = exports.UserGrant = exports.User = exports.UnsafeExecute = exports.TaskGrant = void 0;
|
|
9
9
|
const pulumi = require("@pulumi/pulumi");
|
|
10
10
|
const utilities = require("./utilities");
|
|
11
11
|
exports.Account = null;
|
|
@@ -168,6 +168,8 @@ exports.GrantAccountRole = null;
|
|
|
168
168
|
utilities.lazyLoad(exports, ["GrantAccountRole"], () => require("./grantAccountRole"));
|
|
169
169
|
exports.GrantDatabaseRole = null;
|
|
170
170
|
utilities.lazyLoad(exports, ["GrantDatabaseRole"], () => require("./grantDatabaseRole"));
|
|
171
|
+
exports.GrantOwnership = null;
|
|
172
|
+
utilities.lazyLoad(exports, ["GrantOwnership"], () => require("./grantOwnership"));
|
|
171
173
|
exports.GrantPrivilegesToAccountRole = null;
|
|
172
174
|
utilities.lazyLoad(exports, ["GrantPrivilegesToAccountRole"], () => require("./grantPrivilegesToAccountRole"));
|
|
173
175
|
exports.GrantPrivilegesToDatabaseRole = null;
|
|
@@ -345,6 +347,8 @@ const _module = {
|
|
|
345
347
|
return new exports.GrantAccountRole(name, undefined, { urn });
|
|
346
348
|
case "snowflake:index/grantDatabaseRole:GrantDatabaseRole":
|
|
347
349
|
return new exports.GrantDatabaseRole(name, undefined, { urn });
|
|
350
|
+
case "snowflake:index/grantOwnership:GrantOwnership":
|
|
351
|
+
return new exports.GrantOwnership(name, undefined, { urn });
|
|
348
352
|
case "snowflake:index/grantPrivilegesToAccountRole:GrantPrivilegesToAccountRole":
|
|
349
353
|
return new exports.GrantPrivilegesToAccountRole(name, undefined, { urn });
|
|
350
354
|
case "snowflake:index/grantPrivilegesToDatabaseRole:GrantPrivilegesToDatabaseRole":
|
|
@@ -493,6 +497,7 @@ pulumi.runtime.registerResourceModule("snowflake", "index/function", _module);
|
|
|
493
497
|
pulumi.runtime.registerResourceModule("snowflake", "index/functionGrant", _module);
|
|
494
498
|
pulumi.runtime.registerResourceModule("snowflake", "index/grantAccountRole", _module);
|
|
495
499
|
pulumi.runtime.registerResourceModule("snowflake", "index/grantDatabaseRole", _module);
|
|
500
|
+
pulumi.runtime.registerResourceModule("snowflake", "index/grantOwnership", _module);
|
|
496
501
|
pulumi.runtime.registerResourceModule("snowflake", "index/grantPrivilegesToAccountRole", _module);
|
|
497
502
|
pulumi.runtime.registerResourceModule("snowflake", "index/grantPrivilegesToDatabaseRole", _module);
|
|
498
503
|
pulumi.runtime.registerResourceModule("snowflake", "index/grantPrivilegesToRole", _module);
|