@pulumi/databricks 1.48.0-alpha.1721971593 → 1.48.0-alpha.1722058383

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (150) hide show
  1. package/artifactAllowlist.d.ts +7 -0
  2. package/artifactAllowlist.js +7 -0
  3. package/artifactAllowlist.js.map +1 -1
  4. package/catalog.d.ts +6 -0
  5. package/catalog.js +6 -0
  6. package/catalog.js.map +1 -1
  7. package/catalogWorkspaceBinding.d.ts +12 -0
  8. package/catalogWorkspaceBinding.js +12 -0
  9. package/catalogWorkspaceBinding.js.map +1 -1
  10. package/cluster.d.ts +9 -0
  11. package/cluster.js.map +1 -1
  12. package/dashboard.d.ts +24 -0
  13. package/dashboard.js +24 -0
  14. package/dashboard.js.map +1 -1
  15. package/dbfsFile.d.ts +11 -0
  16. package/dbfsFile.js +2 -0
  17. package/dbfsFile.js.map +1 -1
  18. package/directory.d.ts +38 -0
  19. package/directory.js +29 -0
  20. package/directory.js.map +1 -1
  21. package/file.d.ts +69 -0
  22. package/file.js +69 -0
  23. package/file.js.map +1 -1
  24. package/getCatalog.d.ts +12 -0
  25. package/getCatalog.js +12 -0
  26. package/getCatalog.js.map +1 -1
  27. package/getCatalogs.d.ts +12 -0
  28. package/getCatalogs.js +12 -0
  29. package/getCatalogs.js.map +1 -1
  30. package/getClusters.d.ts +8 -0
  31. package/getClusters.js +8 -0
  32. package/getClusters.js.map +1 -1
  33. package/getCurrentUser.d.ts +4 -4
  34. package/getCurrentUser.js +4 -4
  35. package/getExternalLocation.d.ts +8 -0
  36. package/getExternalLocation.js +8 -0
  37. package/getExternalLocation.js.map +1 -1
  38. package/getExternalLocations.d.ts +8 -0
  39. package/getExternalLocations.js +8 -0
  40. package/getExternalLocations.js.map +1 -1
  41. package/getJobs.d.ts +12 -0
  42. package/getJobs.js +12 -0
  43. package/getJobs.js.map +1 -1
  44. package/getMetastore.d.ts +12 -0
  45. package/getMetastore.js +12 -0
  46. package/getMetastore.js.map +1 -1
  47. package/getMetastores.d.ts +12 -0
  48. package/getMetastores.js +12 -0
  49. package/getMetastores.js.map +1 -1
  50. package/getSchema.d.ts +4 -6
  51. package/getSchema.js +4 -6
  52. package/getSchema.js.map +1 -1
  53. package/getSchemas.d.ts +12 -0
  54. package/getSchemas.js +12 -0
  55. package/getSchemas.js.map +1 -1
  56. package/getShare.d.ts +4 -0
  57. package/getShare.js +4 -0
  58. package/getShare.js.map +1 -1
  59. package/getShares.d.ts +4 -0
  60. package/getShares.js +4 -0
  61. package/getShares.js.map +1 -1
  62. package/getSqlWarehouses.d.ts +8 -0
  63. package/getSqlWarehouses.js +8 -0
  64. package/getSqlWarehouses.js.map +1 -1
  65. package/getStorageCredential.d.ts +8 -0
  66. package/getStorageCredential.js +8 -0
  67. package/getStorageCredential.js.map +1 -1
  68. package/getStorageCredentials.d.ts +8 -0
  69. package/getStorageCredentials.js +8 -0
  70. package/getStorageCredentials.js.map +1 -1
  71. package/getTable.d.ts +12 -0
  72. package/getTable.js +12 -0
  73. package/getTable.js.map +1 -1
  74. package/getTables.d.ts +12 -0
  75. package/getTables.js +12 -0
  76. package/getTables.js.map +1 -1
  77. package/getViews.d.ts +4 -4
  78. package/getViews.js +4 -4
  79. package/getVolume.d.ts +4 -6
  80. package/getVolume.js +4 -6
  81. package/getVolume.js.map +1 -1
  82. package/getVolumes.d.ts +8 -0
  83. package/getVolumes.js +8 -0
  84. package/getVolumes.js.map +1 -1
  85. package/gitCredential.d.ts +23 -0
  86. package/gitCredential.js +23 -0
  87. package/gitCredential.js.map +1 -1
  88. package/globalInitScript.d.ts +11 -0
  89. package/globalInitScript.js +2 -0
  90. package/globalInitScript.js.map +1 -1
  91. package/grant.d.ts +396 -0
  92. package/grant.js +396 -0
  93. package/grant.js.map +1 -1
  94. package/grants.d.ts +433 -0
  95. package/grants.js +433 -0
  96. package/grants.js.map +1 -1
  97. package/group.d.ts +9 -0
  98. package/group.js.map +1 -1
  99. package/job.d.ts +69 -0
  100. package/job.js +69 -0
  101. package/job.js.map +1 -1
  102. package/mlflowWebhook.d.ts +1 -1
  103. package/mlflowWebhook.js +1 -1
  104. package/mwsCustomerManagedKeys.d.ts +9 -0
  105. package/mwsCustomerManagedKeys.js +9 -0
  106. package/mwsCustomerManagedKeys.js.map +1 -1
  107. package/mwsVpcEndpoint.d.ts +192 -0
  108. package/mwsVpcEndpoint.js +192 -0
  109. package/mwsVpcEndpoint.js.map +1 -1
  110. package/notebook.d.ts +11 -0
  111. package/notebook.js +2 -0
  112. package/notebook.js.map +1 -1
  113. package/oboToken.d.ts +64 -0
  114. package/oboToken.js +64 -0
  115. package/oboToken.js.map +1 -1
  116. package/package.json +2 -2
  117. package/permissionAssignment.d.ts +9 -0
  118. package/permissionAssignment.js.map +1 -1
  119. package/permissions.d.ts +684 -18
  120. package/permissions.js +684 -18
  121. package/permissions.js.map +1 -1
  122. package/repo.d.ts +32 -0
  123. package/repo.js +32 -0
  124. package/repo.js.map +1 -1
  125. package/servicePrincipal.d.ts +9 -0
  126. package/servicePrincipal.js.map +1 -1
  127. package/servicePrincipalSecret.d.ts +8 -0
  128. package/servicePrincipalSecret.js +8 -0
  129. package/servicePrincipalSecret.js.map +1 -1
  130. package/share.d.ts +93 -0
  131. package/share.js +93 -0
  132. package/share.js.map +1 -1
  133. package/sqlPermissions.d.ts +15 -3
  134. package/sqlPermissions.js +15 -3
  135. package/sqlPermissions.js.map +1 -1
  136. package/token.d.ts +2 -2
  137. package/token.js +2 -2
  138. package/types/input.d.ts +16 -0
  139. package/types/output.d.ts +16 -0
  140. package/user.d.ts +9 -0
  141. package/user.js.map +1 -1
  142. package/workspaceBinding.d.ts +12 -0
  143. package/workspaceBinding.js +12 -0
  144. package/workspaceBinding.js.map +1 -1
  145. package/workspaceConf.d.ts +4 -0
  146. package/workspaceConf.js +4 -0
  147. package/workspaceConf.js.map +1 -1
  148. package/workspaceFile.d.ts +11 -0
  149. package/workspaceFile.js +2 -0
  150. package/workspaceFile.js.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}
package/grant.d.ts CHANGED
@@ -1,5 +1,401 @@
1
1
  import * as pulumi from "@pulumi/pulumi";
2
2
  /**
3
+ * > **Note**
4
+ * This article refers to the privileges and inheritance model in Privilege Model version 1.0. If you created your metastore during the public preview (before August 25, 2022), you can upgrade to Privilege Model version 1.0 following [Upgrade to privilege inheritance](https://docs.databricks.com/data-governance/unity-catalog/hive-metastore.html)
5
+ *
6
+ * > **Note**
7
+ * Unity Catalog APIs are accessible via **workspace-level APIs**. This design may change in the future. Account-level principal grants can be assigned with any valid workspace as the Unity Catalog is decoupled from specific workspaces. More information in [the official documentation](https://docs.databricks.com/data-governance/unity-catalog/index.html).
8
+ *
9
+ * In Unity Catalog all users initially have no access to data. Only Metastore Admins can create objects and can grant/revoke access on individual objects to users and groups. Every securable object in Unity Catalog has an owner. The owner can be any account-level user or group, called principals in general. The principal that creates an object becomes its owner. Owners receive `ALL_PRIVILEGES` on the securable object (e.g., `SELECT` and `MODIFY` on a table), as well as the permission to grant privileges to other principals.
10
+ *
11
+ * Securable objects are hierarchical and privileges are inherited downward. The highest level object that privileges are inherited from is the catalog. This means that granting a privilege on a catalog or schema automatically grants the privilege to all current and future objects within the catalog or schema. Privileges that are granted on a metastore are not inherited.
12
+ *
13
+ * Every `databricks.Grant` resource must have exactly one securable identifier and the following arguments:
14
+ *
15
+ * - `principal` - User name, group name or service principal application ID.
16
+ * - `privileges` - One or more privileges that are specific to a securable type.
17
+ *
18
+ * For the latest list of privilege types that apply to each securable object in Unity Catalog, please refer to the [official documentation](https://docs.databricks.com/en/data-governance/unity-catalog/manage-privileges/privileges.html#privilege-types-by-securable-object-in-unity-catalog)
19
+ *
20
+ * Pulumi will handle any configuration drift for the specified principal on every `pulumi up` run, even when grants are changed outside of Pulumi state.
21
+ *
22
+ * See databricks.Grants for the list of privilege types that apply to each securable object.
23
+ *
24
+ * ## Metastore grants
25
+ *
26
+ * See databricks.Grants Metastore grants for the list of privileges that apply to Metastores.
27
+ *
28
+ * ```typescript
29
+ * import * as pulumi from "@pulumi/pulumi";
30
+ * import * as databricks from "@pulumi/databricks";
31
+ *
32
+ * const sandboxDataEngineers = new databricks.Grant("sandbox_data_engineers", {
33
+ * principal: "Data Engineers",
34
+ * privileges: [
35
+ * "CREATE_CATALOG",
36
+ * "CREATE_EXTERNAL_LOCATION",
37
+ * ],
38
+ * });
39
+ * const sandboxDataSharer = new databricks.Grant("sandbox_data_sharer", {
40
+ * principal: "Data Sharer",
41
+ * privileges: [
42
+ * "CREATE_RECIPIENT",
43
+ * "CREATE_SHARE",
44
+ * ],
45
+ * });
46
+ * ```
47
+ *
48
+ * ## Catalog grants
49
+ *
50
+ * See databricks.Grants Catalog grants for the list of privileges that apply to Catalogs.
51
+ *
52
+ * ```typescript
53
+ * import * as pulumi from "@pulumi/pulumi";
54
+ * import * as databricks from "@pulumi/databricks";
55
+ *
56
+ * const sandbox = new databricks.Catalog("sandbox", {
57
+ * metastoreId: _this.id,
58
+ * name: "sandbox",
59
+ * comment: "this catalog is managed by terraform",
60
+ * properties: {
61
+ * purpose: "testing",
62
+ * },
63
+ * });
64
+ * const sandboxDataScientists = new databricks.Grant("sandbox_data_scientists", {
65
+ * catalog: sandbox.name,
66
+ * principal: "Data Scientists",
67
+ * privileges: [
68
+ * "USE_CATALOG",
69
+ * "USE_SCHEMA",
70
+ * "CREATE_TABLE",
71
+ * "SELECT",
72
+ * ],
73
+ * });
74
+ * const sandboxDataEngineers = new databricks.Grant("sandbox_data_engineers", {
75
+ * catalog: sandbox.name,
76
+ * principal: "Data Engineers",
77
+ * privileges: [
78
+ * "USE_CATALOG",
79
+ * "USE_SCHEMA",
80
+ * "CREATE_SCHEMA",
81
+ * "CREATE_TABLE",
82
+ * "MODIFY",
83
+ * ],
84
+ * });
85
+ * const sandboxDataAnalyst = new databricks.Grant("sandbox_data_analyst", {
86
+ * catalog: sandbox.name,
87
+ * principal: "Data Analyst",
88
+ * privileges: [
89
+ * "USE_CATALOG",
90
+ * "USE_SCHEMA",
91
+ * "SELECT",
92
+ * ],
93
+ * });
94
+ * ```
95
+ *
96
+ * ## Schema grants
97
+ *
98
+ * See databricks.Grants Schema grants for the list of privileges that apply to Schemas.
99
+ *
100
+ * ```typescript
101
+ * import * as pulumi from "@pulumi/pulumi";
102
+ * import * as databricks from "@pulumi/databricks";
103
+ *
104
+ * const things = new databricks.Schema("things", {
105
+ * catalogName: sandbox.id,
106
+ * name: "things",
107
+ * comment: "this schema is managed by terraform",
108
+ * properties: {
109
+ * kind: "various",
110
+ * },
111
+ * });
112
+ * const thingsGrant = new databricks.Grant("things", {
113
+ * schema: things.id,
114
+ * principal: "Data Engineers",
115
+ * privileges: [
116
+ * "USE_SCHEMA",
117
+ * "MODIFY",
118
+ * ],
119
+ * });
120
+ * ```
121
+ *
122
+ * ## Table grants
123
+ *
124
+ * See databricks.Grants Table grants for the list of privileges that apply to Tables.
125
+ *
126
+ * ```typescript
127
+ * import * as pulumi from "@pulumi/pulumi";
128
+ * import * as databricks from "@pulumi/databricks";
129
+ *
130
+ * const customersDataEngineers = new databricks.Grant("customers_data_engineers", {
131
+ * table: "main.reporting.customers",
132
+ * principal: "Data Engineers",
133
+ * privileges: [
134
+ * "MODIFY",
135
+ * "SELECT",
136
+ * ],
137
+ * });
138
+ * const customersDataAnalysts = new databricks.Grant("customers_data_analysts", {
139
+ * table: "main.reporting.customers",
140
+ * principal: "Data Analysts",
141
+ * privileges: ["SELECT"],
142
+ * });
143
+ * ```
144
+ *
145
+ * You can also apply grants dynamically with databricks.getTables data resource:
146
+ *
147
+ * ```typescript
148
+ * import * as pulumi from "@pulumi/pulumi";
149
+ * import * as databricks from "@pulumi/databricks";
150
+ *
151
+ * export = async () => {
152
+ * const things = await databricks.getTables({
153
+ * catalogName: "sandbox",
154
+ * schemaName: "things",
155
+ * });
156
+ * const thingsGrant: databricks.Grant[] = [];
157
+ * for (const range of things.ids.map((v, k) => ({key: k, value: v}))) {
158
+ * thingsGrant.push(new databricks.Grant(`things-${range.key}`, {
159
+ * table: range.value,
160
+ * principal: "sensitive",
161
+ * privileges: [
162
+ * "SELECT",
163
+ * "MODIFY",
164
+ * ],
165
+ * }));
166
+ * }
167
+ * }
168
+ * ```
169
+ *
170
+ * ## View grants
171
+ *
172
+ * See databricks.Grants View grants for the list of privileges that apply to Views.
173
+ *
174
+ * ```typescript
175
+ * import * as pulumi from "@pulumi/pulumi";
176
+ * import * as databricks from "@pulumi/databricks";
177
+ *
178
+ * const customer360 = new databricks.Grant("customer360", {
179
+ * table: "main.reporting.customer360",
180
+ * principal: "Data Analysts",
181
+ * privileges: ["SELECT"],
182
+ * });
183
+ * ```
184
+ *
185
+ * You can also apply grants dynamically with databricks.getViews data resource:
186
+ *
187
+ * ```typescript
188
+ * import * as pulumi from "@pulumi/pulumi";
189
+ * import * as databricks from "@pulumi/databricks";
190
+ *
191
+ * export = async () => {
192
+ * const customers = await databricks.getViews({
193
+ * catalogName: "main",
194
+ * schemaName: "customers",
195
+ * });
196
+ * const customersGrant: databricks.Grant[] = [];
197
+ * for (const range of customers.ids.map((v, k) => ({key: k, value: v}))) {
198
+ * customersGrant.push(new databricks.Grant(`customers-${range.key}`, {
199
+ * table: range.value,
200
+ * principal: "sensitive",
201
+ * privileges: [
202
+ * "SELECT",
203
+ * "MODIFY",
204
+ * ],
205
+ * }));
206
+ * }
207
+ * }
208
+ * ```
209
+ *
210
+ * ## Volume grants
211
+ *
212
+ * See databricks.Grants Volume grants for the list of privileges that apply to Volumes.
213
+ *
214
+ * ```typescript
215
+ * import * as pulumi from "@pulumi/pulumi";
216
+ * import * as databricks from "@pulumi/databricks";
217
+ *
218
+ * const _this = new databricks.Volume("this", {
219
+ * name: "quickstart_volume",
220
+ * catalogName: sandbox.name,
221
+ * schemaName: things.name,
222
+ * volumeType: "EXTERNAL",
223
+ * storageLocation: some.url,
224
+ * comment: "this volume is managed by terraform",
225
+ * });
226
+ * const volume = new databricks.Grant("volume", {
227
+ * volume: _this.id,
228
+ * principal: "Data Engineers",
229
+ * privileges: ["WRITE_VOLUME"],
230
+ * });
231
+ * ```
232
+ *
233
+ * ## Registered model grants
234
+ *
235
+ * See databricks.Grants Registered model grants for the list of privileges that apply to Registered models.
236
+ *
237
+ * ```typescript
238
+ * import * as pulumi from "@pulumi/pulumi";
239
+ * import * as databricks from "@pulumi/databricks";
240
+ *
241
+ * const customersDataEngineers = new databricks.Grant("customers_data_engineers", {
242
+ * model: "main.reporting.customer_model",
243
+ * principal: "Data Engineers",
244
+ * privileges: [
245
+ * "APPLY_TAG",
246
+ * "EXECUTE",
247
+ * ],
248
+ * });
249
+ * const customersDataAnalysts = new databricks.Grant("customers_data_analysts", {
250
+ * model: "main.reporting.customer_model",
251
+ * principal: "Data Analysts",
252
+ * privileges: ["EXECUTE"],
253
+ * });
254
+ * ```
255
+ *
256
+ * ## Function grants
257
+ *
258
+ * See databricks.Grants Function grants for the list of privileges that apply to Registered models.
259
+ *
260
+ * ```typescript
261
+ * import * as pulumi from "@pulumi/pulumi";
262
+ * import * as databricks from "@pulumi/databricks";
263
+ *
264
+ * const udfDataEngineers = new databricks.Grant("udf_data_engineers", {
265
+ * "function": "main.reporting.udf",
266
+ * principal: "Data Engineers",
267
+ * privileges: ["EXECUTE"],
268
+ * });
269
+ * const udfDataAnalysts = new databricks.Grant("udf_data_analysts", {
270
+ * "function": "main.reporting.udf",
271
+ * principal: "Data Analysts",
272
+ * privileges: ["EXECUTE"],
273
+ * });
274
+ * ```
275
+ *
276
+ * ## Storage credential grants
277
+ *
278
+ * See databricks.Grants Storage credential grants for the list of privileges that apply to Storage credentials.
279
+ *
280
+ * ```typescript
281
+ * import * as pulumi from "@pulumi/pulumi";
282
+ * import * as databricks from "@pulumi/databricks";
283
+ *
284
+ * const external = new databricks.StorageCredential("external", {
285
+ * name: externalDataAccess.name,
286
+ * awsIamRole: {
287
+ * roleArn: externalDataAccess.arn,
288
+ * },
289
+ * comment: "Managed by TF",
290
+ * });
291
+ * const externalCreds = new databricks.Grant("external_creds", {
292
+ * storageCredential: external.id,
293
+ * principal: "Data Engineers",
294
+ * privileges: ["CREATE_EXTERNAL_TABLE"],
295
+ * });
296
+ * ```
297
+ *
298
+ * ## External location grants
299
+ *
300
+ * See databricks.Grants External location grants for the list of privileges that apply to External locations.
301
+ *
302
+ * ```typescript
303
+ * import * as pulumi from "@pulumi/pulumi";
304
+ * import * as databricks from "@pulumi/databricks";
305
+ *
306
+ * const some = new databricks.ExternalLocation("some", {
307
+ * name: "external",
308
+ * url: `s3://${externalAwsS3Bucket.id}/some`,
309
+ * credentialName: external.id,
310
+ * comment: "Managed by TF",
311
+ * });
312
+ * const someDataEngineers = new databricks.Grant("some_data_engineers", {
313
+ * externalLocation: some.id,
314
+ * principal: "Data Engineers",
315
+ * privileges: [
316
+ * "CREATE_EXTERNAL_TABLE",
317
+ * "READ_FILES",
318
+ * ],
319
+ * });
320
+ * const someServicePrincipal = new databricks.Grant("some_service_principal", {
321
+ * externalLocation: some.id,
322
+ * principal: mySp.applicationId,
323
+ * privileges: [
324
+ * "USE_SCHEMA",
325
+ * "MODIFY",
326
+ * ],
327
+ * });
328
+ * const someGroup = new databricks.Grant("some_group", {
329
+ * externalLocation: some.id,
330
+ * principal: myGroup.displayName,
331
+ * privileges: [
332
+ * "USE_SCHEMA",
333
+ * "MODIFY",
334
+ * ],
335
+ * });
336
+ * const someUser = new databricks.Grant("some_user", {
337
+ * externalLocation: some.id,
338
+ * principal: myUser.userName,
339
+ * privileges: [
340
+ * "USE_SCHEMA",
341
+ * "MODIFY",
342
+ * ],
343
+ * });
344
+ * ```
345
+ *
346
+ * ## Connection grants
347
+ *
348
+ * See databricks.Grants Connection grants for the list of privileges that apply to Connections.
349
+ *
350
+ * ```typescript
351
+ * import * as pulumi from "@pulumi/pulumi";
352
+ * import * as databricks from "@pulumi/databricks";
353
+ *
354
+ * const mysql = new databricks.Connection("mysql", {
355
+ * name: "mysql_connection",
356
+ * connectionType: "MYSQL",
357
+ * comment: "this is a connection to mysql db",
358
+ * options: {
359
+ * host: "test.mysql.database.azure.com",
360
+ * port: "3306",
361
+ * user: "user",
362
+ * password: "password",
363
+ * },
364
+ * properties: {
365
+ * purpose: "testing",
366
+ * },
367
+ * });
368
+ * const some = new databricks.Grant("some", {
369
+ * foreignConnection: mysql.name,
370
+ * principal: "Data Engineers",
371
+ * privileges: [
372
+ * "CREATE_FOREIGN_CATALOG",
373
+ * "USE_CONNECTION",
374
+ * ],
375
+ * });
376
+ * ```
377
+ *
378
+ * ## Delta Sharing share grants
379
+ *
380
+ * See databricks.Grants Delta Sharing share grants for the list of privileges that apply to Delta Sharing shares.
381
+ *
382
+ * ```typescript
383
+ * import * as pulumi from "@pulumi/pulumi";
384
+ * import * as databricks from "@pulumi/databricks";
385
+ *
386
+ * const some = new databricks.Share("some", {name: "my_share"});
387
+ * const someRecipient = new databricks.Recipient("some", {name: "my_recipient"});
388
+ * const someGrant = new databricks.Grant("some", {
389
+ * share: some.name,
390
+ * principal: someRecipient.name,
391
+ * privileges: ["SELECT"],
392
+ * });
393
+ * ```
394
+ *
395
+ * ## Other access control
396
+ *
397
+ * You can control Databricks General Permissions through databricks.Permissions resource.
398
+ *
3
399
  * ## Import
4
400
  *
5
401
  * The resource can be imported using combination of securable type (`table`, `catalog`, `foreign_connection`, ...), it's name and `principal`: