@pulumi/databricks 0.0.1-alpha.1648473134

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 (261) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +303 -0
  3. package/awsS3Mount.d.ts +50 -0
  4. package/awsS3Mount.js +63 -0
  5. package/awsS3Mount.js.map +1 -0
  6. package/azureAdlsGen1Mount.d.ts +65 -0
  7. package/azureAdlsGen1Mount.js +85 -0
  8. package/azureAdlsGen1Mount.js.map +1 -0
  9. package/azureAdlsGen2Mount.d.ts +68 -0
  10. package/azureAdlsGen2Mount.js +93 -0
  11. package/azureAdlsGen2Mount.js.map +1 -0
  12. package/azureBlobMount.d.ts +62 -0
  13. package/azureBlobMount.js +83 -0
  14. package/azureBlobMount.js.map +1 -0
  15. package/catalog.d.ts +124 -0
  16. package/catalog.js +88 -0
  17. package/catalog.js.map +1 -0
  18. package/cluster.d.ts +332 -0
  19. package/cluster.js +121 -0
  20. package/cluster.js.map +1 -0
  21. package/clusterPolicy.d.ts +112 -0
  22. package/clusterPolicy.js +97 -0
  23. package/clusterPolicy.js.map +1 -0
  24. package/config/index.d.ts +1 -0
  25. package/config/index.js +21 -0
  26. package/config/index.js.map +1 -0
  27. package/config/vars.d.ts +20 -0
  28. package/config/vars.js +127 -0
  29. package/config/vars.js.map +1 -0
  30. package/dbfsFile.d.ts +91 -0
  31. package/dbfsFile.js +71 -0
  32. package/dbfsFile.js.map +1 -0
  33. package/directory.d.ts +72 -0
  34. package/directory.js +65 -0
  35. package/directory.js.map +1 -0
  36. package/externalLocation.d.ts +114 -0
  37. package/externalLocation.js +80 -0
  38. package/externalLocation.js.map +1 -0
  39. package/getAwsAssumeRolePolicy.d.ts +47 -0
  40. package/getAwsAssumeRolePolicy.js +24 -0
  41. package/getAwsAssumeRolePolicy.js.map +1 -0
  42. package/getAwsBucketPolicy.d.ts +59 -0
  43. package/getAwsBucketPolicy.js +36 -0
  44. package/getAwsBucketPolicy.js.map +1 -0
  45. package/getAwsCrossAccountPolicy.d.ts +59 -0
  46. package/getAwsCrossAccountPolicy.js +47 -0
  47. package/getAwsCrossAccountPolicy.js.map +1 -0
  48. package/getCatalogs.d.ts +54 -0
  49. package/getCatalogs.js +43 -0
  50. package/getCatalogs.js.map +1 -0
  51. package/getClusters.d.ts +69 -0
  52. package/getClusters.js +57 -0
  53. package/getClusters.js.map +1 -0
  54. package/getCurrentUser.d.ts +39 -0
  55. package/getCurrentUser.js +38 -0
  56. package/getCurrentUser.js.map +1 -0
  57. package/getDbfsFile.d.ts +69 -0
  58. package/getDbfsFile.js +44 -0
  59. package/getDbfsFile.js.map +1 -0
  60. package/getDbfsFilePaths.d.ts +68 -0
  61. package/getDbfsFilePaths.js +46 -0
  62. package/getDbfsFilePaths.js.map +1 -0
  63. package/getGroup.d.ts +166 -0
  64. package/getGroup.js +46 -0
  65. package/getGroup.js.map +1 -0
  66. package/getJobs.d.ts +47 -0
  67. package/getJobs.js +30 -0
  68. package/getJobs.js.map +1 -0
  69. package/getNodeType.d.ts +173 -0
  70. package/getNodeType.js +71 -0
  71. package/getNodeType.js.map +1 -0
  72. package/getNotebook.d.ts +93 -0
  73. package/getNotebook.js +39 -0
  74. package/getNotebook.js.map +1 -0
  75. package/getNotebookPaths.d.ts +58 -0
  76. package/getNotebookPaths.js +36 -0
  77. package/getNotebookPaths.js.map +1 -0
  78. package/getSchemas.d.ts +65 -0
  79. package/getSchemas.js +45 -0
  80. package/getSchemas.js.map +1 -0
  81. package/getSparkVersion.d.ts +150 -0
  82. package/getSparkVersion.js +70 -0
  83. package/getSparkVersion.js.map +1 -0
  84. package/getTables.d.ts +75 -0
  85. package/getTables.js +47 -0
  86. package/getTables.js.map +1 -0
  87. package/getUser.d.ts +78 -0
  88. package/getUser.js +39 -0
  89. package/getUser.js.map +1 -0
  90. package/getZones.d.ts +29 -0
  91. package/getZones.js +26 -0
  92. package/getZones.js.map +1 -0
  93. package/gitCredential.d.ts +48 -0
  94. package/gitCredential.js +64 -0
  95. package/gitCredential.js.map +1 -0
  96. package/globalInitScript.d.ts +99 -0
  97. package/globalInitScript.js +68 -0
  98. package/globalInitScript.js.map +1 -0
  99. package/grants.d.ts +58 -0
  100. package/grants.js +64 -0
  101. package/grants.js.map +1 -0
  102. package/group.d.ts +131 -0
  103. package/group.js +83 -0
  104. package/group.js.map +1 -0
  105. package/groupInstanceProfile.d.ts +96 -0
  106. package/groupInstanceProfile.js +93 -0
  107. package/groupInstanceProfile.js.map +1 -0
  108. package/index.d.ts +81 -0
  109. package/index.js +362 -0
  110. package/index.js.map +1 -0
  111. package/instancePool.d.ts +166 -0
  112. package/instancePool.js +93 -0
  113. package/instancePool.js.map +1 -0
  114. package/instanceProfile.d.ts +180 -0
  115. package/instanceProfile.js +161 -0
  116. package/instanceProfile.js.map +1 -0
  117. package/ipAccessList.d.ts +128 -0
  118. package/ipAccessList.js +108 -0
  119. package/ipAccessList.js.map +1 -0
  120. package/job.d.ts +228 -0
  121. package/job.js +102 -0
  122. package/job.js.map +1 -0
  123. package/library.d.ts +183 -0
  124. package/library.js +189 -0
  125. package/library.js.map +1 -0
  126. package/metastore.d.ts +102 -0
  127. package/metastore.js +75 -0
  128. package/metastore.js.map +1 -0
  129. package/metastoreAssignment.d.ts +94 -0
  130. package/metastoreAssignment.js +81 -0
  131. package/metastoreAssignment.js.map +1 -0
  132. package/metastoreDataAccess.d.ts +85 -0
  133. package/metastoreDataAccess.js +73 -0
  134. package/metastoreDataAccess.js.map +1 -0
  135. package/mlflowExperiment.d.ts +122 -0
  136. package/mlflowExperiment.js +99 -0
  137. package/mlflowExperiment.js.map +1 -0
  138. package/mlflowModel.d.ts +131 -0
  139. package/mlflowModel.js +107 -0
  140. package/mlflowModel.js.map +1 -0
  141. package/mlflowWebhook.d.ts +129 -0
  142. package/mlflowWebhook.js +100 -0
  143. package/mlflowWebhook.js.map +1 -0
  144. package/mount.d.ts +89 -0
  145. package/mount.js +76 -0
  146. package/mount.js.map +1 -0
  147. package/mwsCredentials.d.ts +137 -0
  148. package/mwsCredentials.js +115 -0
  149. package/mwsCredentials.js.map +1 -0
  150. package/mwsCustomerManagedKeys.d.ts +257 -0
  151. package/mwsCustomerManagedKeys.js +226 -0
  152. package/mwsCustomerManagedKeys.js.map +1 -0
  153. package/mwsLogDelivery.d.ts +219 -0
  154. package/mwsLogDelivery.js +144 -0
  155. package/mwsLogDelivery.js.map +1 -0
  156. package/mwsNetworks.d.ts +129 -0
  157. package/mwsNetworks.js +89 -0
  158. package/mwsNetworks.js.map +1 -0
  159. package/mwsPrivateAccessSettings.d.ts +137 -0
  160. package/mwsPrivateAccessSettings.js +74 -0
  161. package/mwsPrivateAccessSettings.js.map +1 -0
  162. package/mwsStorageConfigurations.d.ts +122 -0
  163. package/mwsStorageConfigurations.js +106 -0
  164. package/mwsStorageConfigurations.js.map +1 -0
  165. package/mwsVpcEndpoint.d.ts +122 -0
  166. package/mwsVpcEndpoint.js +79 -0
  167. package/mwsVpcEndpoint.js.map +1 -0
  168. package/mwsWorkspaces.d.ts +222 -0
  169. package/mwsWorkspaces.js +106 -0
  170. package/mwsWorkspaces.js.map +1 -0
  171. package/notebook.d.ts +128 -0
  172. package/notebook.js +77 -0
  173. package/notebook.js.map +1 -0
  174. package/oboToken.d.ts +98 -0
  175. package/oboToken.js +82 -0
  176. package/oboToken.js.map +1 -0
  177. package/package.json +28 -0
  178. package/package.json.bak +28 -0
  179. package/package.json.dev +28 -0
  180. package/permissions.d.ts +211 -0
  181. package/permissions.js +97 -0
  182. package/permissions.js.map +1 -0
  183. package/pipeline.d.ts +200 -0
  184. package/pipeline.js +134 -0
  185. package/pipeline.js.map +1 -0
  186. package/provider.d.ts +61 -0
  187. package/provider.js +64 -0
  188. package/provider.js.map +1 -0
  189. package/repo.d.ts +117 -0
  190. package/repo.js +71 -0
  191. package/repo.js.map +1 -0
  192. package/schema.d.ts +149 -0
  193. package/schema.js +106 -0
  194. package/schema.js.map +1 -0
  195. package/scripts/install-pulumi-plugin.js +21 -0
  196. package/secret.d.ts +115 -0
  197. package/secret.js +99 -0
  198. package/secret.js.map +1 -0
  199. package/secretAcl.d.ts +115 -0
  200. package/secretAcl.js +105 -0
  201. package/secretAcl.js.map +1 -0
  202. package/secretScope.d.ts +85 -0
  203. package/secretScope.js +64 -0
  204. package/secretScope.js.map +1 -0
  205. package/servicePrincipal.d.ts +142 -0
  206. package/servicePrincipal.js +83 -0
  207. package/servicePrincipal.js.map +1 -0
  208. package/sqlDashboard.d.ts +90 -0
  209. package/sqlDashboard.js +99 -0
  210. package/sqlDashboard.js.map +1 -0
  211. package/sqlEndpoint.d.ts +249 -0
  212. package/sqlEndpoint.js +128 -0
  213. package/sqlEndpoint.js.map +1 -0
  214. package/sqlGlobalConfig.d.ts +157 -0
  215. package/sqlGlobalConfig.js +115 -0
  216. package/sqlGlobalConfig.js.map +1 -0
  217. package/sqlPermissions.d.ts +191 -0
  218. package/sqlPermissions.js +139 -0
  219. package/sqlPermissions.js.map +1 -0
  220. package/sqlQuery.d.ts +131 -0
  221. package/sqlQuery.js +139 -0
  222. package/sqlQuery.js.map +1 -0
  223. package/sqlVisualization.d.ts +105 -0
  224. package/sqlVisualization.js +119 -0
  225. package/sqlVisualization.js.map +1 -0
  226. package/sqlWidget.d.ts +109 -0
  227. package/sqlWidget.js +114 -0
  228. package/sqlWidget.js.map +1 -0
  229. package/storageCredential.d.ts +122 -0
  230. package/storageCredential.js +118 -0
  231. package/storageCredential.js.map +1 -0
  232. package/table.d.ts +249 -0
  233. package/table.js +157 -0
  234. package/table.js.map +1 -0
  235. package/token.d.ts +102 -0
  236. package/token.js +84 -0
  237. package/token.js.map +1 -0
  238. package/types/index.d.ts +3 -0
  239. package/types/index.js +11 -0
  240. package/types/index.js.map +1 -0
  241. package/types/input.d.ts +1209 -0
  242. package/types/input.js +5 -0
  243. package/types/input.js.map +1 -0
  244. package/types/output.d.ts +1222 -0
  245. package/types/output.js +5 -0
  246. package/types/output.js.map +1 -0
  247. package/user.d.ts +149 -0
  248. package/user.js +91 -0
  249. package/user.js.map +1 -0
  250. package/userInstanceProfile.d.ts +93 -0
  251. package/userInstanceProfile.js +90 -0
  252. package/userInstanceProfile.js.map +1 -0
  253. package/userRole.d.ts +106 -0
  254. package/userRole.js +103 -0
  255. package/userRole.js.map +1 -0
  256. package/utilities.d.ts +4 -0
  257. package/utilities.js +57 -0
  258. package/utilities.js.map +1 -0
  259. package/workspaceConf.d.ts +76 -0
  260. package/workspaceConf.js +71 -0
  261. package/workspaceConf.js.map +1 -0
@@ -0,0 +1,5 @@
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
+ //# sourceMappingURL=output.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"output.js","sourceRoot":"","sources":["../../types/output.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF"}
package/user.d.ts ADDED
@@ -0,0 +1,149 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ /**
3
+ * This resource is used to [manage users](https://docs.databricks.com/administration-guide/users-groups/users.html), that could be added to databricks.Group within the workspace. Upon user creation the user will receive a password reset email. You can also get information about caller identity using databricks.getCurrentUser data source.
4
+ *
5
+ * ## Related Resources
6
+ *
7
+ * The following resources are often used in the same context:
8
+ *
9
+ * * End to end workspace management guide.
10
+ * * databricks.Group to manage [groups in Databricks Workspace](https://docs.databricks.com/administration-guide/users-groups/groups.html) or [Account Console](https://accounts.cloud.databricks.com/) (for AWS deployments).
11
+ * * databricks.Group data to retrieve information about databricks.Group members, entitlements and instance profiles.
12
+ * * databricks.GroupInstanceProfile to attach databricks.InstanceProfile (AWS) to databricks_group.
13
+ * * databricksGroupMember to attach users and groups as group members.
14
+ * * databricks.InstanceProfile to manage AWS EC2 instance profiles that users can launch databricks.Cluster and access data, like databricks_mount.
15
+ * * databricks.User data to retrieves information about databricks_user.
16
+ *
17
+ * ## Import
18
+ *
19
+ * The resource scim user can be imported using idbash
20
+ *
21
+ * ```sh
22
+ * $ pulumi import databricks:index/user:User me <user-id>
23
+ * ```
24
+ */
25
+ export declare class User extends pulumi.CustomResource {
26
+ /**
27
+ * Get an existing User resource's state with the given name, ID, and optional extra
28
+ * properties used to qualify the lookup.
29
+ *
30
+ * @param name The _unique_ name of the resulting resource.
31
+ * @param id The _unique_ provider ID of the resource to lookup.
32
+ * @param state Any extra arguments used during the lookup.
33
+ * @param opts Optional settings to control the behavior of the CustomResource.
34
+ */
35
+ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: UserState, opts?: pulumi.CustomResourceOptions): User;
36
+ /**
37
+ * Returns true if the given object is an instance of User. This is designed to work even
38
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
39
+ */
40
+ static isInstance(obj: any): obj is User;
41
+ /**
42
+ * Either user is active or not. True by default, but can be set to false in case of user deactivation with preserving user assets.
43
+ */
44
+ readonly active: pulumi.Output<boolean | undefined>;
45
+ /**
46
+ * Allow the user to have cluster create privileges. Defaults to false. More fine grained permissions could be assigned with databricks.Permissions and `clusterId` argument. Everyone without `allowClusterCreate` argument set, but with permission to use Cluster Policy would be able to create clusters, but within boundaries of that specific policy.
47
+ */
48
+ readonly allowClusterCreate: pulumi.Output<boolean | undefined>;
49
+ /**
50
+ * Allow the user to have instance pool create privileges. Defaults to false. More fine grained permissions could be assigned with databricks.Permissions and instancePoolId argument.
51
+ */
52
+ readonly allowInstancePoolCreate: pulumi.Output<boolean | undefined>;
53
+ /**
54
+ * This is a field to allow the group to have access to [Databricks SQL](https://databricks.com/product/databricks-sql) feature in User Interface and through databricks_sql_endpoint.
55
+ */
56
+ readonly databricksSqlAccess: pulumi.Output<boolean | undefined>;
57
+ /**
58
+ * This is an alias for the username that can be the full name of the user.
59
+ */
60
+ readonly displayName: pulumi.Output<string>;
61
+ /**
62
+ * ID of the user in an external identity provider.
63
+ */
64
+ readonly externalId: pulumi.Output<string | undefined>;
65
+ readonly force: pulumi.Output<boolean | undefined>;
66
+ /**
67
+ * This is the username of the given user and will be their form of access and identity.
68
+ */
69
+ readonly userName: pulumi.Output<string>;
70
+ readonly workspaceAccess: pulumi.Output<boolean | undefined>;
71
+ /**
72
+ * Create a User resource with the given unique name, arguments, and options.
73
+ *
74
+ * @param name The _unique_ name of the resource.
75
+ * @param args The arguments to use to populate this resource's properties.
76
+ * @param opts A bag of options that control this resource's behavior.
77
+ */
78
+ constructor(name: string, args: UserArgs, opts?: pulumi.CustomResourceOptions);
79
+ }
80
+ /**
81
+ * Input properties used for looking up and filtering User resources.
82
+ */
83
+ export interface UserState {
84
+ /**
85
+ * Either user is active or not. True by default, but can be set to false in case of user deactivation with preserving user assets.
86
+ */
87
+ active?: pulumi.Input<boolean>;
88
+ /**
89
+ * Allow the user to have cluster create privileges. Defaults to false. More fine grained permissions could be assigned with databricks.Permissions and `clusterId` argument. Everyone without `allowClusterCreate` argument set, but with permission to use Cluster Policy would be able to create clusters, but within boundaries of that specific policy.
90
+ */
91
+ allowClusterCreate?: pulumi.Input<boolean>;
92
+ /**
93
+ * Allow the user to have instance pool create privileges. Defaults to false. More fine grained permissions could be assigned with databricks.Permissions and instancePoolId argument.
94
+ */
95
+ allowInstancePoolCreate?: pulumi.Input<boolean>;
96
+ /**
97
+ * This is a field to allow the group to have access to [Databricks SQL](https://databricks.com/product/databricks-sql) feature in User Interface and through databricks_sql_endpoint.
98
+ */
99
+ databricksSqlAccess?: pulumi.Input<boolean>;
100
+ /**
101
+ * This is an alias for the username that can be the full name of the user.
102
+ */
103
+ displayName?: pulumi.Input<string>;
104
+ /**
105
+ * ID of the user in an external identity provider.
106
+ */
107
+ externalId?: pulumi.Input<string>;
108
+ force?: pulumi.Input<boolean>;
109
+ /**
110
+ * This is the username of the given user and will be their form of access and identity.
111
+ */
112
+ userName?: pulumi.Input<string>;
113
+ workspaceAccess?: pulumi.Input<boolean>;
114
+ }
115
+ /**
116
+ * The set of arguments for constructing a User resource.
117
+ */
118
+ export interface UserArgs {
119
+ /**
120
+ * Either user is active or not. True by default, but can be set to false in case of user deactivation with preserving user assets.
121
+ */
122
+ active?: pulumi.Input<boolean>;
123
+ /**
124
+ * Allow the user to have cluster create privileges. Defaults to false. More fine grained permissions could be assigned with databricks.Permissions and `clusterId` argument. Everyone without `allowClusterCreate` argument set, but with permission to use Cluster Policy would be able to create clusters, but within boundaries of that specific policy.
125
+ */
126
+ allowClusterCreate?: pulumi.Input<boolean>;
127
+ /**
128
+ * Allow the user to have instance pool create privileges. Defaults to false. More fine grained permissions could be assigned with databricks.Permissions and instancePoolId argument.
129
+ */
130
+ allowInstancePoolCreate?: pulumi.Input<boolean>;
131
+ /**
132
+ * This is a field to allow the group to have access to [Databricks SQL](https://databricks.com/product/databricks-sql) feature in User Interface and through databricks_sql_endpoint.
133
+ */
134
+ databricksSqlAccess?: pulumi.Input<boolean>;
135
+ /**
136
+ * This is an alias for the username that can be the full name of the user.
137
+ */
138
+ displayName?: pulumi.Input<string>;
139
+ /**
140
+ * ID of the user in an external identity provider.
141
+ */
142
+ externalId?: pulumi.Input<string>;
143
+ force?: pulumi.Input<boolean>;
144
+ /**
145
+ * This is the username of the given user and will be their form of access and identity.
146
+ */
147
+ userName: pulumi.Input<string>;
148
+ workspaceAccess?: pulumi.Input<boolean>;
149
+ }
package/user.js ADDED
@@ -0,0 +1,91 @@
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.User = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("./utilities");
8
+ /**
9
+ * This resource is used to [manage users](https://docs.databricks.com/administration-guide/users-groups/users.html), that could be added to databricks.Group within the workspace. Upon user creation the user will receive a password reset email. You can also get information about caller identity using databricks.getCurrentUser data source.
10
+ *
11
+ * ## Related Resources
12
+ *
13
+ * The following resources are often used in the same context:
14
+ *
15
+ * * End to end workspace management guide.
16
+ * * databricks.Group to manage [groups in Databricks Workspace](https://docs.databricks.com/administration-guide/users-groups/groups.html) or [Account Console](https://accounts.cloud.databricks.com/) (for AWS deployments).
17
+ * * databricks.Group data to retrieve information about databricks.Group members, entitlements and instance profiles.
18
+ * * databricks.GroupInstanceProfile to attach databricks.InstanceProfile (AWS) to databricks_group.
19
+ * * databricksGroupMember to attach users and groups as group members.
20
+ * * databricks.InstanceProfile to manage AWS EC2 instance profiles that users can launch databricks.Cluster and access data, like databricks_mount.
21
+ * * databricks.User data to retrieves information about databricks_user.
22
+ *
23
+ * ## Import
24
+ *
25
+ * The resource scim user can be imported using idbash
26
+ *
27
+ * ```sh
28
+ * $ pulumi import databricks:index/user:User me <user-id>
29
+ * ```
30
+ */
31
+ class User extends pulumi.CustomResource {
32
+ constructor(name, argsOrState, opts) {
33
+ let resourceInputs = {};
34
+ opts = opts || {};
35
+ if (opts.id) {
36
+ const state = argsOrState;
37
+ resourceInputs["active"] = state ? state.active : undefined;
38
+ resourceInputs["allowClusterCreate"] = state ? state.allowClusterCreate : undefined;
39
+ resourceInputs["allowInstancePoolCreate"] = state ? state.allowInstancePoolCreate : undefined;
40
+ resourceInputs["databricksSqlAccess"] = state ? state.databricksSqlAccess : undefined;
41
+ resourceInputs["displayName"] = state ? state.displayName : undefined;
42
+ resourceInputs["externalId"] = state ? state.externalId : undefined;
43
+ resourceInputs["force"] = state ? state.force : undefined;
44
+ resourceInputs["userName"] = state ? state.userName : undefined;
45
+ resourceInputs["workspaceAccess"] = state ? state.workspaceAccess : undefined;
46
+ }
47
+ else {
48
+ const args = argsOrState;
49
+ if ((!args || args.userName === undefined) && !opts.urn) {
50
+ throw new Error("Missing required property 'userName'");
51
+ }
52
+ resourceInputs["active"] = args ? args.active : undefined;
53
+ resourceInputs["allowClusterCreate"] = args ? args.allowClusterCreate : undefined;
54
+ resourceInputs["allowInstancePoolCreate"] = args ? args.allowInstancePoolCreate : undefined;
55
+ resourceInputs["databricksSqlAccess"] = args ? args.databricksSqlAccess : undefined;
56
+ resourceInputs["displayName"] = args ? args.displayName : undefined;
57
+ resourceInputs["externalId"] = args ? args.externalId : undefined;
58
+ resourceInputs["force"] = args ? args.force : undefined;
59
+ resourceInputs["userName"] = args ? args.userName : undefined;
60
+ resourceInputs["workspaceAccess"] = args ? args.workspaceAccess : undefined;
61
+ }
62
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
63
+ super(User.__pulumiType, name, resourceInputs, opts);
64
+ }
65
+ /**
66
+ * Get an existing User resource's state with the given name, ID, and optional extra
67
+ * properties used to qualify the lookup.
68
+ *
69
+ * @param name The _unique_ name of the resulting resource.
70
+ * @param id The _unique_ provider ID of the resource to lookup.
71
+ * @param state Any extra arguments used during the lookup.
72
+ * @param opts Optional settings to control the behavior of the CustomResource.
73
+ */
74
+ static get(name, id, state, opts) {
75
+ return new User(name, state, Object.assign(Object.assign({}, opts), { id: id }));
76
+ }
77
+ /**
78
+ * Returns true if the given object is an instance of User. This is designed to work even
79
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
80
+ */
81
+ static isInstance(obj) {
82
+ if (obj === undefined || obj === null) {
83
+ return false;
84
+ }
85
+ return obj['__pulumiType'] === User.__pulumiType;
86
+ }
87
+ }
88
+ exports.User = User;
89
+ /** @internal */
90
+ User.__pulumiType = 'databricks:index/user:User';
91
+ //# sourceMappingURL=user.js.map
package/user.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user.js","sourceRoot":"","sources":["../user.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAa,IAAK,SAAQ,MAAM,CAAC,cAAc;IAmE3C,YAAY,IAAY,EAAE,WAAkC,EAAE,IAAmC;QAC7F,IAAI,cAAc,GAAkB,EAAE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Y,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IACzD,CAAC;IAjGD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAiB,EAAE,IAAmC;QAC/G,OAAO,IAAI,IAAI,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IAC3D,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,IAAI,CAAC,YAAY,CAAC;IACrD,CAAC;;AA1BL,oBAmGC;AArFG,gBAAgB;AACO,iBAAY,GAAG,4BAA4B,CAAC"}
@@ -0,0 +1,93 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ /**
3
+ * > **Deprecated** Please rewrite with databricks_user_role. This resource will be removed in v0.5.x
4
+ *
5
+ * This resource allows you to attach databricks.InstanceProfile (AWS) to databricks_user.
6
+ *
7
+ * ## Example Usage
8
+ *
9
+ * ```typescript
10
+ * import * as pulumi from "@pulumi/pulumi";
11
+ * import * as databricks from "@pulumi/databricks";
12
+ *
13
+ * const instanceProfile = new databricks.InstanceProfile("instanceProfile", {instanceProfileArn: "my_instance_profile_arn"});
14
+ * const myUser = new databricks.User("myUser", {userName: "me@example.com"});
15
+ * const myUserInstanceProfile = new databricks.UserInstanceProfile("myUserInstanceProfile", {
16
+ * userId: myUser.id,
17
+ * instanceProfileId: instanceProfile.id,
18
+ * });
19
+ * ```
20
+ * ## Related Resources
21
+ *
22
+ * The following resources are often used in the same context:
23
+ *
24
+ * * End to end workspace management guide.
25
+ * * databricks.GroupInstanceProfile to attach databricks.InstanceProfile (AWS) to databricks_group.
26
+ * * databricksGroupMember to attach users and groups as group members.
27
+ * * databricks.InstanceProfile to manage AWS EC2 instance profiles that users can launch databricks.Cluster and access data, like databricks_mount.
28
+ * * databricks.User to [manage users](https://docs.databricks.com/administration-guide/users-groups/users.html), that could be added to databricks.Group within the workspace.
29
+ * * databricks.User data to retrieves information about databricks_user.
30
+ *
31
+ * ## Import
32
+ *
33
+ * -> **Note** Importing this resource is not currently supported.
34
+ */
35
+ export declare class UserInstanceProfile extends pulumi.CustomResource {
36
+ /**
37
+ * Get an existing UserInstanceProfile resource's state with the given name, ID, and optional extra
38
+ * properties used to qualify the lookup.
39
+ *
40
+ * @param name The _unique_ name of the resulting resource.
41
+ * @param id The _unique_ provider ID of the resource to lookup.
42
+ * @param state Any extra arguments used during the lookup.
43
+ * @param opts Optional settings to control the behavior of the CustomResource.
44
+ */
45
+ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: UserInstanceProfileState, opts?: pulumi.CustomResourceOptions): UserInstanceProfile;
46
+ /**
47
+ * Returns true if the given object is an instance of UserInstanceProfile. This is designed to work even
48
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
49
+ */
50
+ static isInstance(obj: any): obj is UserInstanceProfile;
51
+ /**
52
+ * This is the id of the instance profile resource.
53
+ */
54
+ readonly instanceProfileId: pulumi.Output<string>;
55
+ /**
56
+ * This is the id of the user resource.
57
+ */
58
+ readonly userId: pulumi.Output<string>;
59
+ /**
60
+ * Create a UserInstanceProfile resource with the given unique name, arguments, and options.
61
+ *
62
+ * @param name The _unique_ name of the resource.
63
+ * @param args The arguments to use to populate this resource's properties.
64
+ * @param opts A bag of options that control this resource's behavior.
65
+ */
66
+ constructor(name: string, args: UserInstanceProfileArgs, opts?: pulumi.CustomResourceOptions);
67
+ }
68
+ /**
69
+ * Input properties used for looking up and filtering UserInstanceProfile resources.
70
+ */
71
+ export interface UserInstanceProfileState {
72
+ /**
73
+ * This is the id of the instance profile resource.
74
+ */
75
+ instanceProfileId?: pulumi.Input<string>;
76
+ /**
77
+ * This is the id of the user resource.
78
+ */
79
+ userId?: pulumi.Input<string>;
80
+ }
81
+ /**
82
+ * The set of arguments for constructing a UserInstanceProfile resource.
83
+ */
84
+ export interface UserInstanceProfileArgs {
85
+ /**
86
+ * This is the id of the instance profile resource.
87
+ */
88
+ instanceProfileId: pulumi.Input<string>;
89
+ /**
90
+ * This is the id of the user resource.
91
+ */
92
+ userId: pulumi.Input<string>;
93
+ }
@@ -0,0 +1,90 @@
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.UserInstanceProfile = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("./utilities");
8
+ /**
9
+ * > **Deprecated** Please rewrite with databricks_user_role. This resource will be removed in v0.5.x
10
+ *
11
+ * This resource allows you to attach databricks.InstanceProfile (AWS) to databricks_user.
12
+ *
13
+ * ## Example Usage
14
+ *
15
+ * ```typescript
16
+ * import * as pulumi from "@pulumi/pulumi";
17
+ * import * as databricks from "@pulumi/databricks";
18
+ *
19
+ * const instanceProfile = new databricks.InstanceProfile("instanceProfile", {instanceProfileArn: "my_instance_profile_arn"});
20
+ * const myUser = new databricks.User("myUser", {userName: "me@example.com"});
21
+ * const myUserInstanceProfile = new databricks.UserInstanceProfile("myUserInstanceProfile", {
22
+ * userId: myUser.id,
23
+ * instanceProfileId: instanceProfile.id,
24
+ * });
25
+ * ```
26
+ * ## Related Resources
27
+ *
28
+ * The following resources are often used in the same context:
29
+ *
30
+ * * End to end workspace management guide.
31
+ * * databricks.GroupInstanceProfile to attach databricks.InstanceProfile (AWS) to databricks_group.
32
+ * * databricksGroupMember to attach users and groups as group members.
33
+ * * databricks.InstanceProfile to manage AWS EC2 instance profiles that users can launch databricks.Cluster and access data, like databricks_mount.
34
+ * * databricks.User to [manage users](https://docs.databricks.com/administration-guide/users-groups/users.html), that could be added to databricks.Group within the workspace.
35
+ * * databricks.User data to retrieves information about databricks_user.
36
+ *
37
+ * ## Import
38
+ *
39
+ * -> **Note** Importing this resource is not currently supported.
40
+ */
41
+ class UserInstanceProfile extends pulumi.CustomResource {
42
+ constructor(name, argsOrState, opts) {
43
+ let resourceInputs = {};
44
+ opts = opts || {};
45
+ if (opts.id) {
46
+ const state = argsOrState;
47
+ resourceInputs["instanceProfileId"] = state ? state.instanceProfileId : undefined;
48
+ resourceInputs["userId"] = state ? state.userId : undefined;
49
+ }
50
+ else {
51
+ const args = argsOrState;
52
+ if ((!args || args.instanceProfileId === undefined) && !opts.urn) {
53
+ throw new Error("Missing required property 'instanceProfileId'");
54
+ }
55
+ if ((!args || args.userId === undefined) && !opts.urn) {
56
+ throw new Error("Missing required property 'userId'");
57
+ }
58
+ resourceInputs["instanceProfileId"] = args ? args.instanceProfileId : undefined;
59
+ resourceInputs["userId"] = args ? args.userId : undefined;
60
+ }
61
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
62
+ super(UserInstanceProfile.__pulumiType, name, resourceInputs, opts);
63
+ }
64
+ /**
65
+ * Get an existing UserInstanceProfile resource's state with the given name, ID, and optional extra
66
+ * properties used to qualify the lookup.
67
+ *
68
+ * @param name The _unique_ name of the resulting resource.
69
+ * @param id The _unique_ provider ID of the resource to lookup.
70
+ * @param state Any extra arguments used during the lookup.
71
+ * @param opts Optional settings to control the behavior of the CustomResource.
72
+ */
73
+ static get(name, id, state, opts) {
74
+ return new UserInstanceProfile(name, state, Object.assign(Object.assign({}, opts), { id: id }));
75
+ }
76
+ /**
77
+ * Returns true if the given object is an instance of UserInstanceProfile. This is designed to work even
78
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
79
+ */
80
+ static isInstance(obj) {
81
+ if (obj === undefined || obj === null) {
82
+ return false;
83
+ }
84
+ return obj['__pulumiType'] === UserInstanceProfile.__pulumiType;
85
+ }
86
+ }
87
+ exports.UserInstanceProfile = UserInstanceProfile;
88
+ /** @internal */
89
+ UserInstanceProfile.__pulumiType = 'databricks:index/userInstanceProfile:UserInstanceProfile';
90
+ //# sourceMappingURL=userInstanceProfile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"userInstanceProfile.js","sourceRoot":"","sources":["../userInstanceProfile.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAa,mBAAoB,SAAQ,MAAM,CAAC,cAAc;IA6C1D,YAAY,IAAY,EAAE,WAAgE,EAAE,IAAmC;QAC3H,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;YACT,MAAM,KAAK,GAAG,WAAmD,CAAC;YAClE,cAAc,CAAC,mBAAmB,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC,SAAS,CAAC;YAClF,cAAc,CAAC,QAAQ,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;SAC/D;aAAM;YACH,MAAM,IAAI,GAAG,WAAkD,CAAC;YAChE,IAAI,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,iBAAiB,KAAK,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;gBAC9D,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;aACpE;YACD,IAAI,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;gBACnD,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;aACzD;YACD,cAAc,CAAC,mBAAmB,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,SAAS,CAAC;YAChF,cAAc,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;SAC7D;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,mBAAmB,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IACxE,CAAC;IAhED;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAgC,EAAE,IAAmC;QAC9H,OAAO,IAAI,mBAAmB,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IAC1E,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,mBAAmB,CAAC,YAAY,CAAC;IACpE,CAAC;;AA1BL,kDAkEC;AApDG,gBAAgB;AACO,gCAAY,GAAG,0DAA0D,CAAC"}
package/userRole.d.ts ADDED
@@ -0,0 +1,106 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ /**
3
+ * This resource allows you to attach a role or databricks.InstanceProfile (AWS) to databricks_user.
4
+ *
5
+ * ## Example Usage
6
+ *
7
+ * Adding AWS instance profile to a user
8
+ *
9
+ * ```typescript
10
+ * import * as pulumi from "@pulumi/pulumi";
11
+ * import * as databricks from "@pulumi/databricks";
12
+ *
13
+ * const instanceProfile = new databricks.InstanceProfile("instanceProfile", {instanceProfileArn: "my_instance_profile_arn"});
14
+ * const myUser = new databricks.User("myUser", {userName: "me@example.com"});
15
+ * const myUserRole = new databricks.UserRole("myUserRole", {
16
+ * userId: myUser.id,
17
+ * role: instanceProfile.id,
18
+ * });
19
+ * ```
20
+ *
21
+ * Adding user as administrator to Databricks Account
22
+ *
23
+ * ```typescript
24
+ * import * as pulumi from "@pulumi/pulumi";
25
+ * import * as databricks from "@pulumi/databricks";
26
+ *
27
+ * const myUser = new databricks.User("myUser", {userName: "me@example.com"});
28
+ * const myUserAccountAdmin = new databricks.UserRole("myUserAccountAdmin", {
29
+ * userId: myUser.id,
30
+ * role: "account_admin",
31
+ * });
32
+ * ```
33
+ * ## Related Resources
34
+ *
35
+ * The following resources are often used in the same context:
36
+ *
37
+ * * End to end workspace management guide.
38
+ * * databricks.GroupInstanceProfile to attach databricks.InstanceProfile (AWS) to databricks_group.
39
+ * * databricksGroupMember to attach users and groups as group members.
40
+ * * databricks.InstanceProfile to manage AWS EC2 instance profiles that users can launch databricks.Cluster and access data, like databricks_mount.
41
+ * * databricks.User to [manage users](https://docs.databricks.com/administration-guide/users-groups/users.html), that could be added to databricks.Group within the workspace.
42
+ * * databricks.User data to retrieves information about databricks_user.
43
+ *
44
+ * ## Import
45
+ *
46
+ * -> **Note** Importing this resource is not currently supported.
47
+ */
48
+ export declare class UserRole extends pulumi.CustomResource {
49
+ /**
50
+ * Get an existing UserRole resource's state with the given name, ID, and optional extra
51
+ * properties used to qualify the lookup.
52
+ *
53
+ * @param name The _unique_ name of the resulting resource.
54
+ * @param id The _unique_ provider ID of the resource to lookup.
55
+ * @param state Any extra arguments used during the lookup.
56
+ * @param opts Optional settings to control the behavior of the CustomResource.
57
+ */
58
+ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: UserRoleState, opts?: pulumi.CustomResourceOptions): UserRole;
59
+ /**
60
+ * Returns true if the given object is an instance of UserRole. This is designed to work even
61
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
62
+ */
63
+ static isInstance(obj: any): obj is UserRole;
64
+ /**
65
+ * Either a role name or the id of the instance profile resource.
66
+ */
67
+ readonly role: pulumi.Output<string>;
68
+ /**
69
+ * This is the id of the user resource.
70
+ */
71
+ readonly userId: pulumi.Output<string>;
72
+ /**
73
+ * Create a UserRole resource with the given unique name, arguments, and options.
74
+ *
75
+ * @param name The _unique_ name of the resource.
76
+ * @param args The arguments to use to populate this resource's properties.
77
+ * @param opts A bag of options that control this resource's behavior.
78
+ */
79
+ constructor(name: string, args: UserRoleArgs, opts?: pulumi.CustomResourceOptions);
80
+ }
81
+ /**
82
+ * Input properties used for looking up and filtering UserRole resources.
83
+ */
84
+ export interface UserRoleState {
85
+ /**
86
+ * Either a role name or the id of the instance profile resource.
87
+ */
88
+ role?: pulumi.Input<string>;
89
+ /**
90
+ * This is the id of the user resource.
91
+ */
92
+ userId?: pulumi.Input<string>;
93
+ }
94
+ /**
95
+ * The set of arguments for constructing a UserRole resource.
96
+ */
97
+ export interface UserRoleArgs {
98
+ /**
99
+ * Either a role name or the id of the instance profile resource.
100
+ */
101
+ role: pulumi.Input<string>;
102
+ /**
103
+ * This is the id of the user resource.
104
+ */
105
+ userId: pulumi.Input<string>;
106
+ }
package/userRole.js ADDED
@@ -0,0 +1,103 @@
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.UserRole = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("./utilities");
8
+ /**
9
+ * This resource allows you to attach a role or databricks.InstanceProfile (AWS) to databricks_user.
10
+ *
11
+ * ## Example Usage
12
+ *
13
+ * Adding AWS instance profile to a user
14
+ *
15
+ * ```typescript
16
+ * import * as pulumi from "@pulumi/pulumi";
17
+ * import * as databricks from "@pulumi/databricks";
18
+ *
19
+ * const instanceProfile = new databricks.InstanceProfile("instanceProfile", {instanceProfileArn: "my_instance_profile_arn"});
20
+ * const myUser = new databricks.User("myUser", {userName: "me@example.com"});
21
+ * const myUserRole = new databricks.UserRole("myUserRole", {
22
+ * userId: myUser.id,
23
+ * role: instanceProfile.id,
24
+ * });
25
+ * ```
26
+ *
27
+ * Adding user as administrator to Databricks Account
28
+ *
29
+ * ```typescript
30
+ * import * as pulumi from "@pulumi/pulumi";
31
+ * import * as databricks from "@pulumi/databricks";
32
+ *
33
+ * const myUser = new databricks.User("myUser", {userName: "me@example.com"});
34
+ * const myUserAccountAdmin = new databricks.UserRole("myUserAccountAdmin", {
35
+ * userId: myUser.id,
36
+ * role: "account_admin",
37
+ * });
38
+ * ```
39
+ * ## Related Resources
40
+ *
41
+ * The following resources are often used in the same context:
42
+ *
43
+ * * End to end workspace management guide.
44
+ * * databricks.GroupInstanceProfile to attach databricks.InstanceProfile (AWS) to databricks_group.
45
+ * * databricksGroupMember to attach users and groups as group members.
46
+ * * databricks.InstanceProfile to manage AWS EC2 instance profiles that users can launch databricks.Cluster and access data, like databricks_mount.
47
+ * * databricks.User to [manage users](https://docs.databricks.com/administration-guide/users-groups/users.html), that could be added to databricks.Group within the workspace.
48
+ * * databricks.User data to retrieves information about databricks_user.
49
+ *
50
+ * ## Import
51
+ *
52
+ * -> **Note** Importing this resource is not currently supported.
53
+ */
54
+ class UserRole extends pulumi.CustomResource {
55
+ constructor(name, argsOrState, opts) {
56
+ let resourceInputs = {};
57
+ opts = opts || {};
58
+ if (opts.id) {
59
+ const state = argsOrState;
60
+ resourceInputs["role"] = state ? state.role : undefined;
61
+ resourceInputs["userId"] = state ? state.userId : undefined;
62
+ }
63
+ else {
64
+ const args = argsOrState;
65
+ if ((!args || args.role === undefined) && !opts.urn) {
66
+ throw new Error("Missing required property 'role'");
67
+ }
68
+ if ((!args || args.userId === undefined) && !opts.urn) {
69
+ throw new Error("Missing required property 'userId'");
70
+ }
71
+ resourceInputs["role"] = args ? args.role : undefined;
72
+ resourceInputs["userId"] = args ? args.userId : undefined;
73
+ }
74
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
75
+ super(UserRole.__pulumiType, name, resourceInputs, opts);
76
+ }
77
+ /**
78
+ * Get an existing UserRole resource's state with the given name, ID, and optional extra
79
+ * properties used to qualify the lookup.
80
+ *
81
+ * @param name The _unique_ name of the resulting resource.
82
+ * @param id The _unique_ provider ID of the resource to lookup.
83
+ * @param state Any extra arguments used during the lookup.
84
+ * @param opts Optional settings to control the behavior of the CustomResource.
85
+ */
86
+ static get(name, id, state, opts) {
87
+ return new UserRole(name, state, Object.assign(Object.assign({}, opts), { id: id }));
88
+ }
89
+ /**
90
+ * Returns true if the given object is an instance of UserRole. This is designed to work even
91
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
92
+ */
93
+ static isInstance(obj) {
94
+ if (obj === undefined || obj === null) {
95
+ return false;
96
+ }
97
+ return obj['__pulumiType'] === UserRole.__pulumiType;
98
+ }
99
+ }
100
+ exports.UserRole = UserRole;
101
+ /** @internal */
102
+ UserRole.__pulumiType = 'databricks:index/userRole:UserRole';
103
+ //# sourceMappingURL=userRole.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"userRole.js","sourceRoot":"","sources":["../userRole.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,MAAa,QAAS,SAAQ,MAAM,CAAC,cAAc;IA6C/C,YAAY,IAAY,EAAE,WAA0C,EAAE,IAAmC;QACrG,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;YACT,MAAM,KAAK,GAAG,WAAwC,CAAC;YACvD,cAAc,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;YACxD,cAAc,CAAC,QAAQ,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC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