@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.
- package/artifactAllowlist.d.ts +7 -0
- package/artifactAllowlist.js +7 -0
- package/artifactAllowlist.js.map +1 -1
- package/catalog.d.ts +6 -0
- package/catalog.js +6 -0
- package/catalog.js.map +1 -1
- package/catalogWorkspaceBinding.d.ts +12 -0
- package/catalogWorkspaceBinding.js +12 -0
- package/catalogWorkspaceBinding.js.map +1 -1
- package/cluster.d.ts +9 -0
- package/cluster.js.map +1 -1
- package/dashboard.d.ts +24 -0
- package/dashboard.js +24 -0
- package/dashboard.js.map +1 -1
- package/dbfsFile.d.ts +11 -0
- package/dbfsFile.js +2 -0
- package/dbfsFile.js.map +1 -1
- package/directory.d.ts +38 -0
- package/directory.js +29 -0
- package/directory.js.map +1 -1
- package/file.d.ts +69 -0
- package/file.js +69 -0
- package/file.js.map +1 -1
- package/getCatalog.d.ts +12 -0
- package/getCatalog.js +12 -0
- package/getCatalog.js.map +1 -1
- package/getCatalogs.d.ts +12 -0
- package/getCatalogs.js +12 -0
- package/getCatalogs.js.map +1 -1
- package/getClusters.d.ts +8 -0
- package/getClusters.js +8 -0
- package/getClusters.js.map +1 -1
- package/getCurrentUser.d.ts +4 -4
- package/getCurrentUser.js +4 -4
- package/getExternalLocation.d.ts +8 -0
- package/getExternalLocation.js +8 -0
- package/getExternalLocation.js.map +1 -1
- package/getExternalLocations.d.ts +8 -0
- package/getExternalLocations.js +8 -0
- package/getExternalLocations.js.map +1 -1
- package/getJobs.d.ts +12 -0
- package/getJobs.js +12 -0
- package/getJobs.js.map +1 -1
- package/getMetastore.d.ts +12 -0
- package/getMetastore.js +12 -0
- package/getMetastore.js.map +1 -1
- package/getMetastores.d.ts +12 -0
- package/getMetastores.js +12 -0
- package/getMetastores.js.map +1 -1
- package/getSchema.d.ts +4 -6
- package/getSchema.js +4 -6
- package/getSchema.js.map +1 -1
- package/getSchemas.d.ts +12 -0
- package/getSchemas.js +12 -0
- package/getSchemas.js.map +1 -1
- package/getShare.d.ts +4 -0
- package/getShare.js +4 -0
- package/getShare.js.map +1 -1
- package/getShares.d.ts +4 -0
- package/getShares.js +4 -0
- package/getShares.js.map +1 -1
- package/getSqlWarehouses.d.ts +8 -0
- package/getSqlWarehouses.js +8 -0
- package/getSqlWarehouses.js.map +1 -1
- package/getStorageCredential.d.ts +8 -0
- package/getStorageCredential.js +8 -0
- package/getStorageCredential.js.map +1 -1
- package/getStorageCredentials.d.ts +8 -0
- package/getStorageCredentials.js +8 -0
- package/getStorageCredentials.js.map +1 -1
- package/getTable.d.ts +12 -0
- package/getTable.js +12 -0
- package/getTable.js.map +1 -1
- package/getTables.d.ts +12 -0
- package/getTables.js +12 -0
- package/getTables.js.map +1 -1
- package/getViews.d.ts +4 -4
- package/getViews.js +4 -4
- package/getVolume.d.ts +4 -6
- package/getVolume.js +4 -6
- package/getVolume.js.map +1 -1
- package/getVolumes.d.ts +8 -0
- package/getVolumes.js +8 -0
- package/getVolumes.js.map +1 -1
- package/gitCredential.d.ts +23 -0
- package/gitCredential.js +23 -0
- package/gitCredential.js.map +1 -1
- package/globalInitScript.d.ts +11 -0
- package/globalInitScript.js +2 -0
- package/globalInitScript.js.map +1 -1
- package/grant.d.ts +396 -0
- package/grant.js +396 -0
- package/grant.js.map +1 -1
- package/grants.d.ts +433 -0
- package/grants.js +433 -0
- package/grants.js.map +1 -1
- package/group.d.ts +9 -0
- package/group.js.map +1 -1
- package/job.d.ts +69 -0
- package/job.js +69 -0
- package/job.js.map +1 -1
- package/mlflowWebhook.d.ts +1 -1
- package/mlflowWebhook.js +1 -1
- package/mwsCustomerManagedKeys.d.ts +9 -0
- package/mwsCustomerManagedKeys.js +9 -0
- package/mwsCustomerManagedKeys.js.map +1 -1
- package/mwsVpcEndpoint.d.ts +192 -0
- package/mwsVpcEndpoint.js +192 -0
- package/mwsVpcEndpoint.js.map +1 -1
- package/notebook.d.ts +11 -0
- package/notebook.js +2 -0
- package/notebook.js.map +1 -1
- package/oboToken.d.ts +64 -0
- package/oboToken.js +64 -0
- package/oboToken.js.map +1 -1
- package/package.json +2 -2
- package/permissionAssignment.d.ts +9 -0
- package/permissionAssignment.js.map +1 -1
- package/permissions.d.ts +684 -18
- package/permissions.js +684 -18
- package/permissions.js.map +1 -1
- package/repo.d.ts +32 -0
- package/repo.js +32 -0
- package/repo.js.map +1 -1
- package/servicePrincipal.d.ts +9 -0
- package/servicePrincipal.js.map +1 -1
- package/servicePrincipalSecret.d.ts +8 -0
- package/servicePrincipalSecret.js +8 -0
- package/servicePrincipalSecret.js.map +1 -1
- package/share.d.ts +93 -0
- package/share.js +93 -0
- package/share.js.map +1 -1
- package/sqlPermissions.d.ts +15 -3
- package/sqlPermissions.js +15 -3
- package/sqlPermissions.js.map +1 -1
- package/token.d.ts +2 -2
- package/token.js +2 -2
- package/types/input.d.ts +16 -0
- package/types/output.d.ts +16 -0
- package/user.d.ts +9 -0
- package/user.js.map +1 -1
- package/workspaceBinding.d.ts +12 -0
- package/workspaceBinding.js +12 -0
- package/workspaceBinding.js.map +1 -1
- package/workspaceConf.d.ts +4 -0
- package/workspaceConf.js +4 -0
- package/workspaceConf.js.map +1 -1
- package/workspaceFile.d.ts +11 -0
- package/workspaceFile.js +2 -0
- package/workspaceFile.js.map +1 -1
package/grants.js
CHANGED
|
@@ -6,6 +6,439 @@ exports.Grants = void 0;
|
|
|
6
6
|
const pulumi = require("@pulumi/pulumi");
|
|
7
7
|
const utilities = require("./utilities");
|
|
8
8
|
/**
|
|
9
|
+
* > **Note**
|
|
10
|
+
* 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)
|
|
11
|
+
*
|
|
12
|
+
* > **Note**
|
|
13
|
+
* 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).
|
|
14
|
+
*
|
|
15
|
+
* Two different resources help you manage your Unity Catalog grants for a securable. Each of these resources serves a different use case:
|
|
16
|
+
*
|
|
17
|
+
* - databricks_grants: Authoritative. Sets the grants of a securable and replaces any existing grants defined inside or outside of Pulumi.
|
|
18
|
+
* - databricks_grant: Authoritative for a given principal. Updates the grants of a securable to a single principal. Other principals within the grants for the securables are preserved.
|
|
19
|
+
*
|
|
20
|
+
* 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.
|
|
21
|
+
*
|
|
22
|
+
* 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.
|
|
23
|
+
*
|
|
24
|
+
* Every `databricks.Grants` resource must have exactly one securable identifier and one or more `grant` blocks with the following arguments:
|
|
25
|
+
*
|
|
26
|
+
* - `principal` - User name, group name or service principal application ID.
|
|
27
|
+
* - `privileges` - One or more privileges that are specific to a securable type.
|
|
28
|
+
*
|
|
29
|
+
* 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)
|
|
30
|
+
*
|
|
31
|
+
* Pulumi will handle any configuration drift on every `pulumi up` run, even when grants are changed outside of Pulumi state.
|
|
32
|
+
*
|
|
33
|
+
* Unlike the [SQL specification](https://docs.databricks.com/sql/language-manual/sql-ref-privileges.html#privilege-types), all privileges to be written with underscore instead of space, e.g. `CREATE_TABLE` and not `CREATE TABLE`. Below summarizes which privilege types apply to each securable object in the catalog:
|
|
34
|
+
*
|
|
35
|
+
* ## Metastore grants
|
|
36
|
+
*
|
|
37
|
+
* You can grant `CREATE_CATALOG`, `CREATE_CONNECTION`, `CREATE_EXTERNAL_LOCATION`, `CREATE_PROVIDER`, `CREATE_RECIPIENT`, `CREATE_SHARE`, `CREATE_STORAGE_CREDENTIAL`, `MANAGE_ALLOWLIST`, `SET_SHARE_PERMISSION`, `USE_MARKETPLACE_ASSETS`, `USE_CONNECTION`, `USE_PROVIDER`, `USE_RECIPIENT` and `USE_SHARE` privileges to databricks.Metastore assigned to the workspace.
|
|
38
|
+
*
|
|
39
|
+
* ```typescript
|
|
40
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
41
|
+
* import * as databricks from "@pulumi/databricks";
|
|
42
|
+
*
|
|
43
|
+
* const sandbox = new databricks.Grants("sandbox", {
|
|
44
|
+
* metastore: "metastore_id",
|
|
45
|
+
* grants: [
|
|
46
|
+
* {
|
|
47
|
+
* principal: "Data Engineers",
|
|
48
|
+
* privileges: [
|
|
49
|
+
* "CREATE_CATALOG",
|
|
50
|
+
* "CREATE_EXTERNAL_LOCATION",
|
|
51
|
+
* ],
|
|
52
|
+
* },
|
|
53
|
+
* {
|
|
54
|
+
* principal: "Data Sharer",
|
|
55
|
+
* privileges: [
|
|
56
|
+
* "CREATE_RECIPIENT",
|
|
57
|
+
* "CREATE_SHARE",
|
|
58
|
+
* ],
|
|
59
|
+
* },
|
|
60
|
+
* ],
|
|
61
|
+
* });
|
|
62
|
+
* ```
|
|
63
|
+
*
|
|
64
|
+
* ## Catalog grants
|
|
65
|
+
*
|
|
66
|
+
* You can grant `ALL_PRIVILEGES`, `APPLY_TAG`, `CREATE_CONNECTION`, `CREATE_SCHEMA`, `USE_CATALOG` privileges to databricks.Catalog specified in the `catalog` attribute. You can also grant `CREATE_FUNCTION`, `CREATE_TABLE`, `CREATE_VOLUME`, `EXECUTE`, `MODIFY`, `REFRESH`, `SELECT`, `READ_VOLUME`, `WRITE_VOLUME` and `USE_SCHEMA` at the catalog level to apply them to the pertinent current and future securable objects within the catalog:
|
|
67
|
+
*
|
|
68
|
+
* ```typescript
|
|
69
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
70
|
+
* import * as databricks from "@pulumi/databricks";
|
|
71
|
+
*
|
|
72
|
+
* const sandbox = new databricks.Catalog("sandbox", {
|
|
73
|
+
* name: "sandbox",
|
|
74
|
+
* comment: "this catalog is managed by terraform",
|
|
75
|
+
* properties: {
|
|
76
|
+
* purpose: "testing",
|
|
77
|
+
* },
|
|
78
|
+
* });
|
|
79
|
+
* const sandboxGrants = new databricks.Grants("sandbox", {
|
|
80
|
+
* catalog: sandbox.name,
|
|
81
|
+
* grants: [
|
|
82
|
+
* {
|
|
83
|
+
* principal: "Data Scientists",
|
|
84
|
+
* privileges: [
|
|
85
|
+
* "USE_CATALOG",
|
|
86
|
+
* "USE_SCHEMA",
|
|
87
|
+
* "CREATE_TABLE",
|
|
88
|
+
* "SELECT",
|
|
89
|
+
* ],
|
|
90
|
+
* },
|
|
91
|
+
* {
|
|
92
|
+
* principal: "Data Engineers",
|
|
93
|
+
* privileges: [
|
|
94
|
+
* "USE_CATALOG",
|
|
95
|
+
* "USE_SCHEMA",
|
|
96
|
+
* "CREATE_SCHEMA",
|
|
97
|
+
* "CREATE_TABLE",
|
|
98
|
+
* "MODIFY",
|
|
99
|
+
* ],
|
|
100
|
+
* },
|
|
101
|
+
* {
|
|
102
|
+
* principal: "Data Analyst",
|
|
103
|
+
* privileges: [
|
|
104
|
+
* "USE_CATALOG",
|
|
105
|
+
* "USE_SCHEMA",
|
|
106
|
+
* "SELECT",
|
|
107
|
+
* ],
|
|
108
|
+
* },
|
|
109
|
+
* ],
|
|
110
|
+
* });
|
|
111
|
+
* ```
|
|
112
|
+
*
|
|
113
|
+
* ## Schema grants
|
|
114
|
+
*
|
|
115
|
+
* You can grant `ALL_PRIVILEGES`, `APPLY_TAG`, `CREATE_FUNCTION`, `CREATE_TABLE`, `CREATE_VOLUME` and `USE_SCHEMA` privileges to _`catalog.schema`_ specified in the `schema` attribute. You can also grant `EXECUTE`, `MODIFY`, `REFRESH`, `SELECT`, `READ_VOLUME`, `WRITE_VOLUME` at the schema level to apply them to the pertinent current and future securable objects within the schema:
|
|
116
|
+
*
|
|
117
|
+
* ```typescript
|
|
118
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
119
|
+
* import * as databricks from "@pulumi/databricks";
|
|
120
|
+
*
|
|
121
|
+
* const things = new databricks.Schema("things", {
|
|
122
|
+
* catalogName: sandbox.id,
|
|
123
|
+
* name: "things",
|
|
124
|
+
* comment: "this schema is managed by terraform",
|
|
125
|
+
* properties: {
|
|
126
|
+
* kind: "various",
|
|
127
|
+
* },
|
|
128
|
+
* });
|
|
129
|
+
* const thingsGrants = new databricks.Grants("things", {
|
|
130
|
+
* schema: things.id,
|
|
131
|
+
* grants: [{
|
|
132
|
+
* principal: "Data Engineers",
|
|
133
|
+
* privileges: [
|
|
134
|
+
* "USE_SCHEMA",
|
|
135
|
+
* "MODIFY",
|
|
136
|
+
* ],
|
|
137
|
+
* }],
|
|
138
|
+
* });
|
|
139
|
+
* ```
|
|
140
|
+
*
|
|
141
|
+
* ## Table grants
|
|
142
|
+
*
|
|
143
|
+
* You can grant `ALL_PRIVILEGES`, `APPLY_TAG`, `SELECT` and `MODIFY` privileges to _`catalog.schema.table`_ specified in the `table` attribute.
|
|
144
|
+
*
|
|
145
|
+
* ```typescript
|
|
146
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
147
|
+
* import * as databricks from "@pulumi/databricks";
|
|
148
|
+
*
|
|
149
|
+
* const customers = new databricks.Grants("customers", {
|
|
150
|
+
* table: "main.reporting.customers",
|
|
151
|
+
* grants: [
|
|
152
|
+
* {
|
|
153
|
+
* principal: "Data Engineers",
|
|
154
|
+
* privileges: [
|
|
155
|
+
* "MODIFY",
|
|
156
|
+
* "SELECT",
|
|
157
|
+
* ],
|
|
158
|
+
* },
|
|
159
|
+
* {
|
|
160
|
+
* principal: "Data Analysts",
|
|
161
|
+
* privileges: ["SELECT"],
|
|
162
|
+
* },
|
|
163
|
+
* ],
|
|
164
|
+
* });
|
|
165
|
+
* ```
|
|
166
|
+
*
|
|
167
|
+
* You can also apply grants dynamically with databricks.getTables data resource:
|
|
168
|
+
*
|
|
169
|
+
* ```typescript
|
|
170
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
171
|
+
* import * as databricks from "@pulumi/databricks";
|
|
172
|
+
*
|
|
173
|
+
* export = async () => {
|
|
174
|
+
* const things = await databricks.getTables({
|
|
175
|
+
* catalogName: "sandbox",
|
|
176
|
+
* schemaName: "things",
|
|
177
|
+
* });
|
|
178
|
+
* const thingsGrants: databricks.Grants[] = [];
|
|
179
|
+
* for (const range of things.ids.map((v, k) => ({key: k, value: v}))) {
|
|
180
|
+
* thingsGrants.push(new databricks.Grants(`things-${range.key}`, {
|
|
181
|
+
* table: range.value,
|
|
182
|
+
* grants: [{
|
|
183
|
+
* principal: "sensitive",
|
|
184
|
+
* privileges: [
|
|
185
|
+
* "SELECT",
|
|
186
|
+
* "MODIFY",
|
|
187
|
+
* ],
|
|
188
|
+
* }],
|
|
189
|
+
* }));
|
|
190
|
+
* }
|
|
191
|
+
* }
|
|
192
|
+
* ```
|
|
193
|
+
*
|
|
194
|
+
* ## View grants
|
|
195
|
+
*
|
|
196
|
+
* You can grant `ALL_PRIVILEGES`, `APPLY_TAG` and `SELECT` privileges to _`catalog.schema.view`_ specified in `table` attribute.
|
|
197
|
+
*
|
|
198
|
+
* ```typescript
|
|
199
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
200
|
+
* import * as databricks from "@pulumi/databricks";
|
|
201
|
+
*
|
|
202
|
+
* const customer360 = new databricks.Grants("customer360", {
|
|
203
|
+
* table: "main.reporting.customer360",
|
|
204
|
+
* grants: [{
|
|
205
|
+
* principal: "Data Analysts",
|
|
206
|
+
* privileges: ["SELECT"],
|
|
207
|
+
* }],
|
|
208
|
+
* });
|
|
209
|
+
* ```
|
|
210
|
+
*
|
|
211
|
+
* You can also apply grants dynamically with databricks.getViews data resource:
|
|
212
|
+
*
|
|
213
|
+
* ```typescript
|
|
214
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
215
|
+
* import * as databricks from "@pulumi/databricks";
|
|
216
|
+
*
|
|
217
|
+
* export = async () => {
|
|
218
|
+
* const customers = await databricks.getViews({
|
|
219
|
+
* catalogName: "main",
|
|
220
|
+
* schemaName: "customers",
|
|
221
|
+
* });
|
|
222
|
+
* const customersGrants: databricks.Grants[] = [];
|
|
223
|
+
* for (const range of customers.ids.map((v, k) => ({key: k, value: v}))) {
|
|
224
|
+
* customersGrants.push(new databricks.Grants(`customers-${range.key}`, {
|
|
225
|
+
* table: range.value,
|
|
226
|
+
* grants: [{
|
|
227
|
+
* principal: "sensitive",
|
|
228
|
+
* privileges: [
|
|
229
|
+
* "SELECT",
|
|
230
|
+
* "MODIFY",
|
|
231
|
+
* ],
|
|
232
|
+
* }],
|
|
233
|
+
* }));
|
|
234
|
+
* }
|
|
235
|
+
* }
|
|
236
|
+
* ```
|
|
237
|
+
*
|
|
238
|
+
* ## Volume grants
|
|
239
|
+
*
|
|
240
|
+
* You can grant `ALL_PRIVILEGES`, `READ_VOLUME` and `WRITE_VOLUME` privileges to _`catalog.schema.volume`_ specified in the `volume` attribute.
|
|
241
|
+
*
|
|
242
|
+
* ```typescript
|
|
243
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
244
|
+
* import * as databricks from "@pulumi/databricks";
|
|
245
|
+
*
|
|
246
|
+
* const _this = new databricks.Volume("this", {
|
|
247
|
+
* name: "quickstart_volume",
|
|
248
|
+
* catalogName: sandbox.name,
|
|
249
|
+
* schemaName: things.name,
|
|
250
|
+
* volumeType: "EXTERNAL",
|
|
251
|
+
* storageLocation: some.url,
|
|
252
|
+
* comment: "this volume is managed by terraform",
|
|
253
|
+
* });
|
|
254
|
+
* const volume = new databricks.Grants("volume", {
|
|
255
|
+
* volume: _this.id,
|
|
256
|
+
* grants: [{
|
|
257
|
+
* principal: "Data Engineers",
|
|
258
|
+
* privileges: ["WRITE_VOLUME"],
|
|
259
|
+
* }],
|
|
260
|
+
* });
|
|
261
|
+
* ```
|
|
262
|
+
*
|
|
263
|
+
* ## Registered model grants
|
|
264
|
+
*
|
|
265
|
+
* You can grant `ALL_PRIVILEGES`, `APPLY_TAG`, and `EXECUTE` privileges to _`catalog.schema.model`_ specified in the `model` attribute.
|
|
266
|
+
*
|
|
267
|
+
* ```typescript
|
|
268
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
269
|
+
* import * as databricks from "@pulumi/databricks";
|
|
270
|
+
*
|
|
271
|
+
* const customers = new databricks.Grants("customers", {
|
|
272
|
+
* model: "main.reporting.customer_model",
|
|
273
|
+
* grants: [
|
|
274
|
+
* {
|
|
275
|
+
* principal: "Data Engineers",
|
|
276
|
+
* privileges: [
|
|
277
|
+
* "APPLY_TAG",
|
|
278
|
+
* "EXECUTE",
|
|
279
|
+
* ],
|
|
280
|
+
* },
|
|
281
|
+
* {
|
|
282
|
+
* principal: "Data Analysts",
|
|
283
|
+
* privileges: ["EXECUTE"],
|
|
284
|
+
* },
|
|
285
|
+
* ],
|
|
286
|
+
* });
|
|
287
|
+
* ```
|
|
288
|
+
*
|
|
289
|
+
* ## Function grants
|
|
290
|
+
*
|
|
291
|
+
* You can grant `ALL_PRIVILEGES` and `EXECUTE` privileges to _`catalog.schema.function`_ specified in the `function` attribute.
|
|
292
|
+
*
|
|
293
|
+
* ```typescript
|
|
294
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
295
|
+
* import * as databricks from "@pulumi/databricks";
|
|
296
|
+
*
|
|
297
|
+
* const udf = new databricks.Grants("udf", {
|
|
298
|
+
* "function": "main.reporting.udf",
|
|
299
|
+
* grants: [
|
|
300
|
+
* {
|
|
301
|
+
* principal: "Data Engineers",
|
|
302
|
+
* privileges: ["EXECUTE"],
|
|
303
|
+
* },
|
|
304
|
+
* {
|
|
305
|
+
* principal: "Data Analysts",
|
|
306
|
+
* privileges: ["EXECUTE"],
|
|
307
|
+
* },
|
|
308
|
+
* ],
|
|
309
|
+
* });
|
|
310
|
+
* ```
|
|
311
|
+
*
|
|
312
|
+
* ## Storage credential grants
|
|
313
|
+
*
|
|
314
|
+
* You can grant `ALL_PRIVILEGES`, `CREATE_EXTERNAL_LOCATION`, `CREATE_EXTERNAL_TABLE`, `READ_FILES` and `WRITE_FILES` privileges to databricks.StorageCredential id specified in `storageCredential` attribute:
|
|
315
|
+
*
|
|
316
|
+
* ```typescript
|
|
317
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
318
|
+
* import * as databricks from "@pulumi/databricks";
|
|
319
|
+
*
|
|
320
|
+
* const external = new databricks.StorageCredential("external", {
|
|
321
|
+
* name: externalDataAccess.name,
|
|
322
|
+
* awsIamRole: {
|
|
323
|
+
* roleArn: externalDataAccess.arn,
|
|
324
|
+
* },
|
|
325
|
+
* comment: "Managed by TF",
|
|
326
|
+
* });
|
|
327
|
+
* const externalCreds = new databricks.Grants("external_creds", {
|
|
328
|
+
* storageCredential: external.id,
|
|
329
|
+
* grants: [{
|
|
330
|
+
* principal: "Data Engineers",
|
|
331
|
+
* privileges: ["CREATE_EXTERNAL_TABLE"],
|
|
332
|
+
* }],
|
|
333
|
+
* });
|
|
334
|
+
* ```
|
|
335
|
+
*
|
|
336
|
+
* ## External location grants
|
|
337
|
+
*
|
|
338
|
+
* You can grant `ALL_PRIVILEGES`, `CREATE_EXTERNAL_TABLE`, `CREATE_MANAGED_STORAGE`, `CREATE EXTERNAL VOLUME`, `READ_FILES` and `WRITE_FILES` privileges to databricks.ExternalLocation id specified in `externalLocation` attribute:
|
|
339
|
+
*
|
|
340
|
+
* ```typescript
|
|
341
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
342
|
+
* import * as databricks from "@pulumi/databricks";
|
|
343
|
+
*
|
|
344
|
+
* const some = new databricks.ExternalLocation("some", {
|
|
345
|
+
* name: "external",
|
|
346
|
+
* url: `s3://${externalAwsS3Bucket.id}/some`,
|
|
347
|
+
* credentialName: external.id,
|
|
348
|
+
* comment: "Managed by TF",
|
|
349
|
+
* });
|
|
350
|
+
* const someGrants = new databricks.Grants("some", {
|
|
351
|
+
* externalLocation: some.id,
|
|
352
|
+
* grants: [
|
|
353
|
+
* {
|
|
354
|
+
* principal: "Data Engineers",
|
|
355
|
+
* privileges: [
|
|
356
|
+
* "CREATE_EXTERNAL_TABLE",
|
|
357
|
+
* "READ_FILES",
|
|
358
|
+
* ],
|
|
359
|
+
* },
|
|
360
|
+
* {
|
|
361
|
+
* principal: mySp.applicationId,
|
|
362
|
+
* privileges: [
|
|
363
|
+
* "CREATE_EXTERNAL_TABLE",
|
|
364
|
+
* "READ_FILES",
|
|
365
|
+
* ],
|
|
366
|
+
* },
|
|
367
|
+
* {
|
|
368
|
+
* principal: myGroup.displayName,
|
|
369
|
+
* privileges: [
|
|
370
|
+
* "CREATE_EXTERNAL_TABLE",
|
|
371
|
+
* "READ_FILES",
|
|
372
|
+
* ],
|
|
373
|
+
* },
|
|
374
|
+
* {
|
|
375
|
+
* principal: myUser.userName,
|
|
376
|
+
* privileges: [
|
|
377
|
+
* "CREATE_EXTERNAL_TABLE",
|
|
378
|
+
* "READ_FILES",
|
|
379
|
+
* ],
|
|
380
|
+
* },
|
|
381
|
+
* ],
|
|
382
|
+
* });
|
|
383
|
+
* ```
|
|
384
|
+
*
|
|
385
|
+
* ## Connection grants
|
|
386
|
+
*
|
|
387
|
+
* You can grant `ALL_PRIVILEGES`, `USE_CONNECTION` and `CREATE_FOREIGN_CATALOG` to databricks.Connection specified in `foreignConnection` attribute:
|
|
388
|
+
*
|
|
389
|
+
* ```typescript
|
|
390
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
391
|
+
* import * as databricks from "@pulumi/databricks";
|
|
392
|
+
*
|
|
393
|
+
* const mysql = new databricks.Connection("mysql", {
|
|
394
|
+
* name: "mysql_connection",
|
|
395
|
+
* connectionType: "MYSQL",
|
|
396
|
+
* comment: "this is a connection to mysql db",
|
|
397
|
+
* options: {
|
|
398
|
+
* host: "test.mysql.database.azure.com",
|
|
399
|
+
* port: "3306",
|
|
400
|
+
* user: "user",
|
|
401
|
+
* password: "password",
|
|
402
|
+
* },
|
|
403
|
+
* properties: {
|
|
404
|
+
* purpose: "testing",
|
|
405
|
+
* },
|
|
406
|
+
* });
|
|
407
|
+
* const some = new databricks.Grants("some", {
|
|
408
|
+
* foreignConnection: mysql.name,
|
|
409
|
+
* grants: [{
|
|
410
|
+
* principal: "Data Engineers",
|
|
411
|
+
* privileges: [
|
|
412
|
+
* "CREATE_FOREIGN_CATALOG",
|
|
413
|
+
* "USE_CONNECTION",
|
|
414
|
+
* ],
|
|
415
|
+
* }],
|
|
416
|
+
* });
|
|
417
|
+
* ```
|
|
418
|
+
*
|
|
419
|
+
* ## Delta Sharing share grants
|
|
420
|
+
*
|
|
421
|
+
* You can grant `SELECT` to databricks.Recipient on databricks.Share name specified in `share` attribute:
|
|
422
|
+
*
|
|
423
|
+
* ```typescript
|
|
424
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
425
|
+
* import * as databricks from "@pulumi/databricks";
|
|
426
|
+
*
|
|
427
|
+
* const some = new databricks.Share("some", {name: "my_share"});
|
|
428
|
+
* const someRecipient = new databricks.Recipient("some", {name: "my_recipient"});
|
|
429
|
+
* const someGrants = new databricks.Grants("some", {
|
|
430
|
+
* share: some.name,
|
|
431
|
+
* grants: [{
|
|
432
|
+
* principal: someRecipient.name,
|
|
433
|
+
* privileges: ["SELECT"],
|
|
434
|
+
* }],
|
|
435
|
+
* });
|
|
436
|
+
* ```
|
|
437
|
+
*
|
|
438
|
+
* ## Other access control
|
|
439
|
+
*
|
|
440
|
+
* You can control Databricks General Permissions through databricks.Permissions resource.
|
|
441
|
+
*
|
|
9
442
|
* ## Import
|
|
10
443
|
*
|
|
11
444
|
* The resource can be imported using combination of securable type (`table`, `catalog`, `foreign_connection`, ...) and it's name:
|
package/grants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grants.js","sourceRoot":"","sources":["../grants.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC
|
|
1
|
+
{"version":3,"file":"grants.js","sourceRoot":"","sources":["../grants.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2bG;AACH,MAAa,MAAO,SAAQ,MAAM,CAAC,cAAc;IAC7C;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAmB,EAAE,IAAmC;QACjH,OAAO,IAAI,MAAM,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IAC7D,CAAC;IAKD;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,G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,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,MAAM,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAC3D,CAAC;;AA5FL,wBA6FC;AA/EG,gBAAgB;AACO,mBAAY,GAAG,gCAAgC,CAAC"}
|
package/group.d.ts
CHANGED
|
@@ -115,6 +115,9 @@ export declare class Group extends pulumi.CustomResource {
|
|
|
115
115
|
* ID of the group in an external identity provider.
|
|
116
116
|
*/
|
|
117
117
|
readonly externalId: pulumi.Output<string | undefined>;
|
|
118
|
+
/**
|
|
119
|
+
* Ignore `cannot create group: Group with name X already exists.` errors and implicitly import the specific group into Pulumi state, enforcing entitlements defined in the instance of resource. _This functionality is experimental_ and is designed to simplify corner cases, like Azure Active Directory synchronisation.
|
|
120
|
+
*/
|
|
118
121
|
readonly force: pulumi.Output<boolean | undefined>;
|
|
119
122
|
readonly url: pulumi.Output<string>;
|
|
120
123
|
/**
|
|
@@ -158,6 +161,9 @@ export interface GroupState {
|
|
|
158
161
|
* ID of the group in an external identity provider.
|
|
159
162
|
*/
|
|
160
163
|
externalId?: pulumi.Input<string>;
|
|
164
|
+
/**
|
|
165
|
+
* Ignore `cannot create group: Group with name X already exists.` errors and implicitly import the specific group into Pulumi state, enforcing entitlements defined in the instance of resource. _This functionality is experimental_ and is designed to simplify corner cases, like Azure Active Directory synchronisation.
|
|
166
|
+
*/
|
|
161
167
|
force?: pulumi.Input<boolean>;
|
|
162
168
|
url?: pulumi.Input<string>;
|
|
163
169
|
/**
|
|
@@ -193,6 +199,9 @@ export interface GroupArgs {
|
|
|
193
199
|
* ID of the group in an external identity provider.
|
|
194
200
|
*/
|
|
195
201
|
externalId?: pulumi.Input<string>;
|
|
202
|
+
/**
|
|
203
|
+
* Ignore `cannot create group: Group with name X already exists.` errors and implicitly import the specific group into Pulumi state, enforcing entitlements defined in the instance of resource. _This functionality is experimental_ and is designed to simplify corner cases, like Azure Active Directory synchronisation.
|
|
204
|
+
*/
|
|
196
205
|
force?: pulumi.Input<boolean>;
|
|
197
206
|
url?: pulumi.Input<string>;
|
|
198
207
|
/**
|
package/group.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group.js","sourceRoot":"","sources":["../group.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2EG;AACH,MAAa,KAAM,SAAQ,MAAM,CAAC,cAAc;IAC5C;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAkB,EAAE,IAAmC;QAChH,OAAO,IAAI,KAAK,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IAC5D,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,KAAK,CAAC,YAAY,CAAC;IACtD,CAAC;
|
|
1
|
+
{"version":3,"file":"group.js","sourceRoot":"","sources":["../group.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2EG;AACH,MAAa,KAAM,SAAQ,MAAM,CAAC,cAAc;IAC5C;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAkB,EAAE,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C;YACpD,cAAc,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS,CAAC;SAC/E;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,KAAK,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAC1D,CAAC;;AAlGL,sBAmGC;AArFG,gBAAgB;AACO,kBAAY,GAAG,8BAA8B,CAAC"}
|
package/job.d.ts
CHANGED
|
@@ -2,6 +2,75 @@ import * as pulumi from "@pulumi/pulumi";
|
|
|
2
2
|
import * as inputs from "./types/input";
|
|
3
3
|
import * as outputs from "./types/output";
|
|
4
4
|
/**
|
|
5
|
+
* The `databricks.Job` resource allows you to manage [Databricks Jobs](https://docs.databricks.com/jobs.html) to run non-interactive code in a databricks_cluster.
|
|
6
|
+
*
|
|
7
|
+
* ## Example Usage
|
|
8
|
+
*
|
|
9
|
+
* > **Note** In Pulumi configuration, it is recommended to define tasks in alphabetical order of their `taskKey` arguments, so that you get consistent and readable diff. Whenever tasks are added or removed, or `taskKey` is renamed, you'll observe a change in the majority of tasks. It's related to the fact that the current version of the provider treats `task` blocks as an ordered list. Alternatively, `task` block could have been an unordered set, though end-users would see the entire block replaced upon a change in single property of the task.
|
|
10
|
+
*
|
|
11
|
+
* It is possible to create [a Databricks job](https://docs.databricks.com/data-engineering/jobs/jobs-user-guide.html) using `task` blocks. A single task is defined with the `task` block containing one of the `*_task` blocks, `taskKey`, and additional arguments described below.
|
|
12
|
+
*
|
|
13
|
+
* ```typescript
|
|
14
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
15
|
+
* import * as databricks from "@pulumi/databricks";
|
|
16
|
+
*
|
|
17
|
+
* const _this = new databricks.Job("this", {
|
|
18
|
+
* name: "Job with multiple tasks",
|
|
19
|
+
* description: "This job executes multiple tasks on a shared job cluster, which will be provisioned as part of execution, and terminated once all tasks are finished.",
|
|
20
|
+
* jobClusters: [{
|
|
21
|
+
* jobClusterKey: "j",
|
|
22
|
+
* newCluster: {
|
|
23
|
+
* numWorkers: 2,
|
|
24
|
+
* sparkVersion: latest.id,
|
|
25
|
+
* nodeTypeId: smallest.id,
|
|
26
|
+
* },
|
|
27
|
+
* }],
|
|
28
|
+
* tasks: [
|
|
29
|
+
* {
|
|
30
|
+
* taskKey: "a",
|
|
31
|
+
* newCluster: {
|
|
32
|
+
* numWorkers: 1,
|
|
33
|
+
* sparkVersion: latest.id,
|
|
34
|
+
* nodeTypeId: smallest.id,
|
|
35
|
+
* },
|
|
36
|
+
* notebookTask: {
|
|
37
|
+
* notebookPath: thisDatabricksNotebook.path,
|
|
38
|
+
* },
|
|
39
|
+
* },
|
|
40
|
+
* {
|
|
41
|
+
* taskKey: "b",
|
|
42
|
+
* dependsOns: [{
|
|
43
|
+
* taskKey: "a",
|
|
44
|
+
* }],
|
|
45
|
+
* existingClusterId: shared.id,
|
|
46
|
+
* sparkJarTask: {
|
|
47
|
+
* mainClassName: "com.acme.data.Main",
|
|
48
|
+
* },
|
|
49
|
+
* },
|
|
50
|
+
* {
|
|
51
|
+
* taskKey: "c",
|
|
52
|
+
* jobClusterKey: "j",
|
|
53
|
+
* notebookTask: {
|
|
54
|
+
* notebookPath: thisDatabricksNotebook.path,
|
|
55
|
+
* },
|
|
56
|
+
* },
|
|
57
|
+
* {
|
|
58
|
+
* taskKey: "d",
|
|
59
|
+
* pipelineTask: {
|
|
60
|
+
* pipelineId: thisDatabricksPipeline.id,
|
|
61
|
+
* },
|
|
62
|
+
* },
|
|
63
|
+
* ],
|
|
64
|
+
* });
|
|
65
|
+
* ```
|
|
66
|
+
*
|
|
67
|
+
* ## Access Control
|
|
68
|
+
*
|
|
69
|
+
* By default, all users can create and modify jobs unless an administrator [enables jobs access control](https://docs.databricks.com/administration-guide/access-control/jobs-acl.html). With jobs access control, individual permissions determine a user’s abilities.
|
|
70
|
+
*
|
|
71
|
+
* * databricks.Permissions can control which groups or individual users can *Can View*, *Can Manage Run*, and *Can Manage*.
|
|
72
|
+
* * databricks.ClusterPolicy can control which kinds of clusters users can create for jobs.
|
|
73
|
+
*
|
|
5
74
|
* ## Import
|
|
6
75
|
*
|
|
7
76
|
* The resource job can be imported using the id of the job
|
package/job.js
CHANGED
|
@@ -6,6 +6,75 @@ exports.Job = void 0;
|
|
|
6
6
|
const pulumi = require("@pulumi/pulumi");
|
|
7
7
|
const utilities = require("./utilities");
|
|
8
8
|
/**
|
|
9
|
+
* The `databricks.Job` resource allows you to manage [Databricks Jobs](https://docs.databricks.com/jobs.html) to run non-interactive code in a databricks_cluster.
|
|
10
|
+
*
|
|
11
|
+
* ## Example Usage
|
|
12
|
+
*
|
|
13
|
+
* > **Note** In Pulumi configuration, it is recommended to define tasks in alphabetical order of their `taskKey` arguments, so that you get consistent and readable diff. Whenever tasks are added or removed, or `taskKey` is renamed, you'll observe a change in the majority of tasks. It's related to the fact that the current version of the provider treats `task` blocks as an ordered list. Alternatively, `task` block could have been an unordered set, though end-users would see the entire block replaced upon a change in single property of the task.
|
|
14
|
+
*
|
|
15
|
+
* It is possible to create [a Databricks job](https://docs.databricks.com/data-engineering/jobs/jobs-user-guide.html) using `task` blocks. A single task is defined with the `task` block containing one of the `*_task` blocks, `taskKey`, and additional arguments described below.
|
|
16
|
+
*
|
|
17
|
+
* ```typescript
|
|
18
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
19
|
+
* import * as databricks from "@pulumi/databricks";
|
|
20
|
+
*
|
|
21
|
+
* const _this = new databricks.Job("this", {
|
|
22
|
+
* name: "Job with multiple tasks",
|
|
23
|
+
* description: "This job executes multiple tasks on a shared job cluster, which will be provisioned as part of execution, and terminated once all tasks are finished.",
|
|
24
|
+
* jobClusters: [{
|
|
25
|
+
* jobClusterKey: "j",
|
|
26
|
+
* newCluster: {
|
|
27
|
+
* numWorkers: 2,
|
|
28
|
+
* sparkVersion: latest.id,
|
|
29
|
+
* nodeTypeId: smallest.id,
|
|
30
|
+
* },
|
|
31
|
+
* }],
|
|
32
|
+
* tasks: [
|
|
33
|
+
* {
|
|
34
|
+
* taskKey: "a",
|
|
35
|
+
* newCluster: {
|
|
36
|
+
* numWorkers: 1,
|
|
37
|
+
* sparkVersion: latest.id,
|
|
38
|
+
* nodeTypeId: smallest.id,
|
|
39
|
+
* },
|
|
40
|
+
* notebookTask: {
|
|
41
|
+
* notebookPath: thisDatabricksNotebook.path,
|
|
42
|
+
* },
|
|
43
|
+
* },
|
|
44
|
+
* {
|
|
45
|
+
* taskKey: "b",
|
|
46
|
+
* dependsOns: [{
|
|
47
|
+
* taskKey: "a",
|
|
48
|
+
* }],
|
|
49
|
+
* existingClusterId: shared.id,
|
|
50
|
+
* sparkJarTask: {
|
|
51
|
+
* mainClassName: "com.acme.data.Main",
|
|
52
|
+
* },
|
|
53
|
+
* },
|
|
54
|
+
* {
|
|
55
|
+
* taskKey: "c",
|
|
56
|
+
* jobClusterKey: "j",
|
|
57
|
+
* notebookTask: {
|
|
58
|
+
* notebookPath: thisDatabricksNotebook.path,
|
|
59
|
+
* },
|
|
60
|
+
* },
|
|
61
|
+
* {
|
|
62
|
+
* taskKey: "d",
|
|
63
|
+
* pipelineTask: {
|
|
64
|
+
* pipelineId: thisDatabricksPipeline.id,
|
|
65
|
+
* },
|
|
66
|
+
* },
|
|
67
|
+
* ],
|
|
68
|
+
* });
|
|
69
|
+
* ```
|
|
70
|
+
*
|
|
71
|
+
* ## Access Control
|
|
72
|
+
*
|
|
73
|
+
* By default, all users can create and modify jobs unless an administrator [enables jobs access control](https://docs.databricks.com/administration-guide/access-control/jobs-acl.html). With jobs access control, individual permissions determine a user’s abilities.
|
|
74
|
+
*
|
|
75
|
+
* * databricks.Permissions can control which groups or individual users can *Can View*, *Can Manage Run*, and *Can Manage*.
|
|
76
|
+
* * databricks.ClusterPolicy can control which kinds of clusters users can create for jobs.
|
|
77
|
+
*
|
|
9
78
|
* ## Import
|
|
10
79
|
*
|
|
11
80
|
* The resource job can be imported using the id of the job
|