@ibm-cloud/secrets-manager 0.1.0 → 1.0.2

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.
@@ -27,8 +27,19 @@ var __extends = (this && this.__extends) || (function () {
27
27
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
28
28
  };
29
29
  })();
30
+ var __assign = (this && this.__assign) || function () {
31
+ __assign = Object.assign || function(t) {
32
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
33
+ s = arguments[i];
34
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
35
+ t[p] = s[p];
36
+ }
37
+ return t;
38
+ };
39
+ return __assign.apply(this, arguments);
40
+ };
30
41
  /**
31
- * IBM OpenAPI SDK Code Generator Version: 3.29.0-cd9ba74f-20210305-183535
42
+ * IBM OpenAPI SDK Code Generator Version: 3.40.0-910cf8c2-20211006-154754
32
43
  */
33
44
  var extend = require("extend");
34
45
  var ibm_cloud_sdk_core_1 = require("ibm-cloud-sdk-core");
@@ -37,6 +48,9 @@ var common_1 = require("../lib/common");
37
48
  * With IBM Cloud® Secrets Manager, you can create, lease, and centrally manage secrets that are used in IBM Cloud
38
49
  * services or your custom-built applications. Secrets are stored in a dedicated instance of Secrets Manager, built on
39
50
  * open source HashiCorp Vault.
51
+ *
52
+ * API Version: 1.0.0
53
+ * See: https://cloud.ibm.com/docs/secrets-manager
40
54
  */
41
55
  var SecretsManagerV1 = /** @class */ (function (_super) {
42
56
  __extends(SecretsManagerV1, _super);
@@ -89,183 +103,6 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
89
103
  }
90
104
  return service;
91
105
  };
92
- /*************************
93
- * config
94
- ************************/
95
- /**
96
- * Configure secrets of a given type.
97
- *
98
- * Updates the configuration for the given secret type.
99
- *
100
- * @param {Object} params - The parameters to send to the service.
101
- * @param {string} params.secretType - The secret type.
102
- * @param {EngineConfigOneOf} params.engineConfigOneOf - The base request for setting secret engine configuration.
103
- * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
104
- * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.Empty>>}
105
- */
106
- SecretsManagerV1.prototype.putConfig = function (params) {
107
- var _params = Object.assign({}, params);
108
- var requiredParams = ['secretType', 'engineConfigOneOf'];
109
- var missingParams = ibm_cloud_sdk_core_1.getMissingParams(_params, requiredParams);
110
- if (missingParams) {
111
- return Promise.reject(missingParams);
112
- }
113
- var body = _params.engineConfigOneOf;
114
- var path = {
115
- 'secret_type': _params.secretType
116
- };
117
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'putConfig');
118
- var parameters = {
119
- options: {
120
- url: '/api/v1/config/{secret_type}',
121
- method: 'PUT',
122
- body: body,
123
- path: path
124
- },
125
- defaultOptions: extend(true, {}, this.baseOptions, {
126
- headers: extend(true, sdkHeaders, {
127
- 'Content-Type': 'application/json'
128
- }, _params.headers)
129
- })
130
- };
131
- return this.createRequest(parameters);
132
- };
133
- ;
134
- /**
135
- * Get the configuration for a secret type.
136
- *
137
- * Retrieves the configuration that is associated with the given secret type.
138
- *
139
- * @param {Object} params - The parameters to send to the service.
140
- * @param {string} params.secretType - The secret type.
141
- * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
142
- * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.EngineConfigOneOf>>}
143
- */
144
- SecretsManagerV1.prototype.getConfig = function (params) {
145
- var _params = Object.assign({}, params);
146
- var requiredParams = ['secretType'];
147
- var missingParams = ibm_cloud_sdk_core_1.getMissingParams(_params, requiredParams);
148
- if (missingParams) {
149
- return Promise.reject(missingParams);
150
- }
151
- var path = {
152
- 'secret_type': _params.secretType
153
- };
154
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getConfig');
155
- var parameters = {
156
- options: {
157
- url: '/api/v1/config/{secret_type}',
158
- method: 'GET',
159
- path: path
160
- },
161
- defaultOptions: extend(true, {}, this.baseOptions, {
162
- headers: extend(true, sdkHeaders, {
163
- 'Accept': 'application/json'
164
- }, _params.headers)
165
- })
166
- };
167
- return this.createRequest(parameters);
168
- };
169
- ;
170
- /*************************
171
- * policies
172
- ************************/
173
- /**
174
- * Set secret policies.
175
- *
176
- * Creates or updates one or more policies, such as an [automatic rotation
177
- * policy](http://cloud.ibm.com/docs/secrets-manager?topic=secrets-manager-rotate-secrets#auto-rotate-secret), for the
178
- * specified secret.
179
- *
180
- * @param {Object} params - The parameters to send to the service.
181
- * @param {string} params.secretType - The secret type.
182
- * @param {string} params.id - The v4 UUID that uniquely identifies the secret.
183
- * @param {CollectionMetadata} params.metadata - The metadata that describes the resource array.
184
- * @param {SecretPolicyRotation[]} params.resources - A collection of resources.
185
- * @param {string} [params.policy] - The type of policy that is associated with the specified secret.
186
- * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
187
- * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.GetSecretPoliciesOneOf>>}
188
- */
189
- SecretsManagerV1.prototype.putPolicy = function (params) {
190
- var _params = Object.assign({}, params);
191
- var requiredParams = ['secretType', 'id', 'metadata', 'resources'];
192
- var missingParams = ibm_cloud_sdk_core_1.getMissingParams(_params, requiredParams);
193
- if (missingParams) {
194
- return Promise.reject(missingParams);
195
- }
196
- var body = {
197
- 'metadata': _params.metadata,
198
- 'resources': _params.resources
199
- };
200
- var query = {
201
- 'policy': _params.policy
202
- };
203
- var path = {
204
- 'secret_type': _params.secretType,
205
- 'id': _params.id
206
- };
207
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'putPolicy');
208
- var parameters = {
209
- options: {
210
- url: '/api/v1/secrets/{secret_type}/{id}/policies',
211
- method: 'PUT',
212
- body: body,
213
- qs: query,
214
- path: path
215
- },
216
- defaultOptions: extend(true, {}, this.baseOptions, {
217
- headers: extend(true, sdkHeaders, {
218
- 'Accept': 'application/json',
219
- 'Content-Type': 'application/json'
220
- }, _params.headers)
221
- })
222
- };
223
- return this.createRequest(parameters);
224
- };
225
- ;
226
- /**
227
- * List secret policies.
228
- *
229
- * Retrieves a list of policies that are associated with a specified secret.
230
- *
231
- * @param {Object} params - The parameters to send to the service.
232
- * @param {string} params.secretType - The secret type.
233
- * @param {string} params.id - The v4 UUID that uniquely identifies the secret.
234
- * @param {string} [params.policy] - The type of policy that is associated with the specified secret.
235
- * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
236
- * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.GetSecretPoliciesOneOf>>}
237
- */
238
- SecretsManagerV1.prototype.getPolicy = function (params) {
239
- var _params = Object.assign({}, params);
240
- var requiredParams = ['secretType', 'id'];
241
- var missingParams = ibm_cloud_sdk_core_1.getMissingParams(_params, requiredParams);
242
- if (missingParams) {
243
- return Promise.reject(missingParams);
244
- }
245
- var query = {
246
- 'policy': _params.policy
247
- };
248
- var path = {
249
- 'secret_type': _params.secretType,
250
- 'id': _params.id
251
- };
252
- var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getPolicy');
253
- var parameters = {
254
- options: {
255
- url: '/api/v1/secrets/{secret_type}/{id}/policies',
256
- method: 'GET',
257
- qs: query,
258
- path: path
259
- },
260
- defaultOptions: extend(true, {}, this.baseOptions, {
261
- headers: extend(true, sdkHeaders, {
262
- 'Accept': 'application/json'
263
- }, _params.headers)
264
- })
265
- };
266
- return this.createRequest(parameters);
267
- };
268
- ;
269
106
  /*************************
270
107
  * secretGroups
271
108
  ************************/
@@ -285,7 +122,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
285
122
  * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.SecretGroupDef>>}
286
123
  */
287
124
  SecretsManagerV1.prototype.createSecretGroup = function (params) {
288
- var _params = Object.assign({}, params);
125
+ var _params = __assign({}, params);
289
126
  var requiredParams = ['metadata', 'resources'];
290
127
  var missingParams = ibm_cloud_sdk_core_1.getMissingParams(_params, requiredParams);
291
128
  if (missingParams) {
@@ -293,25 +130,24 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
293
130
  }
294
131
  var body = {
295
132
  'metadata': _params.metadata,
296
- 'resources': _params.resources
133
+ 'resources': _params.resources,
297
134
  };
298
135
  var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'createSecretGroup');
299
136
  var parameters = {
300
137
  options: {
301
138
  url: '/api/v1/secret_groups',
302
139
  method: 'POST',
303
- body: body
140
+ body: body,
304
141
  },
305
142
  defaultOptions: extend(true, {}, this.baseOptions, {
306
143
  headers: extend(true, sdkHeaders, {
307
144
  'Accept': 'application/json',
308
- 'Content-Type': 'application/json'
309
- }, _params.headers)
310
- })
145
+ 'Content-Type': 'application/json',
146
+ }, _params.headers),
147
+ }),
311
148
  };
312
149
  return this.createRequest(parameters);
313
150
  };
314
- ;
315
151
  /**
316
152
  * List secret groups.
317
153
  *
@@ -322,22 +158,21 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
322
158
  * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.SecretGroupDef>>}
323
159
  */
324
160
  SecretsManagerV1.prototype.listSecretGroups = function (params) {
325
- var _params = Object.assign({}, params);
161
+ var _params = __assign({}, params);
326
162
  var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'listSecretGroups');
327
163
  var parameters = {
328
164
  options: {
329
165
  url: '/api/v1/secret_groups',
330
- method: 'GET'
166
+ method: 'GET',
331
167
  },
332
168
  defaultOptions: extend(true, {}, this.baseOptions, {
333
169
  headers: extend(true, sdkHeaders, {
334
- 'Accept': 'application/json'
335
- }, _params.headers)
336
- })
170
+ 'Accept': 'application/json',
171
+ }, _params.headers),
172
+ }),
337
173
  };
338
174
  return this.createRequest(parameters);
339
175
  };
340
- ;
341
176
  /**
342
177
  * Get a secret group.
343
178
  *
@@ -349,31 +184,30 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
349
184
  * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.SecretGroupDef>>}
350
185
  */
351
186
  SecretsManagerV1.prototype.getSecretGroup = function (params) {
352
- var _params = Object.assign({}, params);
187
+ var _params = __assign({}, params);
353
188
  var requiredParams = ['id'];
354
189
  var missingParams = ibm_cloud_sdk_core_1.getMissingParams(_params, requiredParams);
355
190
  if (missingParams) {
356
191
  return Promise.reject(missingParams);
357
192
  }
358
193
  var path = {
359
- 'id': _params.id
194
+ 'id': _params.id,
360
195
  };
361
196
  var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getSecretGroup');
362
197
  var parameters = {
363
198
  options: {
364
199
  url: '/api/v1/secret_groups/{id}',
365
200
  method: 'GET',
366
- path: path
201
+ path: path,
367
202
  },
368
203
  defaultOptions: extend(true, {}, this.baseOptions, {
369
204
  headers: extend(true, sdkHeaders, {
370
- 'Accept': 'application/json'
371
- }, _params.headers)
372
- })
205
+ 'Accept': 'application/json',
206
+ }, _params.headers),
207
+ }),
373
208
  };
374
209
  return this.createRequest(parameters);
375
210
  };
376
- ;
377
211
  /**
378
212
  * Update a secret group.
379
213
  *
@@ -387,7 +221,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
387
221
  * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.SecretGroupDef>>}
388
222
  */
389
223
  SecretsManagerV1.prototype.updateSecretGroupMetadata = function (params) {
390
- var _params = Object.assign({}, params);
224
+ var _params = __assign({}, params);
391
225
  var requiredParams = ['id', 'metadata', 'resources'];
392
226
  var missingParams = ibm_cloud_sdk_core_1.getMissingParams(_params, requiredParams);
393
227
  if (missingParams) {
@@ -395,10 +229,10 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
395
229
  }
396
230
  var body = {
397
231
  'metadata': _params.metadata,
398
- 'resources': _params.resources
232
+ 'resources': _params.resources,
399
233
  };
400
234
  var path = {
401
- 'id': _params.id
235
+ 'id': _params.id,
402
236
  };
403
237
  var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'updateSecretGroupMetadata');
404
238
  var parameters = {
@@ -406,18 +240,17 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
406
240
  url: '/api/v1/secret_groups/{id}',
407
241
  method: 'PUT',
408
242
  body: body,
409
- path: path
243
+ path: path,
410
244
  },
411
245
  defaultOptions: extend(true, {}, this.baseOptions, {
412
246
  headers: extend(true, sdkHeaders, {
413
247
  'Accept': 'application/json',
414
- 'Content-Type': 'application/json'
415
- }, _params.headers)
416
- })
248
+ 'Content-Type': 'application/json',
249
+ }, _params.headers),
250
+ }),
417
251
  };
418
252
  return this.createRequest(parameters);
419
253
  };
420
- ;
421
254
  /**
422
255
  * Delete a secret group.
423
256
  *
@@ -432,42 +265,43 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
432
265
  * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.Empty>>}
433
266
  */
434
267
  SecretsManagerV1.prototype.deleteSecretGroup = function (params) {
435
- var _params = Object.assign({}, params);
268
+ var _params = __assign({}, params);
436
269
  var requiredParams = ['id'];
437
270
  var missingParams = ibm_cloud_sdk_core_1.getMissingParams(_params, requiredParams);
438
271
  if (missingParams) {
439
272
  return Promise.reject(missingParams);
440
273
  }
441
274
  var path = {
442
- 'id': _params.id
275
+ 'id': _params.id,
443
276
  };
444
277
  var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteSecretGroup');
445
278
  var parameters = {
446
279
  options: {
447
280
  url: '/api/v1/secret_groups/{id}',
448
281
  method: 'DELETE',
449
- path: path
282
+ path: path,
450
283
  },
451
284
  defaultOptions: extend(true, {}, this.baseOptions, {
452
- headers: extend(true, sdkHeaders, {}, _params.headers)
453
- })
285
+ headers: extend(true, sdkHeaders, {}, _params.headers),
286
+ }),
454
287
  };
455
288
  return this.createRequest(parameters);
456
289
  };
457
- ;
458
290
  /*************************
459
291
  * secrets
460
292
  ************************/
461
293
  /**
462
294
  * Create a secret.
463
295
  *
464
- * Creates a secret that you can use to access or authenticate to a protected resource.
296
+ * Creates a secret or imports an existing value that you can use to access or authenticate to a protected resource.
465
297
  *
466
- * A successful request stores the secret in your dedicated instance based on the secret type and data that you
467
- * specify. The response returns the ID value of the secret, along with other metadata.
298
+ * Use this method to either generate or import an existing secret, such as an arbitrary value or a TLS certificate,
299
+ * that you can manage in your Secrets Manager service instance. A successful request stores the secret in your
300
+ * dedicated instance based on the secret type and data that you specify. The response returns the ID value of the
301
+ * secret, along with other metadata.
468
302
  *
469
303
  * To learn more about the types of secrets that you can create with Secrets Manager, check out the
470
- * [docs](https://cloud.ibm.com/docs/secrets-manager?topic=secrets-manager-secret-basics).
304
+ * [docs](https://cloud.ibm.com/docs/secrets-manager?topic=secrets-manager-what-is-secret).
471
305
  *
472
306
  * @param {Object} params - The parameters to send to the service.
473
307
  * @param {string} params.secretType - The secret type.
@@ -477,7 +311,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
477
311
  * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.CreateSecret>>}
478
312
  */
479
313
  SecretsManagerV1.prototype.createSecret = function (params) {
480
- var _params = Object.assign({}, params);
314
+ var _params = __assign({}, params);
481
315
  var requiredParams = ['secretType', 'metadata', 'resources'];
482
316
  var missingParams = ibm_cloud_sdk_core_1.getMissingParams(_params, requiredParams);
483
317
  if (missingParams) {
@@ -485,10 +319,10 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
485
319
  }
486
320
  var body = {
487
321
  'metadata': _params.metadata,
488
- 'resources': _params.resources
322
+ 'resources': _params.resources,
489
323
  };
490
324
  var path = {
491
- 'secret_type': _params.secretType
325
+ 'secret_type': _params.secretType,
492
326
  };
493
327
  var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'createSecret');
494
328
  var parameters = {
@@ -496,18 +330,17 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
496
330
  url: '/api/v1/secrets/{secret_type}',
497
331
  method: 'POST',
498
332
  body: body,
499
- path: path
333
+ path: path,
500
334
  },
501
335
  defaultOptions: extend(true, {}, this.baseOptions, {
502
336
  headers: extend(true, sdkHeaders, {
503
337
  'Accept': 'application/json',
504
- 'Content-Type': 'application/json'
505
- }, _params.headers)
506
- })
338
+ 'Content-Type': 'application/json',
339
+ }, _params.headers),
340
+ }),
507
341
  };
508
342
  return this.createRequest(parameters);
509
343
  };
510
- ;
511
344
  /**
512
345
  * List secrets by type.
513
346
  *
@@ -530,7 +363,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
530
363
  * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.ListSecrets>>}
531
364
  */
532
365
  SecretsManagerV1.prototype.listSecrets = function (params) {
533
- var _params = Object.assign({}, params);
366
+ var _params = __assign({}, params);
534
367
  var requiredParams = ['secretType'];
535
368
  var missingParams = ibm_cloud_sdk_core_1.getMissingParams(_params, requiredParams);
536
369
  if (missingParams) {
@@ -538,10 +371,10 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
538
371
  }
539
372
  var query = {
540
373
  'limit': _params.limit,
541
- 'offset': _params.offset
374
+ 'offset': _params.offset,
542
375
  };
543
376
  var path = {
544
- 'secret_type': _params.secretType
377
+ 'secret_type': _params.secretType,
545
378
  };
546
379
  var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'listSecrets');
547
380
  var parameters = {
@@ -549,17 +382,16 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
549
382
  url: '/api/v1/secrets/{secret_type}',
550
383
  method: 'GET',
551
384
  qs: query,
552
- path: path
385
+ path: path,
553
386
  },
554
387
  defaultOptions: extend(true, {}, this.baseOptions, {
555
388
  headers: extend(true, sdkHeaders, {
556
- 'Accept': 'application/json'
557
- }, _params.headers)
558
- })
389
+ 'Accept': 'application/json',
390
+ }, _params.headers),
391
+ }),
559
392
  };
560
393
  return this.createRequest(parameters);
561
394
  };
562
- ;
563
395
  /**
564
396
  * List all secrets.
565
397
  *
@@ -586,33 +418,40 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
586
418
  *
587
419
  * **Usage:** To sort a list of secrets by their creation date, use
588
420
  * `../secrets/{secret-type}?sort_by=creation_date`.
421
+ * @param {string[]} [params.groups] - Filter secrets by groups.
422
+ *
423
+ * You can apply multiple filters by using a comma-separated list of secret group IDs. If you need to filter secrets
424
+ * that are in the default secret group, use the `default` keyword.
425
+ *
426
+ * **Usage:** To retrieve a list of secrets that are associated with an existing secret group or the default group,
427
+ * use `../secrets?groups={secret_group_ID},default`.
589
428
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
590
429
  * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.ListSecrets>>}
591
430
  */
592
431
  SecretsManagerV1.prototype.listAllSecrets = function (params) {
593
- var _params = Object.assign({}, params);
432
+ var _params = __assign({}, params);
594
433
  var query = {
595
434
  'limit': _params.limit,
596
435
  'offset': _params.offset,
597
436
  'search': _params.search,
598
- 'sort_by': _params.sortBy
437
+ 'sort_by': _params.sortBy,
438
+ 'groups': _params.groups,
599
439
  };
600
440
  var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'listAllSecrets');
601
441
  var parameters = {
602
442
  options: {
603
443
  url: '/api/v1/secrets',
604
444
  method: 'GET',
605
- qs: query
445
+ qs: query,
606
446
  },
607
447
  defaultOptions: extend(true, {}, this.baseOptions, {
608
448
  headers: extend(true, sdkHeaders, {
609
- 'Accept': 'application/json'
610
- }, _params.headers)
611
- })
449
+ 'Accept': 'application/json',
450
+ }, _params.headers),
451
+ }),
612
452
  };
613
453
  return this.createRequest(parameters);
614
454
  };
615
- ;
616
455
  /**
617
456
  * Get a secret.
618
457
  *
@@ -629,7 +468,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
629
468
  * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.GetSecret>>}
630
469
  */
631
470
  SecretsManagerV1.prototype.getSecret = function (params) {
632
- var _params = Object.assign({}, params);
471
+ var _params = __assign({}, params);
633
472
  var requiredParams = ['secretType', 'id'];
634
473
  var missingParams = ibm_cloud_sdk_core_1.getMissingParams(_params, requiredParams);
635
474
  if (missingParams) {
@@ -637,54 +476,53 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
637
476
  }
638
477
  var path = {
639
478
  'secret_type': _params.secretType,
640
- 'id': _params.id
479
+ 'id': _params.id,
641
480
  };
642
481
  var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getSecret');
643
482
  var parameters = {
644
483
  options: {
645
484
  url: '/api/v1/secrets/{secret_type}/{id}',
646
485
  method: 'GET',
647
- path: path
486
+ path: path,
648
487
  },
649
488
  defaultOptions: extend(true, {}, this.baseOptions, {
650
489
  headers: extend(true, sdkHeaders, {
651
- 'Accept': 'application/json'
652
- }, _params.headers)
653
- })
490
+ 'Accept': 'application/json',
491
+ }, _params.headers),
492
+ }),
654
493
  };
655
494
  return this.createRequest(parameters);
656
495
  };
657
- ;
658
496
  /**
659
497
  * Invoke an action on a secret.
660
498
  *
661
499
  * Invokes an action on a specified secret. This method supports the following actions:
662
500
  *
663
- * - `rotate`: Replace the value of an `arbitrary` or `username_password` secret.
501
+ * - `rotate`: Replace the value of an `arbitrary`, `username_password`, `public_cert` or `imported_cert` secret.
664
502
  * - `delete_credentials`: Delete the API key that is associated with an `iam_credentials` secret.
665
503
  *
666
504
  * @param {Object} params - The parameters to send to the service.
667
505
  * @param {string} params.secretType - The secret type.
668
506
  * @param {string} params.id - The v4 UUID that uniquely identifies the secret.
669
507
  * @param {string} params.action - The action to perform on the specified secret.
670
- * @param {SecretActionOneOf} params.secretActionOneOf - The base request for invoking an action on a secret.
508
+ * @param {SecretAction} params.secretAction - The properties to update for the secret.
671
509
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
672
510
  * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.GetSecret>>}
673
511
  */
674
512
  SecretsManagerV1.prototype.updateSecret = function (params) {
675
- var _params = Object.assign({}, params);
676
- var requiredParams = ['secretType', 'id', 'action', 'secretActionOneOf'];
513
+ var _params = __assign({}, params);
514
+ var requiredParams = ['secretType', 'id', 'action', 'secretAction'];
677
515
  var missingParams = ibm_cloud_sdk_core_1.getMissingParams(_params, requiredParams);
678
516
  if (missingParams) {
679
517
  return Promise.reject(missingParams);
680
518
  }
681
- var body = _params.secretActionOneOf;
519
+ var body = _params.secretAction;
682
520
  var query = {
683
- 'action': _params.action
521
+ 'action': _params.action,
684
522
  };
685
523
  var path = {
686
524
  'secret_type': _params.secretType,
687
- 'id': _params.id
525
+ 'id': _params.id,
688
526
  };
689
527
  var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'updateSecret');
690
528
  var parameters = {
@@ -693,18 +531,17 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
693
531
  method: 'POST',
694
532
  body: body,
695
533
  qs: query,
696
- path: path
534
+ path: path,
697
535
  },
698
536
  defaultOptions: extend(true, {}, this.baseOptions, {
699
537
  headers: extend(true, sdkHeaders, {
700
538
  'Accept': 'application/json',
701
- 'Content-Type': 'application/json'
702
- }, _params.headers)
703
- })
539
+ 'Content-Type': 'application/json',
540
+ }, _params.headers),
541
+ }),
704
542
  };
705
543
  return this.createRequest(parameters);
706
544
  };
707
- ;
708
545
  /**
709
546
  * Delete a secret.
710
547
  *
@@ -717,7 +554,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
717
554
  * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.Empty>>}
718
555
  */
719
556
  SecretsManagerV1.prototype.deleteSecret = function (params) {
720
- var _params = Object.assign({}, params);
557
+ var _params = __assign({}, params);
721
558
  var requiredParams = ['secretType', 'id'];
722
559
  var missingParams = ibm_cloud_sdk_core_1.getMissingParams(_params, requiredParams);
723
560
  if (missingParams) {
@@ -725,29 +562,119 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
725
562
  }
726
563
  var path = {
727
564
  'secret_type': _params.secretType,
728
- 'id': _params.id
565
+ 'id': _params.id,
729
566
  };
730
567
  var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteSecret');
731
568
  var parameters = {
732
569
  options: {
733
570
  url: '/api/v1/secrets/{secret_type}/{id}',
734
571
  method: 'DELETE',
735
- path: path
572
+ path: path,
573
+ },
574
+ defaultOptions: extend(true, {}, this.baseOptions, {
575
+ headers: extend(true, sdkHeaders, {}, _params.headers),
576
+ }),
577
+ };
578
+ return this.createRequest(parameters);
579
+ };
580
+ /**
581
+ * Get a version of a secret.
582
+ *
583
+ * Retrieves a version of a secret by specifying the ID of the version or the alias `previous`.
584
+ *
585
+ * A successful request returns the secret data that is associated with the specified version of your secret, along
586
+ * with other metadata.
587
+ *
588
+ * @param {Object} params - The parameters to send to the service.
589
+ * @param {string} params.secretType - The secret type.
590
+ * @param {string} params.id - The v4 UUID that uniquely identifies the secret.
591
+ * @param {string} params.versionId - The v4 UUID that uniquely identifies the secret version. You can also use
592
+ * `previous` to retrieve the previous version.
593
+ *
594
+ * **Note:** To find the version ID of a secret, use the [Get secret metadata](#get-secret-metadata) method and check
595
+ * the response details.
596
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
597
+ * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.GetSecretVersion>>}
598
+ */
599
+ SecretsManagerV1.prototype.getSecretVersion = function (params) {
600
+ 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);
605
+ }
606
+ var path = {
607
+ 'secret_type': _params.secretType,
608
+ 'id': _params.id,
609
+ 'version_id': _params.versionId,
610
+ };
611
+ var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getSecretVersion');
612
+ var parameters = {
613
+ options: {
614
+ url: '/api/v1/secrets/{secret_type}/{id}/versions/{version_id}',
615
+ method: 'GET',
616
+ path: path,
617
+ },
618
+ defaultOptions: extend(true, {}, this.baseOptions, {
619
+ headers: extend(true, sdkHeaders, {
620
+ 'Accept': 'application/json',
621
+ }, _params.headers),
622
+ }),
623
+ };
624
+ return this.createRequest(parameters);
625
+ };
626
+ /**
627
+ * Get secret version metadata.
628
+ *
629
+ * Retrieves secret version metadata by specifying the ID of the version or the alias `previous`.
630
+ *
631
+ * A successful request returns the metadata that is associated with the specified version of your secret.
632
+ *
633
+ * @param {Object} params - The parameters to send to the service.
634
+ * @param {string} params.secretType - The secret type.
635
+ * @param {string} params.id - The v4 UUID that uniquely identifies the secret.
636
+ * @param {string} params.versionId - The v4 UUID that uniquely identifies the secret version. You can also use
637
+ * `previous` to retrieve the previous version.
638
+ *
639
+ * **Note:** To find the version ID of a secret, use the [Get secret metadata](#get-secret-metadata) method and check
640
+ * the response details.
641
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
642
+ * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.GetSecretVersionMetadata>>}
643
+ */
644
+ SecretsManagerV1.prototype.getSecretVersionMetadata = function (params) {
645
+ 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);
650
+ }
651
+ var path = {
652
+ 'secret_type': _params.secretType,
653
+ 'id': _params.id,
654
+ 'version_id': _params.versionId,
655
+ };
656
+ var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getSecretVersionMetadata');
657
+ var parameters = {
658
+ options: {
659
+ url: '/api/v1/secrets/{secret_type}/{id}/versions/{version_id}/metadata',
660
+ method: 'GET',
661
+ path: path,
736
662
  },
737
663
  defaultOptions: extend(true, {}, this.baseOptions, {
738
- headers: extend(true, sdkHeaders, {}, _params.headers)
739
- })
664
+ headers: extend(true, sdkHeaders, {
665
+ 'Accept': 'application/json',
666
+ }, _params.headers),
667
+ }),
740
668
  };
741
669
  return this.createRequest(parameters);
742
670
  };
743
- ;
744
671
  /**
745
672
  * Get secret metadata.
746
673
  *
747
674
  * Retrieves the details of a secret by specifying the ID.
748
675
  *
749
676
  * A successful request returns only metadata about the secret, such as its name and creation date. To retrieve the
750
- * value of a secret, use the [Get a secret](#get-secret) method.
677
+ * value of a secret, use the [Get a secret](#get-secret) or [Get a version of a secret](#get-secret-version) methods.
751
678
  *
752
679
  * @param {Object} params - The parameters to send to the service.
753
680
  * @param {string} params.secretType - The secret type.
@@ -756,7 +683,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
756
683
  * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.SecretMetadataRequest>>}
757
684
  */
758
685
  SecretsManagerV1.prototype.getSecretMetadata = function (params) {
759
- var _params = Object.assign({}, params);
686
+ var _params = __assign({}, params);
760
687
  var requiredParams = ['secretType', 'id'];
761
688
  var missingParams = ibm_cloud_sdk_core_1.getMissingParams(_params, requiredParams);
762
689
  if (missingParams) {
@@ -764,24 +691,23 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
764
691
  }
765
692
  var path = {
766
693
  'secret_type': _params.secretType,
767
- 'id': _params.id
694
+ 'id': _params.id,
768
695
  };
769
696
  var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getSecretMetadata');
770
697
  var parameters = {
771
698
  options: {
772
699
  url: '/api/v1/secrets/{secret_type}/{id}/metadata',
773
700
  method: 'GET',
774
- path: path
701
+ path: path,
775
702
  },
776
703
  defaultOptions: extend(true, {}, this.baseOptions, {
777
704
  headers: extend(true, sdkHeaders, {
778
- 'Accept': 'application/json'
779
- }, _params.headers)
780
- })
705
+ 'Accept': 'application/json',
706
+ }, _params.headers),
707
+ }),
781
708
  };
782
709
  return this.createRequest(parameters);
783
710
  };
784
- ;
785
711
  /**
786
712
  * Update secret metadata.
787
713
  *
@@ -799,7 +725,7 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
799
725
  * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.SecretMetadataRequest>>}
800
726
  */
801
727
  SecretsManagerV1.prototype.updateSecretMetadata = function (params) {
802
- var _params = Object.assign({}, params);
728
+ var _params = __assign({}, params);
803
729
  var requiredParams = ['secretType', 'id', 'metadata', 'resources'];
804
730
  var missingParams = ibm_cloud_sdk_core_1.getMissingParams(_params, requiredParams);
805
731
  if (missingParams) {
@@ -807,11 +733,11 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
807
733
  }
808
734
  var body = {
809
735
  'metadata': _params.metadata,
810
- 'resources': _params.resources
736
+ 'resources': _params.resources,
811
737
  };
812
738
  var path = {
813
739
  'secret_type': _params.secretType,
814
- 'id': _params.id
740
+ 'id': _params.id,
815
741
  };
816
742
  var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'updateSecretMetadata');
817
743
  var parameters = {
@@ -819,72 +745,414 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
819
745
  url: '/api/v1/secrets/{secret_type}/{id}/metadata',
820
746
  method: 'PUT',
821
747
  body: body,
822
- path: path
748
+ path: path,
823
749
  },
824
750
  defaultOptions: extend(true, {}, this.baseOptions, {
825
751
  headers: extend(true, sdkHeaders, {
826
752
  'Accept': 'application/json',
827
- 'Content-Type': 'application/json'
828
- }, _params.headers)
829
- })
753
+ 'Content-Type': 'application/json',
754
+ }, _params.headers),
755
+ }),
830
756
  };
831
757
  return this.createRequest(parameters);
832
758
  };
833
- ;
834
- SecretsManagerV1.DEFAULT_SERVICE_URL = 'https://secrets-manager.cloud.ibm.com';
835
- SecretsManagerV1.DEFAULT_SERVICE_NAME = 'secrets_manager';
836
- return SecretsManagerV1;
837
- }(ibm_cloud_sdk_core_1.BaseService));
838
- /*************************
839
- * interfaces
840
- ************************/
841
- (function (SecretsManagerV1) {
842
- /** Constants for the `putConfig` operation. */
843
- var PutConfigConstants;
844
- (function (PutConfigConstants) {
845
- /** The secret type. */
846
- var SecretType;
847
- (function (SecretType) {
848
- SecretType["IAM_CREDENTIALS"] = "iam_credentials";
849
- })(SecretType = PutConfigConstants.SecretType || (PutConfigConstants.SecretType = {}));
850
- })(PutConfigConstants = SecretsManagerV1.PutConfigConstants || (SecretsManagerV1.PutConfigConstants = {}));
851
- /** Constants for the `getConfig` operation. */
852
- var GetConfigConstants;
853
- (function (GetConfigConstants) {
854
- /** The secret type. */
855
- var SecretType;
856
- (function (SecretType) {
857
- SecretType["IAM_CREDENTIALS"] = "iam_credentials";
858
- })(SecretType = GetConfigConstants.SecretType || (GetConfigConstants.SecretType = {}));
859
- })(GetConfigConstants = SecretsManagerV1.GetConfigConstants || (SecretsManagerV1.GetConfigConstants = {}));
860
- /** Constants for the `putPolicy` operation. */
861
- var PutPolicyConstants;
862
- (function (PutPolicyConstants) {
863
- /** The secret type. */
864
- var SecretType;
865
- (function (SecretType) {
866
- SecretType["USERNAME_PASSWORD"] = "username_password";
867
- })(SecretType = PutPolicyConstants.SecretType || (PutPolicyConstants.SecretType = {}));
868
- /** The type of policy that is associated with the specified secret. */
869
- var Policy;
870
- (function (Policy) {
871
- Policy["ROTATION"] = "rotation";
872
- })(Policy = PutPolicyConstants.Policy || (PutPolicyConstants.Policy = {}));
873
- })(PutPolicyConstants = SecretsManagerV1.PutPolicyConstants || (SecretsManagerV1.PutPolicyConstants = {}));
874
- /** Constants for the `getPolicy` operation. */
875
- var GetPolicyConstants;
876
- (function (GetPolicyConstants) {
877
- /** The secret type. */
878
- var SecretType;
879
- (function (SecretType) {
880
- SecretType["USERNAME_PASSWORD"] = "username_password";
881
- })(SecretType = GetPolicyConstants.SecretType || (GetPolicyConstants.SecretType = {}));
882
- /** The type of policy that is associated with the specified secret. */
883
- var Policy;
884
- (function (Policy) {
885
- Policy["ROTATION"] = "rotation";
886
- })(Policy = GetPolicyConstants.Policy || (GetPolicyConstants.Policy = {}));
887
- })(GetPolicyConstants = SecretsManagerV1.GetPolicyConstants || (SecretsManagerV1.GetPolicyConstants = {}));
759
+ /*************************
760
+ * policies
761
+ ************************/
762
+ /**
763
+ * Set secret policies.
764
+ *
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.
768
+ *
769
+ * @param {Object} params - The parameters to send to the service.
770
+ * @param {string} params.secretType - The secret type.
771
+ * @param {string} params.id - The v4 UUID that uniquely identifies the secret.
772
+ * @param {CollectionMetadata} params.metadata - The metadata that describes the resource array.
773
+ * @param {SecretPolicyRotation[]} params.resources - A collection of resources.
774
+ * @param {string} [params.policy] - The type of policy that is associated with the specified secret.
775
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
776
+ * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.GetSecretPolicies>>}
777
+ */
778
+ SecretsManagerV1.prototype.putPolicy = function (params) {
779
+ 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);
784
+ }
785
+ var body = {
786
+ 'metadata': _params.metadata,
787
+ 'resources': _params.resources,
788
+ };
789
+ var query = {
790
+ 'policy': _params.policy,
791
+ };
792
+ var path = {
793
+ 'secret_type': _params.secretType,
794
+ 'id': _params.id,
795
+ };
796
+ var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'putPolicy');
797
+ var parameters = {
798
+ options: {
799
+ url: '/api/v1/secrets/{secret_type}/{id}/policies',
800
+ method: 'PUT',
801
+ body: body,
802
+ qs: query,
803
+ path: path,
804
+ },
805
+ defaultOptions: extend(true, {}, this.baseOptions, {
806
+ headers: extend(true, sdkHeaders, {
807
+ 'Accept': 'application/json',
808
+ 'Content-Type': 'application/json',
809
+ }, _params.headers),
810
+ }),
811
+ };
812
+ return this.createRequest(parameters);
813
+ };
814
+ /**
815
+ * List secret policies.
816
+ *
817
+ * Retrieves a list of policies that are associated with a specified secret.
818
+ *
819
+ * @param {Object} params - The parameters to send to the service.
820
+ * @param {string} params.secretType - The secret type.
821
+ * @param {string} params.id - The v4 UUID that uniquely identifies the secret.
822
+ * @param {string} [params.policy] - The type of policy that is associated with the specified secret.
823
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
824
+ * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.GetSecretPolicies>>}
825
+ */
826
+ SecretsManagerV1.prototype.getPolicy = function (params) {
827
+ 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);
832
+ }
833
+ var query = {
834
+ 'policy': _params.policy,
835
+ };
836
+ var path = {
837
+ 'secret_type': _params.secretType,
838
+ 'id': _params.id,
839
+ };
840
+ var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getPolicy');
841
+ var parameters = {
842
+ options: {
843
+ url: '/api/v1/secrets/{secret_type}/{id}/policies',
844
+ method: 'GET',
845
+ qs: query,
846
+ path: path,
847
+ },
848
+ defaultOptions: extend(true, {}, this.baseOptions, {
849
+ headers: extend(true, sdkHeaders, {
850
+ 'Accept': 'application/json',
851
+ }, _params.headers),
852
+ }),
853
+ };
854
+ return this.createRequest(parameters);
855
+ };
856
+ /*************************
857
+ * config
858
+ ************************/
859
+ /**
860
+ * Set the configuration of a secret type.
861
+ *
862
+ * Sets the configuration for the specified secret type.
863
+ *
864
+ * 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.
867
+ *
868
+ * @param {Object} params - The parameters to send to the service.
869
+ * @param {string} params.secretType -
870
+ * @param {EngineConfig} params.engineConfig - Properties to update for a secrets engine.
871
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
872
+ * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.Empty>>}
873
+ */
874
+ SecretsManagerV1.prototype.putConfig = function (params) {
875
+ 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);
880
+ }
881
+ var body = _params.engineConfig;
882
+ var path = {
883
+ 'secret_type': _params.secretType,
884
+ };
885
+ var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'putConfig');
886
+ var parameters = {
887
+ options: {
888
+ url: '/api/v1/config/{secret_type}',
889
+ method: 'PUT',
890
+ body: body,
891
+ path: path,
892
+ },
893
+ defaultOptions: extend(true, {}, this.baseOptions, {
894
+ headers: extend(true, sdkHeaders, {
895
+ 'Content-Type': 'application/json',
896
+ }, _params.headers),
897
+ }),
898
+ };
899
+ return this.createRequest(parameters);
900
+ };
901
+ /**
902
+ * Get the configuration of a secret type.
903
+ *
904
+ * Retrieves the configuration that is associated with the specified secret type.
905
+ *
906
+ * @param {Object} params - The parameters to send to the service.
907
+ * @param {string} params.secretType - The secret type.
908
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
909
+ * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.GetConfig>>}
910
+ */
911
+ SecretsManagerV1.prototype.getConfig = function (params) {
912
+ 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);
917
+ }
918
+ var path = {
919
+ 'secret_type': _params.secretType,
920
+ };
921
+ var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getConfig');
922
+ var parameters = {
923
+ options: {
924
+ url: '/api/v1/config/{secret_type}',
925
+ method: 'GET',
926
+ path: path,
927
+ },
928
+ defaultOptions: extend(true, {}, this.baseOptions, {
929
+ headers: extend(true, sdkHeaders, {
930
+ 'Accept': 'application/json',
931
+ }, _params.headers),
932
+ }),
933
+ };
934
+ return this.createRequest(parameters);
935
+ };
936
+ /**
937
+ * Add a configuration.
938
+ *
939
+ * Adds a configuration element to the specified secret type.
940
+ *
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.
943
+ *
944
+ * @param {Object} params - The parameters to send to the service.
945
+ * @param {string} params.secretType - The secret type.
946
+ * @param {string} params.configElement - The configuration element to define or manage.
947
+ * @param {string} params.name - The human-readable name to assign to your configuration.
948
+ * @param {string} params.type - The type of configuration. Value options differ depending on the `config_element`
949
+ * property that you want to define.
950
+ * @param {ConfigElementDefConfig} params.config - The configuration to define for the specified secret type.
951
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
952
+ * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.GetSingleConfigElement>>}
953
+ */
954
+ SecretsManagerV1.prototype.createConfigElement = function (params) {
955
+ 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);
960
+ }
961
+ var body = {
962
+ 'name': _params.name,
963
+ 'type': _params.type,
964
+ 'config': _params.config,
965
+ };
966
+ var path = {
967
+ 'secret_type': _params.secretType,
968
+ 'config_element': _params.configElement,
969
+ };
970
+ var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'createConfigElement');
971
+ var parameters = {
972
+ options: {
973
+ url: '/api/v1/config/{secret_type}/{config_element}',
974
+ method: 'POST',
975
+ body: body,
976
+ path: path,
977
+ },
978
+ defaultOptions: extend(true, {}, this.baseOptions, {
979
+ headers: extend(true, sdkHeaders, {
980
+ 'Accept': 'application/json',
981
+ 'Content-Type': 'application/json',
982
+ }, _params.headers),
983
+ }),
984
+ };
985
+ return this.createRequest(parameters);
986
+ };
987
+ /**
988
+ * List configurations.
989
+ *
990
+ * Lists the configuration elements that are associated with a specified secret type.
991
+ *
992
+ * @param {Object} params - The parameters to send to the service.
993
+ * @param {string} params.secretType - The secret type.
994
+ * @param {string} params.configElement - The configuration element to define or manage.
995
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
996
+ * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.GetConfigElements>>}
997
+ */
998
+ SecretsManagerV1.prototype.getConfigElements = function (params) {
999
+ 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);
1004
+ }
1005
+ var path = {
1006
+ 'secret_type': _params.secretType,
1007
+ 'config_element': _params.configElement,
1008
+ };
1009
+ var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getConfigElements');
1010
+ var parameters = {
1011
+ options: {
1012
+ url: '/api/v1/config/{secret_type}/{config_element}',
1013
+ method: 'GET',
1014
+ path: path,
1015
+ },
1016
+ defaultOptions: extend(true, {}, this.baseOptions, {
1017
+ headers: extend(true, sdkHeaders, {
1018
+ 'Accept': 'application/json',
1019
+ }, _params.headers),
1020
+ }),
1021
+ };
1022
+ return this.createRequest(parameters);
1023
+ };
1024
+ /**
1025
+ * Get a configuration.
1026
+ *
1027
+ * Retrieves the details of a specific configuration that is associated with a secret type.
1028
+ *
1029
+ * @param {Object} params - The parameters to send to the service.
1030
+ * @param {string} params.secretType - The secret type.
1031
+ * @param {string} params.configElement - The configuration element to define or manage.
1032
+ * @param {string} params.configName - The name of your configuration.
1033
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1034
+ * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.GetSingleConfigElement>>}
1035
+ */
1036
+ SecretsManagerV1.prototype.getConfigElement = function (params) {
1037
+ 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);
1042
+ }
1043
+ var path = {
1044
+ 'secret_type': _params.secretType,
1045
+ 'config_element': _params.configElement,
1046
+ 'config_name': _params.configName,
1047
+ };
1048
+ var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'getConfigElement');
1049
+ var parameters = {
1050
+ options: {
1051
+ url: '/api/v1/config/{secret_type}/{config_element}/{config_name}',
1052
+ method: 'GET',
1053
+ path: path,
1054
+ },
1055
+ defaultOptions: extend(true, {}, this.baseOptions, {
1056
+ headers: extend(true, sdkHeaders, {
1057
+ 'Accept': 'application/json',
1058
+ }, _params.headers),
1059
+ }),
1060
+ };
1061
+ return this.createRequest(parameters);
1062
+ };
1063
+ /**
1064
+ * Update a configuration.
1065
+ *
1066
+ * Updates a configuration element that is associated with the specified secret type.
1067
+ *
1068
+ * @param {Object} params - The parameters to send to the service.
1069
+ * @param {string} params.secretType - The secret type.
1070
+ * @param {string} params.configElement - The configuration element to define or manage.
1071
+ * @param {string} params.configName - The name of your configuration.
1072
+ * @param {string} params.type - The type of configuration. Value options differ depending on the `config_element`
1073
+ * property that you want to define.
1074
+ * @param {JsonObject} params.config -
1075
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1076
+ * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.GetSingleConfigElement>>}
1077
+ */
1078
+ SecretsManagerV1.prototype.updateConfigElement = function (params) {
1079
+ 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);
1084
+ }
1085
+ var body = {
1086
+ 'type': _params.type,
1087
+ 'config': _params.config,
1088
+ };
1089
+ var path = {
1090
+ 'secret_type': _params.secretType,
1091
+ 'config_element': _params.configElement,
1092
+ 'config_name': _params.configName,
1093
+ };
1094
+ var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'updateConfigElement');
1095
+ var parameters = {
1096
+ options: {
1097
+ url: '/api/v1/config/{secret_type}/{config_element}/{config_name}',
1098
+ method: 'PUT',
1099
+ body: body,
1100
+ path: path,
1101
+ },
1102
+ defaultOptions: extend(true, {}, this.baseOptions, {
1103
+ headers: extend(true, sdkHeaders, {
1104
+ 'Accept': 'application/json',
1105
+ 'Content-Type': 'application/json',
1106
+ }, _params.headers),
1107
+ }),
1108
+ };
1109
+ return this.createRequest(parameters);
1110
+ };
1111
+ /**
1112
+ * Delete a configuration.
1113
+ *
1114
+ * Deletes a configuration element from the specified secret type.
1115
+ *
1116
+ * @param {Object} params - The parameters to send to the service.
1117
+ * @param {string} params.secretType - The secret type.
1118
+ * @param {string} params.configElement - The configuration element to define or manage.
1119
+ * @param {string} params.configName - The name of your configuration.
1120
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1121
+ * @returns {Promise<SecretsManagerV1.Response<SecretsManagerV1.Empty>>}
1122
+ */
1123
+ SecretsManagerV1.prototype.deleteConfigElement = function (params) {
1124
+ 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);
1129
+ }
1130
+ var path = {
1131
+ 'secret_type': _params.secretType,
1132
+ 'config_element': _params.configElement,
1133
+ 'config_name': _params.configName,
1134
+ };
1135
+ var sdkHeaders = common_1.getSdkHeaders(SecretsManagerV1.DEFAULT_SERVICE_NAME, 'v1', 'deleteConfigElement');
1136
+ var parameters = {
1137
+ options: {
1138
+ url: '/api/v1/config/{secret_type}/{config_element}/{config_name}',
1139
+ method: 'DELETE',
1140
+ path: path,
1141
+ },
1142
+ defaultOptions: extend(true, {}, this.baseOptions, {
1143
+ headers: extend(true, sdkHeaders, {}, _params.headers),
1144
+ }),
1145
+ };
1146
+ return this.createRequest(parameters);
1147
+ };
1148
+ SecretsManagerV1.DEFAULT_SERVICE_URL = 'https://secrets-manager.cloud.ibm.com';
1149
+ SecretsManagerV1.DEFAULT_SERVICE_NAME = 'secrets_manager';
1150
+ return SecretsManagerV1;
1151
+ }(ibm_cloud_sdk_core_1.BaseService));
1152
+ /*************************
1153
+ * interfaces
1154
+ ************************/
1155
+ (function (SecretsManagerV1) {
888
1156
  /** Constants for the `createSecret` operation. */
889
1157
  var CreateSecretConstants;
890
1158
  (function (CreateSecretConstants) {
@@ -892,8 +1160,10 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
892
1160
  var SecretType;
893
1161
  (function (SecretType) {
894
1162
  SecretType["ARBITRARY"] = "arbitrary";
895
- SecretType["USERNAME_PASSWORD"] = "username_password";
896
1163
  SecretType["IAM_CREDENTIALS"] = "iam_credentials";
1164
+ SecretType["IMPORTED_CERT"] = "imported_cert";
1165
+ SecretType["PUBLIC_CERT"] = "public_cert";
1166
+ SecretType["USERNAME_PASSWORD"] = "username_password";
897
1167
  })(SecretType = CreateSecretConstants.SecretType || (CreateSecretConstants.SecretType = {}));
898
1168
  })(CreateSecretConstants = SecretsManagerV1.CreateSecretConstants || (SecretsManagerV1.CreateSecretConstants = {}));
899
1169
  /** Constants for the `listSecrets` operation. */
@@ -903,8 +1173,10 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
903
1173
  var SecretType;
904
1174
  (function (SecretType) {
905
1175
  SecretType["ARBITRARY"] = "arbitrary";
906
- SecretType["USERNAME_PASSWORD"] = "username_password";
907
1176
  SecretType["IAM_CREDENTIALS"] = "iam_credentials";
1177
+ SecretType["IMPORTED_CERT"] = "imported_cert";
1178
+ SecretType["PUBLIC_CERT"] = "public_cert";
1179
+ SecretType["USERNAME_PASSWORD"] = "username_password";
908
1180
  })(SecretType = ListSecretsConstants.SecretType || (ListSecretsConstants.SecretType = {}));
909
1181
  })(ListSecretsConstants = SecretsManagerV1.ListSecretsConstants || (SecretsManagerV1.ListSecretsConstants = {}));
910
1182
  /** Constants for the `listAllSecrets` operation. */
@@ -927,8 +1199,10 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
927
1199
  var SecretType;
928
1200
  (function (SecretType) {
929
1201
  SecretType["ARBITRARY"] = "arbitrary";
930
- SecretType["USERNAME_PASSWORD"] = "username_password";
931
1202
  SecretType["IAM_CREDENTIALS"] = "iam_credentials";
1203
+ SecretType["IMPORTED_CERT"] = "imported_cert";
1204
+ SecretType["PUBLIC_CERT"] = "public_cert";
1205
+ SecretType["USERNAME_PASSWORD"] = "username_password";
932
1206
  })(SecretType = GetSecretConstants.SecretType || (GetSecretConstants.SecretType = {}));
933
1207
  })(GetSecretConstants = SecretsManagerV1.GetSecretConstants || (SecretsManagerV1.GetSecretConstants = {}));
934
1208
  /** Constants for the `updateSecret` operation. */
@@ -938,8 +1212,10 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
938
1212
  var SecretType;
939
1213
  (function (SecretType) {
940
1214
  SecretType["ARBITRARY"] = "arbitrary";
941
- SecretType["USERNAME_PASSWORD"] = "username_password";
942
1215
  SecretType["IAM_CREDENTIALS"] = "iam_credentials";
1216
+ SecretType["IMPORTED_CERT"] = "imported_cert";
1217
+ SecretType["PUBLIC_CERT"] = "public_cert";
1218
+ SecretType["USERNAME_PASSWORD"] = "username_password";
943
1219
  })(SecretType = UpdateSecretConstants.SecretType || (UpdateSecretConstants.SecretType = {}));
944
1220
  /** The action to perform on the specified secret. */
945
1221
  var Action;
@@ -955,10 +1231,32 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
955
1231
  var SecretType;
956
1232
  (function (SecretType) {
957
1233
  SecretType["ARBITRARY"] = "arbitrary";
958
- SecretType["USERNAME_PASSWORD"] = "username_password";
959
1234
  SecretType["IAM_CREDENTIALS"] = "iam_credentials";
1235
+ SecretType["IMPORTED_CERT"] = "imported_cert";
1236
+ SecretType["PUBLIC_CERT"] = "public_cert";
1237
+ SecretType["USERNAME_PASSWORD"] = "username_password";
960
1238
  })(SecretType = DeleteSecretConstants.SecretType || (DeleteSecretConstants.SecretType = {}));
961
1239
  })(DeleteSecretConstants = SecretsManagerV1.DeleteSecretConstants || (SecretsManagerV1.DeleteSecretConstants = {}));
1240
+ /** Constants for the `getSecretVersion` operation. */
1241
+ var GetSecretVersionConstants;
1242
+ (function (GetSecretVersionConstants) {
1243
+ /** The secret type. */
1244
+ var SecretType;
1245
+ (function (SecretType) {
1246
+ SecretType["IMPORTED_CERT"] = "imported_cert";
1247
+ SecretType["PUBLIC_CERT"] = "public_cert";
1248
+ })(SecretType = GetSecretVersionConstants.SecretType || (GetSecretVersionConstants.SecretType = {}));
1249
+ })(GetSecretVersionConstants = SecretsManagerV1.GetSecretVersionConstants || (SecretsManagerV1.GetSecretVersionConstants = {}));
1250
+ /** Constants for the `getSecretVersionMetadata` operation. */
1251
+ var GetSecretVersionMetadataConstants;
1252
+ (function (GetSecretVersionMetadataConstants) {
1253
+ /** The secret type. */
1254
+ var SecretType;
1255
+ (function (SecretType) {
1256
+ SecretType["IMPORTED_CERT"] = "imported_cert";
1257
+ SecretType["PUBLIC_CERT"] = "public_cert";
1258
+ })(SecretType = GetSecretVersionMetadataConstants.SecretType || (GetSecretVersionMetadataConstants.SecretType = {}));
1259
+ })(GetSecretVersionMetadataConstants = SecretsManagerV1.GetSecretVersionMetadataConstants || (SecretsManagerV1.GetSecretVersionMetadataConstants = {}));
962
1260
  /** Constants for the `getSecretMetadata` operation. */
963
1261
  var GetSecretMetadataConstants;
964
1262
  (function (GetSecretMetadataConstants) {
@@ -966,8 +1264,10 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
966
1264
  var SecretType;
967
1265
  (function (SecretType) {
968
1266
  SecretType["ARBITRARY"] = "arbitrary";
969
- SecretType["USERNAME_PASSWORD"] = "username_password";
970
1267
  SecretType["IAM_CREDENTIALS"] = "iam_credentials";
1268
+ SecretType["IMPORTED_CERT"] = "imported_cert";
1269
+ SecretType["PUBLIC_CERT"] = "public_cert";
1270
+ SecretType["USERNAME_PASSWORD"] = "username_password";
971
1271
  })(SecretType = GetSecretMetadataConstants.SecretType || (GetSecretMetadataConstants.SecretType = {}));
972
1272
  })(GetSecretMetadataConstants = SecretsManagerV1.GetSecretMetadataConstants || (SecretsManagerV1.GetSecretMetadataConstants = {}));
973
1273
  /** Constants for the `updateSecretMetadata` operation. */
@@ -977,10 +1277,152 @@ var SecretsManagerV1 = /** @class */ (function (_super) {
977
1277
  var SecretType;
978
1278
  (function (SecretType) {
979
1279
  SecretType["ARBITRARY"] = "arbitrary";
980
- SecretType["USERNAME_PASSWORD"] = "username_password";
981
1280
  SecretType["IAM_CREDENTIALS"] = "iam_credentials";
1281
+ SecretType["IMPORTED_CERT"] = "imported_cert";
1282
+ SecretType["PUBLIC_CERT"] = "public_cert";
1283
+ SecretType["USERNAME_PASSWORD"] = "username_password";
982
1284
  })(SecretType = UpdateSecretMetadataConstants.SecretType || (UpdateSecretMetadataConstants.SecretType = {}));
983
1285
  })(UpdateSecretMetadataConstants = SecretsManagerV1.UpdateSecretMetadataConstants || (SecretsManagerV1.UpdateSecretMetadataConstants = {}));
1286
+ /** Constants for the `putPolicy` operation. */
1287
+ var PutPolicyConstants;
1288
+ (function (PutPolicyConstants) {
1289
+ /** The secret type. */
1290
+ var SecretType;
1291
+ (function (SecretType) {
1292
+ SecretType["USERNAME_PASSWORD"] = "username_password";
1293
+ SecretType["PUBLIC_CERT"] = "public_cert";
1294
+ })(SecretType = PutPolicyConstants.SecretType || (PutPolicyConstants.SecretType = {}));
1295
+ /** The type of policy that is associated with the specified secret. */
1296
+ var Policy;
1297
+ (function (Policy) {
1298
+ Policy["ROTATION"] = "rotation";
1299
+ })(Policy = PutPolicyConstants.Policy || (PutPolicyConstants.Policy = {}));
1300
+ })(PutPolicyConstants = SecretsManagerV1.PutPolicyConstants || (SecretsManagerV1.PutPolicyConstants = {}));
1301
+ /** Constants for the `getPolicy` operation. */
1302
+ var GetPolicyConstants;
1303
+ (function (GetPolicyConstants) {
1304
+ /** The secret type. */
1305
+ var SecretType;
1306
+ (function (SecretType) {
1307
+ SecretType["USERNAME_PASSWORD"] = "username_password";
1308
+ SecretType["PUBLIC_CERT"] = "public_cert";
1309
+ })(SecretType = GetPolicyConstants.SecretType || (GetPolicyConstants.SecretType = {}));
1310
+ /** The type of policy that is associated with the specified secret. */
1311
+ var Policy;
1312
+ (function (Policy) {
1313
+ Policy["ROTATION"] = "rotation";
1314
+ })(Policy = GetPolicyConstants.Policy || (GetPolicyConstants.Policy = {}));
1315
+ })(GetPolicyConstants = SecretsManagerV1.GetPolicyConstants || (SecretsManagerV1.GetPolicyConstants = {}));
1316
+ /** Constants for the `putConfig` operation. */
1317
+ var PutConfigConstants;
1318
+ (function (PutConfigConstants) {
1319
+ /** SecretType */
1320
+ var SecretType;
1321
+ (function (SecretType) {
1322
+ SecretType["IAM_CREDENTIALS"] = "iam_credentials";
1323
+ })(SecretType = PutConfigConstants.SecretType || (PutConfigConstants.SecretType = {}));
1324
+ })(PutConfigConstants = SecretsManagerV1.PutConfigConstants || (SecretsManagerV1.PutConfigConstants = {}));
1325
+ /** Constants for the `getConfig` operation. */
1326
+ var GetConfigConstants;
1327
+ (function (GetConfigConstants) {
1328
+ /** The secret type. */
1329
+ var SecretType;
1330
+ (function (SecretType) {
1331
+ SecretType["IAM_CREDENTIALS"] = "iam_credentials";
1332
+ SecretType["PUBLIC_CERT"] = "public_cert";
1333
+ })(SecretType = GetConfigConstants.SecretType || (GetConfigConstants.SecretType = {}));
1334
+ })(GetConfigConstants = SecretsManagerV1.GetConfigConstants || (SecretsManagerV1.GetConfigConstants = {}));
1335
+ /** Constants for the `createConfigElement` operation. */
1336
+ var CreateConfigElementConstants;
1337
+ (function (CreateConfigElementConstants) {
1338
+ /** The secret type. */
1339
+ var SecretType;
1340
+ (function (SecretType) {
1341
+ SecretType["PUBLIC_CERT"] = "public_cert";
1342
+ })(SecretType = CreateConfigElementConstants.SecretType || (CreateConfigElementConstants.SecretType = {}));
1343
+ /** The configuration element to define or manage. */
1344
+ var ConfigElement;
1345
+ (function (ConfigElement) {
1346
+ ConfigElement["CERTIFICATE_AUTHORITIES"] = "certificate_authorities";
1347
+ ConfigElement["DNS_PROVIDERS"] = "dns_providers";
1348
+ })(ConfigElement = CreateConfigElementConstants.ConfigElement || (CreateConfigElementConstants.ConfigElement = {}));
1349
+ /** The type of configuration. Value options differ depending on the `config_element` property that you want to define. */
1350
+ var Type;
1351
+ (function (Type) {
1352
+ Type["LETSENCRYPT"] = "letsencrypt";
1353
+ Type["LETSENCRYPT_STAGE"] = "letsencrypt-stage";
1354
+ Type["CIS"] = "cis";
1355
+ Type["CLASSIC_INFRASTRUCTURE"] = "classic_infrastructure";
1356
+ })(Type = CreateConfigElementConstants.Type || (CreateConfigElementConstants.Type = {}));
1357
+ })(CreateConfigElementConstants = SecretsManagerV1.CreateConfigElementConstants || (SecretsManagerV1.CreateConfigElementConstants = {}));
1358
+ /** Constants for the `getConfigElements` operation. */
1359
+ var GetConfigElementsConstants;
1360
+ (function (GetConfigElementsConstants) {
1361
+ /** The secret type. */
1362
+ var SecretType;
1363
+ (function (SecretType) {
1364
+ SecretType["PUBLIC_CERT"] = "public_cert";
1365
+ })(SecretType = GetConfigElementsConstants.SecretType || (GetConfigElementsConstants.SecretType = {}));
1366
+ /** The configuration element to define or manage. */
1367
+ var ConfigElement;
1368
+ (function (ConfigElement) {
1369
+ ConfigElement["CERTIFICATE_AUTHORITIES"] = "certificate_authorities";
1370
+ ConfigElement["DNS_PROVIDERS"] = "dns_providers";
1371
+ })(ConfigElement = GetConfigElementsConstants.ConfigElement || (GetConfigElementsConstants.ConfigElement = {}));
1372
+ })(GetConfigElementsConstants = SecretsManagerV1.GetConfigElementsConstants || (SecretsManagerV1.GetConfigElementsConstants = {}));
1373
+ /** Constants for the `getConfigElement` operation. */
1374
+ var GetConfigElementConstants;
1375
+ (function (GetConfigElementConstants) {
1376
+ /** The secret type. */
1377
+ var SecretType;
1378
+ (function (SecretType) {
1379
+ SecretType["PUBLIC_CERT"] = "public_cert";
1380
+ })(SecretType = GetConfigElementConstants.SecretType || (GetConfigElementConstants.SecretType = {}));
1381
+ /** The configuration element to define or manage. */
1382
+ var ConfigElement;
1383
+ (function (ConfigElement) {
1384
+ ConfigElement["CERTIFICATE_AUTHORITIES"] = "certificate_authorities";
1385
+ ConfigElement["DNS_PROVIDERS"] = "dns_providers";
1386
+ })(ConfigElement = GetConfigElementConstants.ConfigElement || (GetConfigElementConstants.ConfigElement = {}));
1387
+ })(GetConfigElementConstants = SecretsManagerV1.GetConfigElementConstants || (SecretsManagerV1.GetConfigElementConstants = {}));
1388
+ /** Constants for the `updateConfigElement` operation. */
1389
+ var UpdateConfigElementConstants;
1390
+ (function (UpdateConfigElementConstants) {
1391
+ /** The secret type. */
1392
+ var SecretType;
1393
+ (function (SecretType) {
1394
+ SecretType["PUBLIC_CERT"] = "public_cert";
1395
+ })(SecretType = UpdateConfigElementConstants.SecretType || (UpdateConfigElementConstants.SecretType = {}));
1396
+ /** The configuration element to define or manage. */
1397
+ var ConfigElement;
1398
+ (function (ConfigElement) {
1399
+ ConfigElement["CERTIFICATE_AUTHORITIES"] = "certificate_authorities";
1400
+ ConfigElement["DNS_PROVIDERS"] = "dns_providers";
1401
+ })(ConfigElement = UpdateConfigElementConstants.ConfigElement || (UpdateConfigElementConstants.ConfigElement = {}));
1402
+ /** The type of configuration. Value options differ depending on the `config_element` property that you want to define. */
1403
+ var Type;
1404
+ (function (Type) {
1405
+ Type["LETSENCRYPT"] = "letsencrypt";
1406
+ Type["LETSENCRYPT_STAGE"] = "letsencrypt-stage";
1407
+ Type["CIS"] = "cis";
1408
+ Type["CLASSIC_INFRASTRUCTURE"] = "classic_infrastructure";
1409
+ })(Type = UpdateConfigElementConstants.Type || (UpdateConfigElementConstants.Type = {}));
1410
+ })(UpdateConfigElementConstants = SecretsManagerV1.UpdateConfigElementConstants || (SecretsManagerV1.UpdateConfigElementConstants = {}));
1411
+ /** Constants for the `deleteConfigElement` operation. */
1412
+ var DeleteConfigElementConstants;
1413
+ (function (DeleteConfigElementConstants) {
1414
+ /** The secret type. */
1415
+ var SecretType;
1416
+ (function (SecretType) {
1417
+ SecretType["PUBLIC_CERT"] = "public_cert";
1418
+ })(SecretType = DeleteConfigElementConstants.SecretType || (DeleteConfigElementConstants.SecretType = {}));
1419
+ /** The configuration element to define or manage. */
1420
+ var ConfigElement;
1421
+ (function (ConfigElement) {
1422
+ ConfigElement["CERTIFICATE_AUTHORITIES"] = "certificate_authorities";
1423
+ ConfigElement["DNS_PROVIDERS"] = "dns_providers";
1424
+ })(ConfigElement = DeleteConfigElementConstants.ConfigElement || (DeleteConfigElementConstants.ConfigElement = {}));
1425
+ })(DeleteConfigElementConstants = SecretsManagerV1.DeleteConfigElementConstants || (SecretsManagerV1.DeleteConfigElementConstants = {}));
984
1426
  })(SecretsManagerV1 || (SecretsManagerV1 = {}));
985
1427
  module.exports = SecretsManagerV1;
986
1428
  //# sourceMappingURL=v1.js.map