@ibm-cloud/secrets-manager 1.0.2 → 1.0.32

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.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * (C) Copyright IBM Corp. 2021.
3
+ * (C) Copyright IBM Corp. 2022.
4
4
  *
5
5
  * Licensed under the Apache License, Version 2.0 (the "License");
6
6
  * you may not use this file except in compliance with the License.
@@ -39,15 +39,15 @@ var __assign = (this && this.__assign) || function () {
39
39
  return __assign.apply(this, arguments);
40
40
  };
41
41
  /**
42
- * IBM OpenAPI SDK Code Generator Version: 3.40.0-910cf8c2-20211006-154754
42
+ * IBM OpenAPI SDK Code Generator Version: 3.47.1-be944570-20220406-170244
43
43
  */
44
44
  var extend = require("extend");
45
45
  var ibm_cloud_sdk_core_1 = require("ibm-cloud-sdk-core");
46
46
  var common_1 = require("../lib/common");
47
47
  /**
48
48
  * With IBM Cloud® Secrets Manager, you can create, lease, and centrally manage secrets that are used in IBM Cloud
49
- * services or your custom-built applications. Secrets are stored in a dedicated instance of Secrets Manager, built on
50
- * open source HashiCorp Vault.
49
+ * services or your custom-built applications. Secrets are stored in a dedicated instance of Secrets Manager, which is
50
+ * built on open source HashiCorp Vault.
51
51
  *
52
52
  * API Version: 1.0.0
53
53
  * See: https://cloud.ibm.com/docs/secrets-manager
@@ -71,9 +71,6 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
71
71
  if (options.serviceUrl) {
72
72
  _this.setServiceUrl(options.serviceUrl);
73
73
  }
74
- else {
75
- _this.setServiceUrl(SecretsManagerV1.DEFAULT_SERVICE_URL);
76
- }
77
74
  return _this;
78
75
  }
79
76
  /*************************
@@ -109,7 +106,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
109
106
  /**
110
107
  * Create a secret group.
111
108
  *
112
- * Creates a secret group that you can use to organize secrets and control who on your team has access to them.
109
+ * Create a secret group that you can use to organize secrets and control who on your team has access to them.
113
110
  *
114
111
  * A successful request returns the ID value of the secret group, along with other metadata. To learn more about
115
112
  * secret groups, check out the
@@ -123,10 +120,11 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
123
120
  */
124
121
  SecretsManagerV1.prototype.createSecretGroup = function (params) {
125
122
  var _params = __assign({}, params);
126
- var requiredParams = ['metadata', 'resources'];
127
- var missingParams = ibm_cloud_sdk_core_1.getMissingParams(_params, requiredParams);
128
- if (missingParams) {
129
- return Promise.reject(missingParams);
123
+ var _requiredParams = ['metadata', 'resources'];
124
+ var _validParams = ['metadata', 'resources', 'headers'];
125
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
126
+ if (_validationErrors) {
127
+ return Promise.reject(_validationErrors);
130
128
  }
131
129
  var body = {
132
130
  'metadata': _params.metadata,
@@ -151,7 +149,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
151
149
  /**
152
150
  * List secret groups.
153
151
  *
154
- * Retrieves the list of secret groups that are available in your Secrets Manager instance.
152
+ * List the secret groups that are available in your Secrets Manager instance.
155
153
  *
156
154
  * @param {Object} [params] - The parameters to send to the service.
157
155
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
@@ -159,6 +157,12 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
159
157
  */
160
158
  SecretsManagerV1.prototype.listSecretGroups = function (params) {
161
159
  var _params = __assign({}, params);
160
+ var _requiredParams = [];
161
+ var _validParams = ['headers'];
162
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
163
+ if (_validationErrors) {
164
+ return Promise.reject(_validationErrors);
165
+ }
162
166
  var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'listSecretGroups');
163
167
  var parameters = {
164
168
  options: {
@@ -176,7 +180,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
176
180
  /**
177
181
  * Get a secret group.
178
182
  *
179
- * Retrieves the metadata of an existing secret group by specifying the ID of the group.
183
+ * Get the metadata of an existing secret group by specifying the ID of the group.
180
184
  *
181
185
  * @param {Object} params - The parameters to send to the service.
182
186
  * @param {string} params.id - The v4 UUID that uniquely identifies the secret group.
@@ -185,10 +189,11 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
185
189
  */
186
190
  SecretsManagerV1.prototype.getSecretGroup = function (params) {
187
191
  var _params = __assign({}, params);
188
- var requiredParams = ['id'];
189
- var missingParams = ibm_cloud_sdk_core_1.getMissingParams(_params, requiredParams);
190
- if (missingParams) {
191
- return Promise.reject(missingParams);
192
+ var _requiredParams = ['id'];
193
+ var _validParams = ['id', 'headers'];
194
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
195
+ if (_validationErrors) {
196
+ return Promise.reject(_validationErrors);
192
197
  }
193
198
  var path = {
194
199
  'id': _params.id,
@@ -211,7 +216,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
211
216
  /**
212
217
  * Update a secret group.
213
218
  *
214
- * Updates the metadata of an existing secret group, such as its name or description.
219
+ * Update the metadata of an existing secret group, such as its name or description.
215
220
  *
216
221
  * @param {Object} params - The parameters to send to the service.
217
222
  * @param {string} params.id - The v4 UUID that uniquely identifies the secret group.
@@ -222,10 +227,11 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
222
227
  */
223
228
  SecretsManagerV1.prototype.updateSecretGroupMetadata = function (params) {
224
229
  var _params = __assign({}, params);
225
- var requiredParams = ['id', 'metadata', 'resources'];
226
- var missingParams = ibm_cloud_sdk_core_1.getMissingParams(_params, requiredParams);
227
- if (missingParams) {
228
- return Promise.reject(missingParams);
230
+ var _requiredParams = ['id', 'metadata', 'resources'];
231
+ var _validParams = ['id', 'metadata', 'resources', 'headers'];
232
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
233
+ if (_validationErrors) {
234
+ return Promise.reject(_validationErrors);
229
235
  }
230
236
  var body = {
231
237
  'metadata': _params.metadata,
@@ -254,7 +260,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
254
260
  /**
255
261
  * Delete a secret group.
256
262
  *
257
- * Deletes a secret group by specifying the ID of the secret group.
263
+ * Delete a secret group by specifying the ID of the secret group.
258
264
  *
259
265
  * **Note:** To delete a secret group, it must be empty. If you need to remove a secret group that contains secrets,
260
266
  * you must first [delete the secrets](#delete-secret) that are associated with the group.
@@ -266,10 +272,11 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
266
272
  */
267
273
  SecretsManagerV1.prototype.deleteSecretGroup = function (params) {
268
274
  var _params = __assign({}, params);
269
- var requiredParams = ['id'];
270
- var missingParams = ibm_cloud_sdk_core_1.getMissingParams(_params, requiredParams);
271
- if (missingParams) {
272
- return Promise.reject(missingParams);
275
+ var _requiredParams = ['id'];
276
+ var _validParams = ['id', 'headers'];
277
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
278
+ if (_validationErrors) {
279
+ return Promise.reject(_validationErrors);
273
280
  }
274
281
  var path = {
275
282
  'id': _params.id,
@@ -293,7 +300,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
293
300
  /**
294
301
  * Create a secret.
295
302
  *
296
- * Creates a secret or imports an existing value that you can use to access or authenticate to a protected resource.
303
+ * Create a secret or import an existing value that you can use to access or authenticate to a protected resource.
297
304
  *
298
305
  * Use this method to either generate or import an existing secret, such as an arbitrary value or a TLS certificate,
299
306
  * that you can manage in your Secrets Manager service instance. A successful request stores the secret in your
@@ -312,10 +319,11 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
312
319
  */
313
320
  SecretsManagerV1.prototype.createSecret = function (params) {
314
321
  var _params = __assign({}, params);
315
- var requiredParams = ['secretType', 'metadata', 'resources'];
316
- var missingParams = ibm_cloud_sdk_core_1.getMissingParams(_params, requiredParams);
317
- if (missingParams) {
318
- return Promise.reject(missingParams);
322
+ var _requiredParams = ['secretType', 'metadata', 'resources'];
323
+ var _validParams = ['secretType', 'metadata', 'resources', 'headers'];
324
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
325
+ if (_validationErrors) {
326
+ return Promise.reject(_validationErrors);
319
327
  }
320
328
  var body = {
321
329
  'metadata': _params.metadata,
@@ -344,7 +352,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
344
352
  /**
345
353
  * List secrets by type.
346
354
  *
347
- * Retrieves a list of secrets based on the type that you specify.
355
+ * List the secrets in your Secrets Manager instance based on the type that you specify.
348
356
  *
349
357
  * @param {Object} params - The parameters to send to the service.
350
358
  * @param {string} params.secretType - The secret type.
@@ -364,10 +372,11 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
364
372
  */
365
373
  SecretsManagerV1.prototype.listSecrets = function (params) {
366
374
  var _params = __assign({}, params);
367
- var requiredParams = ['secretType'];
368
- var missingParams = ibm_cloud_sdk_core_1.getMissingParams(_params, requiredParams);
369
- if (missingParams) {
370
- return Promise.reject(missingParams);
375
+ var _requiredParams = ['secretType'];
376
+ var _validParams = ['secretType', 'limit', 'offset', 'headers'];
377
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
378
+ if (_validationErrors) {
379
+ return Promise.reject(_validationErrors);
371
380
  }
372
381
  var query = {
373
382
  'limit': _params.limit,
@@ -395,7 +404,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
395
404
  /**
396
405
  * List all secrets.
397
406
  *
398
- * Retrieves a list of all secrets in your Secrets Manager instance.
407
+ * List all of the secrets in your Secrets Manager instance.
399
408
  *
400
409
  * @param {Object} [params] - The parameters to send to the service.
401
410
  * @param {number} [params.limit] - The number of secrets to retrieve. By default, list operations return the first
@@ -430,6 +439,12 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
430
439
  */
431
440
  SecretsManagerV1.prototype.listAllSecrets = function (params) {
432
441
  var _params = __assign({}, params);
442
+ var _requiredParams = [];
443
+ var _validParams = ['limit', 'offset', 'search', 'sortBy', 'groups', 'headers'];
444
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
445
+ if (_validationErrors) {
446
+ return Promise.reject(_validationErrors);
447
+ }
433
448
  var query = {
434
449
  'limit': _params.limit,
435
450
  'offset': _params.offset,
@@ -455,7 +470,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
455
470
  /**
456
471
  * Get a secret.
457
472
  *
458
- * Retrieves a secret and its details by specifying the ID of the secret.
473
+ * Get a secret and its details by specifying the ID of the secret.
459
474
  *
460
475
  * A successful request returns the secret data that is associated with your secret, along with other metadata. To
461
476
  * view only the details of a specified secret without retrieving its value, use the [Get secret
@@ -469,10 +484,11 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
469
484
  */
470
485
  SecretsManagerV1.prototype.getSecret = function (params) {
471
486
  var _params = __assign({}, params);
472
- var requiredParams = ['secretType', 'id'];
473
- var missingParams = ibm_cloud_sdk_core_1.getMissingParams(_params, requiredParams);
474
- if (missingParams) {
475
- return Promise.reject(missingParams);
487
+ var _requiredParams = ['secretType', 'id'];
488
+ var _validParams = ['secretType', 'id', 'headers'];
489
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
490
+ if (_validationErrors) {
491
+ return Promise.reject(_validationErrors);
476
492
  }
477
493
  var path = {
478
494
  'secret_type': _params.secretType,
@@ -496,25 +512,28 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
496
512
  /**
497
513
  * Invoke an action on a secret.
498
514
  *
499
- * Invokes an action on a specified secret. This method supports the following actions:
515
+ * Invoke an action on a specified secret. This method supports the following actions:
500
516
  *
501
- * - `rotate`: Replace the value of an `arbitrary`, `username_password`, `public_cert` or `imported_cert` secret.
517
+ * - `rotate`: Replace the value of a secret.
518
+ * - `restore`: Restore a previous version of an `iam_credentials` secret.
519
+ * - `revoke`: Revoke a private certificate.
502
520
  * - `delete_credentials`: Delete the API key that is associated with an `iam_credentials` secret.
503
521
  *
504
522
  * @param {Object} params - The parameters to send to the service.
505
523
  * @param {string} params.secretType - The secret type.
506
524
  * @param {string} params.id - The v4 UUID that uniquely identifies the secret.
507
525
  * @param {string} params.action - The action to perform on the specified secret.
508
- * @param {SecretAction} params.secretAction - The properties to update for the secret.
526
+ * @param {SecretAction} [params.secretAction] - The properties to update for the secret.
509
527
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
510
528
  * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.GetSecret>>}
511
529
  */
512
530
  SecretsManagerV1.prototype.updateSecret = function (params) {
513
531
  var _params = __assign({}, params);
514
- var requiredParams = ['secretType', 'id', 'action', 'secretAction'];
515
- var missingParams = ibm_cloud_sdk_core_1.getMissingParams(_params, requiredParams);
516
- if (missingParams) {
517
- return Promise.reject(missingParams);
532
+ var _requiredParams = ['secretType', 'id', 'action'];
533
+ var _validParams = ['secretType', 'id', 'action', 'secretAction', 'headers'];
534
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
535
+ if (_validationErrors) {
536
+ return Promise.reject(_validationErrors);
518
537
  }
519
538
  var body = _params.secretAction;
520
539
  var query = {
@@ -545,7 +564,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
545
564
  /**
546
565
  * Delete a secret.
547
566
  *
548
- * Deletes a secret by specifying the ID of the secret.
567
+ * Delete a secret by specifying the ID of the secret.
549
568
  *
550
569
  * @param {Object} params - The parameters to send to the service.
551
570
  * @param {string} params.secretType - The secret type.
@@ -555,10 +574,11 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
555
574
  */
556
575
  SecretsManagerV1.prototype.deleteSecret = function (params) {
557
576
  var _params = __assign({}, params);
558
- var requiredParams = ['secretType', 'id'];
559
- var missingParams = ibm_cloud_sdk_core_1.getMissingParams(_params, requiredParams);
560
- if (missingParams) {
561
- return Promise.reject(missingParams);
577
+ var _requiredParams = ['secretType', 'id'];
578
+ var _validParams = ['secretType', 'id', 'headers'];
579
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
580
+ if (_validationErrors) {
581
+ return Promise.reject(_validationErrors);
562
582
  }
563
583
  var path = {
564
584
  'secret_type': _params.secretType,
@@ -577,10 +597,50 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
577
597
  };
578
598
  return this.createRequest(parameters);
579
599
  };
600
+ /**
601
+ * List versions of a secret.
602
+ *
603
+ * List the versions of a secret.
604
+ *
605
+ * A successful request returns the list of the versions along with the metadata of each version.
606
+ *
607
+ * @param {Object} params - The parameters to send to the service.
608
+ * @param {string} params.secretType - The secret type.
609
+ * @param {string} params.id - The v4 UUID that uniquely identifies the secret.
610
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
611
+ * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.ListSecretVersions>>}
612
+ */
613
+ SecretsManagerV1.prototype.listSecretVersions = function (params) {
614
+ var _params = __assign({}, params);
615
+ var _requiredParams = ['secretType', 'id'];
616
+ var _validParams = ['secretType', 'id', 'headers'];
617
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
618
+ if (_validationErrors) {
619
+ return Promise.reject(_validationErrors);
620
+ }
621
+ var path = {
622
+ 'secret_type': _params.secretType,
623
+ 'id': _params.id,
624
+ };
625
+ var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'listSecretVersions');
626
+ var parameters = {
627
+ options: {
628
+ url: '/api/v1/secrets/{secret_type}/{id}/versions',
629
+ method: 'GET',
630
+ path: path,
631
+ },
632
+ defaultOptions: extend(true, {}, this.baseOptions, {
633
+ headers: extend(true, sdkHeaders, {
634
+ 'Accept': 'application/json',
635
+ }, _params.headers),
636
+ }),
637
+ };
638
+ return this.createRequest(parameters);
639
+ };
580
640
  /**
581
641
  * Get a version of a secret.
582
642
  *
583
- * Retrieves a version of a secret by specifying the ID of the version or the alias `previous`.
643
+ * Get a version of a secret by specifying the ID of the version or the alias `previous`.
584
644
  *
585
645
  * A successful request returns the secret data that is associated with the specified version of your secret, along
586
646
  * with other metadata.
@@ -598,10 +658,11 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
598
658
  */
599
659
  SecretsManagerV1.prototype.getSecretVersion = function (params) {
600
660
  var _params = __assign({}, params);
601
- var requiredParams = ['secretType', 'id', 'versionId'];
602
- var missingParams = ibm_cloud_sdk_core_1.getMissingParams(_params, requiredParams);
603
- if (missingParams) {
604
- return Promise.reject(missingParams);
661
+ var _requiredParams = ['secretType', 'id', 'versionId'];
662
+ var _validParams = ['secretType', 'id', 'versionId', 'headers'];
663
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
664
+ if (_validationErrors) {
665
+ return Promise.reject(_validationErrors);
605
666
  }
606
667
  var path = {
607
668
  'secret_type': _params.secretType,
@@ -623,10 +684,61 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
623
684
  };
624
685
  return this.createRequest(parameters);
625
686
  };
687
+ /**
688
+ * Invoke an action on a version of a secret.
689
+ *
690
+ * Invoke an action on a specified version of a secret. This method supports the following actions:
691
+ *
692
+ * - `revoke`: Revoke a version of a private certificate.
693
+ *
694
+ * @param {Object} params - The parameters to send to the service.
695
+ * @param {string} params.secretType - The secret type.
696
+ * @param {string} params.id - The v4 UUID that uniquely identifies the secret.
697
+ * @param {string} params.versionId - The v4 UUID that uniquely identifies the secret version. You can also use
698
+ * `previous` to retrieve the previous version.
699
+ *
700
+ * **Note:** To find the version ID of a secret, use the [Get secret metadata](#get-secret-metadata) method and check
701
+ * the response details.
702
+ * @param {string} params.action - The action to perform on the specified secret version.
703
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
704
+ * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.GetSecret>>}
705
+ */
706
+ SecretsManagerV1.prototype.updateSecretVersion = function (params) {
707
+ var _params = __assign({}, params);
708
+ var _requiredParams = ['secretType', 'id', 'versionId', 'action'];
709
+ var _validParams = ['secretType', 'id', 'versionId', 'action', 'headers'];
710
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
711
+ if (_validationErrors) {
712
+ return Promise.reject(_validationErrors);
713
+ }
714
+ var query = {
715
+ 'action': _params.action,
716
+ };
717
+ var path = {
718
+ 'secret_type': _params.secretType,
719
+ 'id': _params.id,
720
+ 'version_id': _params.versionId,
721
+ };
722
+ var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'updateSecretVersion');
723
+ var parameters = {
724
+ options: {
725
+ url: '/api/v1/secrets/{secret_type}/{id}/versions/{version_id}',
726
+ method: 'POST',
727
+ qs: query,
728
+ path: path,
729
+ },
730
+ defaultOptions: extend(true, {}, this.baseOptions, {
731
+ headers: extend(true, sdkHeaders, {
732
+ 'Accept': 'application/json',
733
+ }, _params.headers),
734
+ }),
735
+ };
736
+ return this.createRequest(parameters);
737
+ };
626
738
  /**
627
739
  * Get secret version metadata.
628
740
  *
629
- * Retrieves secret version metadata by specifying the ID of the version or the alias `previous`.
741
+ * Get the metadata of a secret version by specifying the ID of the version or the alias `previous`.
630
742
  *
631
743
  * A successful request returns the metadata that is associated with the specified version of your secret.
632
744
  *
@@ -643,10 +755,11 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
643
755
  */
644
756
  SecretsManagerV1.prototype.getSecretVersionMetadata = function (params) {
645
757
  var _params = __assign({}, params);
646
- var requiredParams = ['secretType', 'id', 'versionId'];
647
- var missingParams = ibm_cloud_sdk_core_1.getMissingParams(_params, requiredParams);
648
- if (missingParams) {
649
- return Promise.reject(missingParams);
758
+ var _requiredParams = ['secretType', 'id', 'versionId'];
759
+ var _validParams = ['secretType', 'id', 'versionId', 'headers'];
760
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
761
+ if (_validationErrors) {
762
+ return Promise.reject(_validationErrors);
650
763
  }
651
764
  var path = {
652
765
  'secret_type': _params.secretType,
@@ -671,7 +784,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
671
784
  /**
672
785
  * Get secret metadata.
673
786
  *
674
- * Retrieves the details of a secret by specifying the ID.
787
+ * Get the details of a secret by specifying its ID.
675
788
  *
676
789
  * A successful request returns only metadata about the secret, such as its name and creation date. To retrieve the
677
790
  * value of a secret, use the [Get a secret](#get-secret) or [Get a version of a secret](#get-secret-version) methods.
@@ -684,10 +797,11 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
684
797
  */
685
798
  SecretsManagerV1.prototype.getSecretMetadata = function (params) {
686
799
  var _params = __assign({}, params);
687
- var requiredParams = ['secretType', 'id'];
688
- var missingParams = ibm_cloud_sdk_core_1.getMissingParams(_params, requiredParams);
689
- if (missingParams) {
690
- return Promise.reject(missingParams);
800
+ var _requiredParams = ['secretType', 'id'];
801
+ var _validParams = ['secretType', 'id', 'headers'];
802
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
803
+ if (_validationErrors) {
804
+ return Promise.reject(_validationErrors);
691
805
  }
692
806
  var path = {
693
807
  'secret_type': _params.secretType,
@@ -711,7 +825,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
711
825
  /**
712
826
  * Update secret metadata.
713
827
  *
714
- * Updates the metadata of a secret, such as its name or description.
828
+ * Update the metadata of a secret, such as its name or description.
715
829
  *
716
830
  * To update the actual contents of a secret, rotate the secret by using the [Invoke an action on a
717
831
  * secret](#update-secret) method.
@@ -726,10 +840,11 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
726
840
  */
727
841
  SecretsManagerV1.prototype.updateSecretMetadata = function (params) {
728
842
  var _params = __assign({}, params);
729
- var requiredParams = ['secretType', 'id', 'metadata', 'resources'];
730
- var missingParams = ibm_cloud_sdk_core_1.getMissingParams(_params, requiredParams);
731
- if (missingParams) {
732
- return Promise.reject(missingParams);
843
+ var _requiredParams = ['secretType', 'id', 'metadata', 'resources'];
844
+ var _validParams = ['secretType', 'id', 'metadata', 'resources', 'headers'];
845
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
846
+ if (_validationErrors) {
847
+ return Promise.reject(_validationErrors);
733
848
  }
734
849
  var body = {
735
850
  'metadata': _params.metadata,
@@ -762,9 +877,9 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
762
877
  /**
763
878
  * Set secret policies.
764
879
  *
765
- * Creates or updates one or more policies, such as an [automatic rotation
766
- * policy](http://cloud.ibm.com/docs/secrets-manager?topic=secrets-manager-rotate-secrets#auto-rotate-secret), for the
767
- * specified secret.
880
+ * Create or update one or more policies, such as an [automatic rotation
881
+ * policy](https://cloud.ibm.com/docs/secrets-manager?topic=secrets-manager-automatic-rotation), for the specified
882
+ * secret.
768
883
  *
769
884
  * @param {Object} params - The parameters to send to the service.
770
885
  * @param {string} params.secretType - The secret type.
@@ -777,10 +892,11 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
777
892
  */
778
893
  SecretsManagerV1.prototype.putPolicy = function (params) {
779
894
  var _params = __assign({}, params);
780
- var requiredParams = ['secretType', 'id', 'metadata', 'resources'];
781
- var missingParams = ibm_cloud_sdk_core_1.getMissingParams(_params, requiredParams);
782
- if (missingParams) {
783
- return Promise.reject(missingParams);
895
+ var _requiredParams = ['secretType', 'id', 'metadata', 'resources'];
896
+ var _validParams = ['secretType', 'id', 'metadata', 'resources', 'policy', 'headers'];
897
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
898
+ if (_validationErrors) {
899
+ return Promise.reject(_validationErrors);
784
900
  }
785
901
  var body = {
786
902
  'metadata': _params.metadata,
@@ -814,7 +930,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
814
930
  /**
815
931
  * List secret policies.
816
932
  *
817
- * Retrieves a list of policies that are associated with a specified secret.
933
+ * List the rotation policies that are associated with a specified secret.
818
934
  *
819
935
  * @param {Object} params - The parameters to send to the service.
820
936
  * @param {string} params.secretType - The secret type.
@@ -825,10 +941,11 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
825
941
  */
826
942
  SecretsManagerV1.prototype.getPolicy = function (params) {
827
943
  var _params = __assign({}, params);
828
- var requiredParams = ['secretType', 'id'];
829
- var missingParams = ibm_cloud_sdk_core_1.getMissingParams(_params, requiredParams);
830
- if (missingParams) {
831
- return Promise.reject(missingParams);
944
+ var _requiredParams = ['secretType', 'id'];
945
+ var _validParams = ['secretType', 'id', 'policy', 'headers'];
946
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
947
+ if (_validationErrors) {
948
+ return Promise.reject(_validationErrors);
832
949
  }
833
950
  var query = {
834
951
  'policy': _params.policy,
@@ -859,24 +976,25 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
859
976
  /**
860
977
  * Set the configuration of a secret type.
861
978
  *
862
- * Sets the configuration for the specified secret type.
979
+ * Set the configuration for the specified secret type.
863
980
  *
864
981
  * Use this method to configure the IAM credentials (`iam_credentials`) engine for your service instance. Looking to
865
- * set up certificate ordering? To configure the public certificates (`public_cert`) engine, use the [Add a
866
- * configuration](#create_config_element) method.
982
+ * order or generate certificates? To configure the public certificates (`public_cert`) or private certificates
983
+ * (`private_cert`) engines, use the [Add a configuration](#create_config_element) method.
867
984
  *
868
985
  * @param {Object} params - The parameters to send to the service.
869
- * @param {string} params.secretType -
986
+ * @param {string} params.secretType - The secret type.
870
987
  * @param {EngineConfig} params.engineConfig - Properties to update for a secrets engine.
871
988
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
872
989
  * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.Empty>>}
873
990
  */
874
991
  SecretsManagerV1.prototype.putConfig = function (params) {
875
992
  var _params = __assign({}, params);
876
- var requiredParams = ['secretType', 'engineConfig'];
877
- var missingParams = ibm_cloud_sdk_core_1.getMissingParams(_params, requiredParams);
878
- if (missingParams) {
879
- return Promise.reject(missingParams);
993
+ var _requiredParams = ['secretType', 'engineConfig'];
994
+ var _validParams = ['secretType', 'engineConfig', 'headers'];
995
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
996
+ if (_validationErrors) {
997
+ return Promise.reject(_validationErrors);
880
998
  }
881
999
  var body = _params.engineConfig;
882
1000
  var path = {
@@ -901,7 +1019,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
901
1019
  /**
902
1020
  * Get the configuration of a secret type.
903
1021
  *
904
- * Retrieves the configuration that is associated with the specified secret type.
1022
+ * Get the configuration that is associated with the specified secret type.
905
1023
  *
906
1024
  * @param {Object} params - The parameters to send to the service.
907
1025
  * @param {string} params.secretType - The secret type.
@@ -910,10 +1028,11 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
910
1028
  */
911
1029
  SecretsManagerV1.prototype.getConfig = function (params) {
912
1030
  var _params = __assign({}, params);
913
- var requiredParams = ['secretType'];
914
- var missingParams = ibm_cloud_sdk_core_1.getMissingParams(_params, requiredParams);
915
- if (missingParams) {
916
- return Promise.reject(missingParams);
1031
+ var _requiredParams = ['secretType'];
1032
+ var _validParams = ['secretType', 'headers'];
1033
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1034
+ if (_validationErrors) {
1035
+ return Promise.reject(_validationErrors);
917
1036
  }
918
1037
  var path = {
919
1038
  'secret_type': _params.secretType,
@@ -936,10 +1055,18 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
936
1055
  /**
937
1056
  * Add a configuration.
938
1057
  *
939
- * Adds a configuration element to the specified secret type.
1058
+ * Add a configuration element to the specified secret type.
1059
+ *
1060
+ * Use this method to define the configurations that are required to enable the public certificates (`public_cert`)
1061
+ * and private certificates (`private_cert`) engines.
940
1062
  *
941
- * Use this method to define the configurations that are required to enable the public certificates (`public_cert`)
942
- * engine. You can add up to 10 certificate authority and DNS provider configurations for your instance.
1063
+ * You can add multiple configurations for your instance as follows:
1064
+ *
1065
+ * - Up to 10 public certificate authority configurations
1066
+ * - Up to 10 DNS provider configurations
1067
+ * - Up to 10 private root certificate authority configurations
1068
+ * - Up to 10 private intermediate certificate authority configurations
1069
+ * - Up to 10 certificate templates.
943
1070
  *
944
1071
  * @param {Object} params - The parameters to send to the service.
945
1072
  * @param {string} params.secretType - The secret type.
@@ -953,10 +1080,11 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
953
1080
  */
954
1081
  SecretsManagerV1.prototype.createConfigElement = function (params) {
955
1082
  var _params = __assign({}, params);
956
- var requiredParams = ['secretType', 'configElement', 'name', 'type', 'config'];
957
- var missingParams = ibm_cloud_sdk_core_1.getMissingParams(_params, requiredParams);
958
- if (missingParams) {
959
- return Promise.reject(missingParams);
1083
+ var _requiredParams = ['secretType', 'configElement', 'name', 'type', 'config'];
1084
+ var _validParams = ['secretType', 'configElement', 'name', 'type', 'config', 'headers'];
1085
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1086
+ if (_validationErrors) {
1087
+ return Promise.reject(_validationErrors);
960
1088
  }
961
1089
  var body = {
962
1090
  'name': _params.name,
@@ -987,7 +1115,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
987
1115
  /**
988
1116
  * List configurations.
989
1117
  *
990
- * Lists the configuration elements that are associated with a specified secret type.
1118
+ * List the configuration elements that are associated with a specified secret type.
991
1119
  *
992
1120
  * @param {Object} params - The parameters to send to the service.
993
1121
  * @param {string} params.secretType - The secret type.
@@ -997,10 +1125,11 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
997
1125
  */
998
1126
  SecretsManagerV1.prototype.getConfigElements = function (params) {
999
1127
  var _params = __assign({}, params);
1000
- var requiredParams = ['secretType', 'configElement'];
1001
- var missingParams = ibm_cloud_sdk_core_1.getMissingParams(_params, requiredParams);
1002
- if (missingParams) {
1003
- return Promise.reject(missingParams);
1128
+ var _requiredParams = ['secretType', 'configElement'];
1129
+ var _validParams = ['secretType', 'configElement', 'headers'];
1130
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1131
+ if (_validationErrors) {
1132
+ return Promise.reject(_validationErrors);
1004
1133
  }
1005
1134
  var path = {
1006
1135
  'secret_type': _params.secretType,
@@ -1024,7 +1153,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1024
1153
  /**
1025
1154
  * Get a configuration.
1026
1155
  *
1027
- * Retrieves the details of a specific configuration that is associated with a secret type.
1156
+ * Get the details of a specific configuration that is associated with a secret type.
1028
1157
  *
1029
1158
  * @param {Object} params - The parameters to send to the service.
1030
1159
  * @param {string} params.secretType - The secret type.
@@ -1035,10 +1164,11 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1035
1164
  */
1036
1165
  SecretsManagerV1.prototype.getConfigElement = function (params) {
1037
1166
  var _params = __assign({}, params);
1038
- var requiredParams = ['secretType', 'configElement', 'configName'];
1039
- var missingParams = ibm_cloud_sdk_core_1.getMissingParams(_params, requiredParams);
1040
- if (missingParams) {
1041
- return Promise.reject(missingParams);
1167
+ var _requiredParams = ['secretType', 'configElement', 'configName'];
1168
+ var _validParams = ['secretType', 'configElement', 'configName', 'headers'];
1169
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1170
+ if (_validationErrors) {
1171
+ return Promise.reject(_validationErrors);
1042
1172
  }
1043
1173
  var path = {
1044
1174
  'secret_type': _params.secretType,
@@ -1063,7 +1193,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1063
1193
  /**
1064
1194
  * Update a configuration.
1065
1195
  *
1066
- * Updates a configuration element that is associated with the specified secret type.
1196
+ * Update a configuration element that is associated with the specified secret type.
1067
1197
  *
1068
1198
  * @param {Object} params - The parameters to send to the service.
1069
1199
  * @param {string} params.secretType - The secret type.
@@ -1071,16 +1201,17 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1071
1201
  * @param {string} params.configName - The name of your configuration.
1072
1202
  * @param {string} params.type - The type of configuration. Value options differ depending on the `config_element`
1073
1203
  * property that you want to define.
1074
- * @param {JsonObject} params.config -
1204
+ * @param {JsonObject} params.config - Properties that describe a configuration, which depends on type.
1075
1205
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1076
1206
  * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.GetSingleConfigElement>>}
1077
1207
  */
1078
1208
  SecretsManagerV1.prototype.updateConfigElement = function (params) {
1079
1209
  var _params = __assign({}, params);
1080
- var requiredParams = ['secretType', 'configElement', 'configName', 'type', 'config'];
1081
- var missingParams = ibm_cloud_sdk_core_1.getMissingParams(_params, requiredParams);
1082
- if (missingParams) {
1083
- return Promise.reject(missingParams);
1210
+ var _requiredParams = ['secretType', 'configElement', 'configName', 'type', 'config'];
1211
+ var _validParams = ['secretType', 'configElement', 'configName', 'type', 'config', 'headers'];
1212
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1213
+ if (_validationErrors) {
1214
+ return Promise.reject(_validationErrors);
1084
1215
  }
1085
1216
  var body = {
1086
1217
  'type': _params.type,
@@ -1108,10 +1239,74 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1108
1239
  };
1109
1240
  return this.createRequest(parameters);
1110
1241
  };
1242
+ /**
1243
+ * Invoke an action on a configuration.
1244
+ *
1245
+ * Invoke an action on a specified configuration element. This method supports the following actions:
1246
+ *
1247
+ * - `sign_intermediate`: Sign an intermediate certificate authority.
1248
+ * - `sign_csr`: Sign a certificate signing request.
1249
+ * - `set_signed`: Set a signed intermediate certificate authority.
1250
+ * - `revoke`: Revoke an internally signed intermediate certificate authority certificate.
1251
+ * - `rotate_crl`: Rotate the certificate revocation list (CRL) of an intermediate certificate authority.
1252
+ *
1253
+ * @param {Object} params - The parameters to send to the service.
1254
+ * @param {string} params.secretType - The secret type.
1255
+ * @param {string} params.configElement - The configuration element on which the action is applied.
1256
+ * @param {string} params.configName - The name of the certificate authority.
1257
+ * @param {string} params.action - The action to perform on the specified configuration element.
1258
+ * @param {ConfigAction} [params.config] - Properties that describe an action on a configuration element.
1259
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1260
+ * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.ConfigElementActionResult>>}
1261
+ */
1262
+ SecretsManagerV1.prototype.actionOnConfigElement = function (params) {
1263
+ var _params = __assign({}, params);
1264
+ var _requiredParams = ['secretType', 'configElement', 'configName', 'action'];
1265
+ var _validParams = [
1266
+ 'secretType',
1267
+ 'configElement',
1268
+ 'configName',
1269
+ 'action',
1270
+ 'config',
1271
+ 'headers',
1272
+ ];
1273
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1274
+ if (_validationErrors) {
1275
+ return Promise.reject(_validationErrors);
1276
+ }
1277
+ var body = {
1278
+ 'config': _params.config,
1279
+ };
1280
+ var query = {
1281
+ 'action': _params.action,
1282
+ };
1283
+ var path = {
1284
+ 'secret_type': _params.secretType,
1285
+ 'config_element': _params.configElement,
1286
+ 'config_name': _params.configName,
1287
+ };
1288
+ var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'actionOnConfigElement');
1289
+ var parameters = {
1290
+ options: {
1291
+ url: '/api/v1/config/{secret_type}/{config_element}/{config_name}',
1292
+ method: 'POST',
1293
+ body: body,
1294
+ qs: query,
1295
+ path: path,
1296
+ },
1297
+ defaultOptions: extend(true, {}, this.baseOptions, {
1298
+ headers: extend(true, sdkHeaders, {
1299
+ 'Accept': 'application/json',
1300
+ 'Content-Type': 'application/json',
1301
+ }, _params.headers),
1302
+ }),
1303
+ };
1304
+ return this.createRequest(parameters);
1305
+ };
1111
1306
  /**
1112
1307
  * Delete a configuration.
1113
1308
  *
1114
- * Deletes a configuration element from the specified secret type.
1309
+ * Delete a configuration element from the specified secret type.
1115
1310
  *
1116
1311
  * @param {Object} params - The parameters to send to the service.
1117
1312
  * @param {string} params.secretType - The secret type.
@@ -1122,10 +1317,11 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1122
1317
  */
1123
1318
  SecretsManagerV1.prototype.deleteConfigElement = function (params) {
1124
1319
  var _params = __assign({}, params);
1125
- var requiredParams = ['secretType', 'configElement', 'configName'];
1126
- var missingParams = ibm_cloud_sdk_core_1.getMissingParams(_params, requiredParams);
1127
- if (missingParams) {
1128
- return Promise.reject(missingParams);
1320
+ var _requiredParams = ['secretType', 'configElement', 'configName'];
1321
+ var _validParams = ['secretType', 'configElement', 'configName', 'headers'];
1322
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1323
+ if (_validationErrors) {
1324
+ return Promise.reject(_validationErrors);
1129
1325
  }
1130
1326
  var path = {
1131
1327
  'secret_type': _params.secretType,
@@ -1145,7 +1341,159 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1145
1341
  };
1146
1342
  return this.createRequest(parameters);
1147
1343
  };
1148
- SecretsManagerV1.DEFAULT_SERVICE_URL = 'https://secrets-manager.cloud.ibm.com';
1344
+ /*************************
1345
+ * notifications
1346
+ ************************/
1347
+ /**
1348
+ * Register with Event Notifications.
1349
+ *
1350
+ * Create a registration between a Secrets Manager instance and [Event
1351
+ * Notifications](https://cloud.ibm.com/apidocs/event-notifications).
1352
+ *
1353
+ * A successful request adds Secrets Manager as a source that you can reference from your Event Notifications
1354
+ * instance. For more information about enabling notifications for Secrets Manager, check out the
1355
+ * [docs](https://cloud.ibm.com/docs/secrets-manager?topic=secrets-manager-event-notifications).
1356
+ *
1357
+ * @param {Object} params - The parameters to send to the service.
1358
+ * @param {string} params.eventNotificationsInstanceCrn - The Cloud Resource Name (CRN) of the connected Event
1359
+ * Notifications instance.
1360
+ * @param {string} params.eventNotificationsSourceName - The name that is displayed as a source in your Event
1361
+ * Notifications instance.
1362
+ * @param {string} [params.eventNotificationsSourceDescription] - An optional description for the source in your Event
1363
+ * Notifications instance.
1364
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1365
+ * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.GetNotificationsSettings>>}
1366
+ */
1367
+ SecretsManagerV1.prototype.createNotificationsRegistration = function (params) {
1368
+ var _params = __assign({}, params);
1369
+ var _requiredParams = ['eventNotificationsInstanceCrn', 'eventNotificationsSourceName'];
1370
+ var _validParams = [
1371
+ 'eventNotificationsInstanceCrn',
1372
+ 'eventNotificationsSourceName',
1373
+ 'eventNotificationsSourceDescription',
1374
+ 'headers',
1375
+ ];
1376
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1377
+ if (_validationErrors) {
1378
+ return Promise.reject(_validationErrors);
1379
+ }
1380
+ var body = {
1381
+ 'event_notifications_instance_crn': _params.eventNotificationsInstanceCrn,
1382
+ 'event_notifications_source_name': _params.eventNotificationsSourceName,
1383
+ 'event_notifications_source_description': _params.eventNotificationsSourceDescription,
1384
+ };
1385
+ var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'createNotificationsRegistration');
1386
+ var parameters = {
1387
+ options: {
1388
+ url: '/api/v1/notifications/registration',
1389
+ method: 'POST',
1390
+ body: body,
1391
+ },
1392
+ defaultOptions: extend(true, {}, this.baseOptions, {
1393
+ headers: extend(true, sdkHeaders, {
1394
+ 'Accept': 'application/json',
1395
+ 'Content-Type': 'application/json',
1396
+ }, _params.headers),
1397
+ }),
1398
+ };
1399
+ return this.createRequest(parameters);
1400
+ };
1401
+ /**
1402
+ * Get Event Notifications registration details.
1403
+ *
1404
+ * Get the details of an existing registration between a Secrets Manager instance and Event Notifications.
1405
+ *
1406
+ * @param {Object} [params] - The parameters to send to the service.
1407
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1408
+ * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.GetNotificationsSettings>>}
1409
+ */
1410
+ SecretsManagerV1.prototype.getNotificationsRegistration = function (params) {
1411
+ var _params = __assign({}, params);
1412
+ var _requiredParams = [];
1413
+ var _validParams = ['headers'];
1414
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1415
+ if (_validationErrors) {
1416
+ return Promise.reject(_validationErrors);
1417
+ }
1418
+ var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getNotificationsRegistration');
1419
+ var parameters = {
1420
+ options: {
1421
+ url: '/api/v1/notifications/registration',
1422
+ method: 'GET',
1423
+ },
1424
+ defaultOptions: extend(true, {}, this.baseOptions, {
1425
+ headers: extend(true, sdkHeaders, {
1426
+ 'Accept': 'application/json',
1427
+ }, _params.headers),
1428
+ }),
1429
+ };
1430
+ return this.createRequest(parameters);
1431
+ };
1432
+ /**
1433
+ * Unregister from Event Notifications.
1434
+ *
1435
+ * Delete a registration between a Secrets Manager instance and Event Notifications.
1436
+ *
1437
+ * A successful request removes your Secrets Manager instance as a source in Event Notifications.
1438
+ *
1439
+ * @param {Object} [params] - The parameters to send to the service.
1440
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1441
+ * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.Empty>>}
1442
+ */
1443
+ SecretsManagerV1.prototype.deleteNotificationsRegistration = function (params) {
1444
+ var _params = __assign({}, params);
1445
+ var _requiredParams = [];
1446
+ var _validParams = ['headers'];
1447
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1448
+ if (_validationErrors) {
1449
+ return Promise.reject(_validationErrors);
1450
+ }
1451
+ var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteNotificationsRegistration');
1452
+ var parameters = {
1453
+ options: {
1454
+ url: '/api/v1/notifications/registration',
1455
+ method: 'DELETE',
1456
+ },
1457
+ defaultOptions: extend(true, {}, this.baseOptions, {
1458
+ headers: extend(true, sdkHeaders, {}, _params.headers),
1459
+ }),
1460
+ };
1461
+ return this.createRequest(parameters);
1462
+ };
1463
+ /**
1464
+ * Send a test event.
1465
+ *
1466
+ * Send a test event from a Secrets Manager instance to a configured [Event
1467
+ * Notifications](https://cloud.ibm.com/apidocs/event-notifications) instance.
1468
+ *
1469
+ * A successful request sends a test event to the Event Notifications instance. For more information about enabling
1470
+ * notifications for Secrets Manager, check out the
1471
+ * [docs](https://cloud.ibm.com/docs/secrets-manager?topic=secrets-manager-event-notifications).
1472
+ *
1473
+ * @param {Object} [params] - The parameters to send to the service.
1474
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1475
+ * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.Empty>>}
1476
+ */
1477
+ SecretsManagerV1.prototype.sendTestNotification = function (params) {
1478
+ var _params = __assign({}, params);
1479
+ var _requiredParams = [];
1480
+ var _validParams = ['headers'];
1481
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1482
+ if (_validationErrors) {
1483
+ return Promise.reject(_validationErrors);
1484
+ }
1485
+ var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'sendTestNotification');
1486
+ var parameters = {
1487
+ options: {
1488
+ url: '/api/v1/notifications/test',
1489
+ method: 'GET',
1490
+ },
1491
+ defaultOptions: extend(true, {}, this.baseOptions, {
1492
+ headers: extend(true, sdkHeaders, {}, _params.headers),
1493
+ }),
1494
+ };
1495
+ return this.createRequest(parameters);
1496
+ };
1149
1497
  SecretsManagerV1.DEFAULT_SERVICE_NAME = 'secrets_manager';
1150
1498
  return SecretsManagerV1;
1151
1499
  }(ibm_cloud_sdk_core_1.BaseService));
@@ -1163,7 +1511,9 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1163
1511
  SecretType["IAM_CREDENTIALS"] = "iam_credentials";
1164
1512
  SecretType["IMPORTED_CERT"] = "imported_cert";
1165
1513
  SecretType["PUBLIC_CERT"] = "public_cert";
1514
+ SecretType["PRIVATE_CERT"] = "private_cert";
1166
1515
  SecretType["USERNAME_PASSWORD"] = "username_password";
1516
+ SecretType["KV"] = "kv";
1167
1517
  })(SecretType = CreateSecretConstants.SecretType || (CreateSecretConstants.SecretType = {}));
1168
1518
  })(CreateSecretConstants = SecretsManagerV1.CreateSecretConstants || (SecretsManagerV1.CreateSecretConstants = {}));
1169
1519
  /** Constants for the `listSecrets` operation. */
@@ -1176,7 +1526,9 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1176
1526
  SecretType["IAM_CREDENTIALS"] = "iam_credentials";
1177
1527
  SecretType["IMPORTED_CERT"] = "imported_cert";
1178
1528
  SecretType["PUBLIC_CERT"] = "public_cert";
1529
+ SecretType["PRIVATE_CERT"] = "private_cert";
1179
1530
  SecretType["USERNAME_PASSWORD"] = "username_password";
1531
+ SecretType["KV"] = "kv";
1180
1532
  })(SecretType = ListSecretsConstants.SecretType || (ListSecretsConstants.SecretType = {}));
1181
1533
  })(ListSecretsConstants = SecretsManagerV1.ListSecretsConstants || (SecretsManagerV1.ListSecretsConstants = {}));
1182
1534
  /** Constants for the `listAllSecrets` operation. */
@@ -1202,7 +1554,9 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1202
1554
  SecretType["IAM_CREDENTIALS"] = "iam_credentials";
1203
1555
  SecretType["IMPORTED_CERT"] = "imported_cert";
1204
1556
  SecretType["PUBLIC_CERT"] = "public_cert";
1557
+ SecretType["PRIVATE_CERT"] = "private_cert";
1205
1558
  SecretType["USERNAME_PASSWORD"] = "username_password";
1559
+ SecretType["KV"] = "kv";
1206
1560
  })(SecretType = GetSecretConstants.SecretType || (GetSecretConstants.SecretType = {}));
1207
1561
  })(GetSecretConstants = SecretsManagerV1.GetSecretConstants || (SecretsManagerV1.GetSecretConstants = {}));
1208
1562
  /** Constants for the `updateSecret` operation. */
@@ -1215,12 +1569,16 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1215
1569
  SecretType["IAM_CREDENTIALS"] = "iam_credentials";
1216
1570
  SecretType["IMPORTED_CERT"] = "imported_cert";
1217
1571
  SecretType["PUBLIC_CERT"] = "public_cert";
1572
+ SecretType["PRIVATE_CERT"] = "private_cert";
1218
1573
  SecretType["USERNAME_PASSWORD"] = "username_password";
1574
+ SecretType["KV"] = "kv";
1219
1575
  })(SecretType = UpdateSecretConstants.SecretType || (UpdateSecretConstants.SecretType = {}));
1220
1576
  /** The action to perform on the specified secret. */
1221
1577
  var Action;
1222
1578
  (function (Action) {
1223
1579
  Action["ROTATE"] = "rotate";
1580
+ Action["RESTORE"] = "restore";
1581
+ Action["REVOKE"] = "revoke";
1224
1582
  Action["DELETE_CREDENTIALS"] = "delete_credentials";
1225
1583
  })(Action = UpdateSecretConstants.Action || (UpdateSecretConstants.Action = {}));
1226
1584
  })(UpdateSecretConstants = SecretsManagerV1.UpdateSecretConstants || (SecretsManagerV1.UpdateSecretConstants = {}));
@@ -1234,27 +1592,68 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1234
1592
  SecretType["IAM_CREDENTIALS"] = "iam_credentials";
1235
1593
  SecretType["IMPORTED_CERT"] = "imported_cert";
1236
1594
  SecretType["PUBLIC_CERT"] = "public_cert";
1595
+ SecretType["PRIVATE_CERT"] = "private_cert";
1237
1596
  SecretType["USERNAME_PASSWORD"] = "username_password";
1597
+ SecretType["KV"] = "kv";
1238
1598
  })(SecretType = DeleteSecretConstants.SecretType || (DeleteSecretConstants.SecretType = {}));
1239
1599
  })(DeleteSecretConstants = SecretsManagerV1.DeleteSecretConstants || (SecretsManagerV1.DeleteSecretConstants = {}));
1600
+ /** Constants for the `listSecretVersions` operation. */
1601
+ var ListSecretVersionsConstants;
1602
+ (function (ListSecretVersionsConstants) {
1603
+ /** The secret type. */
1604
+ var SecretType;
1605
+ (function (SecretType) {
1606
+ SecretType["ARBITRARY"] = "arbitrary";
1607
+ SecretType["IAM_CREDENTIALS"] = "iam_credentials";
1608
+ SecretType["IMPORTED_CERT"] = "imported_cert";
1609
+ SecretType["PUBLIC_CERT"] = "public_cert";
1610
+ SecretType["PRIVATE_CERT"] = "private_cert";
1611
+ SecretType["USERNAME_PASSWORD"] = "username_password";
1612
+ SecretType["KV"] = "kv";
1613
+ })(SecretType = ListSecretVersionsConstants.SecretType || (ListSecretVersionsConstants.SecretType = {}));
1614
+ })(ListSecretVersionsConstants = SecretsManagerV1.ListSecretVersionsConstants || (SecretsManagerV1.ListSecretVersionsConstants = {}));
1240
1615
  /** Constants for the `getSecretVersion` operation. */
1241
1616
  var GetSecretVersionConstants;
1242
1617
  (function (GetSecretVersionConstants) {
1243
1618
  /** The secret type. */
1244
1619
  var SecretType;
1245
1620
  (function (SecretType) {
1621
+ SecretType["ARBITRARY"] = "arbitrary";
1622
+ SecretType["IAM_CREDENTIALS"] = "iam_credentials";
1246
1623
  SecretType["IMPORTED_CERT"] = "imported_cert";
1247
1624
  SecretType["PUBLIC_CERT"] = "public_cert";
1625
+ SecretType["PRIVATE_CERT"] = "private_cert";
1626
+ SecretType["USERNAME_PASSWORD"] = "username_password";
1627
+ SecretType["KV"] = "kv";
1248
1628
  })(SecretType = GetSecretVersionConstants.SecretType || (GetSecretVersionConstants.SecretType = {}));
1249
1629
  })(GetSecretVersionConstants = SecretsManagerV1.GetSecretVersionConstants || (SecretsManagerV1.GetSecretVersionConstants = {}));
1630
+ /** Constants for the `updateSecretVersion` operation. */
1631
+ var UpdateSecretVersionConstants;
1632
+ (function (UpdateSecretVersionConstants) {
1633
+ /** The secret type. */
1634
+ var SecretType;
1635
+ (function (SecretType) {
1636
+ SecretType["PRIVATE_CERT"] = "private_cert";
1637
+ })(SecretType = UpdateSecretVersionConstants.SecretType || (UpdateSecretVersionConstants.SecretType = {}));
1638
+ /** The action to perform on the specified secret version. */
1639
+ var Action;
1640
+ (function (Action) {
1641
+ Action["REVOKE"] = "revoke";
1642
+ })(Action = UpdateSecretVersionConstants.Action || (UpdateSecretVersionConstants.Action = {}));
1643
+ })(UpdateSecretVersionConstants = SecretsManagerV1.UpdateSecretVersionConstants || (SecretsManagerV1.UpdateSecretVersionConstants = {}));
1250
1644
  /** Constants for the `getSecretVersionMetadata` operation. */
1251
1645
  var GetSecretVersionMetadataConstants;
1252
1646
  (function (GetSecretVersionMetadataConstants) {
1253
1647
  /** The secret type. */
1254
1648
  var SecretType;
1255
1649
  (function (SecretType) {
1650
+ SecretType["ARBITRARY"] = "arbitrary";
1651
+ SecretType["IAM_CREDENTIALS"] = "iam_credentials";
1256
1652
  SecretType["IMPORTED_CERT"] = "imported_cert";
1257
1653
  SecretType["PUBLIC_CERT"] = "public_cert";
1654
+ SecretType["PRIVATE_CERT"] = "private_cert";
1655
+ SecretType["USERNAME_PASSWORD"] = "username_password";
1656
+ SecretType["KV"] = "kv";
1258
1657
  })(SecretType = GetSecretVersionMetadataConstants.SecretType || (GetSecretVersionMetadataConstants.SecretType = {}));
1259
1658
  })(GetSecretVersionMetadataConstants = SecretsManagerV1.GetSecretVersionMetadataConstants || (SecretsManagerV1.GetSecretVersionMetadataConstants = {}));
1260
1659
  /** Constants for the `getSecretMetadata` operation. */
@@ -1267,7 +1666,9 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1267
1666
  SecretType["IAM_CREDENTIALS"] = "iam_credentials";
1268
1667
  SecretType["IMPORTED_CERT"] = "imported_cert";
1269
1668
  SecretType["PUBLIC_CERT"] = "public_cert";
1669
+ SecretType["PRIVATE_CERT"] = "private_cert";
1270
1670
  SecretType["USERNAME_PASSWORD"] = "username_password";
1671
+ SecretType["KV"] = "kv";
1271
1672
  })(SecretType = GetSecretMetadataConstants.SecretType || (GetSecretMetadataConstants.SecretType = {}));
1272
1673
  })(GetSecretMetadataConstants = SecretsManagerV1.GetSecretMetadataConstants || (SecretsManagerV1.GetSecretMetadataConstants = {}));
1273
1674
  /** Constants for the `updateSecretMetadata` operation. */
@@ -1280,7 +1681,9 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1280
1681
  SecretType["IAM_CREDENTIALS"] = "iam_credentials";
1281
1682
  SecretType["IMPORTED_CERT"] = "imported_cert";
1282
1683
  SecretType["PUBLIC_CERT"] = "public_cert";
1684
+ SecretType["PRIVATE_CERT"] = "private_cert";
1283
1685
  SecretType["USERNAME_PASSWORD"] = "username_password";
1686
+ SecretType["KV"] = "kv";
1284
1687
  })(SecretType = UpdateSecretMetadataConstants.SecretType || (UpdateSecretMetadataConstants.SecretType = {}));
1285
1688
  })(UpdateSecretMetadataConstants = SecretsManagerV1.UpdateSecretMetadataConstants || (SecretsManagerV1.UpdateSecretMetadataConstants = {}));
1286
1689
  /** Constants for the `putPolicy` operation. */
@@ -1291,6 +1694,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1291
1694
  (function (SecretType) {
1292
1695
  SecretType["USERNAME_PASSWORD"] = "username_password";
1293
1696
  SecretType["PUBLIC_CERT"] = "public_cert";
1697
+ SecretType["PRIVATE_CERT"] = "private_cert";
1294
1698
  })(SecretType = PutPolicyConstants.SecretType || (PutPolicyConstants.SecretType = {}));
1295
1699
  /** The type of policy that is associated with the specified secret. */
1296
1700
  var Policy;
@@ -1306,6 +1710,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1306
1710
  (function (SecretType) {
1307
1711
  SecretType["USERNAME_PASSWORD"] = "username_password";
1308
1712
  SecretType["PUBLIC_CERT"] = "public_cert";
1713
+ SecretType["PRIVATE_CERT"] = "private_cert";
1309
1714
  })(SecretType = GetPolicyConstants.SecretType || (GetPolicyConstants.SecretType = {}));
1310
1715
  /** The type of policy that is associated with the specified secret. */
1311
1716
  var Policy;
@@ -1316,7 +1721,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1316
1721
  /** Constants for the `putConfig` operation. */
1317
1722
  var PutConfigConstants;
1318
1723
  (function (PutConfigConstants) {
1319
- /** SecretType */
1724
+ /** The secret type. */
1320
1725
  var SecretType;
1321
1726
  (function (SecretType) {
1322
1727
  SecretType["IAM_CREDENTIALS"] = "iam_credentials";
@@ -1330,6 +1735,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1330
1735
  (function (SecretType) {
1331
1736
  SecretType["IAM_CREDENTIALS"] = "iam_credentials";
1332
1737
  SecretType["PUBLIC_CERT"] = "public_cert";
1738
+ SecretType["PRIVATE_CERT"] = "private_cert";
1333
1739
  })(SecretType = GetConfigConstants.SecretType || (GetConfigConstants.SecretType = {}));
1334
1740
  })(GetConfigConstants = SecretsManagerV1.GetConfigConstants || (SecretsManagerV1.GetConfigConstants = {}));
1335
1741
  /** Constants for the `createConfigElement` operation. */
@@ -1339,12 +1745,16 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1339
1745
  var SecretType;
1340
1746
  (function (SecretType) {
1341
1747
  SecretType["PUBLIC_CERT"] = "public_cert";
1748
+ SecretType["PRIVATE_CERT"] = "private_cert";
1342
1749
  })(SecretType = CreateConfigElementConstants.SecretType || (CreateConfigElementConstants.SecretType = {}));
1343
1750
  /** The configuration element to define or manage. */
1344
1751
  var ConfigElement;
1345
1752
  (function (ConfigElement) {
1346
1753
  ConfigElement["CERTIFICATE_AUTHORITIES"] = "certificate_authorities";
1347
1754
  ConfigElement["DNS_PROVIDERS"] = "dns_providers";
1755
+ ConfigElement["ROOT_CERTIFICATE_AUTHORITIES"] = "root_certificate_authorities";
1756
+ ConfigElement["INTERMEDIATE_CERTIFICATE_AUTHORITIES"] = "intermediate_certificate_authorities";
1757
+ ConfigElement["CERTIFICATE_TEMPLATES"] = "certificate_templates";
1348
1758
  })(ConfigElement = CreateConfigElementConstants.ConfigElement || (CreateConfigElementConstants.ConfigElement = {}));
1349
1759
  /** The type of configuration. Value options differ depending on the `config_element` property that you want to define. */
1350
1760
  var Type;
@@ -1353,6 +1763,9 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1353
1763
  Type["LETSENCRYPT_STAGE"] = "letsencrypt-stage";
1354
1764
  Type["CIS"] = "cis";
1355
1765
  Type["CLASSIC_INFRASTRUCTURE"] = "classic_infrastructure";
1766
+ Type["ROOT_CERTIFICATE_AUTHORITY"] = "root_certificate_authority";
1767
+ Type["INTERMEDIATE_CERTIFICATE_AUTHORITY"] = "intermediate_certificate_authority";
1768
+ Type["CERTIFICATE_TEMPLATE"] = "certificate_template";
1356
1769
  })(Type = CreateConfigElementConstants.Type || (CreateConfigElementConstants.Type = {}));
1357
1770
  })(CreateConfigElementConstants = SecretsManagerV1.CreateConfigElementConstants || (SecretsManagerV1.CreateConfigElementConstants = {}));
1358
1771
  /** Constants for the `getConfigElements` operation. */
@@ -1362,12 +1775,16 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1362
1775
  var SecretType;
1363
1776
  (function (SecretType) {
1364
1777
  SecretType["PUBLIC_CERT"] = "public_cert";
1778
+ SecretType["PRIVATE_CERT"] = "private_cert";
1365
1779
  })(SecretType = GetConfigElementsConstants.SecretType || (GetConfigElementsConstants.SecretType = {}));
1366
1780
  /** The configuration element to define or manage. */
1367
1781
  var ConfigElement;
1368
1782
  (function (ConfigElement) {
1369
1783
  ConfigElement["CERTIFICATE_AUTHORITIES"] = "certificate_authorities";
1370
1784
  ConfigElement["DNS_PROVIDERS"] = "dns_providers";
1785
+ ConfigElement["ROOT_CERTIFICATE_AUTHORITIES"] = "root_certificate_authorities";
1786
+ ConfigElement["INTERMEDIATE_CERTIFICATE_AUTHORITIES"] = "intermediate_certificate_authorities";
1787
+ ConfigElement["CERTIFICATE_TEMPLATES"] = "certificate_templates";
1371
1788
  })(ConfigElement = GetConfigElementsConstants.ConfigElement || (GetConfigElementsConstants.ConfigElement = {}));
1372
1789
  })(GetConfigElementsConstants = SecretsManagerV1.GetConfigElementsConstants || (SecretsManagerV1.GetConfigElementsConstants = {}));
1373
1790
  /** Constants for the `getConfigElement` operation. */
@@ -1377,12 +1794,16 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1377
1794
  var SecretType;
1378
1795
  (function (SecretType) {
1379
1796
  SecretType["PUBLIC_CERT"] = "public_cert";
1797
+ SecretType["PRIVATE_CERT"] = "private_cert";
1380
1798
  })(SecretType = GetConfigElementConstants.SecretType || (GetConfigElementConstants.SecretType = {}));
1381
1799
  /** The configuration element to define or manage. */
1382
1800
  var ConfigElement;
1383
1801
  (function (ConfigElement) {
1384
1802
  ConfigElement["CERTIFICATE_AUTHORITIES"] = "certificate_authorities";
1385
1803
  ConfigElement["DNS_PROVIDERS"] = "dns_providers";
1804
+ ConfigElement["ROOT_CERTIFICATE_AUTHORITIES"] = "root_certificate_authorities";
1805
+ ConfigElement["INTERMEDIATE_CERTIFICATE_AUTHORITIES"] = "intermediate_certificate_authorities";
1806
+ ConfigElement["CERTIFICATE_TEMPLATES"] = "certificate_templates";
1386
1807
  })(ConfigElement = GetConfigElementConstants.ConfigElement || (GetConfigElementConstants.ConfigElement = {}));
1387
1808
  })(GetConfigElementConstants = SecretsManagerV1.GetConfigElementConstants || (SecretsManagerV1.GetConfigElementConstants = {}));
1388
1809
  /** Constants for the `updateConfigElement` operation. */
@@ -1392,12 +1813,16 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1392
1813
  var SecretType;
1393
1814
  (function (SecretType) {
1394
1815
  SecretType["PUBLIC_CERT"] = "public_cert";
1816
+ SecretType["PRIVATE_CERT"] = "private_cert";
1395
1817
  })(SecretType = UpdateConfigElementConstants.SecretType || (UpdateConfigElementConstants.SecretType = {}));
1396
1818
  /** The configuration element to define or manage. */
1397
1819
  var ConfigElement;
1398
1820
  (function (ConfigElement) {
1399
1821
  ConfigElement["CERTIFICATE_AUTHORITIES"] = "certificate_authorities";
1400
1822
  ConfigElement["DNS_PROVIDERS"] = "dns_providers";
1823
+ ConfigElement["ROOT_CERTIFICATE_AUTHORITIES"] = "root_certificate_authorities";
1824
+ ConfigElement["INTERMEDIATE_CERTIFICATE_AUTHORITIES"] = "intermediate_certificate_authorities";
1825
+ ConfigElement["CERTIFICATE_TEMPLATES"] = "certificate_templates";
1401
1826
  })(ConfigElement = UpdateConfigElementConstants.ConfigElement || (UpdateConfigElementConstants.ConfigElement = {}));
1402
1827
  /** The type of configuration. Value options differ depending on the `config_element` property that you want to define. */
1403
1828
  var Type;
@@ -1406,8 +1831,35 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1406
1831
  Type["LETSENCRYPT_STAGE"] = "letsencrypt-stage";
1407
1832
  Type["CIS"] = "cis";
1408
1833
  Type["CLASSIC_INFRASTRUCTURE"] = "classic_infrastructure";
1834
+ Type["ROOT_CERTIFICATE_AUTHORITY"] = "root_certificate_authority";
1835
+ Type["INTERMEDIATE_CERTIFICATE_AUTHORITY"] = "intermediate_certificate_authority";
1836
+ Type["CERTIFICATE_TEMPLATE"] = "certificate_template";
1409
1837
  })(Type = UpdateConfigElementConstants.Type || (UpdateConfigElementConstants.Type = {}));
1410
1838
  })(UpdateConfigElementConstants = SecretsManagerV1.UpdateConfigElementConstants || (SecretsManagerV1.UpdateConfigElementConstants = {}));
1839
+ /** Constants for the `actionOnConfigElement` operation. */
1840
+ var ActionOnConfigElementConstants;
1841
+ (function (ActionOnConfigElementConstants) {
1842
+ /** The secret type. */
1843
+ var SecretType;
1844
+ (function (SecretType) {
1845
+ SecretType["PRIVATE_CERT"] = "private_cert";
1846
+ })(SecretType = ActionOnConfigElementConstants.SecretType || (ActionOnConfigElementConstants.SecretType = {}));
1847
+ /** The configuration element on which the action is applied. */
1848
+ var ConfigElement;
1849
+ (function (ConfigElement) {
1850
+ ConfigElement["ROOT_CERTIFICATE_AUTHORITIES"] = "root_certificate_authorities";
1851
+ ConfigElement["INTERMEDIATE_CERTIFICATE_AUTHORITIES"] = "intermediate_certificate_authorities";
1852
+ })(ConfigElement = ActionOnConfigElementConstants.ConfigElement || (ActionOnConfigElementConstants.ConfigElement = {}));
1853
+ /** The action to perform on the specified configuration element. */
1854
+ var Action;
1855
+ (function (Action) {
1856
+ Action["SIGN_INTERMEDIATE"] = "sign_intermediate";
1857
+ Action["SIGN_CSR"] = "sign_csr";
1858
+ Action["SET_SIGNED"] = "set_signed";
1859
+ Action["REVOKE"] = "revoke";
1860
+ Action["ROTATE_CRL"] = "rotate_crl";
1861
+ })(Action = ActionOnConfigElementConstants.Action || (ActionOnConfigElementConstants.Action = {}));
1862
+ })(ActionOnConfigElementConstants = SecretsManagerV1.ActionOnConfigElementConstants || (SecretsManagerV1.ActionOnConfigElementConstants = {}));
1411
1863
  /** Constants for the `deleteConfigElement` operation. */
1412
1864
  var DeleteConfigElementConstants;
1413
1865
  (function (DeleteConfigElementConstants) {
@@ -1415,12 +1867,16 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1415
1867
  var SecretType;
1416
1868
  (function (SecretType) {
1417
1869
  SecretType["PUBLIC_CERT"] = "public_cert";
1870
+ SecretType["PRIVATE_CERT"] = "private_cert";
1418
1871
  })(SecretType = DeleteConfigElementConstants.SecretType || (DeleteConfigElementConstants.SecretType = {}));
1419
1872
  /** The configuration element to define or manage. */
1420
1873
  var ConfigElement;
1421
1874
  (function (ConfigElement) {
1422
1875
  ConfigElement["CERTIFICATE_AUTHORITIES"] = "certificate_authorities";
1423
1876
  ConfigElement["DNS_PROVIDERS"] = "dns_providers";
1877
+ ConfigElement["ROOT_CERTIFICATE_AUTHORITIES"] = "root_certificate_authorities";
1878
+ ConfigElement["INTERMEDIATE_CERTIFICATE_AUTHORITIES"] = "intermediate_certificate_authorities";
1879
+ ConfigElement["CERTIFICATE_TEMPLATES"] = "certificate_templates";
1424
1880
  })(ConfigElement = DeleteConfigElementConstants.ConfigElement || (DeleteConfigElementConstants.ConfigElement = {}));
1425
1881
  })(DeleteConfigElementConstants = SecretsManagerV1.DeleteConfigElementConstants || (SecretsManagerV1.DeleteConfigElementConstants = {}));
1426
1882
  })(SecretsManagerV1 || (SecretsManagerV1 = {}));