@ibm-cloud/secrets-manager 1.0.33 → 1.0.36

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.
@@ -18,10 +18,12 @@ var __extends = (this && this.__extends) || (function () {
18
18
  var extendStatics = function (d, b) {
19
19
  extendStatics = Object.setPrototypeOf ||
20
20
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
21
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
21
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
22
22
  return extendStatics(d, b);
23
23
  };
24
24
  return function (d, b) {
25
+ if (typeof b !== "function" && b !== null)
26
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
25
27
  extendStatics(d, b);
26
28
  function __() { this.constructor = d; }
27
29
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -39,7 +41,7 @@ var __assign = (this && this.__assign) || function () {
39
41
  return __assign.apply(this, arguments);
40
42
  };
41
43
  /**
42
- * IBM OpenAPI SDK Code Generator Version: 3.48.0-e80b60a1-20220414-145125
44
+ * IBM OpenAPI SDK Code Generator Version: 3.55.1-b24c7487-20220831-201343
43
45
  */
44
46
  var extend = require("extend");
45
47
  var ibm_cloud_sdk_core_1 = require("ibm-cloud-sdk-core");
@@ -49,7 +51,7 @@ var common_1 = require("../lib/common");
49
51
  * services or your custom-built applications. Secrets are stored in a dedicated instance of Secrets Manager, which is
50
52
  * built on open source HashiCorp Vault.
51
53
  *
52
- * API Version: 1.0.33
54
+ * API Version: 1.0.0
53
55
  * See: https://cloud.ibm.com/docs/secrets-manager
54
56
  */
55
57
  var SecretsManagerV1 = /** @class */ (function (_super) {
@@ -91,7 +93,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
91
93
  options.serviceName = this.DEFAULT_SERVICE_NAME;
92
94
  }
93
95
  if (!options.authenticator) {
94
- options.authenticator = ibm_cloud_sdk_core_1.getAuthenticatorFromEnvironment(options.serviceName);
96
+ options.authenticator = (0, ibm_cloud_sdk_core_1.getAuthenticatorFromEnvironment)(options.serviceName);
95
97
  }
96
98
  var service = new SecretsManagerV1(options);
97
99
  service.configureService(options.serviceName);
@@ -122,7 +124,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
122
124
  var _params = __assign({}, params);
123
125
  var _requiredParams = ['metadata', 'resources'];
124
126
  var _validParams = ['metadata', 'resources', 'headers'];
125
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
127
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
126
128
  if (_validationErrors) {
127
129
  return Promise.reject(_validationErrors);
128
130
  }
@@ -130,7 +132,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
130
132
  'metadata': _params.metadata,
131
133
  'resources': _params.resources,
132
134
  };
133
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'createSecretGroup');
135
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'createSecretGroup');
134
136
  var parameters = {
135
137
  options: {
136
138
  url: '/api/v1/secret_groups',
@@ -159,11 +161,11 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
159
161
  var _params = __assign({}, params);
160
162
  var _requiredParams = [];
161
163
  var _validParams = ['headers'];
162
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
164
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
163
165
  if (_validationErrors) {
164
166
  return Promise.reject(_validationErrors);
165
167
  }
166
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'listSecretGroups');
168
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'listSecretGroups');
167
169
  var parameters = {
168
170
  options: {
169
171
  url: '/api/v1/secret_groups',
@@ -191,14 +193,14 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
191
193
  var _params = __assign({}, params);
192
194
  var _requiredParams = ['id'];
193
195
  var _validParams = ['id', 'headers'];
194
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
196
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
195
197
  if (_validationErrors) {
196
198
  return Promise.reject(_validationErrors);
197
199
  }
198
200
  var path = {
199
201
  'id': _params.id,
200
202
  };
201
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getSecretGroup');
203
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getSecretGroup');
202
204
  var parameters = {
203
205
  options: {
204
206
  url: '/api/v1/secret_groups/{id}',
@@ -229,7 +231,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
229
231
  var _params = __assign({}, params);
230
232
  var _requiredParams = ['id', 'metadata', 'resources'];
231
233
  var _validParams = ['id', 'metadata', 'resources', 'headers'];
232
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
234
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
233
235
  if (_validationErrors) {
234
236
  return Promise.reject(_validationErrors);
235
237
  }
@@ -240,7 +242,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
240
242
  var path = {
241
243
  'id': _params.id,
242
244
  };
243
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'updateSecretGroupMetadata');
245
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'updateSecretGroupMetadata');
244
246
  var parameters = {
245
247
  options: {
246
248
  url: '/api/v1/secret_groups/{id}',
@@ -274,14 +276,14 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
274
276
  var _params = __assign({}, params);
275
277
  var _requiredParams = ['id'];
276
278
  var _validParams = ['id', 'headers'];
277
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
279
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
278
280
  if (_validationErrors) {
279
281
  return Promise.reject(_validationErrors);
280
282
  }
281
283
  var path = {
282
284
  'id': _params.id,
283
285
  };
284
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteSecretGroup');
286
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteSecretGroup');
285
287
  var parameters = {
286
288
  options: {
287
289
  url: '/api/v1/secret_groups/{id}',
@@ -321,7 +323,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
321
323
  var _params = __assign({}, params);
322
324
  var _requiredParams = ['secretType', 'metadata', 'resources'];
323
325
  var _validParams = ['secretType', 'metadata', 'resources', 'headers'];
324
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
326
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
325
327
  if (_validationErrors) {
326
328
  return Promise.reject(_validationErrors);
327
329
  }
@@ -332,7 +334,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
332
334
  var path = {
333
335
  'secret_type': _params.secretType,
334
336
  };
335
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'createSecret');
337
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'createSecret');
336
338
  var parameters = {
337
339
  options: {
338
340
  url: '/api/v1/secrets/{secret_type}',
@@ -361,12 +363,12 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
361
363
  * resources.
362
364
  *
363
365
  * **Usage:** If you have 20 secrets in your instance, and you want to retrieve only the first 5 secrets, use
364
- * `../secrets/{secret-type}?limit=5`.
366
+ * `../secrets/{secret_type}?limit=5`.
365
367
  * @param {number} [params.offset] - The number of secrets to skip. By specifying `offset`, you retrieve a subset of
366
368
  * items that starts with the `offset` value. Use `offset` with `limit` to page through your available resources.
367
369
  *
368
370
  * **Usage:** If you have 100 secrets in your instance, and you want to retrieve secrets 26 through 50, use
369
- * `../secrets/{secret-type}?offset=25&limit=25`.
371
+ * `..?offset=25&limit=25`.
370
372
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
371
373
  * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.ListSecrets>>}
372
374
  */
@@ -374,7 +376,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
374
376
  var _params = __assign({}, params);
375
377
  var _requiredParams = ['secretType'];
376
378
  var _validParams = ['secretType', 'limit', 'offset', 'headers'];
377
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
379
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
378
380
  if (_validationErrors) {
379
381
  return Promise.reject(_validationErrors);
380
382
  }
@@ -385,7 +387,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
385
387
  var path = {
386
388
  'secret_type': _params.secretType,
387
389
  };
388
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'listSecrets');
390
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'listSecrets');
389
391
  var parameters = {
390
392
  options: {
391
393
  url: '/api/v1/secrets/{secret_type}',
@@ -412,28 +414,28 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
412
414
  * resources.
413
415
  *
414
416
  * **Usage:** If you have 20 secrets in your instance, and you want to retrieve only the first 5 secrets, use
415
- * `../secrets/{secret-type}?limit=5`.
417
+ * `../secrets/{secret_type}?limit=5`.
416
418
  * @param {number} [params.offset] - The number of secrets to skip. By specifying `offset`, you retrieve a subset of
417
419
  * items that starts with the `offset` value. Use `offset` with `limit` to page through your available resources.
418
420
  *
419
421
  * **Usage:** If you have 100 secrets in your instance, and you want to retrieve secrets 26 through 50, use
420
- * `../secrets/{secret-type}?offset=25&limit=25`.
422
+ * `..?offset=25&limit=25`.
421
423
  * @param {string} [params.search] - Filter secrets that contain the specified string. The fields that are searched
422
424
  * include: id, name, description, labels, secret_type.
423
425
  *
424
426
  * **Usage:** If you want to list only the secrets that contain the string "text", use
425
- * `../secrets/{secret-type}?search=text`.
427
+ * `../secrets/{secret_type}?search=text`.
426
428
  * @param {string} [params.sortBy] - Sort a list of secrets by the specified field.
427
429
  *
428
430
  * **Usage:** To sort a list of secrets by their creation date, use
429
- * `../secrets/{secret-type}?sort_by=creation_date`.
431
+ * `../secrets/{secret_type}?sort_by=creation_date`.
430
432
  * @param {string[]} [params.groups] - Filter secrets by groups.
431
433
  *
432
434
  * You can apply multiple filters by using a comma-separated list of secret group IDs. If you need to filter secrets
433
435
  * that are in the default secret group, use the `default` keyword.
434
436
  *
435
437
  * **Usage:** To retrieve a list of secrets that are associated with an existing secret group or the default group,
436
- * use `../secrets?groups={secret_group_ID},default`.
438
+ * use `..?groups={secret_group_ID},default`.
437
439
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
438
440
  * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.ListSecrets>>}
439
441
  */
@@ -441,7 +443,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
441
443
  var _params = __assign({}, params);
442
444
  var _requiredParams = [];
443
445
  var _validParams = ['limit', 'offset', 'search', 'sortBy', 'groups', 'headers'];
444
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
446
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
445
447
  if (_validationErrors) {
446
448
  return Promise.reject(_validationErrors);
447
449
  }
@@ -452,7 +454,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
452
454
  'sort_by': _params.sortBy,
453
455
  'groups': _params.groups,
454
456
  };
455
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'listAllSecrets');
457
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'listAllSecrets');
456
458
  var parameters = {
457
459
  options: {
458
460
  url: '/api/v1/secrets',
@@ -486,7 +488,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
486
488
  var _params = __assign({}, params);
487
489
  var _requiredParams = ['secretType', 'id'];
488
490
  var _validParams = ['secretType', 'id', 'headers'];
489
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
491
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
490
492
  if (_validationErrors) {
491
493
  return Promise.reject(_validationErrors);
492
494
  }
@@ -494,7 +496,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
494
496
  'secret_type': _params.secretType,
495
497
  'id': _params.id,
496
498
  };
497
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getSecret');
499
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getSecret');
498
500
  var parameters = {
499
501
  options: {
500
502
  url: '/api/v1/secrets/{secret_type}/{id}',
@@ -518,6 +520,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
518
520
  * - `restore`: Restore a previous version of an `iam_credentials` secret.
519
521
  * - `revoke`: Revoke a private certificate.
520
522
  * - `delete_credentials`: Delete the API key that is associated with an `iam_credentials` secret.
523
+ * - `validate_dns_challenge`: Validate challenge for public certificate order with manual dns provider.
521
524
  *
522
525
  * @param {Object} params - The parameters to send to the service.
523
526
  * @param {string} params.secretType - The secret type.
@@ -531,7 +534,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
531
534
  var _params = __assign({}, params);
532
535
  var _requiredParams = ['secretType', 'id', 'action'];
533
536
  var _validParams = ['secretType', 'id', 'action', 'secretAction', 'headers'];
534
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
537
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
535
538
  if (_validationErrors) {
536
539
  return Promise.reject(_validationErrors);
537
540
  }
@@ -543,7 +546,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
543
546
  'secret_type': _params.secretType,
544
547
  'id': _params.id,
545
548
  };
546
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'updateSecret');
549
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'updateSecret');
547
550
  var parameters = {
548
551
  options: {
549
552
  url: '/api/v1/secrets/{secret_type}/{id}',
@@ -576,7 +579,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
576
579
  var _params = __assign({}, params);
577
580
  var _requiredParams = ['secretType', 'id'];
578
581
  var _validParams = ['secretType', 'id', 'headers'];
579
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
582
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
580
583
  if (_validationErrors) {
581
584
  return Promise.reject(_validationErrors);
582
585
  }
@@ -584,7 +587,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
584
587
  'secret_type': _params.secretType,
585
588
  'id': _params.id,
586
589
  };
587
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteSecret');
590
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteSecret');
588
591
  var parameters = {
589
592
  options: {
590
593
  url: '/api/v1/secrets/{secret_type}/{id}',
@@ -614,7 +617,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
614
617
  var _params = __assign({}, params);
615
618
  var _requiredParams = ['secretType', 'id'];
616
619
  var _validParams = ['secretType', 'id', 'headers'];
617
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
620
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
618
621
  if (_validationErrors) {
619
622
  return Promise.reject(_validationErrors);
620
623
  }
@@ -622,7 +625,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
622
625
  'secret_type': _params.secretType,
623
626
  'id': _params.id,
624
627
  };
625
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'listSecretVersions');
628
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'listSecretVersions');
626
629
  var parameters = {
627
630
  options: {
628
631
  url: '/api/v1/secrets/{secret_type}/{id}/versions',
@@ -660,7 +663,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
660
663
  var _params = __assign({}, params);
661
664
  var _requiredParams = ['secretType', 'id', 'versionId'];
662
665
  var _validParams = ['secretType', 'id', 'versionId', 'headers'];
663
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
666
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
664
667
  if (_validationErrors) {
665
668
  return Promise.reject(_validationErrors);
666
669
  }
@@ -669,7 +672,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
669
672
  'id': _params.id,
670
673
  'version_id': _params.versionId,
671
674
  };
672
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getSecretVersion');
675
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getSecretVersion');
673
676
  var parameters = {
674
677
  options: {
675
678
  url: '/api/v1/secrets/{secret_type}/{id}/versions/{version_id}',
@@ -707,7 +710,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
707
710
  var _params = __assign({}, params);
708
711
  var _requiredParams = ['secretType', 'id', 'versionId', 'action'];
709
712
  var _validParams = ['secretType', 'id', 'versionId', 'action', 'headers'];
710
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
713
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
711
714
  if (_validationErrors) {
712
715
  return Promise.reject(_validationErrors);
713
716
  }
@@ -719,7 +722,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
719
722
  'id': _params.id,
720
723
  'version_id': _params.versionId,
721
724
  };
722
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'updateSecretVersion');
725
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'updateSecretVersion');
723
726
  var parameters = {
724
727
  options: {
725
728
  url: '/api/v1/secrets/{secret_type}/{id}/versions/{version_id}',
@@ -736,7 +739,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
736
739
  return this.createRequest(parameters);
737
740
  };
738
741
  /**
739
- * Get secret version metadata.
742
+ * Get the metadata of a secret version.
740
743
  *
741
744
  * Get the metadata of a secret version by specifying the ID of the version or the alias `previous`.
742
745
  *
@@ -757,7 +760,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
757
760
  var _params = __assign({}, params);
758
761
  var _requiredParams = ['secretType', 'id', 'versionId'];
759
762
  var _validParams = ['secretType', 'id', 'versionId', 'headers'];
760
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
763
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
761
764
  if (_validationErrors) {
762
765
  return Promise.reject(_validationErrors);
763
766
  }
@@ -766,7 +769,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
766
769
  'id': _params.id,
767
770
  'version_id': _params.versionId,
768
771
  };
769
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getSecretVersionMetadata');
772
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getSecretVersionMetadata');
770
773
  var parameters = {
771
774
  options: {
772
775
  url: '/api/v1/secrets/{secret_type}/{id}/versions/{version_id}/metadata',
@@ -782,7 +785,59 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
782
785
  return this.createRequest(parameters);
783
786
  };
784
787
  /**
785
- * Get secret metadata.
788
+ * Update the metadata of a secret version.
789
+ *
790
+ * Update the metadata of a secret version, such as `version_custom_metadata`.
791
+ *
792
+ * @param {Object} params - The parameters to send to the service.
793
+ * @param {string} params.secretType - The secret type.
794
+ * @param {string} params.id - The v4 UUID that uniquely identifies the secret.
795
+ * @param {string} params.versionId - The v4 UUID that uniquely identifies the secret version. You can also use
796
+ * `previous` to retrieve the previous version.
797
+ *
798
+ * **Note:** To find the version ID of a secret, use the [Get secret metadata](#get-secret-metadata) method and check
799
+ * the response details.
800
+ * @param {CollectionMetadata} params.metadata - The metadata that describes the resource array.
801
+ * @param {UpdateSecretVersionMetadata[]} params.resources - A collection of resources.
802
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
803
+ * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.GetSecretVersionMetadata>>}
804
+ */
805
+ SecretsManagerV1.prototype.updateSecretVersionMetadata = function (params) {
806
+ var _params = __assign({}, params);
807
+ var _requiredParams = ['secretType', 'id', 'versionId', 'metadata', 'resources'];
808
+ var _validParams = ['secretType', 'id', 'versionId', 'metadata', 'resources', 'headers'];
809
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
810
+ if (_validationErrors) {
811
+ return Promise.reject(_validationErrors);
812
+ }
813
+ var body = {
814
+ 'metadata': _params.metadata,
815
+ 'resources': _params.resources,
816
+ };
817
+ var path = {
818
+ 'secret_type': _params.secretType,
819
+ 'id': _params.id,
820
+ 'version_id': _params.versionId,
821
+ };
822
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'updateSecretVersionMetadata');
823
+ var parameters = {
824
+ options: {
825
+ url: '/api/v1/secrets/{secret_type}/{id}/versions/{version_id}/metadata',
826
+ method: 'PUT',
827
+ body: body,
828
+ path: path,
829
+ },
830
+ defaultOptions: extend(true, {}, this.baseOptions, {
831
+ headers: extend(true, sdkHeaders, {
832
+ 'Accept': 'application/json',
833
+ 'Content-Type': 'application/json',
834
+ }, _params.headers),
835
+ }),
836
+ };
837
+ return this.createRequest(parameters);
838
+ };
839
+ /**
840
+ * Get the metadata of a secret.
786
841
  *
787
842
  * Get the details of a secret by specifying its ID.
788
843
  *
@@ -799,7 +854,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
799
854
  var _params = __assign({}, params);
800
855
  var _requiredParams = ['secretType', 'id'];
801
856
  var _validParams = ['secretType', 'id', 'headers'];
802
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
857
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
803
858
  if (_validationErrors) {
804
859
  return Promise.reject(_validationErrors);
805
860
  }
@@ -807,7 +862,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
807
862
  'secret_type': _params.secretType,
808
863
  'id': _params.id,
809
864
  };
810
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getSecretMetadata');
865
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getSecretMetadata');
811
866
  var parameters = {
812
867
  options: {
813
868
  url: '/api/v1/secrets/{secret_type}/{id}/metadata',
@@ -842,7 +897,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
842
897
  var _params = __assign({}, params);
843
898
  var _requiredParams = ['secretType', 'id', 'metadata', 'resources'];
844
899
  var _validParams = ['secretType', 'id', 'metadata', 'resources', 'headers'];
845
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
900
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
846
901
  if (_validationErrors) {
847
902
  return Promise.reject(_validationErrors);
848
903
  }
@@ -854,7 +909,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
854
909
  'secret_type': _params.secretType,
855
910
  'id': _params.id,
856
911
  };
857
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'updateSecretMetadata');
912
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'updateSecretMetadata');
858
913
  var parameters = {
859
914
  options: {
860
915
  url: '/api/v1/secrets/{secret_type}/{id}/metadata',
@@ -871,6 +926,441 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
871
926
  };
872
927
  return this.createRequest(parameters);
873
928
  };
929
+ /*************************
930
+ * locks
931
+ ************************/
932
+ /**
933
+ * List secret locks.
934
+ *
935
+ * List the locks that are associated with a specified secret.
936
+ *
937
+ * @param {Object} params - The parameters to send to the service.
938
+ * @param {string} params.secretType - The secret type.
939
+ * @param {string} params.id - The v4 UUID that uniquely identifies the secret.
940
+ * @param {number} [params.limit] - The number of locks to retrieve. By default, list operations return the first 25
941
+ * items. To retrieve a different set of items, use `limit` with `offset` to page through your available resources.
942
+ *
943
+ * **Usage:** If you have 20 locks associated with your secret, and you want to retrieve only the first 5 locks, use
944
+ * `..?limit=5`.
945
+ * @param {number} [params.offset] - The number of locks to skip. By specifying `offset`, you retrieve a subset of
946
+ * items that starts with the `offset` value. Use `offset` with `limit` to page through your available resources.
947
+ *
948
+ * **Usage:** If you have 100 locks on your secret, and you want to retrieve locks 26 through 50, use
949
+ * `..?offset=25&limit=25`.
950
+ * @param {string} [params.search] - Filter locks that contain the specified string in the field "name".
951
+ *
952
+ * **Usage:** If you want to list only the locks that contain the string "text" in the field "name", use
953
+ * `..?search=text`.
954
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
955
+ * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.ListSecretLocks>>}
956
+ */
957
+ SecretsManagerV1.prototype.getLocks = function (params) {
958
+ var _params = __assign({}, params);
959
+ var _requiredParams = ['secretType', 'id'];
960
+ var _validParams = ['secretType', 'id', 'limit', 'offset', 'search', 'headers'];
961
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
962
+ if (_validationErrors) {
963
+ return Promise.reject(_validationErrors);
964
+ }
965
+ var query = {
966
+ 'limit': _params.limit,
967
+ 'offset': _params.offset,
968
+ 'search': _params.search,
969
+ };
970
+ var path = {
971
+ 'secret_type': _params.secretType,
972
+ 'id': _params.id,
973
+ };
974
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getLocks');
975
+ var parameters = {
976
+ options: {
977
+ url: '/api/v1/locks/{secret_type}/{id}',
978
+ method: 'GET',
979
+ qs: query,
980
+ path: path,
981
+ },
982
+ defaultOptions: extend(true, {}, this.baseOptions, {
983
+ headers: extend(true, sdkHeaders, {
984
+ 'Accept': 'application/json',
985
+ }, _params.headers),
986
+ }),
987
+ };
988
+ return this.createRequest(parameters);
989
+ };
990
+ /**
991
+ * Lock a secret.
992
+ *
993
+ * Create a lock on the current version of a secret.
994
+ *
995
+ * A lock can be used to prevent a secret from being deleted or modified while it's in use by your applications. A
996
+ * successful request attaches a new lock to your secret, or replaces a lock of the same name if it already exists.
997
+ * Additionally, you can use this method to clear any matching locks on a secret by using one of the following
998
+ * optional lock modes:
999
+ *
1000
+ * - `exclusive`: Removes any other locks with matching names if they are found in the previous version of the secret.
1001
+ * - `exclusive_delete`: Same as `exclusive`, but also permanently deletes the data of the previous secret version if
1002
+ * it doesn't have any locks.
1003
+ *
1004
+ * For more information about locking secrets, check out the
1005
+ * [docs](https://cloud.ibm.com/docs/secrets-manager?topic=secrets-manager-secret-locks).
1006
+ *
1007
+ * @param {Object} params - The parameters to send to the service.
1008
+ * @param {string} params.secretType - The secret type.
1009
+ * @param {string} params.id - The v4 UUID that uniquely identifies the secret.
1010
+ * @param {LockSecretBodyLocksItem[]} [params.locks] - The lock data to be attached to a secret version.
1011
+ * @param {string} [params.mode] - An optional lock mode. At lock creation, you can set one of the following modes to
1012
+ * clear any matching locks on a secret version. Note: When you are locking the `previous` version, the mode parameter
1013
+ * is ignored.
1014
+ *
1015
+ * - `exclusive`: Removes any other locks with matching names if they are found in the previous version of the secret.
1016
+ * - `exclusive_delete`: Same as `exclusive`, but also permanently deletes the data of the previous secret version if
1017
+ * it doesn't have any locks.
1018
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1019
+ * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.GetSecretLocks>>}
1020
+ */
1021
+ SecretsManagerV1.prototype.lockSecret = function (params) {
1022
+ var _params = __assign({}, params);
1023
+ var _requiredParams = ['secretType', 'id'];
1024
+ var _validParams = ['secretType', 'id', 'locks', 'mode', 'headers'];
1025
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1026
+ if (_validationErrors) {
1027
+ return Promise.reject(_validationErrors);
1028
+ }
1029
+ var body = {
1030
+ 'locks': _params.locks,
1031
+ };
1032
+ var query = {
1033
+ 'mode': _params.mode,
1034
+ };
1035
+ var path = {
1036
+ 'secret_type': _params.secretType,
1037
+ 'id': _params.id,
1038
+ };
1039
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'lockSecret');
1040
+ var parameters = {
1041
+ options: {
1042
+ url: '/api/v1/locks/{secret_type}/{id}/lock',
1043
+ method: 'POST',
1044
+ body: body,
1045
+ qs: query,
1046
+ path: path,
1047
+ },
1048
+ defaultOptions: extend(true, {}, this.baseOptions, {
1049
+ headers: extend(true, sdkHeaders, {
1050
+ 'Accept': 'application/json',
1051
+ 'Content-Type': 'application/json',
1052
+ }, _params.headers),
1053
+ }),
1054
+ };
1055
+ return this.createRequest(parameters);
1056
+ };
1057
+ /**
1058
+ * Unlock a secret.
1059
+ *
1060
+ * Delete one or more locks that are associated with the current version of a secret.
1061
+ *
1062
+ * A successful request deletes the locks that you specify. To remove all locks, you can pass `{"locks": ["*"]}` in in
1063
+ * the request body. Otherwise, specify the names of the locks that you want to delete. For example, `{"locks":
1064
+ * ["lock1", "lock2"]}`.
1065
+ *
1066
+ * **Note:** A secret is considered unlocked and able to be revoked or deleted only after all of its locks are
1067
+ * removed. To understand whether a secret contains locks, check the `locks_total` field that is returned as part of
1068
+ * the metadata of your secret.
1069
+ *
1070
+ * @param {Object} params - The parameters to send to the service.
1071
+ * @param {string} params.secretType - The secret type.
1072
+ * @param {string} params.id - The v4 UUID that uniquely identifies the secret.
1073
+ * @param {string[]} [params.locks] - A comma-separated list of locks to delete.
1074
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1075
+ * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.GetSecretLocks>>}
1076
+ */
1077
+ SecretsManagerV1.prototype.unlockSecret = function (params) {
1078
+ var _params = __assign({}, params);
1079
+ var _requiredParams = ['secretType', 'id'];
1080
+ var _validParams = ['secretType', 'id', 'locks', 'headers'];
1081
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1082
+ if (_validationErrors) {
1083
+ return Promise.reject(_validationErrors);
1084
+ }
1085
+ var body = {
1086
+ 'locks': _params.locks,
1087
+ };
1088
+ var path = {
1089
+ 'secret_type': _params.secretType,
1090
+ 'id': _params.id,
1091
+ };
1092
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'unlockSecret');
1093
+ var parameters = {
1094
+ options: {
1095
+ url: '/api/v1/locks/{secret_type}/{id}/unlock',
1096
+ method: 'POST',
1097
+ body: body,
1098
+ path: path,
1099
+ },
1100
+ defaultOptions: extend(true, {}, this.baseOptions, {
1101
+ headers: extend(true, sdkHeaders, {
1102
+ 'Accept': 'application/json',
1103
+ 'Content-Type': 'application/json',
1104
+ }, _params.headers),
1105
+ }),
1106
+ };
1107
+ return this.createRequest(parameters);
1108
+ };
1109
+ /**
1110
+ * List secret version locks.
1111
+ *
1112
+ * List the locks that are associated with a specified secret version.
1113
+ *
1114
+ * @param {Object} params - The parameters to send to the service.
1115
+ * @param {string} params.secretType - The secret type.
1116
+ * @param {string} params.id - The v4 UUID that uniquely identifies the secret.
1117
+ * @param {string} params.versionId - The v4 UUID that uniquely identifies the secret version. You can also use
1118
+ * `previous` to retrieve the previous version.
1119
+ *
1120
+ * **Note:** To find the version ID of a secret, use the [Get secret metadata](#get-secret-metadata) method and check
1121
+ * the response details.
1122
+ * @param {number} [params.limit] - The number of locks to retrieve. By default, list operations return the first 25
1123
+ * items. To retrieve a different set of items, use `limit` with `offset` to page through your available resources.
1124
+ *
1125
+ * **Usage:** If you have 20 locks associated with your secret, and you want to retrieve only the first 5 locks, use
1126
+ * `..?limit=5`.
1127
+ * @param {number} [params.offset] - The number of locks to skip. By specifying `offset`, you retrieve a subset of
1128
+ * items that starts with the `offset` value. Use `offset` with `limit` to page through your available resources.
1129
+ *
1130
+ * **Usage:** If you have 100 locks on your secret, and you want to retrieve locks 26 through 50, use
1131
+ * `..?offset=25&limit=25`.
1132
+ * @param {string} [params.search] - Filter locks that contain the specified string in the field "name".
1133
+ *
1134
+ * **Usage:** If you want to list only the locks that contain the string "text" in the field "name", use
1135
+ * `..?search=text`.
1136
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1137
+ * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.ListSecretLocks>>}
1138
+ */
1139
+ SecretsManagerV1.prototype.getSecretVersionLocks = function (params) {
1140
+ var _params = __assign({}, params);
1141
+ var _requiredParams = ['secretType', 'id', 'versionId'];
1142
+ var _validParams = ['secretType', 'id', 'versionId', 'limit', 'offset', 'search', 'headers'];
1143
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1144
+ if (_validationErrors) {
1145
+ return Promise.reject(_validationErrors);
1146
+ }
1147
+ var query = {
1148
+ 'limit': _params.limit,
1149
+ 'offset': _params.offset,
1150
+ 'search': _params.search,
1151
+ };
1152
+ var path = {
1153
+ 'secret_type': _params.secretType,
1154
+ 'id': _params.id,
1155
+ 'version_id': _params.versionId,
1156
+ };
1157
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getSecretVersionLocks');
1158
+ var parameters = {
1159
+ options: {
1160
+ url: '/api/v1/locks/{secret_type}/{id}/versions/{version_id}',
1161
+ method: 'GET',
1162
+ qs: query,
1163
+ path: path,
1164
+ },
1165
+ defaultOptions: extend(true, {}, this.baseOptions, {
1166
+ headers: extend(true, sdkHeaders, {
1167
+ 'Accept': 'application/json',
1168
+ }, _params.headers),
1169
+ }),
1170
+ };
1171
+ return this.createRequest(parameters);
1172
+ };
1173
+ /**
1174
+ * Lock a secret version.
1175
+ *
1176
+ * Create a lock on the specified version of a secret.
1177
+ *
1178
+ * A lock can be used to prevent a secret from being deleted or modified while it's in use by your applications. A
1179
+ * successful request attaches a new lock to the specified version, or replaces a lock of the same name if it already
1180
+ * exists. Additionally, you can use this method to clear any matching locks on a secret version by using one of the
1181
+ * following optional lock modes:
1182
+ *
1183
+ * - `exclusive`: Removes any other locks with matching names if they are found in the previous version of the secret.
1184
+ * - `exclusive_delete`: Same as `exclusive`, but also permanently deletes the data of the previous secret version if
1185
+ * it doesn't have any locks.
1186
+ *
1187
+ * For more information about locking secrets, check out the
1188
+ * [docs](https://cloud.ibm.com/docs/secrets-manager?topic=secrets-manager-secret-locks).
1189
+ *
1190
+ * @param {Object} params - The parameters to send to the service.
1191
+ * @param {string} params.secretType - The secret type.
1192
+ * @param {string} params.id - The v4 UUID that uniquely identifies the secret.
1193
+ * @param {string} params.versionId - The v4 UUID that uniquely identifies the secret version. You can also use
1194
+ * `previous` to retrieve the previous version.
1195
+ *
1196
+ * **Note:** To find the version ID of a secret, use the [Get secret metadata](#get-secret-metadata) method and check
1197
+ * the response details.
1198
+ * @param {LockSecretBodyLocksItem[]} [params.locks] - The lock data to be attached to a secret version.
1199
+ * @param {string} [params.mode] - An optional lock mode. At lock creation, you can set one of the following modes to
1200
+ * clear any matching locks on a secret version. Note: When you are locking the `previous` version, the mode parameter
1201
+ * is ignored.
1202
+ *
1203
+ * - `exclusive`: Removes any other locks with matching names if they are found in the previous version of the secret.
1204
+ * - `exclusive_delete`: Same as `exclusive`, but also permanently deletes the data of the previous secret version if
1205
+ * it doesn't have any locks.
1206
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1207
+ * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.GetSecretLocks>>}
1208
+ */
1209
+ SecretsManagerV1.prototype.lockSecretVersion = function (params) {
1210
+ var _params = __assign({}, params);
1211
+ var _requiredParams = ['secretType', 'id', 'versionId'];
1212
+ var _validParams = ['secretType', 'id', 'versionId', 'locks', 'mode', 'headers'];
1213
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1214
+ if (_validationErrors) {
1215
+ return Promise.reject(_validationErrors);
1216
+ }
1217
+ var body = {
1218
+ 'locks': _params.locks,
1219
+ };
1220
+ var query = {
1221
+ 'mode': _params.mode,
1222
+ };
1223
+ var path = {
1224
+ 'secret_type': _params.secretType,
1225
+ 'id': _params.id,
1226
+ 'version_id': _params.versionId,
1227
+ };
1228
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'lockSecretVersion');
1229
+ var parameters = {
1230
+ options: {
1231
+ url: '/api/v1/locks/{secret_type}/{id}/versions/{version_id}/lock',
1232
+ method: 'POST',
1233
+ body: body,
1234
+ qs: query,
1235
+ path: path,
1236
+ },
1237
+ defaultOptions: extend(true, {}, this.baseOptions, {
1238
+ headers: extend(true, sdkHeaders, {
1239
+ 'Accept': 'application/json',
1240
+ 'Content-Type': 'application/json',
1241
+ }, _params.headers),
1242
+ }),
1243
+ };
1244
+ return this.createRequest(parameters);
1245
+ };
1246
+ /**
1247
+ * Unlock a secret version.
1248
+ *
1249
+ * Delete one or more locks that are associated with the specified secret version.
1250
+ *
1251
+ * A successful request deletes the locks that you specify. To remove all locks, you can pass `{"locks": ["*"]}` in in
1252
+ * the request body. Otherwise, specify the names of the locks that you want to delete. For example, `{"locks":
1253
+ * ["lock-1", "lock-2"]}`.
1254
+ *
1255
+ * **Note:** A secret is considered unlocked and able to be revoked or deleted only after all of its locks are
1256
+ * removed. To understand whether a secret contains locks, check the `locks_total` field that is returned as part of
1257
+ * the metadata of your secret.
1258
+ *
1259
+ * @param {Object} params - The parameters to send to the service.
1260
+ * @param {string} params.secretType - The secret type.
1261
+ * @param {string} params.id - The v4 UUID that uniquely identifies the secret.
1262
+ * @param {string} params.versionId - The v4 UUID that uniquely identifies the secret version. You can also use
1263
+ * `previous` to retrieve the previous version.
1264
+ *
1265
+ * **Note:** To find the version ID of a secret, use the [Get secret metadata](#get-secret-metadata) method and check
1266
+ * the response details.
1267
+ * @param {string[]} [params.locks] - A comma-separated list of locks to delete.
1268
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1269
+ * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.GetSecretLocks>>}
1270
+ */
1271
+ SecretsManagerV1.prototype.unlockSecretVersion = function (params) {
1272
+ var _params = __assign({}, params);
1273
+ var _requiredParams = ['secretType', 'id', 'versionId'];
1274
+ var _validParams = ['secretType', 'id', 'versionId', 'locks', 'headers'];
1275
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1276
+ if (_validationErrors) {
1277
+ return Promise.reject(_validationErrors);
1278
+ }
1279
+ var body = {
1280
+ 'locks': _params.locks,
1281
+ };
1282
+ var path = {
1283
+ 'secret_type': _params.secretType,
1284
+ 'id': _params.id,
1285
+ 'version_id': _params.versionId,
1286
+ };
1287
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'unlockSecretVersion');
1288
+ var parameters = {
1289
+ options: {
1290
+ url: '/api/v1/locks/{secret_type}/{id}/versions/{version_id}/unlock',
1291
+ method: 'POST',
1292
+ body: body,
1293
+ path: path,
1294
+ },
1295
+ defaultOptions: extend(true, {}, this.baseOptions, {
1296
+ headers: extend(true, sdkHeaders, {
1297
+ 'Accept': 'application/json',
1298
+ 'Content-Type': 'application/json',
1299
+ }, _params.headers),
1300
+ }),
1301
+ };
1302
+ return this.createRequest(parameters);
1303
+ };
1304
+ /**
1305
+ * List all secrets and locks.
1306
+ *
1307
+ * List the lock details that are associated with all secrets in your Secrets Manager instance.
1308
+ *
1309
+ * @param {Object} [params] - The parameters to send to the service.
1310
+ * @param {number} [params.limit] - The number of secrets with associated locks to retrieve. By default, list
1311
+ * operations return the first 25 items. To retrieve a different set of items, use `limit` with `offset` to page
1312
+ * through your available resources.
1313
+ *
1314
+ * **Usage:** If you have 20 secrets in your instance, and you want to retrieve only the first 5, use
1315
+ * `..?limit=5`.
1316
+ * @param {number} [params.offset] - The number of secrets to skip. By specifying `offset`, you retrieve a subset of
1317
+ * items that starts with the `offset` value. Use `offset` with `limit` to page through your available resources.
1318
+ *
1319
+ * **Usage:** If you have 100 secrets in your instance, and you want to retrieve secrets 26 through 50, use
1320
+ * `..?offset=25&limit=25`.
1321
+ * @param {string} [params.search] - Filter locks that contain the specified string in the field "name".
1322
+ *
1323
+ * **Usage:** If you want to list only the locks that contain the string "text" in the field "name", use
1324
+ * `..?search=text`.
1325
+ * @param {string[]} [params.groups] - Filter secrets by groups.
1326
+ *
1327
+ * You can apply multiple filters by using a comma-separated list of secret group IDs. If you need to filter secrets
1328
+ * that are in the default secret group, use the `default` keyword.
1329
+ *
1330
+ * **Usage:** To retrieve a list of secrets that are associated with an existing secret group or the default group,
1331
+ * use `..?groups={secret_group_ID},default`.
1332
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1333
+ * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.GetInstanceLocks>>}
1334
+ */
1335
+ SecretsManagerV1.prototype.listInstanceSecretsLocks = function (params) {
1336
+ var _params = __assign({}, params);
1337
+ var _requiredParams = [];
1338
+ var _validParams = ['limit', 'offset', 'search', 'groups', 'headers'];
1339
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1340
+ if (_validationErrors) {
1341
+ return Promise.reject(_validationErrors);
1342
+ }
1343
+ var query = {
1344
+ 'limit': _params.limit,
1345
+ 'offset': _params.offset,
1346
+ 'search': _params.search,
1347
+ 'groups': _params.groups,
1348
+ };
1349
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'listInstanceSecretsLocks');
1350
+ var parameters = {
1351
+ options: {
1352
+ url: '/api/v1/locks',
1353
+ method: 'GET',
1354
+ qs: query,
1355
+ },
1356
+ defaultOptions: extend(true, {}, this.baseOptions, {
1357
+ headers: extend(true, sdkHeaders, {
1358
+ 'Accept': 'application/json',
1359
+ }, _params.headers),
1360
+ }),
1361
+ };
1362
+ return this.createRequest(parameters);
1363
+ };
874
1364
  /*************************
875
1365
  * policies
876
1366
  ************************/
@@ -894,7 +1384,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
894
1384
  var _params = __assign({}, params);
895
1385
  var _requiredParams = ['secretType', 'id', 'metadata', 'resources'];
896
1386
  var _validParams = ['secretType', 'id', 'metadata', 'resources', 'policy', 'headers'];
897
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1387
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
898
1388
  if (_validationErrors) {
899
1389
  return Promise.reject(_validationErrors);
900
1390
  }
@@ -909,7 +1399,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
909
1399
  'secret_type': _params.secretType,
910
1400
  'id': _params.id,
911
1401
  };
912
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'putPolicy');
1402
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'putPolicy');
913
1403
  var parameters = {
914
1404
  options: {
915
1405
  url: '/api/v1/secrets/{secret_type}/{id}/policies',
@@ -943,7 +1433,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
943
1433
  var _params = __assign({}, params);
944
1434
  var _requiredParams = ['secretType', 'id'];
945
1435
  var _validParams = ['secretType', 'id', 'policy', 'headers'];
946
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1436
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
947
1437
  if (_validationErrors) {
948
1438
  return Promise.reject(_validationErrors);
949
1439
  }
@@ -954,7 +1444,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
954
1444
  'secret_type': _params.secretType,
955
1445
  'id': _params.id,
956
1446
  };
957
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getPolicy');
1447
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getPolicy');
958
1448
  var parameters = {
959
1449
  options: {
960
1450
  url: '/api/v1/secrets/{secret_type}/{id}/policies',
@@ -992,7 +1482,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
992
1482
  var _params = __assign({}, params);
993
1483
  var _requiredParams = ['secretType', 'engineConfig'];
994
1484
  var _validParams = ['secretType', 'engineConfig', 'headers'];
995
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1485
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
996
1486
  if (_validationErrors) {
997
1487
  return Promise.reject(_validationErrors);
998
1488
  }
@@ -1000,7 +1490,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1000
1490
  var path = {
1001
1491
  'secret_type': _params.secretType,
1002
1492
  };
1003
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'putConfig');
1493
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'putConfig');
1004
1494
  var parameters = {
1005
1495
  options: {
1006
1496
  url: '/api/v1/config/{secret_type}',
@@ -1030,14 +1520,14 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1030
1520
  var _params = __assign({}, params);
1031
1521
  var _requiredParams = ['secretType'];
1032
1522
  var _validParams = ['secretType', 'headers'];
1033
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1523
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1034
1524
  if (_validationErrors) {
1035
1525
  return Promise.reject(_validationErrors);
1036
1526
  }
1037
1527
  var path = {
1038
1528
  'secret_type': _params.secretType,
1039
1529
  };
1040
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getConfig');
1530
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getConfig');
1041
1531
  var parameters = {
1042
1532
  options: {
1043
1533
  url: '/api/v1/config/{secret_type}',
@@ -1082,7 +1572,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1082
1572
  var _params = __assign({}, params);
1083
1573
  var _requiredParams = ['secretType', 'configElement', 'name', 'type', 'config'];
1084
1574
  var _validParams = ['secretType', 'configElement', 'name', 'type', 'config', 'headers'];
1085
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1575
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1086
1576
  if (_validationErrors) {
1087
1577
  return Promise.reject(_validationErrors);
1088
1578
  }
@@ -1095,7 +1585,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1095
1585
  'secret_type': _params.secretType,
1096
1586
  'config_element': _params.configElement,
1097
1587
  };
1098
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'createConfigElement');
1588
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'createConfigElement');
1099
1589
  var parameters = {
1100
1590
  options: {
1101
1591
  url: '/api/v1/config/{secret_type}/{config_element}',
@@ -1127,7 +1617,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1127
1617
  var _params = __assign({}, params);
1128
1618
  var _requiredParams = ['secretType', 'configElement'];
1129
1619
  var _validParams = ['secretType', 'configElement', 'headers'];
1130
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1620
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1131
1621
  if (_validationErrors) {
1132
1622
  return Promise.reject(_validationErrors);
1133
1623
  }
@@ -1135,7 +1625,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1135
1625
  'secret_type': _params.secretType,
1136
1626
  'config_element': _params.configElement,
1137
1627
  };
1138
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getConfigElements');
1628
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getConfigElements');
1139
1629
  var parameters = {
1140
1630
  options: {
1141
1631
  url: '/api/v1/config/{secret_type}/{config_element}',
@@ -1166,7 +1656,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1166
1656
  var _params = __assign({}, params);
1167
1657
  var _requiredParams = ['secretType', 'configElement', 'configName'];
1168
1658
  var _validParams = ['secretType', 'configElement', 'configName', 'headers'];
1169
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1659
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1170
1660
  if (_validationErrors) {
1171
1661
  return Promise.reject(_validationErrors);
1172
1662
  }
@@ -1175,7 +1665,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1175
1665
  'config_element': _params.configElement,
1176
1666
  'config_name': _params.configName,
1177
1667
  };
1178
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getConfigElement');
1668
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getConfigElement');
1179
1669
  var parameters = {
1180
1670
  options: {
1181
1671
  url: '/api/v1/config/{secret_type}/{config_element}/{config_name}',
@@ -1209,7 +1699,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1209
1699
  var _params = __assign({}, params);
1210
1700
  var _requiredParams = ['secretType', 'configElement', 'configName', 'type', 'config'];
1211
1701
  var _validParams = ['secretType', 'configElement', 'configName', 'type', 'config', 'headers'];
1212
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1702
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1213
1703
  if (_validationErrors) {
1214
1704
  return Promise.reject(_validationErrors);
1215
1705
  }
@@ -1222,7 +1712,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1222
1712
  'config_element': _params.configElement,
1223
1713
  'config_name': _params.configName,
1224
1714
  };
1225
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'updateConfigElement');
1715
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'updateConfigElement');
1226
1716
  var parameters = {
1227
1717
  options: {
1228
1718
  url: '/api/v1/config/{secret_type}/{config_element}/{config_name}',
@@ -1270,7 +1760,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1270
1760
  'config',
1271
1761
  'headers',
1272
1762
  ];
1273
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1763
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1274
1764
  if (_validationErrors) {
1275
1765
  return Promise.reject(_validationErrors);
1276
1766
  }
@@ -1285,7 +1775,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1285
1775
  'config_element': _params.configElement,
1286
1776
  'config_name': _params.configName,
1287
1777
  };
1288
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'actionOnConfigElement');
1778
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'actionOnConfigElement');
1289
1779
  var parameters = {
1290
1780
  options: {
1291
1781
  url: '/api/v1/config/{secret_type}/{config_element}/{config_name}',
@@ -1319,7 +1809,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1319
1809
  var _params = __assign({}, params);
1320
1810
  var _requiredParams = ['secretType', 'configElement', 'configName'];
1321
1811
  var _validParams = ['secretType', 'configElement', 'configName', 'headers'];
1322
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1812
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1323
1813
  if (_validationErrors) {
1324
1814
  return Promise.reject(_validationErrors);
1325
1815
  }
@@ -1328,7 +1818,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1328
1818
  'config_element': _params.configElement,
1329
1819
  'config_name': _params.configName,
1330
1820
  };
1331
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteConfigElement');
1821
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteConfigElement');
1332
1822
  var parameters = {
1333
1823
  options: {
1334
1824
  url: '/api/v1/config/{secret_type}/{config_element}/{config_name}',
@@ -1373,7 +1863,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1373
1863
  'eventNotificationsSourceDescription',
1374
1864
  'headers',
1375
1865
  ];
1376
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1866
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1377
1867
  if (_validationErrors) {
1378
1868
  return Promise.reject(_validationErrors);
1379
1869
  }
@@ -1382,7 +1872,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1382
1872
  'event_notifications_source_name': _params.eventNotificationsSourceName,
1383
1873
  'event_notifications_source_description': _params.eventNotificationsSourceDescription,
1384
1874
  };
1385
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'createNotificationsRegistration');
1875
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'createNotificationsRegistration');
1386
1876
  var parameters = {
1387
1877
  options: {
1388
1878
  url: '/api/v1/notifications/registration',
@@ -1411,11 +1901,11 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1411
1901
  var _params = __assign({}, params);
1412
1902
  var _requiredParams = [];
1413
1903
  var _validParams = ['headers'];
1414
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1904
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1415
1905
  if (_validationErrors) {
1416
1906
  return Promise.reject(_validationErrors);
1417
1907
  }
1418
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getNotificationsRegistration');
1908
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getNotificationsRegistration');
1419
1909
  var parameters = {
1420
1910
  options: {
1421
1911
  url: '/api/v1/notifications/registration',
@@ -1444,11 +1934,11 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1444
1934
  var _params = __assign({}, params);
1445
1935
  var _requiredParams = [];
1446
1936
  var _validParams = ['headers'];
1447
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1937
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1448
1938
  if (_validationErrors) {
1449
1939
  return Promise.reject(_validationErrors);
1450
1940
  }
1451
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteNotificationsRegistration');
1941
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteNotificationsRegistration');
1452
1942
  var parameters = {
1453
1943
  options: {
1454
1944
  url: '/api/v1/notifications/registration',
@@ -1478,11 +1968,11 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1478
1968
  var _params = __assign({}, params);
1479
1969
  var _requiredParams = [];
1480
1970
  var _validParams = ['headers'];
1481
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1971
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1482
1972
  if (_validationErrors) {
1483
1973
  return Promise.reject(_validationErrors);
1484
1974
  }
1485
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'sendTestNotification');
1975
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'sendTestNotification');
1486
1976
  var parameters = {
1487
1977
  options: {
1488
1978
  url: '/api/v1/notifications/test',
@@ -1534,7 +2024,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1534
2024
  /** Constants for the `listAllSecrets` operation. */
1535
2025
  var ListAllSecretsConstants;
1536
2026
  (function (ListAllSecretsConstants) {
1537
- /** Sort a list of secrets by the specified field. **Usage:** To sort a list of secrets by their creation date, use `../secrets/{secret-type}?sort_by=creation_date`. */
2027
+ /** Sort a list of secrets by the specified field. **Usage:** To sort a list of secrets by their creation date, use `../secrets/{secret_type}?sort_by=creation_date`. */
1538
2028
  var SortBy;
1539
2029
  (function (SortBy) {
1540
2030
  SortBy["ID"] = "id";
@@ -1580,6 +2070,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1580
2070
  Action["RESTORE"] = "restore";
1581
2071
  Action["REVOKE"] = "revoke";
1582
2072
  Action["DELETE_CREDENTIALS"] = "delete_credentials";
2073
+ Action["VALIDATE_DNS_CHALLENGE"] = "validate_dns_challenge";
1583
2074
  })(Action = UpdateSecretConstants.Action || (UpdateSecretConstants.Action = {}));
1584
2075
  })(UpdateSecretConstants = SecretsManagerV1.UpdateSecretConstants || (SecretsManagerV1.UpdateSecretConstants = {}));
1585
2076
  /** Constants for the `deleteSecret` operation. */
@@ -1656,6 +2147,21 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1656
2147
  SecretType["KV"] = "kv";
1657
2148
  })(SecretType = GetSecretVersionMetadataConstants.SecretType || (GetSecretVersionMetadataConstants.SecretType = {}));
1658
2149
  })(GetSecretVersionMetadataConstants = SecretsManagerV1.GetSecretVersionMetadataConstants || (SecretsManagerV1.GetSecretVersionMetadataConstants = {}));
2150
+ /** Constants for the `updateSecretVersionMetadata` operation. */
2151
+ var UpdateSecretVersionMetadataConstants;
2152
+ (function (UpdateSecretVersionMetadataConstants) {
2153
+ /** The secret type. */
2154
+ var SecretType;
2155
+ (function (SecretType) {
2156
+ SecretType["ARBITRARY"] = "arbitrary";
2157
+ SecretType["IAM_CREDENTIALS"] = "iam_credentials";
2158
+ SecretType["IMPORTED_CERT"] = "imported_cert";
2159
+ SecretType["PUBLIC_CERT"] = "public_cert";
2160
+ SecretType["PRIVATE_CERT"] = "private_cert";
2161
+ SecretType["USERNAME_PASSWORD"] = "username_password";
2162
+ SecretType["KV"] = "kv";
2163
+ })(SecretType = UpdateSecretVersionMetadataConstants.SecretType || (UpdateSecretVersionMetadataConstants.SecretType = {}));
2164
+ })(UpdateSecretVersionMetadataConstants = SecretsManagerV1.UpdateSecretVersionMetadataConstants || (SecretsManagerV1.UpdateSecretVersionMetadataConstants = {}));
1659
2165
  /** Constants for the `getSecretMetadata` operation. */
1660
2166
  var GetSecretMetadataConstants;
1661
2167
  (function (GetSecretMetadataConstants) {
@@ -1686,6 +2192,108 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1686
2192
  SecretType["KV"] = "kv";
1687
2193
  })(SecretType = UpdateSecretMetadataConstants.SecretType || (UpdateSecretMetadataConstants.SecretType = {}));
1688
2194
  })(UpdateSecretMetadataConstants = SecretsManagerV1.UpdateSecretMetadataConstants || (SecretsManagerV1.UpdateSecretMetadataConstants = {}));
2195
+ /** Constants for the `getLocks` operation. */
2196
+ var GetLocksConstants;
2197
+ (function (GetLocksConstants) {
2198
+ /** The secret type. */
2199
+ var SecretType;
2200
+ (function (SecretType) {
2201
+ SecretType["ARBITRARY"] = "arbitrary";
2202
+ SecretType["IAM_CREDENTIALS"] = "iam_credentials";
2203
+ SecretType["IMPORTED_CERT"] = "imported_cert";
2204
+ SecretType["PUBLIC_CERT"] = "public_cert";
2205
+ SecretType["PRIVATE_CERT"] = "private_cert";
2206
+ SecretType["USERNAME_PASSWORD"] = "username_password";
2207
+ SecretType["KV"] = "kv";
2208
+ })(SecretType = GetLocksConstants.SecretType || (GetLocksConstants.SecretType = {}));
2209
+ })(GetLocksConstants = SecretsManagerV1.GetLocksConstants || (SecretsManagerV1.GetLocksConstants = {}));
2210
+ /** Constants for the `lockSecret` operation. */
2211
+ var LockSecretConstants;
2212
+ (function (LockSecretConstants) {
2213
+ /** The secret type. */
2214
+ var SecretType;
2215
+ (function (SecretType) {
2216
+ SecretType["ARBITRARY"] = "arbitrary";
2217
+ SecretType["IAM_CREDENTIALS"] = "iam_credentials";
2218
+ SecretType["IMPORTED_CERT"] = "imported_cert";
2219
+ SecretType["PUBLIC_CERT"] = "public_cert";
2220
+ SecretType["PRIVATE_CERT"] = "private_cert";
2221
+ SecretType["USERNAME_PASSWORD"] = "username_password";
2222
+ SecretType["KV"] = "kv";
2223
+ })(SecretType = LockSecretConstants.SecretType || (LockSecretConstants.SecretType = {}));
2224
+ /** An optional lock mode. At lock creation, you can set one of the following modes to clear any matching locks on a secret version. Note: When you are locking the `previous` version, the mode parameter is ignored. - `exclusive`: Removes any other locks with matching names if they are found in the previous version of the secret. - `exclusive_delete`: Same as `exclusive`, but also permanently deletes the data of the previous secret version if it doesn't have any locks. */
2225
+ var Mode;
2226
+ (function (Mode) {
2227
+ Mode["EXCLUSIVE"] = "exclusive";
2228
+ Mode["EXCLUSIVE_DELETE"] = "exclusive_delete";
2229
+ })(Mode = LockSecretConstants.Mode || (LockSecretConstants.Mode = {}));
2230
+ })(LockSecretConstants = SecretsManagerV1.LockSecretConstants || (SecretsManagerV1.LockSecretConstants = {}));
2231
+ /** Constants for the `unlockSecret` operation. */
2232
+ var UnlockSecretConstants;
2233
+ (function (UnlockSecretConstants) {
2234
+ /** The secret type. */
2235
+ var SecretType;
2236
+ (function (SecretType) {
2237
+ SecretType["ARBITRARY"] = "arbitrary";
2238
+ SecretType["IAM_CREDENTIALS"] = "iam_credentials";
2239
+ SecretType["IMPORTED_CERT"] = "imported_cert";
2240
+ SecretType["PUBLIC_CERT"] = "public_cert";
2241
+ SecretType["PRIVATE_CERT"] = "private_cert";
2242
+ SecretType["USERNAME_PASSWORD"] = "username_password";
2243
+ SecretType["KV"] = "kv";
2244
+ })(SecretType = UnlockSecretConstants.SecretType || (UnlockSecretConstants.SecretType = {}));
2245
+ })(UnlockSecretConstants = SecretsManagerV1.UnlockSecretConstants || (SecretsManagerV1.UnlockSecretConstants = {}));
2246
+ /** Constants for the `getSecretVersionLocks` operation. */
2247
+ var GetSecretVersionLocksConstants;
2248
+ (function (GetSecretVersionLocksConstants) {
2249
+ /** The secret type. */
2250
+ var SecretType;
2251
+ (function (SecretType) {
2252
+ SecretType["ARBITRARY"] = "arbitrary";
2253
+ SecretType["IAM_CREDENTIALS"] = "iam_credentials";
2254
+ SecretType["IMPORTED_CERT"] = "imported_cert";
2255
+ SecretType["PUBLIC_CERT"] = "public_cert";
2256
+ SecretType["PRIVATE_CERT"] = "private_cert";
2257
+ SecretType["USERNAME_PASSWORD"] = "username_password";
2258
+ SecretType["KV"] = "kv";
2259
+ })(SecretType = GetSecretVersionLocksConstants.SecretType || (GetSecretVersionLocksConstants.SecretType = {}));
2260
+ })(GetSecretVersionLocksConstants = SecretsManagerV1.GetSecretVersionLocksConstants || (SecretsManagerV1.GetSecretVersionLocksConstants = {}));
2261
+ /** Constants for the `lockSecretVersion` operation. */
2262
+ var LockSecretVersionConstants;
2263
+ (function (LockSecretVersionConstants) {
2264
+ /** The secret type. */
2265
+ var SecretType;
2266
+ (function (SecretType) {
2267
+ SecretType["ARBITRARY"] = "arbitrary";
2268
+ SecretType["IAM_CREDENTIALS"] = "iam_credentials";
2269
+ SecretType["IMPORTED_CERT"] = "imported_cert";
2270
+ SecretType["PUBLIC_CERT"] = "public_cert";
2271
+ SecretType["PRIVATE_CERT"] = "private_cert";
2272
+ SecretType["USERNAME_PASSWORD"] = "username_password";
2273
+ SecretType["KV"] = "kv";
2274
+ })(SecretType = LockSecretVersionConstants.SecretType || (LockSecretVersionConstants.SecretType = {}));
2275
+ /** An optional lock mode. At lock creation, you can set one of the following modes to clear any matching locks on a secret version. Note: When you are locking the `previous` version, the mode parameter is ignored. - `exclusive`: Removes any other locks with matching names if they are found in the previous version of the secret. - `exclusive_delete`: Same as `exclusive`, but also permanently deletes the data of the previous secret version if it doesn't have any locks. */
2276
+ var Mode;
2277
+ (function (Mode) {
2278
+ Mode["EXCLUSIVE"] = "exclusive";
2279
+ Mode["EXCLUSIVE_DELETE"] = "exclusive_delete";
2280
+ })(Mode = LockSecretVersionConstants.Mode || (LockSecretVersionConstants.Mode = {}));
2281
+ })(LockSecretVersionConstants = SecretsManagerV1.LockSecretVersionConstants || (SecretsManagerV1.LockSecretVersionConstants = {}));
2282
+ /** Constants for the `unlockSecretVersion` operation. */
2283
+ var UnlockSecretVersionConstants;
2284
+ (function (UnlockSecretVersionConstants) {
2285
+ /** The secret type. */
2286
+ var SecretType;
2287
+ (function (SecretType) {
2288
+ SecretType["ARBITRARY"] = "arbitrary";
2289
+ SecretType["IAM_CREDENTIALS"] = "iam_credentials";
2290
+ SecretType["IMPORTED_CERT"] = "imported_cert";
2291
+ SecretType["PUBLIC_CERT"] = "public_cert";
2292
+ SecretType["PRIVATE_CERT"] = "private_cert";
2293
+ SecretType["USERNAME_PASSWORD"] = "username_password";
2294
+ SecretType["KV"] = "kv";
2295
+ })(SecretType = UnlockSecretVersionConstants.SecretType || (UnlockSecretVersionConstants.SecretType = {}));
2296
+ })(UnlockSecretVersionConstants = SecretsManagerV1.UnlockSecretVersionConstants || (SecretsManagerV1.UnlockSecretVersionConstants = {}));
1689
2297
  /** Constants for the `putPolicy` operation. */
1690
2298
  var PutPolicyConstants;
1691
2299
  (function (PutPolicyConstants) {
@@ -1693,6 +2301,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1693
2301
  var SecretType;
1694
2302
  (function (SecretType) {
1695
2303
  SecretType["USERNAME_PASSWORD"] = "username_password";
2304
+ SecretType["IAM_CREDENTIALS"] = "iam_credentials";
1696
2305
  SecretType["PUBLIC_CERT"] = "public_cert";
1697
2306
  SecretType["PRIVATE_CERT"] = "private_cert";
1698
2307
  })(SecretType = PutPolicyConstants.SecretType || (PutPolicyConstants.SecretType = {}));
@@ -1709,6 +2318,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1709
2318
  var SecretType;
1710
2319
  (function (SecretType) {
1711
2320
  SecretType["USERNAME_PASSWORD"] = "username_password";
2321
+ SecretType["IAM_CREDENTIALS"] = "iam_credentials";
1712
2322
  SecretType["PUBLIC_CERT"] = "public_cert";
1713
2323
  SecretType["PRIVATE_CERT"] = "private_cert";
1714
2324
  })(SecretType = GetPolicyConstants.SecretType || (GetPolicyConstants.SecretType = {}));