@ibm-cloud/secrets-manager 1.0.1 → 1.0.31

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.38.1-1037b405-20210908-184149
42
+ * IBM OpenAPI SDK Code Generator Version: 3.46.0-a4e29da0-20220224-210428
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
@@ -123,10 +123,11 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
123
123
  */
124
124
  SecretsManagerV1.prototype.createSecretGroup = function (params) {
125
125
  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);
126
+ var _requiredParams = ['metadata', 'resources'];
127
+ var _validParams = ['metadata', 'resources', 'headers'];
128
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
129
+ if (_validationErrors) {
130
+ return Promise.reject(_validationErrors);
130
131
  }
131
132
  var body = {
132
133
  'metadata': _params.metadata,
@@ -159,6 +160,12 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
159
160
  */
160
161
  SecretsManagerV1.prototype.listSecretGroups = function (params) {
161
162
  var _params = __assign({}, params);
163
+ var _requiredParams = [];
164
+ var _validParams = ['headers'];
165
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
166
+ if (_validationErrors) {
167
+ return Promise.reject(_validationErrors);
168
+ }
162
169
  var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'listSecretGroups');
163
170
  var parameters = {
164
171
  options: {
@@ -185,10 +192,11 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
185
192
  */
186
193
  SecretsManagerV1.prototype.getSecretGroup = function (params) {
187
194
  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);
195
+ var _requiredParams = ['id'];
196
+ var _validParams = ['id', 'headers'];
197
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
198
+ if (_validationErrors) {
199
+ return Promise.reject(_validationErrors);
192
200
  }
193
201
  var path = {
194
202
  'id': _params.id,
@@ -222,10 +230,11 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
222
230
  */
223
231
  SecretsManagerV1.prototype.updateSecretGroupMetadata = function (params) {
224
232
  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);
233
+ var _requiredParams = ['id', 'metadata', 'resources'];
234
+ var _validParams = ['id', 'metadata', 'resources', 'headers'];
235
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
236
+ if (_validationErrors) {
237
+ return Promise.reject(_validationErrors);
229
238
  }
230
239
  var body = {
231
240
  'metadata': _params.metadata,
@@ -266,10 +275,11 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
266
275
  */
267
276
  SecretsManagerV1.prototype.deleteSecretGroup = function (params) {
268
277
  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);
278
+ var _requiredParams = ['id'];
279
+ var _validParams = ['id', 'headers'];
280
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
281
+ if (_validationErrors) {
282
+ return Promise.reject(_validationErrors);
273
283
  }
274
284
  var path = {
275
285
  'id': _params.id,
@@ -293,7 +303,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
293
303
  /**
294
304
  * Create a secret.
295
305
  *
296
- * Creates a secret or imports an existing value that you can use to access or authenticate to a protected resource.
306
+ * Create a secret or import an existing value that you can use to access or authenticate to a protected resource.
297
307
  *
298
308
  * Use this method to either generate or import an existing secret, such as an arbitrary value or a TLS certificate,
299
309
  * that you can manage in your Secrets Manager service instance. A successful request stores the secret in your
@@ -312,10 +322,11 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
312
322
  */
313
323
  SecretsManagerV1.prototype.createSecret = function (params) {
314
324
  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);
325
+ var _requiredParams = ['secretType', 'metadata', 'resources'];
326
+ var _validParams = ['secretType', 'metadata', 'resources', 'headers'];
327
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
328
+ if (_validationErrors) {
329
+ return Promise.reject(_validationErrors);
319
330
  }
320
331
  var body = {
321
332
  'metadata': _params.metadata,
@@ -364,10 +375,11 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
364
375
  */
365
376
  SecretsManagerV1.prototype.listSecrets = function (params) {
366
377
  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);
378
+ var _requiredParams = ['secretType'];
379
+ var _validParams = ['secretType', 'limit', 'offset', 'headers'];
380
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
381
+ if (_validationErrors) {
382
+ return Promise.reject(_validationErrors);
371
383
  }
372
384
  var query = {
373
385
  'limit': _params.limit,
@@ -430,6 +442,12 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
430
442
  */
431
443
  SecretsManagerV1.prototype.listAllSecrets = function (params) {
432
444
  var _params = __assign({}, params);
445
+ var _requiredParams = [];
446
+ var _validParams = ['limit', 'offset', 'search', 'sortBy', 'groups', 'headers'];
447
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
448
+ if (_validationErrors) {
449
+ return Promise.reject(_validationErrors);
450
+ }
433
451
  var query = {
434
452
  'limit': _params.limit,
435
453
  'offset': _params.offset,
@@ -455,7 +473,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
455
473
  /**
456
474
  * Get a secret.
457
475
  *
458
- * Retrieves a secret and its details by specifying the ID of the secret.
476
+ * Get a secret and its details by specifying the ID of the secret.
459
477
  *
460
478
  * A successful request returns the secret data that is associated with your secret, along with other metadata. To
461
479
  * view only the details of a specified secret without retrieving its value, use the [Get secret
@@ -469,10 +487,11 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
469
487
  */
470
488
  SecretsManagerV1.prototype.getSecret = function (params) {
471
489
  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);
490
+ var _requiredParams = ['secretType', 'id'];
491
+ var _validParams = ['secretType', 'id', 'headers'];
492
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
493
+ if (_validationErrors) {
494
+ return Promise.reject(_validationErrors);
476
495
  }
477
496
  var path = {
478
497
  'secret_type': _params.secretType,
@@ -498,23 +517,26 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
498
517
  *
499
518
  * Invokes an action on a specified secret. This method supports the following actions:
500
519
  *
501
- * - `rotate`: Replace the value of an `arbitrary`, `username_password`, `public_cert` or `imported_cert` secret.
520
+ * - `rotate`: Replace the value of a secret.
521
+ * - `restore`: Restore a previous version of an `iam_credentials` secret.
522
+ * - `revoke`: Revoke a private certificate.
502
523
  * - `delete_credentials`: Delete the API key that is associated with an `iam_credentials` secret.
503
524
  *
504
525
  * @param {Object} params - The parameters to send to the service.
505
526
  * @param {string} params.secretType - The secret type.
506
527
  * @param {string} params.id - The v4 UUID that uniquely identifies the secret.
507
528
  * @param {string} params.action - The action to perform on the specified secret.
508
- * @param {SecretAction} params.secretAction - The properties to update for the secret.
529
+ * @param {SecretAction} [params.secretAction] - The properties to update for the secret.
509
530
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
510
531
  * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.GetSecret>>}
511
532
  */
512
533
  SecretsManagerV1.prototype.updateSecret = function (params) {
513
534
  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);
535
+ var _requiredParams = ['secretType', 'id', 'action'];
536
+ var _validParams = ['secretType', 'id', 'action', 'secretAction', 'headers'];
537
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
538
+ if (_validationErrors) {
539
+ return Promise.reject(_validationErrors);
518
540
  }
519
541
  var body = _params.secretAction;
520
542
  var query = {
@@ -555,10 +577,11 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
555
577
  */
556
578
  SecretsManagerV1.prototype.deleteSecret = function (params) {
557
579
  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);
580
+ var _requiredParams = ['secretType', 'id'];
581
+ var _validParams = ['secretType', 'id', 'headers'];
582
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
583
+ if (_validationErrors) {
584
+ return Promise.reject(_validationErrors);
562
585
  }
563
586
  var path = {
564
587
  'secret_type': _params.secretType,
@@ -577,6 +600,46 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
577
600
  };
578
601
  return this.createRequest(parameters);
579
602
  };
603
+ /**
604
+ * List versions of a secret.
605
+ *
606
+ * Retrieves a list of the versions of a secret.
607
+ *
608
+ * A successful request returns the list of the versions along with the metadata of each version.
609
+ *
610
+ * @param {Object} params - The parameters to send to the service.
611
+ * @param {string} params.secretType - The secret type.
612
+ * @param {string} params.id - The v4 UUID that uniquely identifies the secret.
613
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
614
+ * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.ListSecretVersions>>}
615
+ */
616
+ SecretsManagerV1.prototype.listSecretVersions = function (params) {
617
+ var _params = __assign({}, params);
618
+ var _requiredParams = ['secretType', 'id'];
619
+ var _validParams = ['secretType', 'id', 'headers'];
620
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
621
+ if (_validationErrors) {
622
+ return Promise.reject(_validationErrors);
623
+ }
624
+ var path = {
625
+ 'secret_type': _params.secretType,
626
+ 'id': _params.id,
627
+ };
628
+ var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'listSecretVersions');
629
+ var parameters = {
630
+ options: {
631
+ url: '/api/v1/secrets/{secret_type}/{id}/versions',
632
+ method: 'GET',
633
+ path: path,
634
+ },
635
+ defaultOptions: extend(true, {}, this.baseOptions, {
636
+ headers: extend(true, sdkHeaders, {
637
+ 'Accept': 'application/json',
638
+ }, _params.headers),
639
+ }),
640
+ };
641
+ return this.createRequest(parameters);
642
+ };
580
643
  /**
581
644
  * Get a version of a secret.
582
645
  *
@@ -586,7 +649,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
586
649
  * with other metadata.
587
650
  *
588
651
  * @param {Object} params - The parameters to send to the service.
589
- * @param {string} params.secretType - The secret type. Supported options include: imported_cert.
652
+ * @param {string} params.secretType - The secret type.
590
653
  * @param {string} params.id - The v4 UUID that uniquely identifies the secret.
591
654
  * @param {string} params.versionId - The v4 UUID that uniquely identifies the secret version. You can also use
592
655
  * `previous` to retrieve the previous version.
@@ -598,10 +661,11 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
598
661
  */
599
662
  SecretsManagerV1.prototype.getSecretVersion = function (params) {
600
663
  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);
664
+ var _requiredParams = ['secretType', 'id', 'versionId'];
665
+ var _validParams = ['secretType', 'id', 'versionId', 'headers'];
666
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
667
+ if (_validationErrors) {
668
+ return Promise.reject(_validationErrors);
605
669
  }
606
670
  var path = {
607
671
  'secret_type': _params.secretType,
@@ -631,7 +695,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
631
695
  * A successful request returns the metadata that is associated with the specified version of your secret.
632
696
  *
633
697
  * @param {Object} params - The parameters to send to the service.
634
- * @param {string} params.secretType - The secret type. Supported options include: imported_cert.
698
+ * @param {string} params.secretType - The secret type.
635
699
  * @param {string} params.id - The v4 UUID that uniquely identifies the secret.
636
700
  * @param {string} params.versionId - The v4 UUID that uniquely identifies the secret version. You can also use
637
701
  * `previous` to retrieve the previous version.
@@ -643,10 +707,11 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
643
707
  */
644
708
  SecretsManagerV1.prototype.getSecretVersionMetadata = function (params) {
645
709
  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);
710
+ var _requiredParams = ['secretType', 'id', 'versionId'];
711
+ var _validParams = ['secretType', 'id', 'versionId', 'headers'];
712
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
713
+ if (_validationErrors) {
714
+ return Promise.reject(_validationErrors);
650
715
  }
651
716
  var path = {
652
717
  'secret_type': _params.secretType,
@@ -684,10 +749,11 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
684
749
  */
685
750
  SecretsManagerV1.prototype.getSecretMetadata = function (params) {
686
751
  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);
752
+ var _requiredParams = ['secretType', 'id'];
753
+ var _validParams = ['secretType', 'id', 'headers'];
754
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
755
+ if (_validationErrors) {
756
+ return Promise.reject(_validationErrors);
691
757
  }
692
758
  var path = {
693
759
  'secret_type': _params.secretType,
@@ -726,10 +792,11 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
726
792
  */
727
793
  SecretsManagerV1.prototype.updateSecretMetadata = function (params) {
728
794
  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);
795
+ var _requiredParams = ['secretType', 'id', 'metadata', 'resources'];
796
+ var _validParams = ['secretType', 'id', 'metadata', 'resources', 'headers'];
797
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
798
+ if (_validationErrors) {
799
+ return Promise.reject(_validationErrors);
733
800
  }
734
801
  var body = {
735
802
  'metadata': _params.metadata,
@@ -777,10 +844,11 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
777
844
  */
778
845
  SecretsManagerV1.prototype.putPolicy = function (params) {
779
846
  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);
847
+ var _requiredParams = ['secretType', 'id', 'metadata', 'resources'];
848
+ var _validParams = ['secretType', 'id', 'metadata', 'resources', 'policy', 'headers'];
849
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
850
+ if (_validationErrors) {
851
+ return Promise.reject(_validationErrors);
784
852
  }
785
853
  var body = {
786
854
  'metadata': _params.metadata,
@@ -825,10 +893,11 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
825
893
  */
826
894
  SecretsManagerV1.prototype.getPolicy = function (params) {
827
895
  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);
896
+ var _requiredParams = ['secretType', 'id'];
897
+ var _validParams = ['secretType', 'id', 'policy', 'headers'];
898
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
899
+ if (_validationErrors) {
900
+ return Promise.reject(_validationErrors);
832
901
  }
833
902
  var query = {
834
903
  'policy': _params.policy,
@@ -867,24 +936,19 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
867
936
  *
868
937
  * @param {Object} params - The parameters to send to the service.
869
938
  * @param {string} params.secretType - The secret type.
870
- * @param {string} params.apiKey - An IBM Cloud API key that has the capability to create and manage service IDs.
871
- *
872
- * The API key must be assigned the Editor platform role on the Access Groups Service and the Operator platform role
873
- * on the IAM Identity Service. For more information, see [Configuring the IAM secrets
874
- * engine](https://cloud.ibm.com/docs/secrets-manager?topic=secrets-manager-iam-credentials#configure-iam-secrets-engine-api).
939
+ * @param {EngineConfig} params.engineConfig - Properties to update for a secrets engine.
875
940
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
876
941
  * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.Empty>>}
877
942
  */
878
943
  SecretsManagerV1.prototype.putConfig = function (params) {
879
944
  var _params = __assign({}, params);
880
- var requiredParams = ['secretType', 'apiKey'];
881
- var missingParams = ibm_cloud_sdk_core_1.getMissingParams(_params, requiredParams);
882
- if (missingParams) {
883
- return Promise.reject(missingParams);
945
+ var _requiredParams = ['secretType', 'engineConfig'];
946
+ var _validParams = ['secretType', 'engineConfig', 'headers'];
947
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
948
+ if (_validationErrors) {
949
+ return Promise.reject(_validationErrors);
884
950
  }
885
- var body = {
886
- 'api_key': _params.apiKey,
887
- };
951
+ var body = _params.engineConfig;
888
952
  var path = {
889
953
  'secret_type': _params.secretType,
890
954
  };
@@ -916,10 +980,11 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
916
980
  */
917
981
  SecretsManagerV1.prototype.getConfig = function (params) {
918
982
  var _params = __assign({}, params);
919
- var requiredParams = ['secretType'];
920
- var missingParams = ibm_cloud_sdk_core_1.getMissingParams(_params, requiredParams);
921
- if (missingParams) {
922
- return Promise.reject(missingParams);
983
+ var _requiredParams = ['secretType'];
984
+ var _validParams = ['secretType', 'headers'];
985
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
986
+ if (_validationErrors) {
987
+ return Promise.reject(_validationErrors);
923
988
  }
924
989
  var path = {
925
990
  'secret_type': _params.secretType,
@@ -944,8 +1009,16 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
944
1009
  *
945
1010
  * Adds a configuration element to the specified secret type.
946
1011
  *
947
- * Use this method to define the configurations that are required to enable the public certificates (`public_cert`)
948
- * engine. You can add up to 10 certificate authority and DNS provider configurations for your instance.
1012
+ * Use this method to define the configurations that are required to enable the public certificates (`public_cert`)
1013
+ * engine and the private certificates (`private_cert`) engine.
1014
+ *
1015
+ * You can add multiple configurations for your instance as follows:
1016
+ *
1017
+ * - Up to 10 public certificate authority configurations
1018
+ * - Up to 10 DNS provider configurations
1019
+ * - Up to 10 private root certifiate authority configurations
1020
+ * - Up to 10 private intermediate certifiate authority configurations
1021
+ * - Up to 10 certificate templates.
949
1022
  *
950
1023
  * @param {Object} params - The parameters to send to the service.
951
1024
  * @param {string} params.secretType - The secret type.
@@ -959,10 +1032,11 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
959
1032
  */
960
1033
  SecretsManagerV1.prototype.createConfigElement = function (params) {
961
1034
  var _params = __assign({}, params);
962
- var requiredParams = ['secretType', 'configElement', 'name', 'type', 'config'];
963
- var missingParams = ibm_cloud_sdk_core_1.getMissingParams(_params, requiredParams);
964
- if (missingParams) {
965
- return Promise.reject(missingParams);
1035
+ var _requiredParams = ['secretType', 'configElement', 'name', 'type', 'config'];
1036
+ var _validParams = ['secretType', 'configElement', 'name', 'type', 'config', 'headers'];
1037
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1038
+ if (_validationErrors) {
1039
+ return Promise.reject(_validationErrors);
966
1040
  }
967
1041
  var body = {
968
1042
  'name': _params.name,
@@ -1003,10 +1077,11 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1003
1077
  */
1004
1078
  SecretsManagerV1.prototype.getConfigElements = function (params) {
1005
1079
  var _params = __assign({}, params);
1006
- var requiredParams = ['secretType', 'configElement'];
1007
- var missingParams = ibm_cloud_sdk_core_1.getMissingParams(_params, requiredParams);
1008
- if (missingParams) {
1009
- return Promise.reject(missingParams);
1080
+ var _requiredParams = ['secretType', 'configElement'];
1081
+ var _validParams = ['secretType', 'configElement', 'headers'];
1082
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1083
+ if (_validationErrors) {
1084
+ return Promise.reject(_validationErrors);
1010
1085
  }
1011
1086
  var path = {
1012
1087
  'secret_type': _params.secretType,
@@ -1027,6 +1102,46 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1027
1102
  };
1028
1103
  return this.createRequest(parameters);
1029
1104
  };
1105
+ /**
1106
+ * Get a configuration.
1107
+ *
1108
+ * Retrieves the details of a specific configuration that is associated with a secret type.
1109
+ *
1110
+ * @param {Object} params - The parameters to send to the service.
1111
+ * @param {string} params.secretType - The secret type.
1112
+ * @param {string} params.configElement - The configuration element to define or manage.
1113
+ * @param {string} params.configName - The name of your configuration.
1114
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1115
+ * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.GetSingleConfigElement>>}
1116
+ */
1117
+ SecretsManagerV1.prototype.getConfigElement = function (params) {
1118
+ var _params = __assign({}, params);
1119
+ var _requiredParams = ['secretType', 'configElement', 'configName'];
1120
+ var _validParams = ['secretType', 'configElement', 'configName', 'headers'];
1121
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1122
+ if (_validationErrors) {
1123
+ return Promise.reject(_validationErrors);
1124
+ }
1125
+ var path = {
1126
+ 'secret_type': _params.secretType,
1127
+ 'config_element': _params.configElement,
1128
+ 'config_name': _params.configName,
1129
+ };
1130
+ var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getConfigElement');
1131
+ var parameters = {
1132
+ options: {
1133
+ url: '/api/v1/config/{secret_type}/{config_element}/{config_name}',
1134
+ method: 'GET',
1135
+ path: path,
1136
+ },
1137
+ defaultOptions: extend(true, {}, this.baseOptions, {
1138
+ headers: extend(true, sdkHeaders, {
1139
+ 'Accept': 'application/json',
1140
+ }, _params.headers),
1141
+ }),
1142
+ };
1143
+ return this.createRequest(parameters);
1144
+ };
1030
1145
  /**
1031
1146
  * Update a configuration.
1032
1147
  *
@@ -1038,16 +1153,17 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1038
1153
  * @param {string} params.configName - The name of your configuration.
1039
1154
  * @param {string} params.type - The type of configuration. Value options differ depending on the `config_element`
1040
1155
  * property that you want to define.
1041
- * @param {JsonObject} params.config -
1156
+ * @param {JsonObject} params.config - Properties that describe a configuration, which depends on type.
1042
1157
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1043
1158
  * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.GetSingleConfigElement>>}
1044
1159
  */
1045
1160
  SecretsManagerV1.prototype.updateConfigElement = function (params) {
1046
1161
  var _params = __assign({}, params);
1047
- var requiredParams = ['secretType', 'configElement', 'configName', 'type', 'config'];
1048
- var missingParams = ibm_cloud_sdk_core_1.getMissingParams(_params, requiredParams);
1049
- if (missingParams) {
1050
- return Promise.reject(missingParams);
1162
+ var _requiredParams = ['secretType', 'configElement', 'configName', 'type', 'config'];
1163
+ var _validParams = ['secretType', 'configElement', 'configName', 'type', 'config', 'headers'];
1164
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1165
+ if (_validationErrors) {
1166
+ return Promise.reject(_validationErrors);
1051
1167
  }
1052
1168
  var body = {
1053
1169
  'type': _params.type,
@@ -1076,9 +1192,9 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1076
1192
  return this.createRequest(parameters);
1077
1193
  };
1078
1194
  /**
1079
- * Remove a configuration.
1195
+ * Delete a configuration.
1080
1196
  *
1081
- * Removes a configuration element from the specified secret type.
1197
+ * Deletes a configuration element from the specified secret type.
1082
1198
  *
1083
1199
  * @param {Object} params - The parameters to send to the service.
1084
1200
  * @param {string} params.secretType - The secret type.
@@ -1089,10 +1205,11 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1089
1205
  */
1090
1206
  SecretsManagerV1.prototype.deleteConfigElement = function (params) {
1091
1207
  var _params = __assign({}, params);
1092
- var requiredParams = ['secretType', 'configElement', 'configName'];
1093
- var missingParams = ibm_cloud_sdk_core_1.getMissingParams(_params, requiredParams);
1094
- if (missingParams) {
1095
- return Promise.reject(missingParams);
1208
+ var _requiredParams = ['secretType', 'configElement', 'configName'];
1209
+ var _validParams = ['secretType', 'configElement', 'configName', 'headers'];
1210
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1211
+ if (_validationErrors) {
1212
+ return Promise.reject(_validationErrors);
1096
1213
  }
1097
1214
  var path = {
1098
1215
  'secret_type': _params.secretType,
@@ -1112,36 +1229,85 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1112
1229
  };
1113
1230
  return this.createRequest(parameters);
1114
1231
  };
1232
+ /*************************
1233
+ * notifications
1234
+ ************************/
1115
1235
  /**
1116
- * Get a configuration.
1236
+ * Register with Event Notifications.
1117
1237
  *
1118
- * Retrieves the details of a specific configuration that is associated with a secret type.
1238
+ * Creates a registration between a Secrets Manager instance and [Event
1239
+ * Notifications](https://cloud.ibm.com/apidocs/event-notifications).
1240
+ *
1241
+ * A successful request adds Secrets Manager as a source that you can reference from your Event Notifications
1242
+ * instance. For more information about enabling notifications for Secrets Manager, check out the
1243
+ * [docs](https://cloud.ibm.com/docs/secrets-manager?topic=secrets-manager-event-notifications).
1119
1244
  *
1120
1245
  * @param {Object} params - The parameters to send to the service.
1121
- * @param {string} params.secretType - The secret type.
1122
- * @param {string} params.configElement - The configuration element to define or manage.
1123
- * @param {string} params.configName - The name of your configuration.
1246
+ * @param {string} params.eventNotificationsInstanceCrn - The Cloud Resource Name (CRN) of the connected Event
1247
+ * Notifications instance.
1248
+ * @param {string} params.eventNotificationsSourceName - The name that is displayed as a source in your Event
1249
+ * Notifications instance.
1250
+ * @param {string} [params.eventNotificationsSourceDescription] - An optional description for the source in your Event
1251
+ * Notifications instance.
1124
1252
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1125
- * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.GetSingleConfigElement>>}
1253
+ * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.GetNotificationsSettings>>}
1126
1254
  */
1127
- SecretsManagerV1.prototype.getConfigElement = function (params) {
1255
+ SecretsManagerV1.prototype.createNotificationsRegistration = function (params) {
1128
1256
  var _params = __assign({}, params);
1129
- var requiredParams = ['secretType', 'configElement', 'configName'];
1130
- var missingParams = ibm_cloud_sdk_core_1.getMissingParams(_params, requiredParams);
1131
- if (missingParams) {
1132
- return Promise.reject(missingParams);
1257
+ var _requiredParams = ['eventNotificationsInstanceCrn', 'eventNotificationsSourceName'];
1258
+ var _validParams = [
1259
+ 'eventNotificationsInstanceCrn',
1260
+ 'eventNotificationsSourceName',
1261
+ 'eventNotificationsSourceDescription',
1262
+ 'headers',
1263
+ ];
1264
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1265
+ if (_validationErrors) {
1266
+ return Promise.reject(_validationErrors);
1133
1267
  }
1134
- var path = {
1135
- 'secret_type': _params.secretType,
1136
- 'config_element': _params.configElement,
1137
- 'config_name': _params.configName,
1268
+ var body = {
1269
+ 'event_notifications_instance_crn': _params.eventNotificationsInstanceCrn,
1270
+ 'event_notifications_source_name': _params.eventNotificationsSourceName,
1271
+ 'event_notifications_source_description': _params.eventNotificationsSourceDescription,
1138
1272
  };
1139
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getConfigElement');
1273
+ var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'createNotificationsRegistration');
1140
1274
  var parameters = {
1141
1275
  options: {
1142
- url: '/api/v1/config/{secret_type}/{config_element}/{config_name}',
1276
+ url: '/api/v1/notifications/registration',
1277
+ method: 'POST',
1278
+ body: body,
1279
+ },
1280
+ defaultOptions: extend(true, {}, this.baseOptions, {
1281
+ headers: extend(true, sdkHeaders, {
1282
+ 'Accept': 'application/json',
1283
+ 'Content-Type': 'application/json',
1284
+ }, _params.headers),
1285
+ }),
1286
+ };
1287
+ return this.createRequest(parameters);
1288
+ };
1289
+ /**
1290
+ * Get Event Notifications registration details.
1291
+ *
1292
+ * Retrieves the details of an existing registration between a Secrets Manager instance and Event Notifications.
1293
+ *
1294
+ * @param {Object} [params] - The parameters to send to the service.
1295
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1296
+ * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.GetNotificationsSettings>>}
1297
+ */
1298
+ SecretsManagerV1.prototype.getNotificationsRegistration = function (params) {
1299
+ var _params = __assign({}, params);
1300
+ var _requiredParams = [];
1301
+ var _validParams = ['headers'];
1302
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1303
+ if (_validationErrors) {
1304
+ return Promise.reject(_validationErrors);
1305
+ }
1306
+ var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getNotificationsRegistration');
1307
+ var parameters = {
1308
+ options: {
1309
+ url: '/api/v1/notifications/registration',
1143
1310
  method: 'GET',
1144
- path: path,
1145
1311
  },
1146
1312
  defaultOptions: extend(true, {}, this.baseOptions, {
1147
1313
  headers: extend(true, sdkHeaders, {
@@ -1151,6 +1317,71 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1151
1317
  };
1152
1318
  return this.createRequest(parameters);
1153
1319
  };
1320
+ /**
1321
+ * Unregister from Event Notifications.
1322
+ *
1323
+ * Deletes a registration between a Secrets Manager instance and Event Notifications.
1324
+ *
1325
+ * A successful request removes your Secrets Manager instance as a source in Event Notifications.
1326
+ *
1327
+ * @param {Object} [params] - The parameters to send to the service.
1328
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1329
+ * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.Empty>>}
1330
+ */
1331
+ SecretsManagerV1.prototype.deleteNotificationsRegistration = function (params) {
1332
+ var _params = __assign({}, params);
1333
+ var _requiredParams = [];
1334
+ var _validParams = ['headers'];
1335
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1336
+ if (_validationErrors) {
1337
+ return Promise.reject(_validationErrors);
1338
+ }
1339
+ var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteNotificationsRegistration');
1340
+ var parameters = {
1341
+ options: {
1342
+ url: '/api/v1/notifications/registration',
1343
+ method: 'DELETE',
1344
+ },
1345
+ defaultOptions: extend(true, {}, this.baseOptions, {
1346
+ headers: extend(true, sdkHeaders, {}, _params.headers),
1347
+ }),
1348
+ };
1349
+ return this.createRequest(parameters);
1350
+ };
1351
+ /**
1352
+ * Send test event.
1353
+ *
1354
+ * Send a test event from a Secrets Manager instance to a configured [Event
1355
+ * Notifications](https://cloud.ibm.com/apidocs/event-notifications) instance.
1356
+ *
1357
+ * A successful request sends a test event to the Event Notifications instance. For more information about enabling
1358
+ * notifications for Secrets Manager, check out the
1359
+ * [docs](https://cloud.ibm.com/docs/secrets-manager?topic=secrets-manager-event-notifications).
1360
+ *
1361
+ * @param {Object} [params] - The parameters to send to the service.
1362
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1363
+ * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.Empty>>}
1364
+ */
1365
+ SecretsManagerV1.prototype.sendTestNotification = function (params) {
1366
+ var _params = __assign({}, params);
1367
+ var _requiredParams = [];
1368
+ var _validParams = ['headers'];
1369
+ var _validationErrors = ibm_cloud_sdk_core_1.validateParams(_params, _requiredParams, _validParams);
1370
+ if (_validationErrors) {
1371
+ return Promise.reject(_validationErrors);
1372
+ }
1373
+ var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'sendTestNotification');
1374
+ var parameters = {
1375
+ options: {
1376
+ url: '/api/v1/notifications/test',
1377
+ method: 'GET',
1378
+ },
1379
+ defaultOptions: extend(true, {}, this.baseOptions, {
1380
+ headers: extend(true, sdkHeaders, {}, _params.headers),
1381
+ }),
1382
+ };
1383
+ return this.createRequest(parameters);
1384
+ };
1154
1385
  SecretsManagerV1.DEFAULT_SERVICE_URL = 'https://secrets-manager.cloud.ibm.com';
1155
1386
  SecretsManagerV1.DEFAULT_SERVICE_NAME = 'secrets_manager';
1156
1387
  return SecretsManagerV1;
@@ -1169,7 +1400,9 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1169
1400
  SecretType["IAM_CREDENTIALS"] = "iam_credentials";
1170
1401
  SecretType["IMPORTED_CERT"] = "imported_cert";
1171
1402
  SecretType["PUBLIC_CERT"] = "public_cert";
1403
+ SecretType["PRIVATE_CERT"] = "private_cert";
1172
1404
  SecretType["USERNAME_PASSWORD"] = "username_password";
1405
+ SecretType["KV"] = "kv";
1173
1406
  })(SecretType = CreateSecretConstants.SecretType || (CreateSecretConstants.SecretType = {}));
1174
1407
  })(CreateSecretConstants = SecretsManagerV1.CreateSecretConstants || (SecretsManagerV1.CreateSecretConstants = {}));
1175
1408
  /** Constants for the `listSecrets` operation. */
@@ -1182,7 +1415,9 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1182
1415
  SecretType["IAM_CREDENTIALS"] = "iam_credentials";
1183
1416
  SecretType["IMPORTED_CERT"] = "imported_cert";
1184
1417
  SecretType["PUBLIC_CERT"] = "public_cert";
1418
+ SecretType["PRIVATE_CERT"] = "private_cert";
1185
1419
  SecretType["USERNAME_PASSWORD"] = "username_password";
1420
+ SecretType["KV"] = "kv";
1186
1421
  })(SecretType = ListSecretsConstants.SecretType || (ListSecretsConstants.SecretType = {}));
1187
1422
  })(ListSecretsConstants = SecretsManagerV1.ListSecretsConstants || (SecretsManagerV1.ListSecretsConstants = {}));
1188
1423
  /** Constants for the `listAllSecrets` operation. */
@@ -1208,7 +1443,9 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1208
1443
  SecretType["IAM_CREDENTIALS"] = "iam_credentials";
1209
1444
  SecretType["IMPORTED_CERT"] = "imported_cert";
1210
1445
  SecretType["PUBLIC_CERT"] = "public_cert";
1446
+ SecretType["PRIVATE_CERT"] = "private_cert";
1211
1447
  SecretType["USERNAME_PASSWORD"] = "username_password";
1448
+ SecretType["KV"] = "kv";
1212
1449
  })(SecretType = GetSecretConstants.SecretType || (GetSecretConstants.SecretType = {}));
1213
1450
  })(GetSecretConstants = SecretsManagerV1.GetSecretConstants || (SecretsManagerV1.GetSecretConstants = {}));
1214
1451
  /** Constants for the `updateSecret` operation. */
@@ -1221,12 +1458,16 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1221
1458
  SecretType["IAM_CREDENTIALS"] = "iam_credentials";
1222
1459
  SecretType["IMPORTED_CERT"] = "imported_cert";
1223
1460
  SecretType["PUBLIC_CERT"] = "public_cert";
1461
+ SecretType["PRIVATE_CERT"] = "private_cert";
1224
1462
  SecretType["USERNAME_PASSWORD"] = "username_password";
1463
+ SecretType["KV"] = "kv";
1225
1464
  })(SecretType = UpdateSecretConstants.SecretType || (UpdateSecretConstants.SecretType = {}));
1226
1465
  /** The action to perform on the specified secret. */
1227
1466
  var Action;
1228
1467
  (function (Action) {
1229
1468
  Action["ROTATE"] = "rotate";
1469
+ Action["RESTORE"] = "restore";
1470
+ Action["REVOKE"] = "revoke";
1230
1471
  Action["DELETE_CREDENTIALS"] = "delete_credentials";
1231
1472
  })(Action = UpdateSecretConstants.Action || (UpdateSecretConstants.Action = {}));
1232
1473
  })(UpdateSecretConstants = SecretsManagerV1.UpdateSecretConstants || (SecretsManagerV1.UpdateSecretConstants = {}));
@@ -1240,27 +1481,54 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1240
1481
  SecretType["IAM_CREDENTIALS"] = "iam_credentials";
1241
1482
  SecretType["IMPORTED_CERT"] = "imported_cert";
1242
1483
  SecretType["PUBLIC_CERT"] = "public_cert";
1484
+ SecretType["PRIVATE_CERT"] = "private_cert";
1243
1485
  SecretType["USERNAME_PASSWORD"] = "username_password";
1486
+ SecretType["KV"] = "kv";
1244
1487
  })(SecretType = DeleteSecretConstants.SecretType || (DeleteSecretConstants.SecretType = {}));
1245
1488
  })(DeleteSecretConstants = SecretsManagerV1.DeleteSecretConstants || (SecretsManagerV1.DeleteSecretConstants = {}));
1489
+ /** Constants for the `listSecretVersions` operation. */
1490
+ var ListSecretVersionsConstants;
1491
+ (function (ListSecretVersionsConstants) {
1492
+ /** The secret type. */
1493
+ var SecretType;
1494
+ (function (SecretType) {
1495
+ SecretType["ARBITRARY"] = "arbitrary";
1496
+ SecretType["IAM_CREDENTIALS"] = "iam_credentials";
1497
+ SecretType["IMPORTED_CERT"] = "imported_cert";
1498
+ SecretType["PUBLIC_CERT"] = "public_cert";
1499
+ SecretType["PRIVATE_CERT"] = "private_cert";
1500
+ SecretType["USERNAME_PASSWORD"] = "username_password";
1501
+ SecretType["KV"] = "kv";
1502
+ })(SecretType = ListSecretVersionsConstants.SecretType || (ListSecretVersionsConstants.SecretType = {}));
1503
+ })(ListSecretVersionsConstants = SecretsManagerV1.ListSecretVersionsConstants || (SecretsManagerV1.ListSecretVersionsConstants = {}));
1246
1504
  /** Constants for the `getSecretVersion` operation. */
1247
1505
  var GetSecretVersionConstants;
1248
1506
  (function (GetSecretVersionConstants) {
1249
- /** The secret type. Supported options include: imported_cert. */
1507
+ /** The secret type. */
1250
1508
  var SecretType;
1251
1509
  (function (SecretType) {
1510
+ SecretType["ARBITRARY"] = "arbitrary";
1511
+ SecretType["IAM_CREDENTIALS"] = "iam_credentials";
1252
1512
  SecretType["IMPORTED_CERT"] = "imported_cert";
1253
1513
  SecretType["PUBLIC_CERT"] = "public_cert";
1514
+ SecretType["PRIVATE_CERT"] = "private_cert";
1515
+ SecretType["USERNAME_PASSWORD"] = "username_password";
1516
+ SecretType["KV"] = "kv";
1254
1517
  })(SecretType = GetSecretVersionConstants.SecretType || (GetSecretVersionConstants.SecretType = {}));
1255
1518
  })(GetSecretVersionConstants = SecretsManagerV1.GetSecretVersionConstants || (SecretsManagerV1.GetSecretVersionConstants = {}));
1256
1519
  /** Constants for the `getSecretVersionMetadata` operation. */
1257
1520
  var GetSecretVersionMetadataConstants;
1258
1521
  (function (GetSecretVersionMetadataConstants) {
1259
- /** The secret type. Supported options include: imported_cert. */
1522
+ /** The secret type. */
1260
1523
  var SecretType;
1261
1524
  (function (SecretType) {
1525
+ SecretType["ARBITRARY"] = "arbitrary";
1526
+ SecretType["IAM_CREDENTIALS"] = "iam_credentials";
1262
1527
  SecretType["IMPORTED_CERT"] = "imported_cert";
1263
1528
  SecretType["PUBLIC_CERT"] = "public_cert";
1529
+ SecretType["PRIVATE_CERT"] = "private_cert";
1530
+ SecretType["USERNAME_PASSWORD"] = "username_password";
1531
+ SecretType["KV"] = "kv";
1264
1532
  })(SecretType = GetSecretVersionMetadataConstants.SecretType || (GetSecretVersionMetadataConstants.SecretType = {}));
1265
1533
  })(GetSecretVersionMetadataConstants = SecretsManagerV1.GetSecretVersionMetadataConstants || (SecretsManagerV1.GetSecretVersionMetadataConstants = {}));
1266
1534
  /** Constants for the `getSecretMetadata` operation. */
@@ -1273,7 +1541,9 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1273
1541
  SecretType["IAM_CREDENTIALS"] = "iam_credentials";
1274
1542
  SecretType["IMPORTED_CERT"] = "imported_cert";
1275
1543
  SecretType["PUBLIC_CERT"] = "public_cert";
1544
+ SecretType["PRIVATE_CERT"] = "private_cert";
1276
1545
  SecretType["USERNAME_PASSWORD"] = "username_password";
1546
+ SecretType["KV"] = "kv";
1277
1547
  })(SecretType = GetSecretMetadataConstants.SecretType || (GetSecretMetadataConstants.SecretType = {}));
1278
1548
  })(GetSecretMetadataConstants = SecretsManagerV1.GetSecretMetadataConstants || (SecretsManagerV1.GetSecretMetadataConstants = {}));
1279
1549
  /** Constants for the `updateSecretMetadata` operation. */
@@ -1286,7 +1556,9 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1286
1556
  SecretType["IAM_CREDENTIALS"] = "iam_credentials";
1287
1557
  SecretType["IMPORTED_CERT"] = "imported_cert";
1288
1558
  SecretType["PUBLIC_CERT"] = "public_cert";
1559
+ SecretType["PRIVATE_CERT"] = "private_cert";
1289
1560
  SecretType["USERNAME_PASSWORD"] = "username_password";
1561
+ SecretType["KV"] = "kv";
1290
1562
  })(SecretType = UpdateSecretMetadataConstants.SecretType || (UpdateSecretMetadataConstants.SecretType = {}));
1291
1563
  })(UpdateSecretMetadataConstants = SecretsManagerV1.UpdateSecretMetadataConstants || (SecretsManagerV1.UpdateSecretMetadataConstants = {}));
1292
1564
  /** Constants for the `putPolicy` operation. */
@@ -1297,6 +1569,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1297
1569
  (function (SecretType) {
1298
1570
  SecretType["USERNAME_PASSWORD"] = "username_password";
1299
1571
  SecretType["PUBLIC_CERT"] = "public_cert";
1572
+ SecretType["PRIVATE_CERT"] = "private_cert";
1300
1573
  })(SecretType = PutPolicyConstants.SecretType || (PutPolicyConstants.SecretType = {}));
1301
1574
  /** The type of policy that is associated with the specified secret. */
1302
1575
  var Policy;
@@ -1312,6 +1585,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1312
1585
  (function (SecretType) {
1313
1586
  SecretType["USERNAME_PASSWORD"] = "username_password";
1314
1587
  SecretType["PUBLIC_CERT"] = "public_cert";
1588
+ SecretType["PRIVATE_CERT"] = "private_cert";
1315
1589
  })(SecretType = GetPolicyConstants.SecretType || (GetPolicyConstants.SecretType = {}));
1316
1590
  /** The type of policy that is associated with the specified secret. */
1317
1591
  var Policy;
@@ -1326,7 +1600,6 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1326
1600
  var SecretType;
1327
1601
  (function (SecretType) {
1328
1602
  SecretType["IAM_CREDENTIALS"] = "iam_credentials";
1329
- SecretType["PUBLIC_CERT"] = "public_cert";
1330
1603
  })(SecretType = PutConfigConstants.SecretType || (PutConfigConstants.SecretType = {}));
1331
1604
  })(PutConfigConstants = SecretsManagerV1.PutConfigConstants || (SecretsManagerV1.PutConfigConstants = {}));
1332
1605
  /** Constants for the `getConfig` operation. */
@@ -1337,6 +1610,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1337
1610
  (function (SecretType) {
1338
1611
  SecretType["IAM_CREDENTIALS"] = "iam_credentials";
1339
1612
  SecretType["PUBLIC_CERT"] = "public_cert";
1613
+ SecretType["PRIVATE_CERT"] = "private_cert";
1340
1614
  })(SecretType = GetConfigConstants.SecretType || (GetConfigConstants.SecretType = {}));
1341
1615
  })(GetConfigConstants = SecretsManagerV1.GetConfigConstants || (SecretsManagerV1.GetConfigConstants = {}));
1342
1616
  /** Constants for the `createConfigElement` operation. */
@@ -1346,12 +1620,16 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1346
1620
  var SecretType;
1347
1621
  (function (SecretType) {
1348
1622
  SecretType["PUBLIC_CERT"] = "public_cert";
1623
+ SecretType["PRIVATE_CERT"] = "private_cert";
1349
1624
  })(SecretType = CreateConfigElementConstants.SecretType || (CreateConfigElementConstants.SecretType = {}));
1350
1625
  /** The configuration element to define or manage. */
1351
1626
  var ConfigElement;
1352
1627
  (function (ConfigElement) {
1353
1628
  ConfigElement["CERTIFICATE_AUTHORITIES"] = "certificate_authorities";
1354
1629
  ConfigElement["DNS_PROVIDERS"] = "dns_providers";
1630
+ ConfigElement["ROOT_CERTIFICATE_AUTHORITIES"] = "root_certificate_authorities";
1631
+ ConfigElement["INTERMEDIATE_CERTIFICATE_AUTHORITIES"] = "intermediate_certificate_authorities";
1632
+ ConfigElement["CERTIFICATE_TEMPLATES"] = "certificate_templates";
1355
1633
  })(ConfigElement = CreateConfigElementConstants.ConfigElement || (CreateConfigElementConstants.ConfigElement = {}));
1356
1634
  /** The type of configuration. Value options differ depending on the `config_element` property that you want to define. */
1357
1635
  var Type;
@@ -1360,6 +1638,9 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1360
1638
  Type["LETSENCRYPT_STAGE"] = "letsencrypt-stage";
1361
1639
  Type["CIS"] = "cis";
1362
1640
  Type["CLASSIC_INFRASTRUCTURE"] = "classic_infrastructure";
1641
+ Type["ROOT_CERTIFICATE_AUTHORITY"] = "root_certificate_authority";
1642
+ Type["INTERMEDIATE_CERTIFICATE_AUTHORITY"] = "intermediate_certificate_authority";
1643
+ Type["CERTIFICATE_TEMPLATE"] = "certificate_template";
1363
1644
  })(Type = CreateConfigElementConstants.Type || (CreateConfigElementConstants.Type = {}));
1364
1645
  })(CreateConfigElementConstants = SecretsManagerV1.CreateConfigElementConstants || (SecretsManagerV1.CreateConfigElementConstants = {}));
1365
1646
  /** Constants for the `getConfigElements` operation. */
@@ -1369,14 +1650,37 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1369
1650
  var SecretType;
1370
1651
  (function (SecretType) {
1371
1652
  SecretType["PUBLIC_CERT"] = "public_cert";
1653
+ SecretType["PRIVATE_CERT"] = "private_cert";
1372
1654
  })(SecretType = GetConfigElementsConstants.SecretType || (GetConfigElementsConstants.SecretType = {}));
1373
1655
  /** The configuration element to define or manage. */
1374
1656
  var ConfigElement;
1375
1657
  (function (ConfigElement) {
1376
1658
  ConfigElement["CERTIFICATE_AUTHORITIES"] = "certificate_authorities";
1377
1659
  ConfigElement["DNS_PROVIDERS"] = "dns_providers";
1660
+ ConfigElement["ROOT_CERTIFICATE_AUTHORITIES"] = "root_certificate_authorities";
1661
+ ConfigElement["INTERMEDIATE_CERTIFICATE_AUTHORITIES"] = "intermediate_certificate_authorities";
1662
+ ConfigElement["CERTIFICATE_TEMPLATES"] = "certificate_templates";
1378
1663
  })(ConfigElement = GetConfigElementsConstants.ConfigElement || (GetConfigElementsConstants.ConfigElement = {}));
1379
1664
  })(GetConfigElementsConstants = SecretsManagerV1.GetConfigElementsConstants || (SecretsManagerV1.GetConfigElementsConstants = {}));
1665
+ /** Constants for the `getConfigElement` operation. */
1666
+ var GetConfigElementConstants;
1667
+ (function (GetConfigElementConstants) {
1668
+ /** The secret type. */
1669
+ var SecretType;
1670
+ (function (SecretType) {
1671
+ SecretType["PUBLIC_CERT"] = "public_cert";
1672
+ SecretType["PRIVATE_CERT"] = "private_cert";
1673
+ })(SecretType = GetConfigElementConstants.SecretType || (GetConfigElementConstants.SecretType = {}));
1674
+ /** The configuration element to define or manage. */
1675
+ var ConfigElement;
1676
+ (function (ConfigElement) {
1677
+ ConfigElement["CERTIFICATE_AUTHORITIES"] = "certificate_authorities";
1678
+ ConfigElement["DNS_PROVIDERS"] = "dns_providers";
1679
+ ConfigElement["ROOT_CERTIFICATE_AUTHORITIES"] = "root_certificate_authorities";
1680
+ ConfigElement["INTERMEDIATE_CERTIFICATE_AUTHORITIES"] = "intermediate_certificate_authorities";
1681
+ ConfigElement["CERTIFICATE_TEMPLATES"] = "certificate_templates";
1682
+ })(ConfigElement = GetConfigElementConstants.ConfigElement || (GetConfigElementConstants.ConfigElement = {}));
1683
+ })(GetConfigElementConstants = SecretsManagerV1.GetConfigElementConstants || (SecretsManagerV1.GetConfigElementConstants = {}));
1380
1684
  /** Constants for the `updateConfigElement` operation. */
1381
1685
  var UpdateConfigElementConstants;
1382
1686
  (function (UpdateConfigElementConstants) {
@@ -1384,12 +1688,16 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1384
1688
  var SecretType;
1385
1689
  (function (SecretType) {
1386
1690
  SecretType["PUBLIC_CERT"] = "public_cert";
1691
+ SecretType["PRIVATE_CERT"] = "private_cert";
1387
1692
  })(SecretType = UpdateConfigElementConstants.SecretType || (UpdateConfigElementConstants.SecretType = {}));
1388
1693
  /** The configuration element to define or manage. */
1389
1694
  var ConfigElement;
1390
1695
  (function (ConfigElement) {
1391
1696
  ConfigElement["CERTIFICATE_AUTHORITIES"] = "certificate_authorities";
1392
1697
  ConfigElement["DNS_PROVIDERS"] = "dns_providers";
1698
+ ConfigElement["ROOT_CERTIFICATE_AUTHORITIES"] = "root_certificate_authorities";
1699
+ ConfigElement["INTERMEDIATE_CERTIFICATE_AUTHORITIES"] = "intermediate_certificate_authorities";
1700
+ ConfigElement["CERTIFICATE_TEMPLATES"] = "certificate_templates";
1393
1701
  })(ConfigElement = UpdateConfigElementConstants.ConfigElement || (UpdateConfigElementConstants.ConfigElement = {}));
1394
1702
  /** The type of configuration. Value options differ depending on the `config_element` property that you want to define. */
1395
1703
  var Type;
@@ -1398,6 +1706,9 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1398
1706
  Type["LETSENCRYPT_STAGE"] = "letsencrypt-stage";
1399
1707
  Type["CIS"] = "cis";
1400
1708
  Type["CLASSIC_INFRASTRUCTURE"] = "classic_infrastructure";
1709
+ Type["ROOT_CERTIFICATE_AUTHORITY"] = "root_certificate_authority";
1710
+ Type["INTERMEDIATE_CERTIFICATE_AUTHORITY"] = "intermediate_certificate_authority";
1711
+ Type["CERTIFICATE_TEMPLATE"] = "certificate_template";
1401
1712
  })(Type = UpdateConfigElementConstants.Type || (UpdateConfigElementConstants.Type = {}));
1402
1713
  })(UpdateConfigElementConstants = SecretsManagerV1.UpdateConfigElementConstants || (SecretsManagerV1.UpdateConfigElementConstants = {}));
1403
1714
  /** Constants for the `deleteConfigElement` operation. */
@@ -1407,29 +1718,18 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
1407
1718
  var SecretType;
1408
1719
  (function (SecretType) {
1409
1720
  SecretType["PUBLIC_CERT"] = "public_cert";
1721
+ SecretType["PRIVATE_CERT"] = "private_cert";
1410
1722
  })(SecretType = DeleteConfigElementConstants.SecretType || (DeleteConfigElementConstants.SecretType = {}));
1411
1723
  /** The configuration element to define or manage. */
1412
1724
  var ConfigElement;
1413
1725
  (function (ConfigElement) {
1414
1726
  ConfigElement["CERTIFICATE_AUTHORITIES"] = "certificate_authorities";
1415
1727
  ConfigElement["DNS_PROVIDERS"] = "dns_providers";
1728
+ ConfigElement["ROOT_CERTIFICATE_AUTHORITIES"] = "root_certificate_authorities";
1729
+ ConfigElement["INTERMEDIATE_CERTIFICATE_AUTHORITIES"] = "intermediate_certificate_authorities";
1730
+ ConfigElement["CERTIFICATE_TEMPLATES"] = "certificate_templates";
1416
1731
  })(ConfigElement = DeleteConfigElementConstants.ConfigElement || (DeleteConfigElementConstants.ConfigElement = {}));
1417
1732
  })(DeleteConfigElementConstants = SecretsManagerV1.DeleteConfigElementConstants || (SecretsManagerV1.DeleteConfigElementConstants = {}));
1418
- /** Constants for the `getConfigElement` operation. */
1419
- var GetConfigElementConstants;
1420
- (function (GetConfigElementConstants) {
1421
- /** The secret type. */
1422
- var SecretType;
1423
- (function (SecretType) {
1424
- SecretType["PUBLIC_CERT"] = "public_cert";
1425
- })(SecretType = GetConfigElementConstants.SecretType || (GetConfigElementConstants.SecretType = {}));
1426
- /** The configuration element to define or manage. */
1427
- var ConfigElement;
1428
- (function (ConfigElement) {
1429
- ConfigElement["CERTIFICATE_AUTHORITIES"] = "certificate_authorities";
1430
- ConfigElement["DNS_PROVIDERS"] = "dns_providers";
1431
- })(ConfigElement = GetConfigElementConstants.ConfigElement || (GetConfigElementConstants.ConfigElement = {}));
1432
- })(GetConfigElementConstants = SecretsManagerV1.GetConfigElementConstants || (SecretsManagerV1.GetConfigElementConstants = {}));
1433
1733
  })(SecretsManagerV1 || (SecretsManagerV1 = {}));
1434
1734
  module.exports = SecretsManagerV1;
1435
1735
  //# sourceMappingURL=v1.js.map