@databricks/sdk-clusterlibraries 0.0.0-dev → 0.1.0-dev.2
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/LICENSE +203 -0
- package/dist/v2/client.d.ts +37 -0
- package/dist/v2/client.d.ts.map +1 -0
- package/dist/v2/client.js +162 -0
- package/dist/v2/client.js.map +1 -0
- package/dist/v2/index.d.ts +4 -0
- package/dist/v2/index.d.ts.map +1 -0
- package/dist/v2/index.js +4 -0
- package/dist/v2/index.js.map +1 -0
- package/dist/v2/model.d.ts +178 -0
- package/dist/v2/model.d.ts.map +1 -0
- package/dist/v2/model.js +212 -0
- package/dist/v2/model.js.map +1 -0
- package/dist/v2/transport.d.ts +5 -0
- package/dist/v2/transport.d.ts.map +1 -0
- package/dist/v2/transport.js +57 -0
- package/dist/v2/transport.js.map +1 -0
- package/dist/v2/utils.d.ts +21 -0
- package/dist/v2/utils.d.ts.map +1 -0
- package/dist/v2/utils.js +113 -0
- package/dist/v2/utils.js.map +1 -0
- package/package.json +38 -4
- package/src/v2/client.ts +217 -0
- package/src/v2/index.ts +21 -0
- package/src/v2/model.ts +383 -0
- package/src/v2/transport.ts +73 -0
- package/src/v2/utils.ts +156 -0
- package/README.md +0 -1
- package/index.js +0 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
Copyright 2026 Databricks, Inc. All rights reserved.
|
|
2
|
+
|
|
3
|
+
Apache License
|
|
4
|
+
Version 2.0, January 2004
|
|
5
|
+
http://www.apache.org/licenses/
|
|
6
|
+
|
|
7
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
8
|
+
|
|
9
|
+
1. Definitions.
|
|
10
|
+
|
|
11
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
12
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
13
|
+
|
|
14
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
15
|
+
the copyright owner that is granting the License.
|
|
16
|
+
|
|
17
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
18
|
+
other entities that control, are controlled by, or are under common
|
|
19
|
+
control with that entity. For the purposes of this definition,
|
|
20
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
21
|
+
direction or management of such entity, whether by contract or
|
|
22
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
23
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
24
|
+
|
|
25
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
26
|
+
exercising permissions granted by this License.
|
|
27
|
+
|
|
28
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
29
|
+
including but not limited to software source code, documentation
|
|
30
|
+
source, and configuration files.
|
|
31
|
+
|
|
32
|
+
"Object" form shall mean any form resulting from mechanical
|
|
33
|
+
transformation or translation of a Source form, including but
|
|
34
|
+
not limited to compiled object code, generated documentation,
|
|
35
|
+
and conversions to other media types.
|
|
36
|
+
|
|
37
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
38
|
+
Object form, made available under the License, as indicated by a
|
|
39
|
+
copyright notice that is included in or attached to the work
|
|
40
|
+
(an example is provided in the Appendix below).
|
|
41
|
+
|
|
42
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
43
|
+
form, that is based on (or derived from) the Work and for which the
|
|
44
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
45
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
46
|
+
of this License, Derivative Works shall not include works that remain
|
|
47
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
48
|
+
the Work and Derivative Works thereof.
|
|
49
|
+
|
|
50
|
+
"Contribution" shall mean any work of authorship, including
|
|
51
|
+
the original version of the Work and any modifications or additions
|
|
52
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
53
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
54
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
55
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
56
|
+
means any form of electronic, verbal, or written communication sent
|
|
57
|
+
to the Licensor or its representatives, including but not limited to
|
|
58
|
+
communication on electronic mailing lists, source code control systems,
|
|
59
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
60
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
61
|
+
excluding communication that is conspicuously marked or otherwise
|
|
62
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
63
|
+
|
|
64
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
65
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
66
|
+
subsequently incorporated within the Work.
|
|
67
|
+
|
|
68
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
69
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
70
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
71
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
72
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
73
|
+
Work and such Derivative Works in Source or Object form.
|
|
74
|
+
|
|
75
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
76
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
77
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
78
|
+
(except as stated in this section) patent license to make, have made,
|
|
79
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
80
|
+
where such license applies only to those patent claims licensable
|
|
81
|
+
by such Contributor that are necessarily infringed by their
|
|
82
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
83
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
84
|
+
institute patent litigation against any entity (including a
|
|
85
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
86
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
87
|
+
or contributory patent infringement, then any patent licenses
|
|
88
|
+
granted to You under this License for that Work shall terminate
|
|
89
|
+
as of the date such litigation is filed.
|
|
90
|
+
|
|
91
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
92
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
93
|
+
modifications, and in Source or Object form, provided that You
|
|
94
|
+
meet the following conditions:
|
|
95
|
+
|
|
96
|
+
(a) You must give any other recipients of the Work or
|
|
97
|
+
Derivative Works a copy of this License; and
|
|
98
|
+
|
|
99
|
+
(b) You must cause any modified files to carry prominent notices
|
|
100
|
+
stating that You changed the files; and
|
|
101
|
+
|
|
102
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
103
|
+
that You distribute, all copyright, patent, trademark, and
|
|
104
|
+
attribution notices from the Source form of the Work,
|
|
105
|
+
excluding those notices that do not pertain to any part of
|
|
106
|
+
the Derivative Works; and
|
|
107
|
+
|
|
108
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
109
|
+
distribution, then any Derivative Works that You distribute must
|
|
110
|
+
include a readable copy of the attribution notices contained
|
|
111
|
+
within such NOTICE file, excluding those notices that do not
|
|
112
|
+
pertain to any part of the Derivative Works, in at least one
|
|
113
|
+
of the following places: within a NOTICE text file distributed
|
|
114
|
+
as part of the Derivative Works; within the Source form or
|
|
115
|
+
documentation, if provided along with the Derivative Works; or,
|
|
116
|
+
within a display generated by the Derivative Works, if and
|
|
117
|
+
wherever such third-party notices normally appear. The contents
|
|
118
|
+
of the NOTICE file are for informational purposes only and
|
|
119
|
+
do not modify the License. You may add Your own attribution
|
|
120
|
+
notices within Derivative Works that You distribute, alongside
|
|
121
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
122
|
+
that such additional attribution notices cannot be construed
|
|
123
|
+
as modifying the License.
|
|
124
|
+
|
|
125
|
+
You may add Your own copyright statement to Your modifications and
|
|
126
|
+
may provide additional or different license terms and conditions
|
|
127
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
128
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
129
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
130
|
+
the conditions stated in this License.
|
|
131
|
+
|
|
132
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
133
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
134
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
135
|
+
this License, without any additional terms or conditions.
|
|
136
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
137
|
+
the terms of any separate license agreement you may have executed
|
|
138
|
+
with Licensor regarding such Contributions.
|
|
139
|
+
|
|
140
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
141
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
142
|
+
except as required for reasonable and customary use in describing the
|
|
143
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
144
|
+
|
|
145
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
146
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
147
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
148
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
149
|
+
implied, including, without limitation, any warranties or conditions
|
|
150
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
151
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
152
|
+
appropriateness of using or redistributing the Work and assume any
|
|
153
|
+
risks associated with Your exercise of permissions under this License.
|
|
154
|
+
|
|
155
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
156
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
157
|
+
unless required by applicable law (such as deliberate and grossly
|
|
158
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
159
|
+
liable to You for damages, including any direct, indirect, special,
|
|
160
|
+
incidental, or consequential damages of any character arising as a
|
|
161
|
+
result of this License or out of the use or inability to use the
|
|
162
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
163
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
164
|
+
other commercial damages or losses), even if such Contributor
|
|
165
|
+
has been advised of the possibility of such damages.
|
|
166
|
+
|
|
167
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
168
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
169
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
170
|
+
or other liability obligations and/or rights consistent with this
|
|
171
|
+
License. However, in accepting such obligations, You may act only
|
|
172
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
173
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
174
|
+
defend, and hold each Contributor harmless for any liability
|
|
175
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
176
|
+
of your accepting any such warranty or additional liability.
|
|
177
|
+
|
|
178
|
+
END OF TERMS AND CONDITIONS
|
|
179
|
+
|
|
180
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
181
|
+
|
|
182
|
+
To apply the Apache License to your work, attach the following
|
|
183
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
184
|
+
replaced with your own identifying information. (Don't include
|
|
185
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
186
|
+
comment syntax for the file format. We also recommend that a
|
|
187
|
+
file or class name and description of purpose be included on the
|
|
188
|
+
same "printed page" as the copyright notice for easier
|
|
189
|
+
identification within third-party archives.
|
|
190
|
+
|
|
191
|
+
Copyright [yyyy] [name of copyright owner]
|
|
192
|
+
|
|
193
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
194
|
+
you may not use this file except in compliance with the License.
|
|
195
|
+
You may obtain a copy of the License at
|
|
196
|
+
|
|
197
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
198
|
+
|
|
199
|
+
Unless required by applicable law or agreed to in writing, software
|
|
200
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
201
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
202
|
+
See the License for the specific language governing permissions and
|
|
203
|
+
limitations under the License.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { CallOptions } from '@databricks/sdk-options/call';
|
|
2
|
+
import type { ClientOptions } from '@databricks/sdk-options/client';
|
|
3
|
+
import type { ClusterLibraryStatuses, ClusterStatusRequest, InstallLibrariesRequest, InstallLibrariesRequest_Response, ListAllClusterLibraryStatusesRequest, ListAllClusterLibraryStatusesRequest_Response, UninstallLibrariesRequest, UninstallLibrariesRequest_Response } from './model';
|
|
4
|
+
export declare class ClusterLibrariesClient {
|
|
5
|
+
private readonly host;
|
|
6
|
+
private readonly workspaceId;
|
|
7
|
+
private readonly httpClient;
|
|
8
|
+
private readonly logger;
|
|
9
|
+
private readonly userAgent;
|
|
10
|
+
constructor(options: ClientOptions);
|
|
11
|
+
/**
|
|
12
|
+
* Get the status of all libraries on all clusters. A status is returned for all libraries installed on this cluster
|
|
13
|
+
* via the API or the libraries UI.
|
|
14
|
+
*/
|
|
15
|
+
allClusterStatuses(_req: ListAllClusterLibraryStatusesRequest, options?: CallOptions): Promise<ListAllClusterLibraryStatusesRequest_Response>;
|
|
16
|
+
/**
|
|
17
|
+
* Get the status of libraries on a cluster. A status is returned for all libraries installed on this cluster via the API
|
|
18
|
+
* or the libraries UI.
|
|
19
|
+
* The order of returned libraries is as follows:
|
|
20
|
+
* 1. Libraries set to be installed on this cluster, in the order that the libraries were added
|
|
21
|
+
* to the cluster, are returned first.
|
|
22
|
+
* 2. Libraries that were previously requested to be installed on this cluster or,
|
|
23
|
+
* but are now marked for removal, in no particular order, are returned last.
|
|
24
|
+
*/
|
|
25
|
+
clusterStatus(req: ClusterStatusRequest, options?: CallOptions): Promise<ClusterLibraryStatuses>;
|
|
26
|
+
/**
|
|
27
|
+
* Add libraries to install on a cluster. The installation is asynchronous; it happens in
|
|
28
|
+
* the background after the completion of this request.
|
|
29
|
+
*/
|
|
30
|
+
installLibraries(req: InstallLibrariesRequest, options?: CallOptions): Promise<InstallLibrariesRequest_Response>;
|
|
31
|
+
/**
|
|
32
|
+
* Set libraries to uninstall from a cluster. The libraries won't be uninstalled until
|
|
33
|
+
* the cluster is restarted. A request to uninstall a library that is not currently installed is ignored.
|
|
34
|
+
*/
|
|
35
|
+
uninstallLibraries(req: UninstallLibrariesRequest, options?: CallOptions): Promise<UninstallLibrariesRequest_Response>;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/v2/client.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,8BAA8B,CAAC;AAC9D,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,gCAAgC,CAAC;AAWlE,OAAO,KAAK,EACV,sBAAsB,EACtB,oBAAoB,EACpB,uBAAuB,EACvB,gCAAgC,EAChC,oCAAoC,EACpC,6CAA6C,EAC7C,yBAAyB,EACzB,kCAAkC,EACnC,MAAM,SAAS,CAAC;AAgBjB,qBAAa,sBAAsB;IACjC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;IAI9B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAqB;IACjD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAa;IACxC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAIhC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;gBAEvB,OAAO,EAAE,aAAa;IAelC;;;OAGG;IACG,kBAAkB,CACtB,IAAI,EAAE,oCAAoC,EAC1C,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,6CAA6C,CAAC;IA2BzD;;;;;;;;OAQG;IACG,aAAa,CACjB,GAAG,EAAE,oBAAoB,EACzB,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,sBAAsB,CAAC;IA8BlC;;;OAGG;IACG,gBAAgB,CACpB,GAAG,EAAE,uBAAuB,EAC5B,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,gCAAgC,CAAC;IA4B5C;;;OAGG;IACG,kBAAkB,CACtB,GAAG,EAAE,yBAAyB,EAC9B,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,kCAAkC,CAAC;CA2B/C"}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
// Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
|
|
2
|
+
import { VERSION as AUTH_VERSION } from '@databricks/sdk-auth';
|
|
3
|
+
import { createDefault } from '@databricks/sdk-core/clientinfo';
|
|
4
|
+
import { NoOpLogger } from '@databricks/sdk-core/logger';
|
|
5
|
+
import { newHttpClient } from './transport';
|
|
6
|
+
import { buildHttpRequest, executeCall, executeHttpCall, marshalRequest, parseResponse, } from './utils';
|
|
7
|
+
import pkgJson from '../../package.json' with { type: 'json' };
|
|
8
|
+
import { marshalInstallLibrariesRequestSchema, marshalUninstallLibrariesRequestSchema, unmarshalClusterLibraryStatusesSchema, unmarshalInstallLibrariesRequest_ResponseSchema, unmarshalListAllClusterLibraryStatusesRequest_ResponseSchema, unmarshalUninstallLibrariesRequest_ResponseSchema, } from './model';
|
|
9
|
+
// Package identity segment for this client to be used in the User-Agent header.
|
|
10
|
+
const PACKAGE_SEGMENT = {
|
|
11
|
+
key: 'sdk-js-' + pkgJson.name.replace(/^@[^/]+\/sdk-/, ''),
|
|
12
|
+
value: pkgJson.version,
|
|
13
|
+
};
|
|
14
|
+
export class ClusterLibrariesClient {
|
|
15
|
+
host;
|
|
16
|
+
// Workspace ID used to route workspace-level calls on unified hosts (SPOG).
|
|
17
|
+
// When set, workspace-level methods send X-Databricks-Org-Id on every
|
|
18
|
+
// request.
|
|
19
|
+
workspaceId;
|
|
20
|
+
httpClient;
|
|
21
|
+
logger;
|
|
22
|
+
// User-Agent header value. Composed once at construction from
|
|
23
|
+
// createDefault() merged with this package's identity and the active
|
|
24
|
+
// credential's name.
|
|
25
|
+
userAgent;
|
|
26
|
+
constructor(options) {
|
|
27
|
+
if (options.host === undefined) {
|
|
28
|
+
throw new Error('Host is required.');
|
|
29
|
+
}
|
|
30
|
+
this.host = options.host.replace(/\/$/, '');
|
|
31
|
+
this.workspaceId = options.workspaceId;
|
|
32
|
+
this.logger = options.logger ?? new NoOpLogger();
|
|
33
|
+
const info = createDefault()
|
|
34
|
+
.with(PACKAGE_SEGMENT)
|
|
35
|
+
.with({ key: 'sdk-js-auth', value: AUTH_VERSION })
|
|
36
|
+
.with({ key: 'auth', value: options.credentials?.name() ?? 'default' });
|
|
37
|
+
this.userAgent = info.toString();
|
|
38
|
+
this.httpClient = newHttpClient(options);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Get the status of all libraries on all clusters. A status is returned for all libraries installed on this cluster
|
|
42
|
+
* via the API or the libraries UI.
|
|
43
|
+
*/
|
|
44
|
+
async allClusterStatuses(_req, options) {
|
|
45
|
+
const url = `${this.host}/api/2.0/libraries/all-cluster-statuses`;
|
|
46
|
+
let resp;
|
|
47
|
+
const call = async (callSignal) => {
|
|
48
|
+
const headers = new Headers();
|
|
49
|
+
if (this.workspaceId !== undefined) {
|
|
50
|
+
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
51
|
+
}
|
|
52
|
+
headers.set('User-Agent', this.userAgent);
|
|
53
|
+
const httpReq = buildHttpRequest('GET', url, headers, callSignal);
|
|
54
|
+
const respBody = await executeHttpCall({
|
|
55
|
+
request: httpReq,
|
|
56
|
+
httpClient: this.httpClient,
|
|
57
|
+
logger: this.logger,
|
|
58
|
+
});
|
|
59
|
+
resp = parseResponse(respBody, unmarshalListAllClusterLibraryStatusesRequest_ResponseSchema);
|
|
60
|
+
};
|
|
61
|
+
await executeCall(call, options);
|
|
62
|
+
if (resp === undefined) {
|
|
63
|
+
throw new Error('operation completed without a result.');
|
|
64
|
+
}
|
|
65
|
+
return resp;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Get the status of libraries on a cluster. A status is returned for all libraries installed on this cluster via the API
|
|
69
|
+
* or the libraries UI.
|
|
70
|
+
* The order of returned libraries is as follows:
|
|
71
|
+
* 1. Libraries set to be installed on this cluster, in the order that the libraries were added
|
|
72
|
+
* to the cluster, are returned first.
|
|
73
|
+
* 2. Libraries that were previously requested to be installed on this cluster or,
|
|
74
|
+
* but are now marked for removal, in no particular order, are returned last.
|
|
75
|
+
*/
|
|
76
|
+
async clusterStatus(req, options) {
|
|
77
|
+
const url = `${this.host}/api/2.0/libraries/cluster-status`;
|
|
78
|
+
const params = new URLSearchParams();
|
|
79
|
+
if (req.clusterId !== undefined) {
|
|
80
|
+
params.append('cluster_id', req.clusterId);
|
|
81
|
+
}
|
|
82
|
+
const query = params.toString();
|
|
83
|
+
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
84
|
+
let resp;
|
|
85
|
+
const call = async (callSignal) => {
|
|
86
|
+
const headers = new Headers();
|
|
87
|
+
if (this.workspaceId !== undefined) {
|
|
88
|
+
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
89
|
+
}
|
|
90
|
+
headers.set('User-Agent', this.userAgent);
|
|
91
|
+
const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);
|
|
92
|
+
const respBody = await executeHttpCall({
|
|
93
|
+
request: httpReq,
|
|
94
|
+
httpClient: this.httpClient,
|
|
95
|
+
logger: this.logger,
|
|
96
|
+
});
|
|
97
|
+
resp = parseResponse(respBody, unmarshalClusterLibraryStatusesSchema);
|
|
98
|
+
};
|
|
99
|
+
await executeCall(call, options);
|
|
100
|
+
if (resp === undefined) {
|
|
101
|
+
throw new Error('operation completed without a result.');
|
|
102
|
+
}
|
|
103
|
+
return resp;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Add libraries to install on a cluster. The installation is asynchronous; it happens in
|
|
107
|
+
* the background after the completion of this request.
|
|
108
|
+
*/
|
|
109
|
+
async installLibraries(req, options) {
|
|
110
|
+
const url = `${this.host}/api/2.0/libraries/install`;
|
|
111
|
+
const body = marshalRequest(req, marshalInstallLibrariesRequestSchema);
|
|
112
|
+
let resp;
|
|
113
|
+
const call = async (callSignal) => {
|
|
114
|
+
const headers = new Headers({ 'Content-Type': 'application/json' });
|
|
115
|
+
if (this.workspaceId !== undefined) {
|
|
116
|
+
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
117
|
+
}
|
|
118
|
+
headers.set('User-Agent', this.userAgent);
|
|
119
|
+
const httpReq = buildHttpRequest('POST', url, headers, callSignal, body);
|
|
120
|
+
const respBody = await executeHttpCall({
|
|
121
|
+
request: httpReq,
|
|
122
|
+
httpClient: this.httpClient,
|
|
123
|
+
logger: this.logger,
|
|
124
|
+
});
|
|
125
|
+
resp = parseResponse(respBody, unmarshalInstallLibrariesRequest_ResponseSchema);
|
|
126
|
+
};
|
|
127
|
+
await executeCall(call, options);
|
|
128
|
+
if (resp === undefined) {
|
|
129
|
+
throw new Error('operation completed without a result.');
|
|
130
|
+
}
|
|
131
|
+
return resp;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Set libraries to uninstall from a cluster. The libraries won't be uninstalled until
|
|
135
|
+
* the cluster is restarted. A request to uninstall a library that is not currently installed is ignored.
|
|
136
|
+
*/
|
|
137
|
+
async uninstallLibraries(req, options) {
|
|
138
|
+
const url = `${this.host}/api/2.0/libraries/uninstall`;
|
|
139
|
+
const body = marshalRequest(req, marshalUninstallLibrariesRequestSchema);
|
|
140
|
+
let resp;
|
|
141
|
+
const call = async (callSignal) => {
|
|
142
|
+
const headers = new Headers({ 'Content-Type': 'application/json' });
|
|
143
|
+
if (this.workspaceId !== undefined) {
|
|
144
|
+
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
145
|
+
}
|
|
146
|
+
headers.set('User-Agent', this.userAgent);
|
|
147
|
+
const httpReq = buildHttpRequest('POST', url, headers, callSignal, body);
|
|
148
|
+
const respBody = await executeHttpCall({
|
|
149
|
+
request: httpReq,
|
|
150
|
+
httpClient: this.httpClient,
|
|
151
|
+
logger: this.logger,
|
|
152
|
+
});
|
|
153
|
+
resp = parseResponse(respBody, unmarshalUninstallLibrariesRequest_ResponseSchema);
|
|
154
|
+
};
|
|
155
|
+
await executeCall(call, options);
|
|
156
|
+
if (resp === undefined) {
|
|
157
|
+
throw new Error('operation completed without a result.');
|
|
158
|
+
}
|
|
159
|
+
return resp;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/v2/client.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAE/E,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAC,aAAa,EAAC,MAAM,iCAAiC,CAAC;AAE9D,OAAO,EAAC,UAAU,EAAC,MAAM,6BAA6B,CAAC;AAIvD,OAAO,EAAC,aAAa,EAAC,MAAM,aAAa,CAAC;AAC1C,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,eAAe,EACf,cAAc,EACd,aAAa,GACd,MAAM,SAAS,CAAC;AACjB,OAAO,OAAO,MAAM,oBAAoB,CAAC,OAAM,IAAI,EAAE,MAAM,EAAC,CAAC;AAW7D,OAAO,EACL,oCAAoC,EACpC,sCAAsC,EACtC,qCAAqC,EACrC,+CAA+C,EAC/C,4DAA4D,EAC5D,iDAAiD,GAClD,MAAM,SAAS,CAAC;AAEjB,gFAAgF;AAChF,MAAM,eAAe,GAAG;IACtB,GAAG,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC;IAC1D,KAAK,EAAE,OAAO,CAAC,OAAO;CACvB,CAAC;AAEF,MAAM,OAAO,sBAAsB;IAChB,IAAI,CAAS;IAC9B,4EAA4E;IAC5E,sEAAsE;IACtE,WAAW;IACM,WAAW,CAAqB;IAChC,UAAU,CAAa;IACvB,MAAM,CAAS;IAChC,8DAA8D;IAC9D,qEAAqE;IACrE,qBAAqB;IACJ,SAAS,CAAS;IAEnC,YAAY,OAAsB;QAChC,IAAI,OAAO,CAAC,IAAI,K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AAM,eAAe,CAAC;gBACrC,OAAO,EAAE,OAAO;gBAChB,UAAU,EAAE,IAAI,CAAC,UAAU;gBAC3B,MAAM,EAAE,IAAI,CAAC,MAAM;aACpB,CAAC,CAAC;YACH,IAAI,GAAG,aAAa,CAClB,QAAQ,EACR,iDAAiD,CAClD,CAAC;QACJ,CAAC,CAAC;QACF,MAAM,WAAW,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACjC,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACvB,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;QAC3D,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { ClusterLibrariesClient } from './client';
|
|
2
|
+
export { LibraryInstallStatus } from './model';
|
|
3
|
+
export type { ClusterLibraryStatuses, ClusterStatusRequest, InstallLibrariesRequest, InstallLibrariesRequest_Response, Library, LibraryFullStatus, ListAllClusterLibraryStatusesRequest, ListAllClusterLibraryStatusesRequest_Response, MavenLibrary, PythonPyPiLibrary, RCranLibrary, UninstallLibrariesRequest, UninstallLibrariesRequest_Response, } from './model';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/v2/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,sBAAsB,EAAC,MAAM,UAAU,CAAC;AAEhD,OAAO,EAAC,oBAAoB,EAAC,MAAM,SAAS,CAAC;AAE7C,YAAY,EACV,sBAAsB,EACtB,oBAAoB,EACpB,uBAAuB,EACvB,gCAAgC,EAChC,OAAO,EACP,iBAAiB,EACjB,oCAAoC,EACpC,6CAA6C,EAC7C,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ,yBAAyB,EACzB,kCAAkC,GACnC,MAAM,SAAS,CAAC"}
|
package/dist/v2/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/v2/index.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAE/E,OAAO,EAAC,sBAAsB,EAAC,MAAM,UAAU,CAAC;AAEhD,OAAO,EAAC,oBAAoB,EAAC,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** The status of a library on a specific cluster. */
|
|
3
|
+
export declare enum LibraryInstallStatus {
|
|
4
|
+
/** No action has yet been taken to install the library. This state should be very short lived. */
|
|
5
|
+
PENDING = "PENDING",
|
|
6
|
+
/**
|
|
7
|
+
* Metadata necessary to install the library is being retrieved from the provided repository.
|
|
8
|
+
*
|
|
9
|
+
* For jar and egg libraries, this step is a no-op.
|
|
10
|
+
*/
|
|
11
|
+
RESOLVING = "RESOLVING",
|
|
12
|
+
/**
|
|
13
|
+
* The library is actively being installed, either by adding resources to Spark or executing
|
|
14
|
+
* system commands inside the Spark nodes.
|
|
15
|
+
*/
|
|
16
|
+
INSTALLING = "INSTALLING",
|
|
17
|
+
/** The library has been successfully installed and can now be used. */
|
|
18
|
+
INSTALLED = "INSTALLED",
|
|
19
|
+
/** Some step in installation failed. More information can be found in the `messages` field. */
|
|
20
|
+
FAILED = "FAILED",
|
|
21
|
+
/**
|
|
22
|
+
* The library has been marked for removal. Currently, libraries can only be removed when clusters
|
|
23
|
+
* are restarted, so libraries that enter this state will remain until the cluster is restarted.
|
|
24
|
+
*/
|
|
25
|
+
UNINSTALL_ON_RESTART = "UNINSTALL_ON_RESTART",
|
|
26
|
+
/**
|
|
27
|
+
* Indicates that Library Manager decided to skip installation for this library.
|
|
28
|
+
* For example, shared libraries on DBR 7+ are skipped.
|
|
29
|
+
*/
|
|
30
|
+
SKIPPED = "SKIPPED",
|
|
31
|
+
/** Library installation is restored and can be used. */
|
|
32
|
+
RESTORED = "RESTORED"
|
|
33
|
+
}
|
|
34
|
+
export interface ClusterLibraryStatuses {
|
|
35
|
+
/** Unique identifier for the cluster. */
|
|
36
|
+
clusterId?: string | undefined;
|
|
37
|
+
/** Status of all libraries on the cluster. */
|
|
38
|
+
libraryStatuses?: LibraryFullStatus[] | undefined;
|
|
39
|
+
}
|
|
40
|
+
export interface ClusterStatusRequest {
|
|
41
|
+
/** Unique identifier of the cluster whose status should be retrieved. */
|
|
42
|
+
clusterId?: string | undefined;
|
|
43
|
+
}
|
|
44
|
+
export interface InstallLibrariesRequest {
|
|
45
|
+
/** Unique identifier for the cluster on which to install these libraries. */
|
|
46
|
+
clusterId?: string | undefined;
|
|
47
|
+
/** The libraries to install. */
|
|
48
|
+
libraries?: Library[] | undefined;
|
|
49
|
+
}
|
|
50
|
+
export interface InstallLibrariesRequest_Response {
|
|
51
|
+
}
|
|
52
|
+
export interface Library {
|
|
53
|
+
lib?: {
|
|
54
|
+
$case: 'jar';
|
|
55
|
+
/**
|
|
56
|
+
* URI of the JAR library to install. Supported URIs include Workspace paths, Unity Catalog Volumes paths, and S3 URIs.
|
|
57
|
+
* For example: `{ "jar": "/Workspace/path/to/library.jar" }`, `{ "jar" : "/Volumes/path/to/library.jar" }` or
|
|
58
|
+
* `{ "jar": "s3://my-bucket/library.jar" }`.
|
|
59
|
+
* If S3 is used, please make sure the cluster has read access on the library. You may need to
|
|
60
|
+
* launch the cluster with an IAM role to access the S3 URI.
|
|
61
|
+
*/
|
|
62
|
+
jar: string;
|
|
63
|
+
} | {
|
|
64
|
+
$case: 'egg';
|
|
65
|
+
/** Deprecated. URI of the egg library to install. Installing Python egg files is deprecated and is not supported in Databricks Runtime 14.0 and above. */
|
|
66
|
+
egg: string;
|
|
67
|
+
} | {
|
|
68
|
+
$case: 'pypi';
|
|
69
|
+
/**
|
|
70
|
+
* Specification of a PyPi library to be installed. For example:
|
|
71
|
+
* `{ "package": "simplejson" }`
|
|
72
|
+
*/
|
|
73
|
+
pypi: PythonPyPiLibrary;
|
|
74
|
+
} | {
|
|
75
|
+
$case: 'maven';
|
|
76
|
+
/**
|
|
77
|
+
* Specification of a maven library to be installed. For example:
|
|
78
|
+
* `{ "coordinates": "org.jsoup:jsoup:1.7.2" }`
|
|
79
|
+
*/
|
|
80
|
+
maven: MavenLibrary;
|
|
81
|
+
} | {
|
|
82
|
+
$case: 'cran';
|
|
83
|
+
/** Specification of a CRAN library to be installed as part of the library */
|
|
84
|
+
cran: RCranLibrary;
|
|
85
|
+
} | {
|
|
86
|
+
$case: 'whl';
|
|
87
|
+
/**
|
|
88
|
+
* URI of the wheel library to install. Supported URIs include Workspace paths, Unity Catalog Volumes paths, and S3 URIs.
|
|
89
|
+
* For example: `{ "whl": "/Workspace/path/to/library.whl" }`, `{ "whl" : "/Volumes/path/to/library.whl" }` or
|
|
90
|
+
* `{ "whl": "s3://my-bucket/library.whl" }`.
|
|
91
|
+
* If S3 is used, please make sure the cluster has read access on the library. You may need to
|
|
92
|
+
* launch the cluster with an IAM role to access the S3 URI.
|
|
93
|
+
*/
|
|
94
|
+
whl: string;
|
|
95
|
+
} | {
|
|
96
|
+
$case: 'requirements';
|
|
97
|
+
/**
|
|
98
|
+
* URI of the requirements.txt file to install. Only Workspace paths and Unity Catalog Volumes paths are supported.
|
|
99
|
+
* For example: `{ "requirements": "/Workspace/path/to/requirements.txt" }` or `{ "requirements" : "/Volumes/path/to/requirements.txt" }`
|
|
100
|
+
*/
|
|
101
|
+
requirements: string;
|
|
102
|
+
} | undefined;
|
|
103
|
+
}
|
|
104
|
+
/** The status of the library on a specific cluster. */
|
|
105
|
+
export interface LibraryFullStatus {
|
|
106
|
+
/** Unique identifier for the library. */
|
|
107
|
+
library?: Library | undefined;
|
|
108
|
+
/** Status of installing the library on the cluster. */
|
|
109
|
+
status?: LibraryInstallStatus | undefined;
|
|
110
|
+
/** All the info and warning messages that have occurred so far for this library. */
|
|
111
|
+
messages?: string[] | undefined;
|
|
112
|
+
/** Whether the library was set to be installed on all clusters via the libraries UI. */
|
|
113
|
+
isLibraryForAllClusters?: boolean | undefined;
|
|
114
|
+
}
|
|
115
|
+
export interface ListAllClusterLibraryStatusesRequest {
|
|
116
|
+
}
|
|
117
|
+
export interface ListAllClusterLibraryStatusesRequest_Response {
|
|
118
|
+
/** A list of cluster statuses. */
|
|
119
|
+
statuses?: ClusterLibraryStatuses[] | undefined;
|
|
120
|
+
}
|
|
121
|
+
export interface MavenLibrary {
|
|
122
|
+
/** Gradle-style maven coordinates. For example: "org.jsoup:jsoup:1.7.2". */
|
|
123
|
+
coordinates?: string | undefined;
|
|
124
|
+
/**
|
|
125
|
+
* Maven repo to install the Maven package from. If omitted, both Maven Central Repository
|
|
126
|
+
* and Spark Packages are searched.
|
|
127
|
+
*/
|
|
128
|
+
repo?: string | undefined;
|
|
129
|
+
/**
|
|
130
|
+
* List of dependences to exclude. For example: `["slf4j:slf4j", "*:hadoop-client"]`.
|
|
131
|
+
*
|
|
132
|
+
* Maven dependency exclusions:
|
|
133
|
+
* https://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html.
|
|
134
|
+
*/
|
|
135
|
+
exclusions?: string[] | undefined;
|
|
136
|
+
}
|
|
137
|
+
export interface PythonPyPiLibrary {
|
|
138
|
+
/**
|
|
139
|
+
* The name of the pypi package to install. An optional exact version specification is also
|
|
140
|
+
* supported. Examples: "simplejson" and "simplejson==3.8.0".
|
|
141
|
+
*/
|
|
142
|
+
package?: string | undefined;
|
|
143
|
+
/**
|
|
144
|
+
* The repository where the package can be found. If not specified, the default pip index is
|
|
145
|
+
* used.
|
|
146
|
+
*/
|
|
147
|
+
repo?: string | undefined;
|
|
148
|
+
}
|
|
149
|
+
export interface RCranLibrary {
|
|
150
|
+
/** The name of the CRAN package to install. */
|
|
151
|
+
package?: string | undefined;
|
|
152
|
+
/** The repository where the package can be found. If not specified, the default CRAN repo is used. */
|
|
153
|
+
repo?: string | undefined;
|
|
154
|
+
}
|
|
155
|
+
export interface UninstallLibrariesRequest {
|
|
156
|
+
/** Unique identifier for the cluster on which to uninstall these libraries. */
|
|
157
|
+
clusterId?: string | undefined;
|
|
158
|
+
/** The libraries to uninstall. */
|
|
159
|
+
libraries?: Library[] | undefined;
|
|
160
|
+
}
|
|
161
|
+
export interface UninstallLibrariesRequest_Response {
|
|
162
|
+
}
|
|
163
|
+
export declare const unmarshalClusterLibraryStatusesSchema: z.ZodType<ClusterLibraryStatuses>;
|
|
164
|
+
export declare const unmarshalInstallLibrariesRequest_ResponseSchema: z.ZodType<InstallLibrariesRequest_Response>;
|
|
165
|
+
export declare const unmarshalLibrarySchema: z.ZodType<Library>;
|
|
166
|
+
export declare const unmarshalLibraryFullStatusSchema: z.ZodType<LibraryFullStatus>;
|
|
167
|
+
export declare const unmarshalListAllClusterLibraryStatusesRequest_ResponseSchema: z.ZodType<ListAllClusterLibraryStatusesRequest_Response>;
|
|
168
|
+
export declare const unmarshalMavenLibrarySchema: z.ZodType<MavenLibrary>;
|
|
169
|
+
export declare const unmarshalPythonPyPiLibrarySchema: z.ZodType<PythonPyPiLibrary>;
|
|
170
|
+
export declare const unmarshalRCranLibrarySchema: z.ZodType<RCranLibrary>;
|
|
171
|
+
export declare const unmarshalUninstallLibrariesRequest_ResponseSchema: z.ZodType<UninstallLibrariesRequest_Response>;
|
|
172
|
+
export declare const marshalInstallLibrariesRequestSchema: z.ZodType;
|
|
173
|
+
export declare const marshalLibrarySchema: z.ZodType;
|
|
174
|
+
export declare const marshalMavenLibrarySchema: z.ZodType;
|
|
175
|
+
export declare const marshalPythonPyPiLibrarySchema: z.ZodType;
|
|
176
|
+
export declare const marshalRCranLibrarySchema: z.ZodType;
|
|
177
|
+
export declare const marshalUninstallLibrariesRequestSchema: z.ZodType;
|
|
178
|
+
//# sourceMappingURL=model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../src/v2/model.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,qDAAqD;AACrD,oBAAY,oB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