@ibm-cloud/secrets-manager 1.0.32 → 1.0.35

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.47.1-be944570-20220406-170244
44
+ * IBM OpenAPI SDK Code Generator Version: 3.51.0-5b8b699d-20220613-200818
43
45
  */
44
46
  var extend = require("extend");
45
47
  var ibm_cloud_sdk_core_1 = require("ibm-cloud-sdk-core");
@@ -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}',
@@ -531,7 +533,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
531
533
  var _params = __assign({}, params);
532
534
  var _requiredParams = ['secretType', 'id', 'action'];
533
535
  var _validParams = ['secretType', 'id', 'action', 'secretAction', 'headers'];
534
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
536
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
535
537
  if (_validationErrors) {
536
538
  return Promise.reject(_validationErrors);
537
539
  }
@@ -543,7 +545,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
543
545
  'secret_type': _params.secretType,
544
546
  'id': _params.id,
545
547
  };
546
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'updateSecret');
548
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'updateSecret');
547
549
  var parameters = {
548
550
  options: {
549
551
  url: '/api/v1/secrets/{secret_type}/{id}',
@@ -576,7 +578,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
576
578
  var _params = __assign({}, params);
577
579
  var _requiredParams = ['secretType', 'id'];
578
580
  var _validParams = ['secretType', 'id', 'headers'];
579
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
581
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
580
582
  if (_validationErrors) {
581
583
  return Promise.reject(_validationErrors);
582
584
  }
@@ -584,7 +586,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
584
586
  'secret_type': _params.secretType,
585
587
  'id': _params.id,
586
588
  };
587
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteSecret');
589
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteSecret');
588
590
  var parameters = {
589
591
  options: {
590
592
  url: '/api/v1/secrets/{secret_type}/{id}',
@@ -614,7 +616,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
614
616
  var _params = __assign({}, params);
615
617
  var _requiredParams = ['secretType', 'id'];
616
618
  var _validParams = ['secretType', 'id', 'headers'];
617
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
619
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
618
620
  if (_validationErrors) {
619
621
  return Promise.reject(_validationErrors);
620
622
  }
@@ -622,7 +624,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
622
624
  'secret_type': _params.secretType,
623
625
  'id': _params.id,
624
626
  };
625
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'listSecretVersions');
627
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'listSecretVersions');
626
628
  var parameters = {
627
629
  options: {
628
630
  url: '/api/v1/secrets/{secret_type}/{id}/versions',
@@ -660,7 +662,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
660
662
  var _params = __assign({}, params);
661
663
  var _requiredParams = ['secretType', 'id', 'versionId'];
662
664
  var _validParams = ['secretType', 'id', 'versionId', 'headers'];
663
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
665
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
664
666
  if (_validationErrors) {
665
667
  return Promise.reject(_validationErrors);
666
668
  }
@@ -669,7 +671,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
669
671
  'id': _params.id,
670
672
  'version_id': _params.versionId,
671
673
  };
672
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getSecretVersion');
674
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getSecretVersion');
673
675
  var parameters = {
674
676
  options: {
675
677
  url: '/api/v1/secrets/{secret_type}/{id}/versions/{version_id}',
@@ -707,7 +709,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
707
709
  var _params = __assign({}, params);
708
710
  var _requiredParams = ['secretType', 'id', 'versionId', 'action'];
709
711
  var _validParams = ['secretType', 'id', 'versionId', 'action', 'headers'];
710
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
712
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
711
713
  if (_validationErrors) {
712
714
  return Promise.reject(_validationErrors);
713
715
  }
@@ -719,7 +721,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
719
721
  'id': _params.id,
720
722
  'version_id': _params.versionId,
721
723
  };
722
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'updateSecretVersion');
724
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'updateSecretVersion');
723
725
  var parameters = {
724
726
  options: {
725
727
  url: '/api/v1/secrets/{secret_type}/{id}/versions/{version_id}',
@@ -757,7 +759,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
757
759
  var _params = __assign({}, params);
758
760
  var _requiredParams = ['secretType', 'id', 'versionId'];
759
761
  var _validParams = ['secretType', 'id', 'versionId', 'headers'];
760
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
762
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
761
763
  if (_validationErrors) {
762
764
  return Promise.reject(_validationErrors);
763
765
  }
@@ -766,7 +768,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
766
768
  'id': _params.id,
767
769
  'version_id': _params.versionId,
768
770
  };
769
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getSecretVersionMetadata');
771
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getSecretVersionMetadata');
770
772
  var parameters = {
771
773
  options: {
772
774
  url: '/api/v1/secrets/{secret_type}/{id}/versions/{version_id}/metadata',
@@ -799,7 +801,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
799
801
  var _params = __assign({}, params);
800
802
  var _requiredParams = ['secretType', 'id'];
801
803
  var _validParams = ['secretType', 'id', 'headers'];
802
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
804
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
803
805
  if (_validationErrors) {
804
806
  return Promise.reject(_validationErrors);
805
807
  }
@@ -807,7 +809,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
807
809
  'secret_type': _params.secretType,
808
810
  'id': _params.id,
809
811
  };
810
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getSecretMetadata');
812
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getSecretMetadata');
811
813
  var parameters = {
812
814
  options: {
813
815
  url: '/api/v1/secrets/{secret_type}/{id}/metadata',
@@ -842,7 +844,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
842
844
  var _params = __assign({}, params);
843
845
  var _requiredParams = ['secretType', 'id', 'metadata', 'resources'];
844
846
  var _validParams = ['secretType', 'id', 'metadata', 'resources', 'headers'];
845
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
847
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
846
848
  if (_validationErrors) {
847
849
  return Promise.reject(_validationErrors);
848
850
  }
@@ -854,7 +856,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
854
856
  'secret_type': _params.secretType,
855
857
  'id': _params.id,
856
858
  };
857
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'updateSecretMetadata');
859
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'updateSecretMetadata');
858
860
  var parameters = {
859
861
  options: {
860
862
  url: '/api/v1/secrets/{secret_type}/{id}/metadata',
@@ -871,6 +873,441 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
871
873
  };
872
874
  return this.createRequest(parameters);
873
875
  };
876
+ /*************************
877
+ * locks
878
+ ************************/
879
+ /**
880
+ * List secret locks.
881
+ *
882
+ * List the locks that are associated with a specified secret.
883
+ *
884
+ * @param {Object} params - The parameters to send to the service.
885
+ * @param {string} params.secretType - The secret type.
886
+ * @param {string} params.id - The v4 UUID that uniquely identifies the secret.
887
+ * @param {number} [params.limit] - The number of secrets with locks to retrieve. By default, list operations return
888
+ * the first 25 items. To retrieve a different set of items, use `limit` with `offset` to page through your available
889
+ * resources.
890
+ *
891
+ * **Usage:** If you have 20 secrets in your instance, and you want to retrieve only the first 5 with locks, use
892
+ * `..?limit=5`.
893
+ * @param {number} [params.offset] - The number of secrets to skip. By specifying `offset`, you retrieve a subset of
894
+ * items that starts with the `offset` value. Use `offset` with `limit` to page through your available resources.
895
+ *
896
+ * **Usage:** If you have 100 secrets in your instance, and you want to retrieve secrets 26 through 50, use
897
+ * `..?offset=25&limit=25`.
898
+ * @param {string} [params.search] - Filter locks that contain the specified string in the field "name".
899
+ *
900
+ * **Usage:** If you want to list only the locks that contain the string "text" in the field "name", use
901
+ * `..?search=text`.
902
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
903
+ * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.ListSecretLocks>>}
904
+ */
905
+ SecretsManagerV1.prototype.getLocks = function (params) {
906
+ var _params = __assign({}, params);
907
+ var _requiredParams = ['secretType', 'id'];
908
+ var _validParams = ['secretType', 'id', 'limit', 'offset', 'search', 'headers'];
909
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
910
+ if (_validationErrors) {
911
+ return Promise.reject(_validationErrors);
912
+ }
913
+ var query = {
914
+ 'limit': _params.limit,
915
+ 'offset': _params.offset,
916
+ 'search': _params.search,
917
+ };
918
+ var path = {
919
+ 'secret_type': _params.secretType,
920
+ 'id': _params.id,
921
+ };
922
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getLocks');
923
+ var parameters = {
924
+ options: {
925
+ url: '/api/v1/locks/{secret_type}/{id}',
926
+ method: 'GET',
927
+ qs: query,
928
+ path: path,
929
+ },
930
+ defaultOptions: extend(true, {}, this.baseOptions, {
931
+ headers: extend(true, sdkHeaders, {
932
+ 'Accept': 'application/json',
933
+ }, _params.headers),
934
+ }),
935
+ };
936
+ return this.createRequest(parameters);
937
+ };
938
+ /**
939
+ * Lock a secret.
940
+ *
941
+ * Create a lock on the current version of a secret.
942
+ *
943
+ * A lock can be used to prevent a secret from being deleted or modified while it's in use by your applications. A
944
+ * successful request attaches a new lock to your secret, or replaces a lock of the same name if it already exists.
945
+ * Additionally, you can use this method to clear any matching locks on a secret by using one of the following
946
+ * optional lock modes:
947
+ *
948
+ * - `exclusive`: Removes any other locks with matching names if they are found in the previous version of the secret.
949
+ * - `exclusive_delete`: Same as `exclusive`, but also permanently deletes the data of the previous secret version if
950
+ * it doesn't have any locks.
951
+ *
952
+ * For more information about locking secrets, check out the
953
+ * [docs](https://cloud.ibm.com/docs/secrets-manager?topic=secrets-manager-secret-locks).
954
+ *
955
+ * @param {Object} params - The parameters to send to the service.
956
+ * @param {string} params.secretType - The secret type.
957
+ * @param {string} params.id - The v4 UUID that uniquely identifies the secret.
958
+ * @param {LockSecretBodyLocksItem[]} [params.locks] - The lock data to be attached to a secret version.
959
+ * @param {string} [params.mode] - An optional lock mode. At lock creation, you can set one of the following modes to
960
+ * clear any matching locks on a secret version.
961
+ *
962
+ * - `exclusive`: Removes any other locks with matching names if they are found in the previous version of the secret.
963
+ * - `exclusive_delete`: Same as `exclusive`, but also permanently deletes the data of the previous secret version if
964
+ * it doesn't have any locks.
965
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
966
+ * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.GetSecretLocks>>}
967
+ */
968
+ SecretsManagerV1.prototype.lockSecret = function (params) {
969
+ var _params = __assign({}, params);
970
+ var _requiredParams = ['secretType', 'id'];
971
+ var _validParams = ['secretType', 'id', 'locks', 'mode', 'headers'];
972
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
973
+ if (_validationErrors) {
974
+ return Promise.reject(_validationErrors);
975
+ }
976
+ var body = {
977
+ 'locks': _params.locks,
978
+ };
979
+ var query = {
980
+ 'mode': _params.mode,
981
+ };
982
+ var path = {
983
+ 'secret_type': _params.secretType,
984
+ 'id': _params.id,
985
+ };
986
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'lockSecret');
987
+ var parameters = {
988
+ options: {
989
+ url: '/api/v1/locks/{secret_type}/{id}/lock',
990
+ method: 'POST',
991
+ body: body,
992
+ qs: query,
993
+ path: path,
994
+ },
995
+ defaultOptions: extend(true, {}, this.baseOptions, {
996
+ headers: extend(true, sdkHeaders, {
997
+ 'Accept': 'application/json',
998
+ 'Content-Type': 'application/json',
999
+ }, _params.headers),
1000
+ }),
1001
+ };
1002
+ return this.createRequest(parameters);
1003
+ };
1004
+ /**
1005
+ * Unlock a secret.
1006
+ *
1007
+ * Delete one or more locks that are associated with the current version of a secret.
1008
+ *
1009
+ * A successful request deletes the locks that you specify. To remove all locks, you can pass `{"locks": ["*"]}` in in
1010
+ * the request body. Otherwise, specify the names of the locks that you want to delete. For example, `{"locks":
1011
+ * ["lock1", "lock2"]}`.
1012
+ *
1013
+ * **Note:** A secret is considered unlocked and able to be revoked or deleted only after all of its locks are
1014
+ * removed. To understand whether a secret contains locks, check the `locks_total` field that is returned as part of
1015
+ * the metadata of your secret.
1016
+ *
1017
+ * @param {Object} params - The parameters to send to the service.
1018
+ * @param {string} params.secretType - The secret type.
1019
+ * @param {string} params.id - The v4 UUID that uniquely identifies the secret.
1020
+ * @param {string[]} [params.locks] - A comma-separated list of locks to delete.
1021
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1022
+ * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.GetSecretLocks>>}
1023
+ */
1024
+ SecretsManagerV1.prototype.unlockSecret = function (params) {
1025
+ var _params = __assign({}, params);
1026
+ var _requiredParams = ['secretType', 'id'];
1027
+ var _validParams = ['secretType', 'id', 'locks', 'headers'];
1028
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1029
+ if (_validationErrors) {
1030
+ return Promise.reject(_validationErrors);
1031
+ }
1032
+ var body = {
1033
+ 'locks': _params.locks,
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', 'unlockSecret');
1040
+ var parameters = {
1041
+ options: {
1042
+ url: '/api/v1/locks/{secret_type}/{id}/unlock',
1043
+ method: 'POST',
1044
+ body: body,
1045
+ path: path,
1046
+ },
1047
+ defaultOptions: extend(true, {}, this.baseOptions, {
1048
+ headers: extend(true, sdkHeaders, {
1049
+ 'Accept': 'application/json',
1050
+ 'Content-Type': 'application/json',
1051
+ }, _params.headers),
1052
+ }),
1053
+ };
1054
+ return this.createRequest(parameters);
1055
+ };
1056
+ /**
1057
+ * List secret version locks.
1058
+ *
1059
+ * List the locks that are associated with a specified secret version.
1060
+ *
1061
+ * @param {Object} params - The parameters to send to the service.
1062
+ * @param {string} params.secretType - The secret type.
1063
+ * @param {string} params.id - The v4 UUID that uniquely identifies the secret.
1064
+ * @param {string} params.versionId - The v4 UUID that uniquely identifies the secret version. You can also use
1065
+ * `previous` to retrieve the previous version.
1066
+ *
1067
+ * **Note:** To find the version ID of a secret, use the [Get secret metadata](#get-secret-metadata) method and check
1068
+ * the response details.
1069
+ * @param {number} [params.limit] - The number of secrets with locks to retrieve. By default, list operations return
1070
+ * the first 25 items. To retrieve a different set of items, use `limit` with `offset` to page through your available
1071
+ * resources.
1072
+ *
1073
+ * **Usage:** If you have 20 secrets in your instance, and you want to retrieve only the first 5 with locks, use
1074
+ * `..?limit=5`.
1075
+ * @param {number} [params.offset] - The number of secrets to skip. By specifying `offset`, you retrieve a subset of
1076
+ * items that starts with the `offset` value. Use `offset` with `limit` to page through your available resources.
1077
+ *
1078
+ * **Usage:** If you have 100 secrets in your instance, and you want to retrieve secrets 26 through 50, use
1079
+ * `..?offset=25&limit=25`.
1080
+ * @param {string} [params.search] - Filter locks that contain the specified string in the field "name".
1081
+ *
1082
+ * **Usage:** If you want to list only the locks that contain the string "text" in the field "name", use
1083
+ * `..?search=text`.
1084
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1085
+ * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.ListSecretLocks>>}
1086
+ */
1087
+ SecretsManagerV1.prototype.getSecretVersionLocks = function (params) {
1088
+ var _params = __assign({}, params);
1089
+ var _requiredParams = ['secretType', 'id', 'versionId'];
1090
+ var _validParams = ['secretType', 'id', 'versionId', 'limit', 'offset', 'search', 'headers'];
1091
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1092
+ if (_validationErrors) {
1093
+ return Promise.reject(_validationErrors);
1094
+ }
1095
+ var query = {
1096
+ 'limit': _params.limit,
1097
+ 'offset': _params.offset,
1098
+ 'search': _params.search,
1099
+ };
1100
+ var path = {
1101
+ 'secret_type': _params.secretType,
1102
+ 'id': _params.id,
1103
+ 'version_id': _params.versionId,
1104
+ };
1105
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getSecretVersionLocks');
1106
+ var parameters = {
1107
+ options: {
1108
+ url: '/api/v1/locks/{secret_type}/{id}/versions/{version_id}',
1109
+ method: 'GET',
1110
+ qs: query,
1111
+ path: path,
1112
+ },
1113
+ defaultOptions: extend(true, {}, this.baseOptions, {
1114
+ headers: extend(true, sdkHeaders, {
1115
+ 'Accept': 'application/json',
1116
+ }, _params.headers),
1117
+ }),
1118
+ };
1119
+ return this.createRequest(parameters);
1120
+ };
1121
+ /**
1122
+ * Lock a secret version.
1123
+ *
1124
+ * Create a lock on the specified version of a secret.
1125
+ *
1126
+ * A lock can be used to prevent a secret from being deleted or modified while it's in use by your applications. A
1127
+ * successful request attaches a new lock to the specified version, or replaces a lock of the same name if it already
1128
+ * exists. Additionally, you can use this method to clear any matching locks on a secret version by using one of the
1129
+ * following optional lock modes:
1130
+ *
1131
+ * - `exclusive`: Removes any other locks with matching names if they are found in the previous version of the secret.
1132
+ * - `exclusive_delete`: Same as `exclusive`, but also permanently deletes the data of the previous secret version if
1133
+ * it doesn't have any locks.
1134
+ *
1135
+ * For more information about locking secrets, check out the
1136
+ * [docs](https://cloud.ibm.com/docs/secrets-manager?topic=secrets-manager-secret-locks).
1137
+ *
1138
+ * @param {Object} params - The parameters to send to the service.
1139
+ * @param {string} params.secretType - The secret type.
1140
+ * @param {string} params.id - The v4 UUID that uniquely identifies the secret.
1141
+ * @param {string} params.versionId - The v4 UUID that uniquely identifies the secret version. You can also use
1142
+ * `previous` to retrieve the previous version.
1143
+ *
1144
+ * **Note:** To find the version ID of a secret, use the [Get secret metadata](#get-secret-metadata) method and check
1145
+ * the response details.
1146
+ * @param {LockSecretBodyLocksItem[]} [params.locks] - The lock data to be attached to a secret version.
1147
+ * @param {string} [params.mode] - An optional lock mode. At lock creation, you can set one of the following modes to
1148
+ * clear any matching locks on a secret version.
1149
+ *
1150
+ * - `exclusive`: Removes any other locks with matching names if they are found in the previous version of the secret.
1151
+ * - `exclusive_delete`: Same as `exclusive`, but also permanently deletes the data of the previous secret version if
1152
+ * it doesn't have any locks.
1153
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1154
+ * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.GetSecretLocks>>}
1155
+ */
1156
+ SecretsManagerV1.prototype.lockSecretVersion = function (params) {
1157
+ var _params = __assign({}, params);
1158
+ var _requiredParams = ['secretType', 'id', 'versionId'];
1159
+ var _validParams = ['secretType', 'id', 'versionId', 'locks', 'mode', 'headers'];
1160
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1161
+ if (_validationErrors) {
1162
+ return Promise.reject(_validationErrors);
1163
+ }
1164
+ var body = {
1165
+ 'locks': _params.locks,
1166
+ };
1167
+ var query = {
1168
+ 'mode': _params.mode,
1169
+ };
1170
+ var path = {
1171
+ 'secret_type': _params.secretType,
1172
+ 'id': _params.id,
1173
+ 'version_id': _params.versionId,
1174
+ };
1175
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'lockSecretVersion');
1176
+ var parameters = {
1177
+ options: {
1178
+ url: '/api/v1/locks/{secret_type}/{id}/versions/{version_id}/lock',
1179
+ method: 'POST',
1180
+ body: body,
1181
+ qs: query,
1182
+ path: path,
1183
+ },
1184
+ defaultOptions: extend(true, {}, this.baseOptions, {
1185
+ headers: extend(true, sdkHeaders, {
1186
+ 'Accept': 'application/json',
1187
+ 'Content-Type': 'application/json',
1188
+ }, _params.headers),
1189
+ }),
1190
+ };
1191
+ return this.createRequest(parameters);
1192
+ };
1193
+ /**
1194
+ * Unlock a secret version.
1195
+ *
1196
+ * Delete one or more locks that are associated with the specified secret version.
1197
+ *
1198
+ * A successful request deletes the locks that you specify. To remove all locks, you can pass `{"locks": ["*"]}` in in
1199
+ * the request body. Otherwise, specify the names of the locks that you want to delete. For example, `{"locks":
1200
+ * ["lock-1", "lock-2"]}`.
1201
+ *
1202
+ * **Note:** A secret is considered unlocked and able to be revoked or deleted only after all of its locks are
1203
+ * removed. To understand whether a secret contains locks, check the `locks_total` field that is returned as part of
1204
+ * the metadata of your secret.
1205
+ *
1206
+ * @param {Object} params - The parameters to send to the service.
1207
+ * @param {string} params.secretType - The secret type.
1208
+ * @param {string} params.id - The v4 UUID that uniquely identifies the secret.
1209
+ * @param {string} params.versionId - The v4 UUID that uniquely identifies the secret version. You can also use
1210
+ * `previous` to retrieve the previous version.
1211
+ *
1212
+ * **Note:** To find the version ID of a secret, use the [Get secret metadata](#get-secret-metadata) method and check
1213
+ * the response details.
1214
+ * @param {string[]} [params.locks] - A comma-separated list of locks to delete.
1215
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1216
+ * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.GetSecretLocks>>}
1217
+ */
1218
+ SecretsManagerV1.prototype.unlockSecretVersion = function (params) {
1219
+ var _params = __assign({}, params);
1220
+ var _requiredParams = ['secretType', 'id', 'versionId'];
1221
+ var _validParams = ['secretType', 'id', 'versionId', 'locks', 'headers'];
1222
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1223
+ if (_validationErrors) {
1224
+ return Promise.reject(_validationErrors);
1225
+ }
1226
+ var body = {
1227
+ 'locks': _params.locks,
1228
+ };
1229
+ var path = {
1230
+ 'secret_type': _params.secretType,
1231
+ 'id': _params.id,
1232
+ 'version_id': _params.versionId,
1233
+ };
1234
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'unlockSecretVersion');
1235
+ var parameters = {
1236
+ options: {
1237
+ url: '/api/v1/locks/{secret_type}/{id}/versions/{version_id}/unlock',
1238
+ method: 'POST',
1239
+ body: body,
1240
+ path: path,
1241
+ },
1242
+ defaultOptions: extend(true, {}, this.baseOptions, {
1243
+ headers: extend(true, sdkHeaders, {
1244
+ 'Accept': 'application/json',
1245
+ 'Content-Type': 'application/json',
1246
+ }, _params.headers),
1247
+ }),
1248
+ };
1249
+ return this.createRequest(parameters);
1250
+ };
1251
+ /**
1252
+ * List all secrets and locks.
1253
+ *
1254
+ * List the lock details that are associated with all secrets in your Secrets Manager instance.
1255
+ *
1256
+ * @param {Object} [params] - The parameters to send to the service.
1257
+ * @param {number} [params.limit] - The number of secrets with locks to retrieve. By default, list operations return
1258
+ * the first 25 items. To retrieve a different set of items, use `limit` with `offset` to page through your available
1259
+ * resources.
1260
+ *
1261
+ * **Usage:** If you have 20 secrets in your instance, and you want to retrieve only the first 5 with locks, use
1262
+ * `..?limit=5`.
1263
+ * @param {number} [params.offset] - The number of secrets to skip. By specifying `offset`, you retrieve a subset of
1264
+ * items that starts with the `offset` value. Use `offset` with `limit` to page through your available resources.
1265
+ *
1266
+ * **Usage:** If you have 100 secrets in your instance, and you want to retrieve secrets 26 through 50, use
1267
+ * `..?offset=25&limit=25`.
1268
+ * @param {string} [params.search] - Filter locks that contain the specified string in the field "name".
1269
+ *
1270
+ * **Usage:** If you want to list only the locks that contain the string "text" in the field "name", use
1271
+ * `..?search=text`.
1272
+ * @param {string[]} [params.groups] - Filter secrets by groups.
1273
+ *
1274
+ * You can apply multiple filters by using a comma-separated list of secret group IDs. If you need to filter secrets
1275
+ * that are in the default secret group, use the `default` keyword.
1276
+ *
1277
+ * **Usage:** To retrieve a list of secrets that are associated with an existing secret group or the default group,
1278
+ * use `..?groups={secret_group_ID},default`.
1279
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1280
+ * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.GetInstanceLocks>>}
1281
+ */
1282
+ SecretsManagerV1.prototype.listInstanceSecretsLocks = function (params) {
1283
+ var _params = __assign({}, params);
1284
+ var _requiredParams = [];
1285
+ var _validParams = ['limit', 'offset', 'search', 'groups', 'headers'];
1286
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1287
+ if (_validationErrors) {
1288
+ return Promise.reject(_validationErrors);
1289
+ }
1290
+ var query = {
1291
+ 'limit': _params.limit,
1292
+ 'offset': _params.offset,
1293
+ 'search': _params.search,
1294
+ 'groups': _params.groups,
1295
+ };
1296
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'listInstanceSecretsLocks');
1297
+ var parameters = {
1298
+ options: {
1299
+ url: '/api/v1/locks',
1300
+ method: 'GET',
1301
+ qs: query,
1302
+ },
1303
+ defaultOptions: extend(true, {}, this.baseOptions, {
1304
+ headers: extend(true, sdkHeaders, {
1305
+ 'Accept': 'application/json',
1306
+ }, _params.headers),
1307
+ }),
1308
+ };
1309
+ return this.createRequest(parameters);
1310
+ };
874
1311
  /*************************
875
1312
  * policies
876
1313
  ************************/
@@ -894,7 +1331,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
894
1331
  var _params = __assign({}, params);
895
1332
  var _requiredParams = ['secretType', 'id', 'metadata', 'resources'];
896
1333
  var _validParams = ['secretType', 'id', 'metadata', 'resources', 'policy', 'headers'];
897
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1334
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
898
1335
  if (_validationErrors) {
899
1336
  return Promise.reject(_validationErrors);
900
1337
  }
@@ -909,7 +1346,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
909
1346
  'secret_type': _params.secretType,
910
1347
  'id': _params.id,
911
1348
  };
912
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'putPolicy');
1349
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'putPolicy');
913
1350
  var parameters = {
914
1351
  options: {
915
1352
  url: '/api/v1/secrets/{secret_type}/{id}/policies',
@@ -943,7 +1380,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
943
1380
  var _params = __assign({}, params);
944
1381
  var _requiredParams = ['secretType', 'id'];
945
1382
  var _validParams = ['secretType', 'id', 'policy', 'headers'];
946
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1383
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
947
1384
  if (_validationErrors) {
948
1385
  return Promise.reject(_validationErrors);
949
1386
  }
@@ -954,7 +1391,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
954
1391
  'secret_type': _params.secretType,
955
1392
  'id': _params.id,
956
1393
  };
957
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getPolicy');
1394
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getPolicy');
958
1395
  var parameters = {
959
1396
  options: {
960
1397
  url: '/api/v1/secrets/{secret_type}/{id}/policies',
@@ -992,7 +1429,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
992
1429
  var _params = __assign({}, params);
993
1430
  var _requiredParams = ['secretType', 'engineConfig'];
994
1431
  var _validParams = ['secretType', 'engineConfig', 'headers'];
995
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1432
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
996
1433
  if (_validationErrors) {
997
1434
  return Promise.reject(_validationErrors);
998
1435
  }
@@ -1000,7 +1437,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1000
1437
  var path = {
1001
1438
  'secret_type': _params.secretType,
1002
1439
  };
1003
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'putConfig');
1440
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'putConfig');
1004
1441
  var parameters = {
1005
1442
  options: {
1006
1443
  url: '/api/v1/config/{secret_type}',
@@ -1030,14 +1467,14 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1030
1467
  var _params = __assign({}, params);
1031
1468
  var _requiredParams = ['secretType'];
1032
1469
  var _validParams = ['secretType', 'headers'];
1033
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1470
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1034
1471
  if (_validationErrors) {
1035
1472
  return Promise.reject(_validationErrors);
1036
1473
  }
1037
1474
  var path = {
1038
1475
  'secret_type': _params.secretType,
1039
1476
  };
1040
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getConfig');
1477
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getConfig');
1041
1478
  var parameters = {
1042
1479
  options: {
1043
1480
  url: '/api/v1/config/{secret_type}',
@@ -1082,7 +1519,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1082
1519
  var _params = __assign({}, params);
1083
1520
  var _requiredParams = ['secretType', 'configElement', 'name', 'type', 'config'];
1084
1521
  var _validParams = ['secretType', 'configElement', 'name', 'type', 'config', 'headers'];
1085
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1522
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1086
1523
  if (_validationErrors) {
1087
1524
  return Promise.reject(_validationErrors);
1088
1525
  }
@@ -1095,7 +1532,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1095
1532
  'secret_type': _params.secretType,
1096
1533
  'config_element': _params.configElement,
1097
1534
  };
1098
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'createConfigElement');
1535
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'createConfigElement');
1099
1536
  var parameters = {
1100
1537
  options: {
1101
1538
  url: '/api/v1/config/{secret_type}/{config_element}',
@@ -1127,7 +1564,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1127
1564
  var _params = __assign({}, params);
1128
1565
  var _requiredParams = ['secretType', 'configElement'];
1129
1566
  var _validParams = ['secretType', 'configElement', 'headers'];
1130
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1567
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1131
1568
  if (_validationErrors) {
1132
1569
  return Promise.reject(_validationErrors);
1133
1570
  }
@@ -1135,7 +1572,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1135
1572
  'secret_type': _params.secretType,
1136
1573
  'config_element': _params.configElement,
1137
1574
  };
1138
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getConfigElements');
1575
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getConfigElements');
1139
1576
  var parameters = {
1140
1577
  options: {
1141
1578
  url: '/api/v1/config/{secret_type}/{config_element}',
@@ -1166,7 +1603,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1166
1603
  var _params = __assign({}, params);
1167
1604
  var _requiredParams = ['secretType', 'configElement', 'configName'];
1168
1605
  var _validParams = ['secretType', 'configElement', 'configName', 'headers'];
1169
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1606
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1170
1607
  if (_validationErrors) {
1171
1608
  return Promise.reject(_validationErrors);
1172
1609
  }
@@ -1175,7 +1612,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1175
1612
  'config_element': _params.configElement,
1176
1613
  'config_name': _params.configName,
1177
1614
  };
1178
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getConfigElement');
1615
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getConfigElement');
1179
1616
  var parameters = {
1180
1617
  options: {
1181
1618
  url: '/api/v1/config/{secret_type}/{config_element}/{config_name}',
@@ -1209,7 +1646,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1209
1646
  var _params = __assign({}, params);
1210
1647
  var _requiredParams = ['secretType', 'configElement', 'configName', 'type', 'config'];
1211
1648
  var _validParams = ['secretType', 'configElement', 'configName', 'type', 'config', 'headers'];
1212
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1649
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1213
1650
  if (_validationErrors) {
1214
1651
  return Promise.reject(_validationErrors);
1215
1652
  }
@@ -1222,7 +1659,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1222
1659
  'config_element': _params.configElement,
1223
1660
  'config_name': _params.configName,
1224
1661
  };
1225
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'updateConfigElement');
1662
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'updateConfigElement');
1226
1663
  var parameters = {
1227
1664
  options: {
1228
1665
  url: '/api/v1/config/{secret_type}/{config_element}/{config_name}',
@@ -1270,7 +1707,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1270
1707
  'config',
1271
1708
  'headers',
1272
1709
  ];
1273
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1710
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1274
1711
  if (_validationErrors) {
1275
1712
  return Promise.reject(_validationErrors);
1276
1713
  }
@@ -1285,7 +1722,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1285
1722
  'config_element': _params.configElement,
1286
1723
  'config_name': _params.configName,
1287
1724
  };
1288
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'actionOnConfigElement');
1725
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'actionOnConfigElement');
1289
1726
  var parameters = {
1290
1727
  options: {
1291
1728
  url: '/api/v1/config/{secret_type}/{config_element}/{config_name}',
@@ -1319,7 +1756,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1319
1756
  var _params = __assign({}, params);
1320
1757
  var _requiredParams = ['secretType', 'configElement', 'configName'];
1321
1758
  var _validParams = ['secretType', 'configElement', 'configName', 'headers'];
1322
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1759
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1323
1760
  if (_validationErrors) {
1324
1761
  return Promise.reject(_validationErrors);
1325
1762
  }
@@ -1328,7 +1765,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1328
1765
  'config_element': _params.configElement,
1329
1766
  'config_name': _params.configName,
1330
1767
  };
1331
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteConfigElement');
1768
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteConfigElement');
1332
1769
  var parameters = {
1333
1770
  options: {
1334
1771
  url: '/api/v1/config/{secret_type}/{config_element}/{config_name}',
@@ -1373,7 +1810,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1373
1810
  'eventNotificationsSourceDescription',
1374
1811
  'headers',
1375
1812
  ];
1376
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1813
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1377
1814
  if (_validationErrors) {
1378
1815
  return Promise.reject(_validationErrors);
1379
1816
  }
@@ -1382,7 +1819,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1382
1819
  'event_notifications_source_name': _params.eventNotificationsSourceName,
1383
1820
  'event_notifications_source_description': _params.eventNotificationsSourceDescription,
1384
1821
  };
1385
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'createNotificationsRegistration');
1822
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'createNotificationsRegistration');
1386
1823
  var parameters = {
1387
1824
  options: {
1388
1825
  url: '/api/v1/notifications/registration',
@@ -1411,11 +1848,11 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1411
1848
  var _params = __assign({}, params);
1412
1849
  var _requiredParams = [];
1413
1850
  var _validParams = ['headers'];
1414
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1851
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1415
1852
  if (_validationErrors) {
1416
1853
  return Promise.reject(_validationErrors);
1417
1854
  }
1418
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getNotificationsRegistration');
1855
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getNotificationsRegistration');
1419
1856
  var parameters = {
1420
1857
  options: {
1421
1858
  url: '/api/v1/notifications/registration',
@@ -1444,11 +1881,11 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1444
1881
  var _params = __assign({}, params);
1445
1882
  var _requiredParams = [];
1446
1883
  var _validParams = ['headers'];
1447
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1884
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1448
1885
  if (_validationErrors) {
1449
1886
  return Promise.reject(_validationErrors);
1450
1887
  }
1451
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteNotificationsRegistration');
1888
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteNotificationsRegistration');
1452
1889
  var parameters = {
1453
1890
  options: {
1454
1891
  url: '/api/v1/notifications/registration',
@@ -1478,11 +1915,11 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1478
1915
  var _params = __assign({}, params);
1479
1916
  var _requiredParams = [];
1480
1917
  var _validParams = ['headers'];
1481
- var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1918
+ var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
1482
1919
  if (_validationErrors) {
1483
1920
  return Promise.reject(_validationErrors);
1484
1921
  }
1485
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'sendTestNotification');
1922
+ var sdkHeaders = (0, common_1.getSdkHeaders)(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'sendTestNotification');
1486
1923
  var parameters = {
1487
1924
  options: {
1488
1925
  url: '/api/v1/notifications/test',
@@ -1534,7 +1971,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1534
1971
  /** Constants for the `listAllSecrets` operation. */
1535
1972
  var ListAllSecretsConstants;
1536
1973
  (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`. */
1974
+ /** 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
1975
  var SortBy;
1539
1976
  (function (SortBy) {
1540
1977
  SortBy["ID"] = "id";
@@ -1686,6 +2123,108 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1686
2123
  SecretType["KV"] = "kv";
1687
2124
  })(SecretType = UpdateSecretMetadataConstants.SecretType || (UpdateSecretMetadataConstants.SecretType = {}));
1688
2125
  })(UpdateSecretMetadataConstants = SecretsManagerV1.UpdateSecretMetadataConstants || (SecretsManagerV1.UpdateSecretMetadataConstants = {}));
2126
+ /** Constants for the `getLocks` operation. */
2127
+ var GetLocksConstants;
2128
+ (function (GetLocksConstants) {
2129
+ /** The secret type. */
2130
+ var SecretType;
2131
+ (function (SecretType) {
2132
+ SecretType["ARBITRARY"] = "arbitrary";
2133
+ SecretType["IAM_CREDENTIALS"] = "iam_credentials";
2134
+ SecretType["IMPORTED_CERT"] = "imported_cert";
2135
+ SecretType["PUBLIC_CERT"] = "public_cert";
2136
+ SecretType["PRIVATE_CERT"] = "private_cert";
2137
+ SecretType["USERNAME_PASSWORD"] = "username_password";
2138
+ SecretType["KV"] = "kv";
2139
+ })(SecretType = GetLocksConstants.SecretType || (GetLocksConstants.SecretType = {}));
2140
+ })(GetLocksConstants = SecretsManagerV1.GetLocksConstants || (SecretsManagerV1.GetLocksConstants = {}));
2141
+ /** Constants for the `lockSecret` operation. */
2142
+ var LockSecretConstants;
2143
+ (function (LockSecretConstants) {
2144
+ /** The secret type. */
2145
+ var SecretType;
2146
+ (function (SecretType) {
2147
+ SecretType["ARBITRARY"] = "arbitrary";
2148
+ SecretType["IAM_CREDENTIALS"] = "iam_credentials";
2149
+ SecretType["IMPORTED_CERT"] = "imported_cert";
2150
+ SecretType["PUBLIC_CERT"] = "public_cert";
2151
+ SecretType["PRIVATE_CERT"] = "private_cert";
2152
+ SecretType["USERNAME_PASSWORD"] = "username_password";
2153
+ SecretType["KV"] = "kv";
2154
+ })(SecretType = LockSecretConstants.SecretType || (LockSecretConstants.SecretType = {}));
2155
+ /** An optional lock mode. At lock creation, you can set one of the following modes to clear any matching locks on a secret version. - `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. */
2156
+ var Mode;
2157
+ (function (Mode) {
2158
+ Mode["EXCLUSIVE"] = "exclusive";
2159
+ Mode["EXCLUSIVE_DELETE"] = "exclusive_delete";
2160
+ })(Mode = LockSecretConstants.Mode || (LockSecretConstants.Mode = {}));
2161
+ })(LockSecretConstants = SecretsManagerV1.LockSecretConstants || (SecretsManagerV1.LockSecretConstants = {}));
2162
+ /** Constants for the `unlockSecret` operation. */
2163
+ var UnlockSecretConstants;
2164
+ (function (UnlockSecretConstants) {
2165
+ /** The secret type. */
2166
+ var SecretType;
2167
+ (function (SecretType) {
2168
+ SecretType["ARBITRARY"] = "arbitrary";
2169
+ SecretType["IAM_CREDENTIALS"] = "iam_credentials";
2170
+ SecretType["IMPORTED_CERT"] = "imported_cert";
2171
+ SecretType["PUBLIC_CERT"] = "public_cert";
2172
+ SecretType["PRIVATE_CERT"] = "private_cert";
2173
+ SecretType["USERNAME_PASSWORD"] = "username_password";
2174
+ SecretType["KV"] = "kv";
2175
+ })(SecretType = UnlockSecretConstants.SecretType || (UnlockSecretConstants.SecretType = {}));
2176
+ })(UnlockSecretConstants = SecretsManagerV1.UnlockSecretConstants || (SecretsManagerV1.UnlockSecretConstants = {}));
2177
+ /** Constants for the `getSecretVersionLocks` operation. */
2178
+ var GetSecretVersionLocksConstants;
2179
+ (function (GetSecretVersionLocksConstants) {
2180
+ /** The secret type. */
2181
+ var SecretType;
2182
+ (function (SecretType) {
2183
+ SecretType["ARBITRARY"] = "arbitrary";
2184
+ SecretType["IAM_CREDENTIALS"] = "iam_credentials";
2185
+ SecretType["IMPORTED_CERT"] = "imported_cert";
2186
+ SecretType["PUBLIC_CERT"] = "public_cert";
2187
+ SecretType["PRIVATE_CERT"] = "private_cert";
2188
+ SecretType["USERNAME_PASSWORD"] = "username_password";
2189
+ SecretType["KV"] = "kv";
2190
+ })(SecretType = GetSecretVersionLocksConstants.SecretType || (GetSecretVersionLocksConstants.SecretType = {}));
2191
+ })(GetSecretVersionLocksConstants = SecretsManagerV1.GetSecretVersionLocksConstants || (SecretsManagerV1.GetSecretVersionLocksConstants = {}));
2192
+ /** Constants for the `lockSecretVersion` operation. */
2193
+ var LockSecretVersionConstants;
2194
+ (function (LockSecretVersionConstants) {
2195
+ /** The secret type. */
2196
+ var SecretType;
2197
+ (function (SecretType) {
2198
+ SecretType["ARBITRARY"] = "arbitrary";
2199
+ SecretType["IAM_CREDENTIALS"] = "iam_credentials";
2200
+ SecretType["IMPORTED_CERT"] = "imported_cert";
2201
+ SecretType["PUBLIC_CERT"] = "public_cert";
2202
+ SecretType["PRIVATE_CERT"] = "private_cert";
2203
+ SecretType["USERNAME_PASSWORD"] = "username_password";
2204
+ SecretType["KV"] = "kv";
2205
+ })(SecretType = LockSecretVersionConstants.SecretType || (LockSecretVersionConstants.SecretType = {}));
2206
+ /** An optional lock mode. At lock creation, you can set one of the following modes to clear any matching locks on a secret version. - `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. */
2207
+ var Mode;
2208
+ (function (Mode) {
2209
+ Mode["EXCLUSIVE"] = "exclusive";
2210
+ Mode["EXCLUSIVE_DELETE"] = "exclusive_delete";
2211
+ })(Mode = LockSecretVersionConstants.Mode || (LockSecretVersionConstants.Mode = {}));
2212
+ })(LockSecretVersionConstants = SecretsManagerV1.LockSecretVersionConstants || (SecretsManagerV1.LockSecretVersionConstants = {}));
2213
+ /** Constants for the `unlockSecretVersion` operation. */
2214
+ var UnlockSecretVersionConstants;
2215
+ (function (UnlockSecretVersionConstants) {
2216
+ /** The secret type. */
2217
+ var SecretType;
2218
+ (function (SecretType) {
2219
+ SecretType["ARBITRARY"] = "arbitrary";
2220
+ SecretType["IAM_CREDENTIALS"] = "iam_credentials";
2221
+ SecretType["IMPORTED_CERT"] = "imported_cert";
2222
+ SecretType["PUBLIC_CERT"] = "public_cert";
2223
+ SecretType["PRIVATE_CERT"] = "private_cert";
2224
+ SecretType["USERNAME_PASSWORD"] = "username_password";
2225
+ SecretType["KV"] = "kv";
2226
+ })(SecretType = UnlockSecretVersionConstants.SecretType || (UnlockSecretVersionConstants.SecretType = {}));
2227
+ })(UnlockSecretVersionConstants = SecretsManagerV1.UnlockSecretVersionConstants || (SecretsManagerV1.UnlockSecretVersionConstants = {}));
1689
2228
  /** Constants for the `putPolicy` operation. */
1690
2229
  var PutPolicyConstants;
1691
2230
  (function (PutPolicyConstants) {