@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,166 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ import { input as inputs, output as outputs } from "./types";
3
+ /**
4
+ * ## Import
5
+ *
6
+ * The resource instance pool can be imported using it's idbash
7
+ *
8
+ * ```sh
9
+ * $ pulumi import databricks:index/instancePool:InstancePool this <instance-pool-id>
10
+ * ```
11
+ */
12
+ export declare class InstancePool extends pulumi.CustomResource {
13
+ /**
14
+ * Get an existing InstancePool resource's state with the given name, ID, and optional extra
15
+ * properties used to qualify the lookup.
16
+ *
17
+ * @param name The _unique_ name of the resulting resource.
18
+ * @param id The _unique_ provider ID of the resource to lookup.
19
+ * @param state Any extra arguments used during the lookup.
20
+ * @param opts Optional settings to control the behavior of the CustomResource.
21
+ */
22
+ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: InstancePoolState, opts?: pulumi.CustomResourceOptions): InstancePool;
23
+ /**
24
+ * Returns true if the given object is an instance of InstancePool. This is designed to work even
25
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
26
+ */
27
+ static isInstance(obj: any): obj is InstancePool;
28
+ readonly awsAttributes: pulumi.Output<outputs.InstancePoolAwsAttributes | undefined>;
29
+ readonly azureAttributes: pulumi.Output<outputs.InstancePoolAzureAttributes | undefined>;
30
+ /**
31
+ * (Map) Additional tags for instance pool resources. Databricks tags all pool resources (e.g. AWS & Azure instances and Disk volumes). *Databricks allows at most 43 custom tags.*
32
+ */
33
+ readonly customTags: pulumi.Output<{
34
+ [key: string]: any;
35
+ } | undefined>;
36
+ readonly diskSpec: pulumi.Output<outputs.InstancePoolDiskSpec | undefined>;
37
+ /**
38
+ * (Bool) Autoscaling Local Storage: when enabled, the instances in the pool dynamically acquire additional disk space when they are running low on disk space.
39
+ */
40
+ readonly enableElasticDisk: pulumi.Output<boolean | undefined>;
41
+ readonly gcpAttributes: pulumi.Output<outputs.InstancePoolGcpAttributes | undefined>;
42
+ /**
43
+ * (Integer) The number of minutes that idle instances in excess of the minIdleInstances are maintained by the pool before being terminated. If not specified, excess idle instances are terminated automatically after a default timeout period. If specified, the time must be between 0 and 10000 minutes. If you specify 0, excess idle instances are removed as soon as possible.
44
+ */
45
+ readonly idleInstanceAutoterminationMinutes: pulumi.Output<number>;
46
+ readonly instancePoolId: pulumi.Output<string>;
47
+ /**
48
+ * (String) The name of the instance pool. This is required for create and edit operations. It must be unique, non-empty, and less than 100 characters.
49
+ */
50
+ readonly instancePoolName: pulumi.Output<string>;
51
+ /**
52
+ * (Integer) The maximum number of instances the pool can contain, including both idle instances and ones in use by clusters. Once the maximum capacity is reached, you cannot create new clusters from the pool and existing clusters cannot autoscale up until some instances are made idle in the pool via cluster termination or down-scaling.
53
+ */
54
+ readonly maxCapacity: pulumi.Output<number | undefined>;
55
+ /**
56
+ * (Integer) The minimum number of idle instances maintained by the pool. This is in addition to any instances in use by active clusters.
57
+ */
58
+ readonly minIdleInstances: pulumi.Output<number | undefined>;
59
+ /**
60
+ * (String) The node type for the instances in the pool. All clusters attached to the pool inherit this node type and the pool’s idle instances are allocated based on this type. You can retrieve a list of available node types by using the [List Node Types API](https://docs.databricks.com/dev-tools/api/latest/clusters.html#clusterclusterservicelistnodetypes) call.
61
+ */
62
+ readonly nodeTypeId: pulumi.Output<string>;
63
+ readonly preloadedDockerImages: pulumi.Output<outputs.InstancePoolPreloadedDockerImage[] | undefined>;
64
+ /**
65
+ * (List) A list with at most one runtime version the pool installs on each instance. Pool clusters that use a preloaded runtime version start faster as they do not have to wait for the image to download. You can retrieve them via databricks.getSparkVersion data source or via [Runtime Versions API](https://docs.databricks.com/dev-tools/api/latest/clusters.html#clusterclusterservicelistsparkversions) call.
66
+ */
67
+ readonly preloadedSparkVersions: pulumi.Output<string[] | undefined>;
68
+ /**
69
+ * Create a InstancePool resource with the given unique name, arguments, and options.
70
+ *
71
+ * @param name The _unique_ name of the resource.
72
+ * @param args The arguments to use to populate this resource's properties.
73
+ * @param opts A bag of options that control this resource's behavior.
74
+ */
75
+ constructor(name: string, args: InstancePoolArgs, opts?: pulumi.CustomResourceOptions);
76
+ }
77
+ /**
78
+ * Input properties used for looking up and filtering InstancePool resources.
79
+ */
80
+ export interface InstancePoolState {
81
+ awsAttributes?: pulumi.Input<inputs.InstancePoolAwsAttributes>;
82
+ azureAttributes?: pulumi.Input<inputs.InstancePoolAzureAttributes>;
83
+ /**
84
+ * (Map) Additional tags for instance pool resources. Databricks tags all pool resources (e.g. AWS & Azure instances and Disk volumes). *Databricks allows at most 43 custom tags.*
85
+ */
86
+ customTags?: pulumi.Input<{
87
+ [key: string]: any;
88
+ }>;
89
+ diskSpec?: pulumi.Input<inputs.InstancePoolDiskSpec>;
90
+ /**
91
+ * (Bool) Autoscaling Local Storage: when enabled, the instances in the pool dynamically acquire additional disk space when they are running low on disk space.
92
+ */
93
+ enableElasticDisk?: pulumi.Input<boolean>;
94
+ gcpAttributes?: pulumi.Input<inputs.InstancePoolGcpAttributes>;
95
+ /**
96
+ * (Integer) The number of minutes that idle instances in excess of the minIdleInstances are maintained by the pool before being terminated. If not specified, excess idle instances are terminated automatically after a default timeout period. If specified, the time must be between 0 and 10000 minutes. If you specify 0, excess idle instances are removed as soon as possible.
97
+ */
98
+ idleInstanceAutoterminationMinutes?: pulumi.Input<number>;
99
+ instancePoolId?: pulumi.Input<string>;
100
+ /**
101
+ * (String) The name of the instance pool. This is required for create and edit operations. It must be unique, non-empty, and less than 100 characters.
102
+ */
103
+ instancePoolName?: pulumi.Input<string>;
104
+ /**
105
+ * (Integer) The maximum number of instances the pool can contain, including both idle instances and ones in use by clusters. Once the maximum capacity is reached, you cannot create new clusters from the pool and existing clusters cannot autoscale up until some instances are made idle in the pool via cluster termination or down-scaling.
106
+ */
107
+ maxCapacity?: pulumi.Input<number>;
108
+ /**
109
+ * (Integer) The minimum number of idle instances maintained by the pool. This is in addition to any instances in use by active clusters.
110
+ */
111
+ minIdleInstances?: pulumi.Input<number>;
112
+ /**
113
+ * (String) The node type for the instances in the pool. All clusters attached to the pool inherit this node type and the pool’s idle instances are allocated based on this type. You can retrieve a list of available node types by using the [List Node Types API](https://docs.databricks.com/dev-tools/api/latest/clusters.html#clusterclusterservicelistnodetypes) call.
114
+ */
115
+ nodeTypeId?: pulumi.Input<string>;
116
+ preloadedDockerImages?: pulumi.Input<pulumi.Input<inputs.InstancePoolPreloadedDockerImage>[]>;
117
+ /**
118
+ * (List) A list with at most one runtime version the pool installs on each instance. Pool clusters that use a preloaded runtime version start faster as they do not have to wait for the image to download. You can retrieve them via databricks.getSparkVersion data source or via [Runtime Versions API](https://docs.databricks.com/dev-tools/api/latest/clusters.html#clusterclusterservicelistsparkversions) call.
119
+ */
120
+ preloadedSparkVersions?: pulumi.Input<pulumi.Input<string>[]>;
121
+ }
122
+ /**
123
+ * The set of arguments for constructing a InstancePool resource.
124
+ */
125
+ export interface InstancePoolArgs {
126
+ awsAttributes?: pulumi.Input<inputs.InstancePoolAwsAttributes>;
127
+ azureAttributes?: pulumi.Input<inputs.InstancePoolAzureAttributes>;
128
+ /**
129
+ * (Map) Additional tags for instance pool resources. Databricks tags all pool resources (e.g. AWS & Azure instances and Disk volumes). *Databricks allows at most 43 custom tags.*
130
+ */
131
+ customTags?: pulumi.Input<{
132
+ [key: string]: any;
133
+ }>;
134
+ diskSpec?: pulumi.Input<inputs.InstancePoolDiskSpec>;
135
+ /**
136
+ * (Bool) Autoscaling Local Storage: when enabled, the instances in the pool dynamically acquire additional disk space when they are running low on disk space.
137
+ */
138
+ enableElasticDisk?: pulumi.Input<boolean>;
139
+ gcpAttributes?: pulumi.Input<inputs.InstancePoolGcpAttributes>;
140
+ /**
141
+ * (Integer) The number of minutes that idle instances in excess of the minIdleInstances are maintained by the pool before being terminated. If not specified, excess idle instances are terminated automatically after a default timeout period. If specified, the time must be between 0 and 10000 minutes. If you specify 0, excess idle instances are removed as soon as possible.
142
+ */
143
+ idleInstanceAutoterminationMinutes: pulumi.Input<number>;
144
+ instancePoolId?: pulumi.Input<string>;
145
+ /**
146
+ * (String) The name of the instance pool. This is required for create and edit operations. It must be unique, non-empty, and less than 100 characters.
147
+ */
148
+ instancePoolName: pulumi.Input<string>;
149
+ /**
150
+ * (Integer) The maximum number of instances the pool can contain, including both idle instances and ones in use by clusters. Once the maximum capacity is reached, you cannot create new clusters from the pool and existing clusters cannot autoscale up until some instances are made idle in the pool via cluster termination or down-scaling.
151
+ */
152
+ maxCapacity?: pulumi.Input<number>;
153
+ /**
154
+ * (Integer) The minimum number of idle instances maintained by the pool. This is in addition to any instances in use by active clusters.
155
+ */
156
+ minIdleInstances?: pulumi.Input<number>;
157
+ /**
158
+ * (String) The node type for the instances in the pool. All clusters attached to the pool inherit this node type and the pool’s idle instances are allocated based on this type. You can retrieve a list of available node types by using the [List Node Types API](https://docs.databricks.com/dev-tools/api/latest/clusters.html#clusterclusterservicelistnodetypes) call.
159
+ */
160
+ nodeTypeId: pulumi.Input<string>;
161
+ preloadedDockerImages?: pulumi.Input<pulumi.Input<inputs.InstancePoolPreloadedDockerImage>[]>;
162
+ /**
163
+ * (List) A list with at most one runtime version the pool installs on each instance. Pool clusters that use a preloaded runtime version start faster as they do not have to wait for the image to download. You can retrieve them via databricks.getSparkVersion data source or via [Runtime Versions API](https://docs.databricks.com/dev-tools/api/latest/clusters.html#clusterclusterservicelistsparkversions) call.
164
+ */
165
+ preloadedSparkVersions?: pulumi.Input<pulumi.Input<string>[]>;
166
+ }
@@ -0,0 +1,93 @@
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.InstancePool = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("./utilities");
8
+ /**
9
+ * ## Import
10
+ *
11
+ * The resource instance pool can be imported using it's idbash
12
+ *
13
+ * ```sh
14
+ * $ pulumi import databricks:index/instancePool:InstancePool this <instance-pool-id>
15
+ * ```
16
+ */
17
+ class InstancePool extends pulumi.CustomResource {
18
+ constructor(name, argsOrState, opts) {
19
+ let resourceInputs = {};
20
+ opts = opts || {};
21
+ if (opts.id) {
22
+ const state = argsOrState;
23
+ resourceInputs["awsAttributes"] = state ? state.awsAttributes : undefined;
24
+ resourceInputs["azureAttributes"] = state ? state.azureAttributes : undefined;
25
+ resourceInputs["customTags"] = state ? state.customTags : undefined;
26
+ resourceInputs["diskSpec"] = state ? state.diskSpec : undefined;
27
+ resourceInputs["enableElasticDisk"] = state ? state.enableElasticDisk : undefined;
28
+ resourceInputs["gcpAttributes"] = state ? state.gcpAttributes : undefined;
29
+ resourceInputs["idleInstanceAutoterminationMinutes"] = state ? state.idleInstanceAutoterminationMinutes : undefined;
30
+ resourceInputs["instancePoolId"] = state ? state.instancePoolId : undefined;
31
+ resourceInputs["instancePoolName"] = state ? state.instancePoolName : undefined;
32
+ resourceInputs["maxCapacity"] = state ? state.maxCapacity : undefined;
33
+ resourceInputs["minIdleInstances"] = state ? state.minIdleInstances : undefined;
34
+ resourceInputs["nodeTypeId"] = state ? state.nodeTypeId : undefined;
35
+ resourceInputs["preloadedDockerImages"] = state ? state.preloadedDockerImages : undefined;
36
+ resourceInputs["preloadedSparkVersions"] = state ? state.preloadedSparkVersions : undefined;
37
+ }
38
+ else {
39
+ const args = argsOrState;
40
+ if ((!args || args.idleInstanceAutoterminationMinutes === undefined) && !opts.urn) {
41
+ throw new Error("Missing required property 'idleInstanceAutoterminationMinutes'");
42
+ }
43
+ if ((!args || args.instancePoolName === undefined) && !opts.urn) {
44
+ throw new Error("Missing required property 'instancePoolName'");
45
+ }
46
+ if ((!args || args.nodeTypeId === undefined) && !opts.urn) {
47
+ throw new Error("Missing required property 'nodeTypeId'");
48
+ }
49
+ resourceInputs["awsAttributes"] = args ? args.awsAttributes : undefined;
50
+ resourceInputs["azureAttributes"] = args ? args.azureAttributes : undefined;
51
+ resourceInputs["customTags"] = args ? args.customTags : undefined;
52
+ resourceInputs["diskSpec"] = args ? args.diskSpec : undefined;
53
+ resourceInputs["enableElasticDisk"] = args ? args.enableElasticDisk : undefined;
54
+ resourceInputs["gcpAttributes"] = args ? args.gcpAttributes : undefined;
55
+ resourceInputs["idleInstanceAutoterminationMinutes"] = args ? args.idleInstanceAutoterminationMinutes : undefined;
56
+ resourceInputs["instancePoolId"] = args ? args.instancePoolId : undefined;
57
+ resourceInputs["instancePoolName"] = args ? args.instancePoolName : undefined;
58
+ resourceInputs["maxCapacity"] = args ? args.maxCapacity : undefined;
59
+ resourceInputs["minIdleInstances"] = args ? args.minIdleInstances : undefined;
60
+ resourceInputs["nodeTypeId"] = args ? args.nodeTypeId : undefined;
61
+ resourceInputs["preloadedDockerImages"] = args ? args.preloadedDockerImages : undefined;
62
+ resourceInputs["preloadedSparkVersions"] = args ? args.preloadedSparkVersions : undefined;
63
+ }
64
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
65
+ super(InstancePool.__pulumiType, name, resourceInputs, opts);
66
+ }
67
+ /**
68
+ * Get an existing InstancePool resource's state with the given name, ID, and optional extra
69
+ * properties used to qualify the lookup.
70
+ *
71
+ * @param name The _unique_ name of the resulting resource.
72
+ * @param id The _unique_ provider ID of the resource to lookup.
73
+ * @param state Any extra arguments used during the lookup.
74
+ * @param opts Optional settings to control the behavior of the CustomResource.
75
+ */
76
+ static get(name, id, state, opts) {
77
+ return new InstancePool(name, state, Object.assign(Object.assign({}, opts), { id: id }));
78
+ }
79
+ /**
80
+ * Returns true if the given object is an instance of InstancePool. This is designed to work even
81
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
82
+ */
83
+ static isInstance(obj) {
84
+ if (obj === undefined || obj === null) {
85
+ return false;
86
+ }
87
+ return obj['__pulumiType'] === InstancePool.__pulumiType;
88
+ }
89
+ }
90
+ exports.InstancePool = InstancePool;
91
+ /** @internal */
92
+ InstancePool.__pulumiType = 'databricks:index/instancePool:InstancePool';
93
+ //# sourceMappingURL=instancePool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instancePool.js","sourceRoot":"","sources":["../instancePool.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAEzC,yCAAyC;AAEzC;;;;;;;;GAQG;AACH,MAAa,YAAa,SAAQ,MAAM,CAAC,cAAc;IA2EnD,YAAY,IAAY,EAAE,WAAkD,EAAE,IAAmC;QAC7G,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;YACT,MAAM,KAAK,GAAG,WAA4C,CAAC;YAC3D,cAAc,CAAC,eAAe,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC;YAC1E,cAAc,CAAC,iBAAiB,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS,CAAC;YAC9E,cAAc,CAAC,YAAY,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC;YACpE,cAAc,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;YAChE,cAAc,CAAC,mBAAmB,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,iBAAiB,CAA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AG,CAAC,cAAc,CAAC,KAAK,YAAY,CAAC,YAAY,CAAC;IAC7D,CAAC;;AA1BL,oCA2HC;AA7GG,gBAAgB;AACO,yBAAY,GAAG,4CAA4C,CAAC"}
@@ -0,0 +1,180 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ /**
3
+ * This resource allows you to manage AWS EC2 instance profiles that users can launch databricks.Cluster and access data, like databricks_mount. The following example demonstrates how to create an instance profile and create a cluster with it. When creating new `databricks.InstanceProfile`, Databricks validates that it has sufficient permissions to launch instances with the instance profile. This validation uses AWS dry-run mode for the [AWS EC2 RunInstances API](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html).
4
+ *
5
+ * > **Note** Please switch to databricks.StorageCredential with Unity Catalog to manage storage credentials, which provides better and faster way for managing credential security.
6
+ *
7
+ * ```typescript
8
+ * import * as pulumi from "@pulumi/pulumi";
9
+ * import * as aws from "@pulumi/aws";
10
+ * import * as databricks from "@pulumi/databricks";
11
+ *
12
+ * const config = new pulumi.Config();
13
+ * const crossaccountRoleName = config.require("crossaccountRoleName");
14
+ * const assumeRoleForEc2 = aws.iam.getPolicyDocument({
15
+ * statements: [{
16
+ * effect: "Allow",
17
+ * actions: ["sts:AssumeRole"],
18
+ * principals: [{
19
+ * identifiers: ["ec2.amazonaws.com"],
20
+ * type: "Service",
21
+ * }],
22
+ * }],
23
+ * });
24
+ * const roleForS3Access = new aws.iam.Role("roleForS3Access", {
25
+ * description: "Role for shared access",
26
+ * assumeRolePolicy: assumeRoleForEc2.then(assumeRoleForEc2 => assumeRoleForEc2.json),
27
+ * });
28
+ * const passRoleForS3AccessPolicyDocument = aws.iam.getPolicyDocumentOutput({
29
+ * statements: [{
30
+ * effect: "Allow",
31
+ * actions: ["iam:PassRole"],
32
+ * resources: [roleForS3Access.arn],
33
+ * }],
34
+ * });
35
+ * const passRoleForS3AccessPolicy = new aws.iam.Policy("passRoleForS3AccessPolicy", {
36
+ * path: "/",
37
+ * policy: passRoleForS3AccessPolicyDocument.apply(passRoleForS3AccessPolicyDocument => passRoleForS3AccessPolicyDocument.json),
38
+ * });
39
+ * const crossAccount = new aws.iam.RolePolicyAttachment("crossAccount", {
40
+ * policyArn: passRoleForS3AccessPolicy.arn,
41
+ * role: crossaccountRoleName,
42
+ * });
43
+ * const sharedInstanceProfile = new aws.iam.InstanceProfile("sharedInstanceProfile", {role: roleForS3Access.name});
44
+ * const sharedIndex_instanceProfileInstanceProfile = new databricks.InstanceProfile("sharedIndex/instanceProfileInstanceProfile", {instanceProfileArn: sharedInstanceProfile.arn});
45
+ * const latest = databricks.getSparkVersion({});
46
+ * const smallest = databricks.getNodeType({
47
+ * localDisk: true,
48
+ * });
49
+ * const _this = new databricks.Cluster("this", {
50
+ * clusterName: "Shared Autoscaling",
51
+ * sparkVersion: latest.then(latest => latest.id),
52
+ * nodeTypeId: smallest.then(smallest => smallest.id),
53
+ * autoterminationMinutes: 20,
54
+ * autoscale: {
55
+ * minWorkers: 1,
56
+ * maxWorkers: 50,
57
+ * },
58
+ * awsAttributes: {
59
+ * instanceProfileArn: sharedIndex / instanceProfileInstanceProfile.id,
60
+ * availability: "SPOT",
61
+ * zoneId: "us-east-1",
62
+ * firstOnDemand: 1,
63
+ * spotBidPricePercent: 100,
64
+ * },
65
+ * });
66
+ * ```
67
+ *
68
+ * ## Usage with Cluster Policies
69
+ *
70
+ * It is advised to keep all common configurations in Cluster Policies to maintain control of the environments launched, so `databricks.Cluster` above could be replaced with `databricks.ClusterPolicy`:
71
+ *
72
+ * ```typescript
73
+ * import * as pulumi from "@pulumi/pulumi";
74
+ * import * as databricks from "@pulumi/databricks";
75
+ *
76
+ * const _this = new databricks.ClusterPolicy("this", {definition: JSON.stringify({
77
+ * "aws_attributes.instance_profile_arn": {
78
+ * type: "fixed",
79
+ * value: databricks_instance_profile.shared.arn,
80
+ * },
81
+ * })});
82
+ * ```
83
+ *
84
+ * ## Granting access to all users
85
+ *
86
+ * You can make instance profile available to all users by associating it with the special group called `users` through databricks.Group data source.
87
+ *
88
+ * ```typescript
89
+ * import * as pulumi from "@pulumi/pulumi";
90
+ * import * as databricks from "@pulumi/databricks";
91
+ *
92
+ * const _this = new databricks.InstanceProfile("this", {instanceProfileArn: aws_iam_instance_profile.shared.arn});
93
+ * const users = databricks.getGroup({
94
+ * displayName: "users",
95
+ * });
96
+ * const all = new databricks.GroupInstanceProfile("all", {
97
+ * groupId: users.then(users => users.id),
98
+ * instanceProfileId: _this.id,
99
+ * });
100
+ * ```
101
+ *
102
+ * ## Import
103
+ *
104
+ * The resource instance profile can be imported using the ARN of it bash
105
+ *
106
+ * ```sh
107
+ * $ pulumi import databricks:index/instanceProfile:InstanceProfile this <instance-profile-arn>
108
+ * ```
109
+ */
110
+ export declare class InstanceProfile extends pulumi.CustomResource {
111
+ /**
112
+ * Get an existing InstanceProfile resource's state with the given name, ID, and optional extra
113
+ * properties used to qualify the lookup.
114
+ *
115
+ * @param name The _unique_ name of the resulting resource.
116
+ * @param id The _unique_ provider ID of the resource to lookup.
117
+ * @param state Any extra arguments used during the lookup.
118
+ * @param opts Optional settings to control the behavior of the CustomResource.
119
+ */
120
+ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: InstanceProfileState, opts?: pulumi.CustomResourceOptions): InstanceProfile;
121
+ /**
122
+ * Returns true if the given object is an instance of InstanceProfile. This is designed to work even
123
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
124
+ */
125
+ static isInstance(obj: any): obj is InstanceProfile;
126
+ /**
127
+ * `ARN` attribute of `awsIamInstanceProfile` output, the EC2 instance profile association to AWS IAM role. This ARN would be validated upon resource creation.
128
+ */
129
+ readonly instanceProfileArn: pulumi.Output<string | undefined>;
130
+ /**
131
+ * Whether the instance profile is a meta instance profile. Used only in [IAM credential passthrough](https://docs.databricks.com/security/credential-passthrough/iam-passthrough.html).
132
+ */
133
+ readonly isMetaInstanceProfile: pulumi.Output<boolean | undefined>;
134
+ /**
135
+ * **For advanced usage only.** If validation fails with an error message that does not indicate an IAM related permission issue, (e.g. “Your requested instance type is not supported in your requested availability zone”), you can pass this flag to skip the validation and forcibly add the instance profile.
136
+ */
137
+ readonly skipValidation: pulumi.Output<boolean>;
138
+ /**
139
+ * Create a InstanceProfile resource with the given unique name, arguments, and options.
140
+ *
141
+ * @param name The _unique_ name of the resource.
142
+ * @param args The arguments to use to populate this resource's properties.
143
+ * @param opts A bag of options that control this resource's behavior.
144
+ */
145
+ constructor(name: string, args?: InstanceProfileArgs, opts?: pulumi.CustomResourceOptions);
146
+ }
147
+ /**
148
+ * Input properties used for looking up and filtering InstanceProfile resources.
149
+ */
150
+ export interface InstanceProfileState {
151
+ /**
152
+ * `ARN` attribute of `awsIamInstanceProfile` output, the EC2 instance profile association to AWS IAM role. This ARN would be validated upon resource creation.
153
+ */
154
+ instanceProfileArn?: pulumi.Input<string>;
155
+ /**
156
+ * Whether the instance profile is a meta instance profile. Used only in [IAM credential passthrough](https://docs.databricks.com/security/credential-passthrough/iam-passthrough.html).
157
+ */
158
+ isMetaInstanceProfile?: pulumi.Input<boolean>;
159
+ /**
160
+ * **For advanced usage only.** If validation fails with an error message that does not indicate an IAM related permission issue, (e.g. “Your requested instance type is not supported in your requested availability zone”), you can pass this flag to skip the validation and forcibly add the instance profile.
161
+ */
162
+ skipValidation?: pulumi.Input<boolean>;
163
+ }
164
+ /**
165
+ * The set of arguments for constructing a InstanceProfile resource.
166
+ */
167
+ export interface InstanceProfileArgs {
168
+ /**
169
+ * `ARN` attribute of `awsIamInstanceProfile` output, the EC2 instance profile association to AWS IAM role. This ARN would be validated upon resource creation.
170
+ */
171
+ instanceProfileArn?: pulumi.Input<string>;
172
+ /**
173
+ * Whether the instance profile is a meta instance profile. Used only in [IAM credential passthrough](https://docs.databricks.com/security/credential-passthrough/iam-passthrough.html).
174
+ */
175
+ isMetaInstanceProfile?: pulumi.Input<boolean>;
176
+ /**
177
+ * **For advanced usage only.** If validation fails with an error message that does not indicate an IAM related permission issue, (e.g. “Your requested instance type is not supported in your requested availability zone”), you can pass this flag to skip the validation and forcibly add the instance profile.
178
+ */
179
+ skipValidation?: pulumi.Input<boolean>;
180
+ }
@@ -0,0 +1,161 @@
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.InstanceProfile = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("./utilities");
8
+ /**
9
+ * This resource allows you to manage AWS EC2 instance profiles that users can launch databricks.Cluster and access data, like databricks_mount. The following example demonstrates how to create an instance profile and create a cluster with it. When creating new `databricks.InstanceProfile`, Databricks validates that it has sufficient permissions to launch instances with the instance profile. This validation uses AWS dry-run mode for the [AWS EC2 RunInstances API](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html).
10
+ *
11
+ * > **Note** Please switch to databricks.StorageCredential with Unity Catalog to manage storage credentials, which provides better and faster way for managing credential security.
12
+ *
13
+ * ```typescript
14
+ * import * as pulumi from "@pulumi/pulumi";
15
+ * import * as aws from "@pulumi/aws";
16
+ * import * as databricks from "@pulumi/databricks";
17
+ *
18
+ * const config = new pulumi.Config();
19
+ * const crossaccountRoleName = config.require("crossaccountRoleName");
20
+ * const assumeRoleForEc2 = aws.iam.getPolicyDocument({
21
+ * statements: [{
22
+ * effect: "Allow",
23
+ * actions: ["sts:AssumeRole"],
24
+ * principals: [{
25
+ * identifiers: ["ec2.amazonaws.com"],
26
+ * type: "Service",
27
+ * }],
28
+ * }],
29
+ * });
30
+ * const roleForS3Access = new aws.iam.Role("roleForS3Access", {
31
+ * description: "Role for shared access",
32
+ * assumeRolePolicy: assumeRoleForEc2.then(assumeRoleForEc2 => assumeRoleForEc2.json),
33
+ * });
34
+ * const passRoleForS3AccessPolicyDocument = aws.iam.getPolicyDocumentOutput({
35
+ * statements: [{
36
+ * effect: "Allow",
37
+ * actions: ["iam:PassRole"],
38
+ * resources: [roleForS3Access.arn],
39
+ * }],
40
+ * });
41
+ * const passRoleForS3AccessPolicy = new aws.iam.Policy("passRoleForS3AccessPolicy", {
42
+ * path: "/",
43
+ * policy: passRoleForS3AccessPolicyDocument.apply(passRoleForS3AccessPolicyDocument => passRoleForS3AccessPolicyDocument.json),
44
+ * });
45
+ * const crossAccount = new aws.iam.RolePolicyAttachment("crossAccount", {
46
+ * policyArn: passRoleForS3AccessPolicy.arn,
47
+ * role: crossaccountRoleName,
48
+ * });
49
+ * const sharedInstanceProfile = new aws.iam.InstanceProfile("sharedInstanceProfile", {role: roleForS3Access.name});
50
+ * const sharedIndex_instanceProfileInstanceProfile = new databricks.InstanceProfile("sharedIndex/instanceProfileInstanceProfile", {instanceProfileArn: sharedInstanceProfile.arn});
51
+ * const latest = databricks.getSparkVersion({});
52
+ * const smallest = databricks.getNodeType({
53
+ * localDisk: true,
54
+ * });
55
+ * const _this = new databricks.Cluster("this", {
56
+ * clusterName: "Shared Autoscaling",
57
+ * sparkVersion: latest.then(latest => latest.id),
58
+ * nodeTypeId: smallest.then(smallest => smallest.id),
59
+ * autoterminationMinutes: 20,
60
+ * autoscale: {
61
+ * minWorkers: 1,
62
+ * maxWorkers: 50,
63
+ * },
64
+ * awsAttributes: {
65
+ * instanceProfileArn: sharedIndex / instanceProfileInstanceProfile.id,
66
+ * availability: "SPOT",
67
+ * zoneId: "us-east-1",
68
+ * firstOnDemand: 1,
69
+ * spotBidPricePercent: 100,
70
+ * },
71
+ * });
72
+ * ```
73
+ *
74
+ * ## Usage with Cluster Policies
75
+ *
76
+ * It is advised to keep all common configurations in Cluster Policies to maintain control of the environments launched, so `databricks.Cluster` above could be replaced with `databricks.ClusterPolicy`:
77
+ *
78
+ * ```typescript
79
+ * import * as pulumi from "@pulumi/pulumi";
80
+ * import * as databricks from "@pulumi/databricks";
81
+ *
82
+ * const _this = new databricks.ClusterPolicy("this", {definition: JSON.stringify({
83
+ * "aws_attributes.instance_profile_arn": {
84
+ * type: "fixed",
85
+ * value: databricks_instance_profile.shared.arn,
86
+ * },
87
+ * })});
88
+ * ```
89
+ *
90
+ * ## Granting access to all users
91
+ *
92
+ * You can make instance profile available to all users by associating it with the special group called `users` through databricks.Group data source.
93
+ *
94
+ * ```typescript
95
+ * import * as pulumi from "@pulumi/pulumi";
96
+ * import * as databricks from "@pulumi/databricks";
97
+ *
98
+ * const _this = new databricks.InstanceProfile("this", {instanceProfileArn: aws_iam_instance_profile.shared.arn});
99
+ * const users = databricks.getGroup({
100
+ * displayName: "users",
101
+ * });
102
+ * const all = new databricks.GroupInstanceProfile("all", {
103
+ * groupId: users.then(users => users.id),
104
+ * instanceProfileId: _this.id,
105
+ * });
106
+ * ```
107
+ *
108
+ * ## Import
109
+ *
110
+ * The resource instance profile can be imported using the ARN of it bash
111
+ *
112
+ * ```sh
113
+ * $ pulumi import databricks:index/instanceProfile:InstanceProfile this <instance-profile-arn>
114
+ * ```
115
+ */
116
+ class InstanceProfile extends pulumi.CustomResource {
117
+ constructor(name, argsOrState, opts) {
118
+ let resourceInputs = {};
119
+ opts = opts || {};
120
+ if (opts.id) {
121
+ const state = argsOrState;
122
+ resourceInputs["instanceProfileArn"] = state ? state.instanceProfileArn : undefined;
123
+ resourceInputs["isMetaInstanceProfile"] = state ? state.isMetaInstanceProfile : undefined;
124
+ resourceInputs["skipValidation"] = state ? state.skipValidation : undefined;
125
+ }
126
+ else {
127
+ const args = argsOrState;
128
+ resourceInputs["instanceProfileArn"] = args ? args.instanceProfileArn : undefined;
129
+ resourceInputs["isMetaInstanceProfile"] = args ? args.isMetaInstanceProfile : undefined;
130
+ resourceInputs["skipValidation"] = args ? args.skipValidation : undefined;
131
+ }
132
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
133
+ super(InstanceProfile.__pulumiType, name, resourceInputs, opts);
134
+ }
135
+ /**
136
+ * Get an existing InstanceProfile resource's state with the given name, ID, and optional extra
137
+ * properties used to qualify the lookup.
138
+ *
139
+ * @param name The _unique_ name of the resulting resource.
140
+ * @param id The _unique_ provider ID of the resource to lookup.
141
+ * @param state Any extra arguments used during the lookup.
142
+ * @param opts Optional settings to control the behavior of the CustomResource.
143
+ */
144
+ static get(name, id, state, opts) {
145
+ return new InstanceProfile(name, state, Object.assign(Object.assign({}, opts), { id: id }));
146
+ }
147
+ /**
148
+ * Returns true if the given object is an instance of InstanceProfile. This is designed to work even
149
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
150
+ */
151
+ static isInstance(obj) {
152
+ if (obj === undefined || obj === null) {
153
+ return false;
154
+ }
155
+ return obj['__pulumiType'] === InstanceProfile.__pulumiType;
156
+ }
157
+ }
158
+ exports.InstanceProfile = InstanceProfile;
159
+ /** @internal */
160
+ InstanceProfile.__pulumiType = 'databricks:index/instanceProfile:InstanceProfile';
161
+ //# sourceMappingURL=instanceProfile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instanceProfile.js","sourceRoot":"","sources":["../instanceProfile.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2GG;AACH,MAAa,eAAgB,SAAQ,MAAM,CAAC,cAAc;IAiDtD,YAAY,IAAY,EAAE,WAAwD,EAAE,IAAmC;QACnH,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;YACT,MAAM,KAAK,GAAG,WAA+C,CAAC;YAC9D,cAAc,CAAC,oBAAoB,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC,CAAC,SAAS,CAAC;YACpF,cAAc,CAAC,uBAAuB,CAAC,GAAG,KAAK,CAAC,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