@databricks/sdk-secrets 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.
@@ -0,0 +1,604 @@
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 { marshalCreateScopeRequestSchema, marshalDeleteAclRequestSchema, marshalDeleteScopeRequestSchema, marshalDeleteSecretRequestSchema, marshalPutAclRequestSchema, marshalPutSecretRequestSchema, unmarshalAclItemSchema, unmarshalCreateScopeRequest_ResponseSchema, unmarshalDeleteAclRequest_ResponseSchema, unmarshalDeleteScopeRequest_ResponseSchema, unmarshalDeleteSecretRequest_ResponseSchema, unmarshalGetSecretRequest_ResponseSchema, unmarshalListAclsRequest_ResponseSchema, unmarshalListScopesRequest_ResponseSchema, unmarshalListSecretsRequest_ResponseSchema, unmarshalPutAclRequest_ResponseSchema, unmarshalPutSecretRequest_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 SecretsClient {
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
+ * Creates a new secret scope.
42
+ *
43
+ * The scope name must consist of alphanumeric characters, dashes, underscores, and
44
+ * periods, and may not exceed 128 characters.
45
+ *
46
+ * Example request:
47
+ *
48
+ * .. code::
49
+ *
50
+ * {
51
+ * "scope": "my-simple-databricks-scope",
52
+ * "initial_manage_principal": "users"
53
+ * "scope_backend_type": "databricks|azure_keyvault",
54
+ * # below is only required if scope type is azure_keyvault
55
+ * "backend_azure_keyvault": {
56
+ * "resource_id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/xxxx/providers/Microsoft.KeyVault/vaults/xxxx",
57
+ * "tenant_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
58
+ * "dns_name": "https://xxxx.vault.azure.net/",
59
+ * }
60
+ * }
61
+ *
62
+ * If ``initial_manage_principal`` is specified, the initial ACL applied to the scope is
63
+ * applied to the supplied principal (user or group) with ``MANAGE`` permissions.
64
+ * The only supported principal for this option is the group ``users``, which
65
+ * contains all users in the workspace. If ``initial_manage_principal`` is not specified,
66
+ * the initial ACL with ``MANAGE`` permission applied to the scope is assigned to the
67
+ * API request issuer's user identity.
68
+ *
69
+ * If ``scope_backend_type`` is ``azure_keyvault``, a secret scope is created with secrets
70
+ * from a given Azure KeyVault. The caller must provide the keyvault_resource_id and the tenant_id
71
+ * for the key vault. If ``scope_backend_type`` is ``databricks`` or is unspecified, an empty
72
+ * secret scope is created and stored in <Databricks>'s own storage.
73
+ *
74
+ *
75
+ * Throws ``RESOURCE_ALREADY_EXISTS`` if a scope with the given name already exists.
76
+ * Throws ``RESOURCE_LIMIT_EXCEEDED`` if maximum number of scopes in the workspace is exceeded.
77
+ * Throws ``INVALID_PARAMETER_VALUE`` if the scope name is invalid.
78
+ * Throws ``BAD_REQUEST`` if request violated constraints.
79
+ * Throws ``CUSTOMER_UNAUTHORIZED`` if normal user attempts to create a scope with name reserved for databricks internal usage.
80
+ * Throws ``UNAUTHENTICATED`` if unable to verify user access permission on Azure KeyVault
81
+ */
82
+ async createScope(req, options) {
83
+ const url = `${this.host}/api/2.0/secrets/scopes/create`;
84
+ const body = marshalRequest(req, marshalCreateScopeRequestSchema);
85
+ let resp;
86
+ const call = async (callSignal) => {
87
+ const headers = new Headers({ 'Content-Type': 'application/json' });
88
+ if (this.workspaceId !== undefined) {
89
+ headers.set('X-Databricks-Org-Id', this.workspaceId);
90
+ }
91
+ headers.set('User-Agent', this.userAgent);
92
+ const httpReq = buildHttpRequest('POST', url, headers, callSignal, body);
93
+ const respBody = await executeHttpCall({
94
+ request: httpReq,
95
+ httpClient: this.httpClient,
96
+ logger: this.logger,
97
+ });
98
+ resp = parseResponse(respBody, unmarshalCreateScopeRequest_ResponseSchema);
99
+ };
100
+ await executeCall(call, options);
101
+ if (resp === undefined) {
102
+ throw new Error('API call completed without a result.');
103
+ }
104
+ return resp;
105
+ }
106
+ /**
107
+ * Deletes the given ACL on the given scope.
108
+ *
109
+ * Users must have the ``MANAGE`` permission to invoke this API.
110
+ *
111
+ * Example request:
112
+ *
113
+ * .. code::
114
+ *
115
+ * {
116
+ * "scope": "my-secret-scope",
117
+ * "principal": "data-scientists"
118
+ * }
119
+ *
120
+ * Throws ``RESOURCE_DOES_NOT_EXIST`` if no such secret scope, principal, or ACL exists.
121
+ * Throws ``PERMISSION_DENIED`` if the user does not have permission to make this API call.
122
+ * Throws ``INVALID_PARAMETER_VALUE`` if the permission or principal is invalid.
123
+ */
124
+ async deleteAcl(req, options) {
125
+ const url = `${this.host}/api/2.0/secrets/acls/delete`;
126
+ const body = marshalRequest(req, marshalDeleteAclRequestSchema);
127
+ let resp;
128
+ const call = async (callSignal) => {
129
+ const headers = new Headers({ 'Content-Type': 'application/json' });
130
+ if (this.workspaceId !== undefined) {
131
+ headers.set('X-Databricks-Org-Id', this.workspaceId);
132
+ }
133
+ headers.set('User-Agent', this.userAgent);
134
+ const httpReq = buildHttpRequest('POST', url, headers, callSignal, body);
135
+ const respBody = await executeHttpCall({
136
+ request: httpReq,
137
+ httpClient: this.httpClient,
138
+ logger: this.logger,
139
+ });
140
+ resp = parseResponse(respBody, unmarshalDeleteAclRequest_ResponseSchema);
141
+ };
142
+ await executeCall(call, options);
143
+ if (resp === undefined) {
144
+ throw new Error('API call completed without a result.');
145
+ }
146
+ return resp;
147
+ }
148
+ /**
149
+ * Deletes a secret scope.
150
+ *
151
+ * Example request:
152
+ *
153
+ * .. code::
154
+ *
155
+ * {
156
+ * "scope": "my-secret-scope"
157
+ * }
158
+ *
159
+ * Throws ``RESOURCE_DOES_NOT_EXIST`` if the scope does not exist.
160
+ * Throws ``PERMISSION_DENIED`` if the user does not have permission to make this API call.
161
+ * Throws ``BAD_REQUEST`` if system user attempts to delete internal secret scope.
162
+ */
163
+ async deleteScope(req, options) {
164
+ const url = `${this.host}/api/2.0/secrets/scopes/delete`;
165
+ const body = marshalRequest(req, marshalDeleteScopeRequestSchema);
166
+ let resp;
167
+ const call = async (callSignal) => {
168
+ const headers = new Headers({ 'Content-Type': 'application/json' });
169
+ if (this.workspaceId !== undefined) {
170
+ headers.set('X-Databricks-Org-Id', this.workspaceId);
171
+ }
172
+ headers.set('User-Agent', this.userAgent);
173
+ const httpReq = buildHttpRequest('POST', url, headers, callSignal, body);
174
+ const respBody = await executeHttpCall({
175
+ request: httpReq,
176
+ httpClient: this.httpClient,
177
+ logger: this.logger,
178
+ });
179
+ resp = parseResponse(respBody, unmarshalDeleteScopeRequest_ResponseSchema);
180
+ };
181
+ await executeCall(call, options);
182
+ if (resp === undefined) {
183
+ throw new Error('API call completed without a result.');
184
+ }
185
+ return resp;
186
+ }
187
+ /**
188
+ * Deletes the secret stored in this secret scope. You must have ``WRITE`` or ``MANAGE``
189
+ * permission on the Secret Scope.
190
+ *
191
+ * Example request:
192
+ *
193
+ * .. code::
194
+ *
195
+ * {
196
+ * "scope": "my-secret-scope",
197
+ * "key": "my-secret-key"
198
+ * }
199
+ *
200
+ * Throws ``RESOURCE_DOES_NOT_EXIST`` if no such secret scope or secret exists.
201
+ * Throws ``PERMISSION_DENIED`` if the user does not have permission to make this API call.
202
+ * Throws ``BAD_REQUEST`` if system user attempts to delete an internal secret, or request is made against Azure KeyVault backed scope.
203
+ */
204
+ async deleteSecret(req, options) {
205
+ const url = `${this.host}/api/2.0/secrets/delete`;
206
+ const body = marshalRequest(req, marshalDeleteSecretRequestSchema);
207
+ let resp;
208
+ const call = async (callSignal) => {
209
+ const headers = new Headers({ 'Content-Type': 'application/json' });
210
+ if (this.workspaceId !== undefined) {
211
+ headers.set('X-Databricks-Org-Id', this.workspaceId);
212
+ }
213
+ headers.set('User-Agent', this.userAgent);
214
+ const httpReq = buildHttpRequest('POST', url, headers, callSignal, body);
215
+ const respBody = await executeHttpCall({
216
+ request: httpReq,
217
+ httpClient: this.httpClient,
218
+ logger: this.logger,
219
+ });
220
+ resp = parseResponse(respBody, unmarshalDeleteSecretRequest_ResponseSchema);
221
+ };
222
+ await executeCall(call, options);
223
+ if (resp === undefined) {
224
+ throw new Error('API call completed without a result.');
225
+ }
226
+ return resp;
227
+ }
228
+ /**
229
+ * Describes the details about the given ACL, such as the group and permission.
230
+ *
231
+ * Users must have the ``MANAGE`` permission to invoke this API.
232
+ *
233
+ * Example response:
234
+ *
235
+ * .. code::
236
+ *
237
+ * {
238
+ * "principal": "data-scientists",
239
+ * "permission": "READ"
240
+ * }
241
+ *
242
+ * Throws ``RESOURCE_DOES_NOT_EXIST`` if no such secret scope exists.
243
+ * Throws ``PERMISSION_DENIED`` if the user does not have permission to make this API call.
244
+ * Throws ``INVALID_PARAMETER_VALUE`` if the permission or principal is invalid.
245
+ */
246
+ async getAcl(req, options) {
247
+ const url = `${this.host}/api/2.0/secrets/acls/get`;
248
+ const params = new URLSearchParams();
249
+ if (req.scope !== undefined) {
250
+ params.append('scope', req.scope);
251
+ }
252
+ if (req.principal !== undefined) {
253
+ params.append('principal', req.principal);
254
+ }
255
+ const query = params.toString();
256
+ const fullUrl = query !== '' ? `${url}?${query}` : url;
257
+ let resp;
258
+ const call = async (callSignal) => {
259
+ const headers = new Headers();
260
+ if (this.workspaceId !== undefined) {
261
+ headers.set('X-Databricks-Org-Id', this.workspaceId);
262
+ }
263
+ headers.set('User-Agent', this.userAgent);
264
+ const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);
265
+ const respBody = await executeHttpCall({
266
+ request: httpReq,
267
+ httpClient: this.httpClient,
268
+ logger: this.logger,
269
+ });
270
+ resp = parseResponse(respBody, unmarshalAclItemSchema);
271
+ };
272
+ await executeCall(call, options);
273
+ if (resp === undefined) {
274
+ throw new Error('API call completed without a result.');
275
+ }
276
+ return resp;
277
+ }
278
+ /**
279
+ * Gets a secret for a given key and scope. This API can only be called from the DBUtils
280
+ * interface. Users need the READ permission to make this call.
281
+ *
282
+ * Example response:
283
+ *
284
+ * .. code::
285
+ *
286
+ * {
287
+ * "key": "my-string-key",
288
+ * "value": <bytes of the secret value>
289
+ * }
290
+ *
291
+ * Note that the secret value returned is in bytes. The interpretation of the bytes
292
+ * is determined by the caller in DBUtils and the type the data is decoded into.
293
+ *
294
+ * Throws ``RESOURCE_DOES_NOT_EXIST`` if no such secret or secret scope exists.
295
+ * Throws ``PERMISSION_DENIED`` if the user does not have permission to make this API call.
296
+ *
297
+ * Note: This is explicitly an undocumented API. It also doesn't need to be supported
298
+ * for the /preview prefix, because it's not a customer-facing API (i.e. only used
299
+ * for DBUtils SecretUtils to fetch secrets).
300
+ *
301
+ * Throws ``RESOURCE_DOES_NOT_EXIST`` if no such secret scope or secret exists.
302
+ * Throws ``BAD_REQUEST`` if normal user calls get secret outside of a notebook.
303
+ * AKV specific errors:
304
+ * Throws ``INVALID_PARAMETER_VALUE`` if secret name is not alphanumeric or too long.
305
+ * Throws ``PERMISSION_DENIED`` if secret manager cannot access AKV with 403 error
306
+ * Throws ``MALFORMED_REQUEST`` if secret manager cannot access AKV with any other 4xx error
307
+ */
308
+ async getSecret(req, options) {
309
+ const url = `${this.host}/api/2.0/secrets/get`;
310
+ const params = new URLSearchParams();
311
+ if (req.scope !== undefined) {
312
+ params.append('scope', req.scope);
313
+ }
314
+ if (req.key !== undefined) {
315
+ params.append('key', req.key);
316
+ }
317
+ const query = params.toString();
318
+ const fullUrl = query !== '' ? `${url}?${query}` : url;
319
+ let resp;
320
+ const call = async (callSignal) => {
321
+ const headers = new Headers();
322
+ if (this.workspaceId !== undefined) {
323
+ headers.set('X-Databricks-Org-Id', this.workspaceId);
324
+ }
325
+ headers.set('User-Agent', this.userAgent);
326
+ const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);
327
+ const respBody = await executeHttpCall({
328
+ request: httpReq,
329
+ httpClient: this.httpClient,
330
+ logger: this.logger,
331
+ });
332
+ resp = parseResponse(respBody, unmarshalGetSecretRequest_ResponseSchema);
333
+ };
334
+ await executeCall(call, options);
335
+ if (resp === undefined) {
336
+ throw new Error('API call completed without a result.');
337
+ }
338
+ return resp;
339
+ }
340
+ /**
341
+ * Lists the ACLs set on the given scope.
342
+ *
343
+ * Users must have the ``MANAGE`` permission to invoke this API.
344
+ *
345
+ * Example response:
346
+ *
347
+ * .. code::
348
+ *
349
+ * {
350
+ * "acls": [{
351
+ * "principal": "admins",
352
+ * "permission": "MANAGE"
353
+ * },{
354
+ * "principal": "data-scientists",
355
+ * "permission": "READ"
356
+ * }]
357
+ * }
358
+ *
359
+ * Throws ``RESOURCE_DOES_NOT_EXIST`` if no such secret scope exists.
360
+ * Throws ``PERMISSION_DENIED`` if the user does not have permission to make this API call.
361
+ */
362
+ async listAcls(req, options) {
363
+ const url = `${this.host}/api/2.0/secrets/acls/list`;
364
+ const params = new URLSearchParams();
365
+ if (req.scope !== undefined) {
366
+ params.append('scope', req.scope);
367
+ }
368
+ const query = params.toString();
369
+ const fullUrl = query !== '' ? `${url}?${query}` : url;
370
+ let resp;
371
+ const call = async (callSignal) => {
372
+ const headers = new Headers();
373
+ if (this.workspaceId !== undefined) {
374
+ headers.set('X-Databricks-Org-Id', this.workspaceId);
375
+ }
376
+ headers.set('User-Agent', this.userAgent);
377
+ const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);
378
+ const respBody = await executeHttpCall({
379
+ request: httpReq,
380
+ httpClient: this.httpClient,
381
+ logger: this.logger,
382
+ });
383
+ resp = parseResponse(respBody, unmarshalListAclsRequest_ResponseSchema);
384
+ };
385
+ await executeCall(call, options);
386
+ if (resp === undefined) {
387
+ throw new Error('API call completed without a result.');
388
+ }
389
+ return resp;
390
+ }
391
+ /**
392
+ * Lists all secret scopes available in the workspace.
393
+ *
394
+ * Example response:
395
+ *
396
+ * .. code::
397
+ *
398
+ * {
399
+ * "scopes": [{
400
+ * "name": "my-databricks-scope",
401
+ * "backend_type": "DATABRICKS"
402
+ * },{
403
+ * "name": "mount-points",
404
+ * "backend_type": "DATABRICKS"
405
+ * }]
406
+ * }
407
+ *
408
+ * Throws ``PERMISSION_DENIED`` if the user does not have permission to make this API call.
409
+ */
410
+ async listScopes(_req, options) {
411
+ const url = `${this.host}/api/2.0/secrets/scopes/list`;
412
+ let resp;
413
+ const call = async (callSignal) => {
414
+ const headers = new Headers();
415
+ if (this.workspaceId !== undefined) {
416
+ headers.set('X-Databricks-Org-Id', this.workspaceId);
417
+ }
418
+ headers.set('User-Agent', this.userAgent);
419
+ const httpReq = buildHttpRequest('GET', url, headers, callSignal);
420
+ const respBody = await executeHttpCall({
421
+ request: httpReq,
422
+ httpClient: this.httpClient,
423
+ logger: this.logger,
424
+ });
425
+ resp = parseResponse(respBody, unmarshalListScopesRequest_ResponseSchema);
426
+ };
427
+ await executeCall(call, options);
428
+ if (resp === undefined) {
429
+ throw new Error('API call completed without a result.');
430
+ }
431
+ return resp;
432
+ }
433
+ /**
434
+ * Lists the secret keys that are stored at this scope. This is a metadata-only
435
+ * operation; secret data cannot be retrieved using this API. Users need the READ
436
+ * permission to make this call.
437
+ *
438
+ * Example response:
439
+ *
440
+ * .. code::
441
+ *
442
+ * {
443
+ * "secrets": [
444
+ * {
445
+ * "key": "my-string-key"",
446
+ * "last_updated_timestamp": "1520467595000"
447
+ * },
448
+ * {
449
+ * "key": "my-byte-key",
450
+ * "last_updated_timestamp": "1520467595000"
451
+ * },
452
+ * ]
453
+ * }
454
+ *
455
+ * The lastUpdatedTimestamp returned is in milliseconds since epoch.
456
+ *
457
+ * Throws ``RESOURCE_DOES_NOT_EXIST`` if no such secret scope exists.
458
+ * Throws ``PERMISSION_DENIED`` if the user does not have permission to make this API call.
459
+ */
460
+ async listSecrets(req, options) {
461
+ const url = `${this.host}/api/2.0/secrets/list`;
462
+ const params = new URLSearchParams();
463
+ if (req.scope !== undefined) {
464
+ params.append('scope', req.scope);
465
+ }
466
+ const query = params.toString();
467
+ const fullUrl = query !== '' ? `${url}?${query}` : url;
468
+ let resp;
469
+ const call = async (callSignal) => {
470
+ const headers = new Headers();
471
+ if (this.workspaceId !== undefined) {
472
+ headers.set('X-Databricks-Org-Id', this.workspaceId);
473
+ }
474
+ headers.set('User-Agent', this.userAgent);
475
+ const httpReq = buildHttpRequest('GET', fullUrl, headers, callSignal);
476
+ const respBody = await executeHttpCall({
477
+ request: httpReq,
478
+ httpClient: this.httpClient,
479
+ logger: this.logger,
480
+ });
481
+ resp = parseResponse(respBody, unmarshalListSecretsRequest_ResponseSchema);
482
+ };
483
+ await executeCall(call, options);
484
+ if (resp === undefined) {
485
+ throw new Error('API call completed without a result.');
486
+ }
487
+ return resp;
488
+ }
489
+ /**
490
+ * Creates or overwrites the ACL associated with the given principal (user or group) on the
491
+ * specified scope point. In general, a user or group will use the most powerful
492
+ * permission available to them, and permissions are ordered as follows:
493
+ *
494
+ * * ``MANAGE`` - Allowed to change ACLs, and read and write to this secret scope.
495
+ * * ``WRITE`` - Allowed to read and write to this secret scope.
496
+ * * ``READ`` - Allowed to read this secret scope and list what secrets are available.
497
+ *
498
+ * Note that in general, secret values can only be read from within a command
499
+ * on a cluster (for example, through a notebook). There is no API to read the actual
500
+ * secret value material outside of a cluster. However, the user's permission will be
501
+ * applied based on who is executing the command, and they must have at least READ permission.
502
+ *
503
+ * Users must have the ``MANAGE`` permission to invoke this API.
504
+ *
505
+ * Example request:
506
+ *
507
+ * .. code::
508
+ *
509
+ * {
510
+ * "scope": "my-secret-scope",
511
+ * "principal": "data-scientists",
512
+ * "permission": "READ"
513
+ * }
514
+ *
515
+ * The principal is a user or group name corresponding to an existing <Databricks>
516
+ * principal to be granted or revoked access.
517
+ *
518
+ * Throws ``RESOURCE_DOES_NOT_EXIST`` if no such secret scope exists.
519
+ * Throws ``RESOURCE_ALREADY_EXISTS`` if a permission for the principal already exists.
520
+ * Throws ``INVALID_PARAMETER_VALUE`` if the permission or principal is invalid.
521
+ * Throws ``PERMISSION_DENIED`` if the user does not have permission to make this API call.
522
+ */
523
+ async putAcl(req, options) {
524
+ const url = `${this.host}/api/2.0/secrets/acls/put`;
525
+ const body = marshalRequest(req, marshalPutAclRequestSchema);
526
+ let resp;
527
+ const call = async (callSignal) => {
528
+ const headers = new Headers({ 'Content-Type': 'application/json' });
529
+ if (this.workspaceId !== undefined) {
530
+ headers.set('X-Databricks-Org-Id', this.workspaceId);
531
+ }
532
+ headers.set('User-Agent', this.userAgent);
533
+ const httpReq = buildHttpRequest('POST', url, headers, callSignal, body);
534
+ const respBody = await executeHttpCall({
535
+ request: httpReq,
536
+ httpClient: this.httpClient,
537
+ logger: this.logger,
538
+ });
539
+ resp = parseResponse(respBody, unmarshalPutAclRequest_ResponseSchema);
540
+ };
541
+ await executeCall(call, options);
542
+ if (resp === undefined) {
543
+ throw new Error('API call completed without a result.');
544
+ }
545
+ return resp;
546
+ }
547
+ /**
548
+ * Inserts a secret under the provided scope with the given name. If a secret already
549
+ * exists with the same name, this command overwrites the existing secret's value.
550
+ * The server encrypts the secret using the secret scope's encryption settings before
551
+ * storing it. You must have ``WRITE`` or ``MANAGE`` permission on the secret scope.
552
+ *
553
+ * The secret key must consist of alphanumeric characters, dashes, underscores,
554
+ * and periods, and cannot exceed 128 characters. The maximum allowed secret
555
+ * value size is 128 KB. The maximum number of secrets in a given scope is
556
+ * 1000.
557
+ *
558
+ * Example request:
559
+ *
560
+ * .. code::
561
+ *
562
+ * {
563
+ * "scope": "my-databricks-scope",
564
+ * "key": "my-string-key",
565
+ * "string_value": "foobar"
566
+ * }
567
+ *
568
+ * The input fields "string_value" or "bytes_value"
569
+ * specify the type of the secret, which will determine the value returned when
570
+ * the secret value is requested. Exactly one must be specified.
571
+ *
572
+ * Throws ``RESOURCE_DOES_NOT_EXIST`` if no such secret scope exists.
573
+ * Throws ``RESOURCE_LIMIT_EXCEEDED`` if maximum number of secrets in scope is exceeded.
574
+ * Throws ``INVALID_PARAMETER_VALUE`` if the request parameters are invalid.
575
+ * Throws ``PERMISSION_DENIED`` if the user does not have permission to make this API call.
576
+ * Throws ``MALFORMED_REQUEST`` if request is incorrectly formatted or conflicting.
577
+ * Throws ``BAD_REQUEST`` if request is made against Azure KeyVault backed scope.
578
+ */
579
+ async putSecret(req, options) {
580
+ const url = `${this.host}/api/2.0/secrets/put`;
581
+ const body = marshalRequest(req, marshalPutSecretRequestSchema);
582
+ let resp;
583
+ const call = async (callSignal) => {
584
+ const headers = new Headers({ 'Content-Type': 'application/json' });
585
+ if (this.workspaceId !== undefined) {
586
+ headers.set('X-Databricks-Org-Id', this.workspaceId);
587
+ }
588
+ headers.set('User-Agent', this.userAgent);
589
+ const httpReq = buildHttpRequest('POST', url, headers, callSignal, body);
590
+ const respBody = await executeHttpCall({
591
+ request: httpReq,
592
+ httpClient: this.httpClient,
593
+ logger: this.logger,
594
+ });
595
+ resp = parseResponse(respBody, unmarshalPutSecretRequest_ResponseSchema);
596
+ };
597
+ await executeCall(call, options);
598
+ if (resp === undefined) {
599
+ throw new Error('API call completed without a result.');
600
+ }
601
+ return resp;
602
+ }
603
+ }
604
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/v1/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;AAyB7D,OAAO,EACL,+BAA+B,EAC/B,6BAA6B,EAC7B,+BAA+B,EAC/B,gCAAgC,EAChC,0BAA0B,EAC1B,6BAA6B,EAC7B,sBAAsB,EACtB,0CAA0C,EAC1C,wCAAwC,EACxC,0CAA0C,EAC1C,2CAA2C,EAC3C,wCAAwC,EACxC,uCAAuC,EACvC,yCAAyC,EACzC,0CAA0C,EAC1C,qCAAqC,EACrC,wCAAwC,GACzC,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,aAAa;IACP,IAAI,CAAS;IAC9B,4EAA4E;IAC5E,sEAAsE;IACtE,WAAW;IACM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,GAAG,GAAG,GAAG,IAAI,CAAC,IAAI,sBAAsB,CAAC;QAC/C,MAAM,IAAI,GAAG,cAAc,CAAC,GAAG,EAAE,6BAA6B,CAAC,CAAC;QAChE,IAAI,IAA2C,CAAC;QAChD,MAAM,IAAI,GAAS,KAAK,EAAE,UAAwB,EAAiB,EAAE;YACnE,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,EAAC,cAAc,EAAE,kBAAkB,EAAC,CAAC,CAAC;YAClE,IAAI,IAAI,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;gBACnC,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;YACvD,CAAC;YACD,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;YAC1C,MAAM,OAAO,GAAG,gBAAgB,CAAC,MAAM,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,CAAC,QAAQ,EAAE,wCAAwC,CAAC,CAAC;QAC3E,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,4 @@
1
+ export { SecretsClient } from './client';
2
+ export { AclPermission, ScopeBackendType } from './model';
3
+ export type { AclItem, AzureKeyVaultSecretScopeMetadata, CreateScopeRequest, CreateScopeRequest_Response, DeleteAclRequest, DeleteAclRequest_Response, DeleteScopeRequest, DeleteScopeRequest_Response, DeleteSecretRequest, DeleteSecretRequest_Response, GetAclRequest, GetSecretRequest, GetSecretRequest_Response, ListAclsRequest, ListAclsRequest_Response, ListScopesRequest, ListScopesRequest_Response, ListSecretsRequest, ListSecretsRequest_Response, PutAclRequest, PutAclRequest_Response, PutSecretRequest, PutSecretRequest_Response, SecretMetadata, SecretScope, } from './model';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/v1/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,aAAa,EAAC,MAAM,UAAU,CAAC;AAEvC,OAAO,EAAC,aAAa,EAAE,gBAAgB,EAAC,MAAM,SAAS,CAAC;AAExD,YAAY,EACV,OAAO,EACP,gCAAgC,EAChC,kBAAkB,EAClB,2BAA2B,EAC3B,gBAAgB,EAChB,yBAAyB,EACzB,kBAAkB,EAClB,2BAA2B,EAC3B,mBAAmB,EACnB,4BAA4B,EAC5B,aAAa,EACb,gBAAgB,EAChB,yBAAyB,EACzB,eAAe,EACf,wBAAwB,EACxB,iBAAiB,EACjB,0BAA0B,EAC1B,kBAAkB,EAClB,2BAA2B,EAC3B,aAAa,EACb,sBAAsB,EACtB,gBAAgB,EAChB,yBAAyB,EACzB,cAAc,EACd,WAAW,GACZ,MAAM,SAAS,CAAC"}
@@ -0,0 +1,4 @@
1
+ // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
2
+ export { SecretsClient } from './client';
3
+ export { AclPermission, ScopeBackendType } from './model';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/v1/index.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAE/E,OAAO,EAAC,aAAa,EAAC,MAAM,UAAU,CAAC;AAEvC,OAAO,EAAC,aAAa,EAAE,gBAAgB,EAAC,MAAM,SAAS,CAAC"}