@databricks/sdk-instanceprofiles 0.0.0-dev → 0.1.0-dev.1
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 +47 -0
- package/dist/v2/client.d.ts.map +1 -0
- package/dist/v2/client.js +167 -0
- package/dist/v2/client.js.map +1 -0
- package/dist/v2/index.d.ts +3 -0
- package/dist/v2/index.d.ts.map +1 -0
- package/dist/v2/index.js +3 -0
- package/dist/v2/index.js.map +1 -0
- package/dist/v2/model.d.ts +98 -0
- package/dist/v2/model.d.ts.map +1 -0
- package/dist/v2/model.js +61 -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 +22 -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 +227 -0
- package/src/v2/index.ts +15 -0
- package/src/v2/model.ts +171 -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,47 @@
|
|
|
1
|
+
import type { CallOptions } from '@databricks/sdk-options/call';
|
|
2
|
+
import type { ClientOptions } from '@databricks/sdk-options/client';
|
|
3
|
+
import type { AddInstanceProfileRequest, AddInstanceProfileRequest_Response, EditInstanceProfileRequest, EditInstanceProfileRequest_Response, ListInstanceProfilesRequest, ListInstanceProfilesRequest_Response, RemoveInstanceProfileRequest, RemoveInstanceProfileRequest_Response } from './model';
|
|
4
|
+
export declare class InstanceprofilesClient {
|
|
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
|
+
* Registers an instance profile in <Databricks>. In the UI, you can then give users the permission
|
|
13
|
+
* to use this instance profile when launching clusters.
|
|
14
|
+
*
|
|
15
|
+
* This API is only available to admin users.
|
|
16
|
+
*/
|
|
17
|
+
addInstanceProfile(req: AddInstanceProfileRequest, options?: CallOptions): Promise<AddInstanceProfileRequest_Response>;
|
|
18
|
+
/**
|
|
19
|
+
* The only supported field to change is the optional IAM role ARN associated with
|
|
20
|
+
* the instance profile. It is required to specify the IAM role ARN if both of
|
|
21
|
+
* the following are true:
|
|
22
|
+
*
|
|
23
|
+
* * Your role name and instance profile name do not match. The name is the part
|
|
24
|
+
* after the last slash in each ARN.
|
|
25
|
+
* * You want to use the instance profile with [Databricks SQL Serverless](/sql/admin/serverless.html).
|
|
26
|
+
*
|
|
27
|
+
* To understand where these fields are in the AWS console, see
|
|
28
|
+
* [Enable serverless SQL warehouses](/sql/admin/serverless.html).
|
|
29
|
+
*
|
|
30
|
+
* This API is only available to admin users.
|
|
31
|
+
*/
|
|
32
|
+
editInstanceProfile(req: EditInstanceProfileRequest, options?: CallOptions): Promise<EditInstanceProfileRequest_Response>;
|
|
33
|
+
/**
|
|
34
|
+
* List the instance profiles that the calling user can use to launch a cluster.
|
|
35
|
+
*
|
|
36
|
+
* This API is available to all users.
|
|
37
|
+
*/
|
|
38
|
+
listInstanceProfiles(_req: ListInstanceProfilesRequest, options?: CallOptions): Promise<ListInstanceProfilesRequest_Response>;
|
|
39
|
+
/**
|
|
40
|
+
* Remove the instance profile with the provided ARN.
|
|
41
|
+
* Existing clusters with this instance profile will continue to function.
|
|
42
|
+
*
|
|
43
|
+
* This API is only accessible to admin users.
|
|
44
|
+
*/
|
|
45
|
+
removeInstanceProfile(req: RemoveInstanceProfileRequest, options?: CallOptions): Promise<RemoveInstanceProfileRequest_Response>;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/v2/client.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,8BAA8B,CAAC;AAC9D,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,gCAAgC,CAAC;AAWlE,OAAO,KAAK,EACV,yBAAyB,EACzB,kCAAkC,EAClC,0BAA0B,EAC1B,mCAAmC,EACnC,2BAA2B,EAC3B,oCAAoC,EACpC,4BAA4B,EAC5B,qCAAqC,EACtC,MAAM,SAAS,CAAC;AAiBjB,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;;;;;OAKG;IACG,kBAAkB,CACtB,GAAG,EAAE,yBAAyB,EAC9B,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,kCAAkC,CAAC;IA4B9C;;;;;;;;;;;;;OAaG;IACG,mBAAmB,CACvB,GAAG,EAAE,0BAA0B,EAC/B,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,mCAAmC,CAAC;IA4B/C;;;;OAIG;IACG,oBAAoB,CACxB,IAAI,EAAE,2BAA2B,EACjC,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,oCAAoC,CAAC;IA2BhD;;;;;OAKG;IACG,qBAAqB,CACzB,GAAG,EAAE,4BAA4B,EACjC,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,qCAAqC,CAAC;CA2BlD"}
|
|
@@ -0,0 +1,167 @@
|
|
|
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 { marshalAddInstanceProfileRequestSchema, marshalEditInstanceProfileRequestSchema, marshalRemoveInstanceProfileRequestSchema, unmarshalAddInstanceProfileRequest_ResponseSchema, unmarshalEditInstanceProfileRequest_ResponseSchema, unmarshalListInstanceProfilesRequest_ResponseSchema, unmarshalRemoveInstanceProfileRequest_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 InstanceprofilesClient {
|
|
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
|
+
* Registers an instance profile in <Databricks>. In the UI, you can then give users the permission
|
|
42
|
+
* to use this instance profile when launching clusters.
|
|
43
|
+
*
|
|
44
|
+
* This API is only available to admin users.
|
|
45
|
+
*/
|
|
46
|
+
async addInstanceProfile(req, options) {
|
|
47
|
+
const url = `${this.host}/api/2.0/instance-profiles/add`;
|
|
48
|
+
const body = marshalRequest(req, marshalAddInstanceProfileRequestSchema);
|
|
49
|
+
let resp;
|
|
50
|
+
const call = async (callSignal) => {
|
|
51
|
+
const headers = new Headers({ 'Content-Type': 'application/json' });
|
|
52
|
+
if (this.workspaceId !== undefined) {
|
|
53
|
+
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
54
|
+
}
|
|
55
|
+
headers.set('User-Agent', this.userAgent);
|
|
56
|
+
const httpReq = buildHttpRequest('POST', url, headers, callSignal, body);
|
|
57
|
+
const respBody = await executeHttpCall({
|
|
58
|
+
request: httpReq,
|
|
59
|
+
httpClient: this.httpClient,
|
|
60
|
+
logger: this.logger,
|
|
61
|
+
});
|
|
62
|
+
resp = parseResponse(respBody, unmarshalAddInstanceProfileRequest_ResponseSchema);
|
|
63
|
+
};
|
|
64
|
+
await executeCall(call, options);
|
|
65
|
+
if (resp === undefined) {
|
|
66
|
+
throw new Error('API call completed without a result.');
|
|
67
|
+
}
|
|
68
|
+
return resp;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* The only supported field to change is the optional IAM role ARN associated with
|
|
72
|
+
* the instance profile. It is required to specify the IAM role ARN if both of
|
|
73
|
+
* the following are true:
|
|
74
|
+
*
|
|
75
|
+
* * Your role name and instance profile name do not match. The name is the part
|
|
76
|
+
* after the last slash in each ARN.
|
|
77
|
+
* * You want to use the instance profile with [Databricks SQL Serverless](/sql/admin/serverless.html).
|
|
78
|
+
*
|
|
79
|
+
* To understand where these fields are in the AWS console, see
|
|
80
|
+
* [Enable serverless SQL warehouses](/sql/admin/serverless.html).
|
|
81
|
+
*
|
|
82
|
+
* This API is only available to admin users.
|
|
83
|
+
*/
|
|
84
|
+
async editInstanceProfile(req, options) {
|
|
85
|
+
const url = `${this.host}/api/2.0/instance-profiles/edit`;
|
|
86
|
+
const body = marshalRequest(req, marshalEditInstanceProfileRequestSchema);
|
|
87
|
+
let resp;
|
|
88
|
+
const call = async (callSignal) => {
|
|
89
|
+
const headers = new Headers({ 'Content-Type': 'application/json' });
|
|
90
|
+
if (this.workspaceId !== undefined) {
|
|
91
|
+
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
92
|
+
}
|
|
93
|
+
headers.set('User-Agent', this.userAgent);
|
|
94
|
+
const httpReq = buildHttpRequest('POST', url, headers, callSignal, body);
|
|
95
|
+
const respBody = await executeHttpCall({
|
|
96
|
+
request: httpReq,
|
|
97
|
+
httpClient: this.httpClient,
|
|
98
|
+
logger: this.logger,
|
|
99
|
+
});
|
|
100
|
+
resp = parseResponse(respBody, unmarshalEditInstanceProfileRequest_ResponseSchema);
|
|
101
|
+
};
|
|
102
|
+
await executeCall(call, options);
|
|
103
|
+
if (resp === undefined) {
|
|
104
|
+
throw new Error('API call completed without a result.');
|
|
105
|
+
}
|
|
106
|
+
return resp;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* List the instance profiles that the calling user can use to launch a cluster.
|
|
110
|
+
*
|
|
111
|
+
* This API is available to all users.
|
|
112
|
+
*/
|
|
113
|
+
async listInstanceProfiles(_req, options) {
|
|
114
|
+
const url = `${this.host}/api/2.0/instance-profiles/list`;
|
|
115
|
+
let resp;
|
|
116
|
+
const call = async (callSignal) => {
|
|
117
|
+
const headers = new Headers();
|
|
118
|
+
if (this.workspaceId !== undefined) {
|
|
119
|
+
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
120
|
+
}
|
|
121
|
+
headers.set('User-Agent', this.userAgent);
|
|
122
|
+
const httpReq = buildHttpRequest('GET', url, headers, callSignal);
|
|
123
|
+
const respBody = await executeHttpCall({
|
|
124
|
+
request: httpReq,
|
|
125
|
+
httpClient: this.httpClient,
|
|
126
|
+
logger: this.logger,
|
|
127
|
+
});
|
|
128
|
+
resp = parseResponse(respBody, unmarshalListInstanceProfilesRequest_ResponseSchema);
|
|
129
|
+
};
|
|
130
|
+
await executeCall(call, options);
|
|
131
|
+
if (resp === undefined) {
|
|
132
|
+
throw new Error('API call completed without a result.');
|
|
133
|
+
}
|
|
134
|
+
return resp;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Remove the instance profile with the provided ARN.
|
|
138
|
+
* Existing clusters with this instance profile will continue to function.
|
|
139
|
+
*
|
|
140
|
+
* This API is only accessible to admin users.
|
|
141
|
+
*/
|
|
142
|
+
async removeInstanceProfile(req, options) {
|
|
143
|
+
const url = `${this.host}/api/2.0/instance-profiles/remove`;
|
|
144
|
+
const body = marshalRequest(req, marshalRemoveInstanceProfileRequestSchema);
|
|
145
|
+
let resp;
|
|
146
|
+
const call = async (callSignal) => {
|
|
147
|
+
const headers = new Headers({ 'Content-Type': 'application/json' });
|
|
148
|
+
if (this.workspaceId !== undefined) {
|
|
149
|
+
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
150
|
+
}
|
|
151
|
+
headers.set('User-Agent', this.userAgent);
|
|
152
|
+
const httpReq = buildHttpRequest('POST', url, headers, callSignal, body);
|
|
153
|
+
const respBody = await executeHttpCall({
|
|
154
|
+
request: httpReq,
|
|
155
|
+
httpClient: this.httpClient,
|
|
156
|
+
logger: this.logger,
|
|
157
|
+
});
|
|
158
|
+
resp = parseResponse(respBody, unmarshalRemoveInstanceProfileRequest_ResponseSchema);
|
|
159
|
+
};
|
|
160
|
+
await executeCall(call, options);
|
|
161
|
+
if (resp === undefined) {
|
|
162
|
+
throw new Error('API call completed without a result.');
|
|
163
|
+
}
|
|
164
|
+
return resp;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
//# 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;AAE7D,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,sCAAsC,EACtC,uCAAuC,EACvC,yCAAyC,EACzC,iDAAiD,EACjD,kDAAkD,EAClD,mDAAmD,EACnD,oDAAoD,GACrD,MAAM,SAAS,CAAC;AAEjB,gFAAgF;AAChF,MAAM,eAAe,GAAG;IACtB,GAAG,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,EAA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M,EAAE,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC;YACzE,MAAM,QAAQ,GAAG,MAAM,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,oDAAoD,CACrD,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,sCAAsC,CAAC,CAAC;QAC1D,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { InstanceprofilesClient } from './client';
|
|
2
|
+
export type { AddInstanceProfileRequest, AddInstanceProfileRequest_Response, EditInstanceProfileRequest, EditInstanceProfileRequest_Response, InstanceProfile, ListInstanceProfilesRequest, ListInstanceProfilesRequest_Response, RemoveInstanceProfileRequest, RemoveInstanceProfileRequest_Response, } from './model';
|
|
3
|
+
//# 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,YAAY,EACV,yBAAyB,EACzB,kCAAkC,EAClC,0BAA0B,EAC1B,mCAAmC,EACnC,eAAe,EACf,2BAA2B,EAC3B,oCAAoC,EACpC,4BAA4B,EAC5B,qCAAqC,GACtC,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"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export interface AddInstanceProfileRequest {
|
|
3
|
+
/**
|
|
4
|
+
* By default, <Databricks> validates that it has sufficient permissions to launch
|
|
5
|
+
* instances with the instance profile. This validation uses AWS dry-run mode for
|
|
6
|
+
* the RunInstances API. If validation fails with an error message that does not
|
|
7
|
+
* indicate an IAM related permission issue,
|
|
8
|
+
* (e.g. “Your requested instance type is not supported in your requested availability zone”),
|
|
9
|
+
* you can pass this flag to skip the validation and forcibly add the instance profile.
|
|
10
|
+
*/
|
|
11
|
+
skipValidation?: boolean | undefined;
|
|
12
|
+
/** The AWS ARN of the instance profile to register with <Databricks>. This field is required. */
|
|
13
|
+
instanceProfileArn?: string | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Boolean flag indicating whether the instance profile should only be used in credential
|
|
16
|
+
* passthrough scenarios. If true, it means the instance profile contains an meta IAM role
|
|
17
|
+
* which could assume a wide range of roles. Therefore it should always be used with
|
|
18
|
+
* authorization.
|
|
19
|
+
* This field is optional, the default value is `false`.
|
|
20
|
+
*/
|
|
21
|
+
isMetaInstanceProfile?: boolean | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* The AWS IAM role ARN of the role associated with the instance profile.
|
|
24
|
+
* This field is required if your role name and instance profile name do
|
|
25
|
+
* not match and you want to use the instance profile with
|
|
26
|
+
* [Databricks SQL Serverless](/sql/admin/serverless.html).
|
|
27
|
+
*
|
|
28
|
+
* Otherwise, this field is optional.
|
|
29
|
+
*/
|
|
30
|
+
iamRoleArn?: string | undefined;
|
|
31
|
+
}
|
|
32
|
+
export interface AddInstanceProfileRequest_Response {
|
|
33
|
+
}
|
|
34
|
+
export interface EditInstanceProfileRequest {
|
|
35
|
+
/** The AWS ARN of the instance profile to register with <Databricks>. This field is required. */
|
|
36
|
+
instanceProfileArn?: string | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Boolean flag indicating whether the instance profile should only be used in credential
|
|
39
|
+
* passthrough scenarios. If true, it means the instance profile contains an meta IAM role
|
|
40
|
+
* which could assume a wide range of roles. Therefore it should always be used with
|
|
41
|
+
* authorization.
|
|
42
|
+
* This field is optional, the default value is `false`.
|
|
43
|
+
*/
|
|
44
|
+
isMetaInstanceProfile?: boolean | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* The AWS IAM role ARN of the role associated with the instance profile.
|
|
47
|
+
* This field is required if your role name and instance profile name do
|
|
48
|
+
* not match and you want to use the instance profile with
|
|
49
|
+
* [Databricks SQL Serverless](/sql/admin/serverless.html).
|
|
50
|
+
*
|
|
51
|
+
* Otherwise, this field is optional.
|
|
52
|
+
*/
|
|
53
|
+
iamRoleArn?: string | undefined;
|
|
54
|
+
}
|
|
55
|
+
export interface EditInstanceProfileRequest_Response {
|
|
56
|
+
}
|
|
57
|
+
export interface InstanceProfile {
|
|
58
|
+
/** The AWS ARN of the instance profile to register with <Databricks>. This field is required. */
|
|
59
|
+
instanceProfileArn?: string | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* Boolean flag indicating whether the instance profile should only be used in credential
|
|
62
|
+
* passthrough scenarios. If true, it means the instance profile contains an meta IAM role
|
|
63
|
+
* which could assume a wide range of roles. Therefore it should always be used with
|
|
64
|
+
* authorization.
|
|
65
|
+
* This field is optional, the default value is `false`.
|
|
66
|
+
*/
|
|
67
|
+
isMetaInstanceProfile?: boolean | undefined;
|
|
68
|
+
/**
|
|
69
|
+
* The AWS IAM role ARN of the role associated with the instance profile.
|
|
70
|
+
* This field is required if your role name and instance profile name do
|
|
71
|
+
* not match and you want to use the instance profile with
|
|
72
|
+
* [Databricks SQL Serverless](/sql/admin/serverless.html).
|
|
73
|
+
*
|
|
74
|
+
* Otherwise, this field is optional.
|
|
75
|
+
*/
|
|
76
|
+
iamRoleArn?: string | undefined;
|
|
77
|
+
}
|
|
78
|
+
export interface ListInstanceProfilesRequest {
|
|
79
|
+
}
|
|
80
|
+
export interface ListInstanceProfilesRequest_Response {
|
|
81
|
+
/** A list of instance profiles that the user can access. */
|
|
82
|
+
instanceProfiles?: InstanceProfile[] | undefined;
|
|
83
|
+
}
|
|
84
|
+
export interface RemoveInstanceProfileRequest {
|
|
85
|
+
/** The ARN of the instance profile to remove. This field is required. */
|
|
86
|
+
instanceProfileArn?: string | undefined;
|
|
87
|
+
}
|
|
88
|
+
export interface RemoveInstanceProfileRequest_Response {
|
|
89
|
+
}
|
|
90
|
+
export declare const unmarshalAddInstanceProfileRequest_ResponseSchema: z.ZodType<AddInstanceProfileRequest_Response>;
|
|
91
|
+
export declare const unmarshalEditInstanceProfileRequest_ResponseSchema: z.ZodType<EditInstanceProfileRequest_Response>;
|
|
92
|
+
export declare const unmarshalInstanceProfileSchema: z.ZodType<InstanceProfile>;
|
|
93
|
+
export declare const unmarshalListInstanceProfilesRequest_ResponseSchema: z.ZodType<ListInstanceProfilesRequest_Response>;
|
|
94
|
+
export declare const unmarshalRemoveInstanceProfileRequest_ResponseSchema: z.ZodType<RemoveInstanceProfileRequest_Response>;
|
|
95
|
+
export declare const marshalAddInstanceProfileRequestSchema: z.ZodType;
|
|
96
|
+
export declare const marshalEditInstanceProfileRequestSchema: z.ZodType;
|
|
97
|
+
export declare const marshalRemoveInstanceProfileRequestSchema: z.ZodType;
|
|
98
|
+
//# 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,MAAM,WAAW,yBAAyB;IACxC;;;;;;;OAOG;IACH,cAAc,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACrC,iGAAiG;IACjG,kBAAkB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC;;;;;;OAMG;IACH,qBAAqB,CAAC,EAAE,OAAO,GAAG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,CAAC,OAAO,CAAC,qCAAqC,CACpG,CAAC;AAEf,eAAO,MAAM,sCAAsC,EAAE,CAAC,CAAC,OAYlD,CAAC;AAEN,eAAO,MAAM,uCAAuC,EAAE,CAAC,CAAC,OAUnD,CAAC;AAEN,eAAO,MAAM,yCAAyC,EAAE,CAAC,CAAC,OAMrD,CAAC"}
|
package/dist/v2/model.js
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
// Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
|
|
4
|
+
export const unmarshalAddInstanceProfileRequest_ResponseSchema = z.object({});
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
|
|
6
|
+
export const unmarshalEditInstanceProfileRequest_ResponseSchema = z.object({});
|
|
7
|
+
export const unmarshalInstanceProfileSchema = z
|
|
8
|
+
.object({
|
|
9
|
+
instance_profile_arn: z.string().optional(),
|
|
10
|
+
is_meta_instance_profile: z.boolean().optional(),
|
|
11
|
+
iam_role_arn: z.string().optional(),
|
|
12
|
+
})
|
|
13
|
+
.transform(d => ({
|
|
14
|
+
instanceProfileArn: d.instance_profile_arn,
|
|
15
|
+
isMetaInstanceProfile: d.is_meta_instance_profile,
|
|
16
|
+
iamRoleArn: d.iam_role_arn,
|
|
17
|
+
}));
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
|
|
19
|
+
export const unmarshalListInstanceProfilesRequest_ResponseSchema = z
|
|
20
|
+
.object({
|
|
21
|
+
instance_profiles: z
|
|
22
|
+
.array(z.lazy(() => unmarshalInstanceProfileSchema))
|
|
23
|
+
.optional(),
|
|
24
|
+
})
|
|
25
|
+
.transform(d => ({
|
|
26
|
+
instanceProfiles: d.instance_profiles,
|
|
27
|
+
}));
|
|
28
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
|
|
29
|
+
export const unmarshalRemoveInstanceProfileRequest_ResponseSchema = z.object({});
|
|
30
|
+
export const marshalAddInstanceProfileRequestSchema = z
|
|
31
|
+
.object({
|
|
32
|
+
skipValidation: z.boolean().optional(),
|
|
33
|
+
instanceProfileArn: z.string().optional(),
|
|
34
|
+
isMetaInstanceProfile: z.boolean().optional(),
|
|
35
|
+
iamRoleArn: z.string().optional(),
|
|
36
|
+
})
|
|
37
|
+
.transform(d => ({
|
|
38
|
+
skip_validation: d.skipValidation,
|
|
39
|
+
instance_profile_arn: d.instanceProfileArn,
|
|
40
|
+
is_meta_instance_profile: d.isMetaInstanceProfile,
|
|
41
|
+
iam_role_arn: d.iamRoleArn,
|
|
42
|
+
}));
|
|
43
|
+
export const marshalEditInstanceProfileRequestSchema = z
|
|
44
|
+
.object({
|
|
45
|
+
instanceProfileArn: z.string().optional(),
|
|
46
|
+
isMetaInstanceProfile: z.boolean().optional(),
|
|
47
|
+
iamRoleArn: z.string().optional(),
|
|
48
|
+
})
|
|
49
|
+
.transform(d => ({
|
|
50
|
+
instance_profile_arn: d.instanceProfileArn,
|
|
51
|
+
is_meta_instance_profile: d.isMetaInstanceProfile,
|
|
52
|
+
iam_role_arn: d.iamRoleArn,
|
|
53
|
+
}));
|
|
54
|
+
export const marshalRemoveInstanceProfileRequestSchema = z
|
|
55
|
+
.object({
|
|
56
|
+
instanceProfileArn: z.string().optional(),
|
|
57
|
+
})
|
|
58
|
+
.transform(d => ({
|
|
59
|
+
instance_profile_arn: d.instanceProfileArn,
|
|
60
|
+
}));
|
|
61
|
+
//# sourceMappingURL=model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../src/v2/model.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAE/E,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAoGtB,oGAAoG;AACpG,MAAM,CAAC,MAAM,iDAAiD,GAC5D,CAAC,CAAC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,CAAC,QAAQ,EAAE;IAC7C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAClC,CAAC;KACD,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IACf,eAAe,EAAE,CAAC,CAAC,cAAc;IACjC,oBAAoB,EAAE,CAAC,CAAC,kBAAkB;IAC1C,wBAAwB,EAAE,CAAC,CAAC,qBAAqB;IACjD,YAAY,EAAE,CAAC,CAAC,UAAU;CAC3B,CAAC,CAAC,CAAC;AAEN,MAAM,CAAC,MAAM,uCAAuC,GAAc,CAAC;KAChE,MAAM,CAAC;IACN,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACzC,qBAAqB,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC7C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAClC,CAAC;KACD,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IACf,oBAAoB,EAAE,CAAC,CAAC,kBAAkB;IAC1C,wBAAwB,EAAE,CAAC,CAAC,qBAAqB;IACjD,YAAY,EAAE,CAAC,CAAC,UAAU;CAC3B,CAAC,CAAC,CAAC;AAEN,MAAM,CAAC,MAAM,yCAAyC,GAAc,CAAC;KAClE,MAAM,CAAC;IACN,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC1C,CAAC;KACD,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IACf,oBAAoB,EAAE,CAAC,CAAC,kBAAkB;CAC3C,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { HttpClient } from '@databricks/sdk-core/http';
|
|
2
|
+
import type { ClientOptions } from '@databricks/sdk-options/client';
|
|
3
|
+
/** Creates a new HTTP client with the given options. */
|
|
4
|
+
export declare function newHttpClient(options?: ClientOptions): HttpClient;
|
|
5
|
+
//# sourceMappingURL=transport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../src/v2/transport.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,UAAU,EAGX,MAAM,2BAA2B,CAAC;AAEnC,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,gCAAgC,CAAC;AAElE,wDAAwD;AACxD,wBAAgB,aAAa,CAAC,OAAO,CAAC,EAAE,aAAa,GAAG,UAAU,CAwBjE"}
|