Skip to content

Commit bea96a3

Browse files
authored
Add retrieved_at field (#230)
Signed-off-by: Haim <[email protected]>
1 parent af5bc79 commit bea96a3

File tree

2 files changed

+94
-5
lines changed

2 files changed

+94
-5
lines changed

secrets-manager/v2.ts

Lines changed: 92 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
/**
18-
* IBM OpenAPI SDK Code Generator Version: 3.104.0-b4a47c49-20250418-184351
18+
* IBM OpenAPI SDK Code Generator Version: 3.107.0-b68ebf7a-20250811-145645
1919
*/
2020

2121
/* eslint-disable max-classes-per-file */
@@ -494,7 +494,7 @@ class SecretsManagerV2 extends BaseService {
494494
* descending order use the `-` character
495495
*
496496
*
497-
* **Available values:** id | created_at | updated_at | expiration_date | secret_type | name
497+
* **Available values:** id | created_at | updated_at | retrieved_at | expiration_date | secret_type | name
498498
*
499499
* **Usage:** To sort a list of secrets by their creation date, use
500500
* `../secrets?sort=created_at`.
@@ -2804,7 +2804,7 @@ namespace SecretsManagerV2 {
28042804
* `-` character
28052805
*
28062806
*
2807-
* **Available values:** id | created_at | updated_at | expiration_date | secret_type | name
2807+
* **Available values:** id | created_at | updated_at | retrieved_at | expiration_date | secret_type | name
28082808
*
28092809
* **Usage:** To sort a list of secrets by their creation date, use
28102810
* `../secrets?sort=created_at`.
@@ -4564,6 +4564,10 @@ namespace SecretsManagerV2 {
45644564
created_by: string;
45654565
/** The date when the resource was created. The date format follows `RFC 3339`. */
45664566
created_at: string;
4567+
/** The date when the data of the secret was last retrieved. The date format follows RFC 3339. Epoch date if
4568+
* there is no record of secret data retrieval.
4569+
*/
4570+
retrieved_at?: string;
45674571
/** A CRN that uniquely identifies an IBM Cloud resource. */
45684572
crn: string;
45694573
/** The secret metadata that a user can customize. */
@@ -4650,6 +4654,10 @@ namespace SecretsManagerV2 {
46504654
created_by: string;
46514655
/** The date when the resource was created. The date format follows `RFC 3339`. */
46524656
created_at: string;
4657+
/** The date when the data of the secret was last retrieved. The date format follows RFC 3339. Epoch date if
4658+
* there is no record of secret data retrieval.
4659+
*/
4660+
retrieved_at?: string;
46534661
/** A CRN that uniquely identifies an IBM Cloud resource. */
46544662
crn: string;
46554663
/** The secret metadata that a user can customize. */
@@ -4952,6 +4960,18 @@ namespace SecretsManagerV2 {
49524960

49534961
/**
49544962
* This field indicates whether Secrets Manager rotates your secrets automatically.
4963+
*
4964+
* Rotation interval cannot exceed the assiged TTL value.
4965+
*
4966+
* Custom Credentials: Minimum 6 hours, Maximum 3 months.
4967+
*
4968+
* Service Credentials: Minimum 1 day, Maximum 3 months.
4969+
*
4970+
* IAM Credentials: Minimum 1 day, Maximum 3 months.
4971+
*
4972+
* Private certificate: Minimum 1 day, Maximum 24 months.
4973+
*
4974+
* User credentials: Minimum 1 day, Maximum 24 months.
49554975
*/
49564976
export interface CommonRotationPolicy extends RotationPolicy {
49574977
/** This field indicates whether Secrets Manager rotates your secret automatically.
@@ -4971,6 +4991,7 @@ namespace SecretsManagerV2 {
49714991
export enum Unit {
49724992
DAY = 'day',
49734993
MONTH = 'month',
4994+
HOUR = 'hour',
49744995
}
49754996
}
49764997
}
@@ -5174,6 +5195,10 @@ namespace SecretsManagerV2 {
51745195
created_by: string;
51755196
/** The date when the resource was created. The date format follows `RFC 3339`. */
51765197
created_at: string;
5198+
/** The date when the data of the secret was last retrieved. The date format follows RFC 3339. Epoch date if
5199+
* there is no record of secret data retrieval.
5200+
*/
5201+
retrieved_at?: string;
51775202
/** A CRN that uniquely identifies an IBM Cloud resource. */
51785203
crn: string;
51795204
/** The secret metadata that a user can customize. */
@@ -5253,6 +5278,8 @@ namespace SecretsManagerV2 {
52535278
queued_task_count?: number;
52545279
/** A Secret Manager task identifier. */
52555280
last_failed_task_id?: string;
5281+
/** Indicates if the last rotation (automatic or manual) for the secret failed. */
5282+
last_rotation_failed?: boolean;
52565283
/** The name of the custom credentials configuration. */
52575284
configuration: string;
52585285
/** The fields that can be passed to and from the custom credentials engine. Allowed types are 'string',
@@ -5297,6 +5324,10 @@ namespace SecretsManagerV2 {
52975324
created_by: string;
52985325
/** The date when the resource was created. The date format follows `RFC 3339`. */
52995326
created_at: string;
5327+
/** The date when the data of the secret was last retrieved. The date format follows RFC 3339. Epoch date if
5328+
* there is no record of secret data retrieval.
5329+
*/
5330+
retrieved_at?: string;
53005331
/** A CRN that uniquely identifies an IBM Cloud resource. */
53015332
crn: string;
53025333
/** The secret metadata that a user can customize. */
@@ -5376,6 +5407,8 @@ namespace SecretsManagerV2 {
53765407
queued_task_count?: number;
53775408
/** A Secret Manager task identifier. */
53785409
last_failed_task_id?: string;
5410+
/** Indicates if the last rotation (automatic or manual) for the secret failed. */
5411+
last_rotation_failed?: boolean;
53795412
/** The name of the custom credentials configuration. */
53805413
configuration: string;
53815414
/** The fields that can be passed to and from the custom credentials engine. Allowed types are 'string',
@@ -5847,6 +5880,10 @@ namespace SecretsManagerV2 {
58475880
created_by: string;
58485881
/** The date when the resource was created. The date format follows `RFC 3339`. */
58495882
created_at: string;
5883+
/** The date when the data of the secret was last retrieved. The date format follows RFC 3339. Epoch date if
5884+
* there is no record of secret data retrieval.
5885+
*/
5886+
retrieved_at?: string;
58505887
/** A CRN that uniquely identifies an IBM Cloud resource. */
58515888
crn: string;
58525889
/** The secret metadata that a user can customize. */
@@ -5993,6 +6030,10 @@ namespace SecretsManagerV2 {
59936030
created_by: string;
59946031
/** The date when the resource was created. The date format follows `RFC 3339`. */
59956032
created_at: string;
6033+
/** The date when the data of the secret was last retrieved. The date format follows RFC 3339. Epoch date if
6034+
* there is no record of secret data retrieval.
6035+
*/
6036+
retrieved_at?: string;
59966037
/** A CRN that uniquely identifies an IBM Cloud resource. */
59976038
crn: string;
59986039
/** The secret metadata that a user can customize. */
@@ -6441,6 +6482,10 @@ namespace SecretsManagerV2 {
64416482
created_by: string;
64426483
/** The date when the resource was created. The date format follows `RFC 3339`. */
64436484
created_at: string;
6485+
/** The date when the data of the secret was last retrieved. The date format follows RFC 3339. Epoch date if
6486+
* there is no record of secret data retrieval.
6487+
*/
6488+
retrieved_at?: string;
64446489
/** A CRN that uniquely identifies an IBM Cloud resource. */
64456490
crn: string;
64466491
/** The secret metadata that a user can customize. */
@@ -6563,6 +6608,10 @@ namespace SecretsManagerV2 {
65636608
created_by: string;
65646609
/** The date when the resource was created. The date format follows `RFC 3339`. */
65656610
created_at: string;
6611+
/** The date when the data of the secret was last retrieved. The date format follows RFC 3339. Epoch date if
6612+
* there is no record of secret data retrieval.
6613+
*/
6614+
retrieved_at?: string;
65666615
/** A CRN that uniquely identifies an IBM Cloud resource. */
65676616
crn: string;
65686617
/** The secret metadata that a user can customize. */
@@ -6927,6 +6976,10 @@ namespace SecretsManagerV2 {
69276976
created_by: string;
69286977
/** The date when the resource was created. The date format follows `RFC 3339`. */
69296978
created_at: string;
6979+
/** The date when the data of the secret was last retrieved. The date format follows RFC 3339. Epoch date if
6980+
* there is no record of secret data retrieval.
6981+
*/
6982+
retrieved_at?: string;
69306983
/** A CRN that uniquely identifies an IBM Cloud resource. */
69316984
crn: string;
69326985
/** The secret metadata that a user can customize. */
@@ -7008,6 +7061,10 @@ namespace SecretsManagerV2 {
70087061
created_by: string;
70097062
/** The date when the resource was created. The date format follows `RFC 3339`. */
70107063
created_at: string;
7064+
/** The date when the data of the secret was last retrieved. The date format follows RFC 3339. Epoch date if
7065+
* there is no record of secret data retrieval.
7066+
*/
7067+
retrieved_at?: string;
70117068
/** A CRN that uniquely identifies an IBM Cloud resource. */
70127069
crn: string;
70137070
/** The secret metadata that a user can customize. */
@@ -7303,6 +7360,10 @@ namespace SecretsManagerV2 {
73037360
created_by: string;
73047361
/** The date when the resource was created. The date format follows `RFC 3339`. */
73057362
created_at: string;
7363+
/** The date when the data of the secret was last retrieved. The date format follows RFC 3339. Epoch date if
7364+
* there is no record of secret data retrieval.
7365+
*/
7366+
retrieved_at?: string;
73067367
/** A CRN that uniquely identifies an IBM Cloud resource. */
73077368
crn: string;
73087369
/** The secret metadata that a user can customize. */
@@ -9700,6 +9761,10 @@ namespace SecretsManagerV2 {
97009761
created_by: string;
97019762
/** The date when the resource was created. The date format follows `RFC 3339`. */
97029763
created_at: string;
9764+
/** The date when the data of the secret was last retrieved. The date format follows RFC 3339. Epoch date if
9765+
* there is no record of secret data retrieval.
9766+
*/
9767+
retrieved_at?: string;
97039768
/** A CRN that uniquely identifies an IBM Cloud resource. */
97049769
crn: string;
97059770
/** The secret metadata that a user can customize. */
@@ -10142,6 +10207,10 @@ namespace SecretsManagerV2 {
1014210207
created_by: string;
1014310208
/** The date when the resource was created. The date format follows `RFC 3339`. */
1014410209
created_at: string;
10210+
/** The date when the data of the secret was last retrieved. The date format follows RFC 3339. Epoch date if
10211+
* there is no record of secret data retrieval.
10212+
*/
10213+
retrieved_at?: string;
1014510214
/** A CRN that uniquely identifies an IBM Cloud resource. */
1014610215
crn: string;
1014710216
/** The secret metadata that a user can customize. */
@@ -10892,6 +10961,10 @@ namespace SecretsManagerV2 {
1089210961
created_by: string;
1089310962
/** The date when the resource was created. The date format follows `RFC 3339`. */
1089410963
created_at: string;
10964+
/** The date when the data of the secret was last retrieved. The date format follows RFC 3339. Epoch date if
10965+
* there is no record of secret data retrieval.
10966+
*/
10967+
retrieved_at?: string;
1089510968
/** A CRN that uniquely identifies an IBM Cloud resource. */
1089610969
crn: string;
1089710970
/** The secret metadata that a user can customize. */
@@ -11346,6 +11419,10 @@ namespace SecretsManagerV2 {
1134611419
created_by: string;
1134711420
/** The date when the resource was created. The date format follows `RFC 3339`. */
1134811421
created_at: string;
11422+
/** The date when the data of the secret was last retrieved. The date format follows RFC 3339. Epoch date if
11423+
* there is no record of secret data retrieval.
11424+
*/
11425+
retrieved_at?: string;
1134911426
/** A CRN that uniquely identifies an IBM Cloud resource. */
1135011427
crn: string;
1135111428
/** The secret metadata that a user can customize. */
@@ -11455,6 +11532,10 @@ namespace SecretsManagerV2 {
1145511532
created_by: string;
1145611533
/** The date when the resource was created. The date format follows `RFC 3339`. */
1145711534
created_at: string;
11535+
/** The date when the data of the secret was last retrieved. The date format follows RFC 3339. Epoch date if
11536+
* there is no record of secret data retrieval.
11537+
*/
11538+
retrieved_at?: string;
1145811539
/** A CRN that uniquely identifies an IBM Cloud resource. */
1145911540
crn: string;
1146011541
/** The secret metadata that a user can customize. */
@@ -11812,6 +11893,10 @@ namespace SecretsManagerV2 {
1181211893
created_by: string;
1181311894
/** The date when the resource was created. The date format follows `RFC 3339`. */
1181411895
created_at: string;
11896+
/** The date when the data of the secret was last retrieved. The date format follows RFC 3339. Epoch date if
11897+
* there is no record of secret data retrieval.
11898+
*/
11899+
retrieved_at?: string;
1181511900
/** A CRN that uniquely identifies an IBM Cloud resource. */
1181611901
crn: string;
1181711902
/** The secret metadata that a user can customize. */
@@ -11912,6 +11997,10 @@ namespace SecretsManagerV2 {
1191211997
created_by: string;
1191311998
/** The date when the resource was created. The date format follows `RFC 3339`. */
1191411999
created_at: string;
12000+
/** The date when the data of the secret was last retrieved. The date format follows RFC 3339. Epoch date if
12001+
* there is no record of secret data retrieval.
12002+
*/
12003+
retrieved_at?: string;
1191512004
/** A CRN that uniquely identifies an IBM Cloud resource. */
1191612005
crn: string;
1191712006
/** The secret metadata that a user can customize. */

test/unit/secrets-manager.v2.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -730,9 +730,9 @@ describe('SecretsManagerV2', () => {
730730
const serviceUrl = secretsManagerServiceOptions.url;
731731
const path = '/api/v2/secrets';
732732
const mockPagerResponse1 =
733-
'{"next":{"href":"https://myhost.com/somePath?offset=1"},"total_count":2,"limit":1,"secrets":[{"created_by":"iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21","created_at":"2022-04-12T23:20:50.520Z","crn":"crn","custom_metadata":{"anyKey":"anyValue"},"description":"Extended description for this secret.","downloaded":true,"id":"b49ad24d-81d4-5ebc-b9b9-b0937d1c84d5","labels":["my-label"],"locks_total":0,"name":"my-secret","secret_group_id":"default","secret_type":"arbitrary","state":0,"state_description":"active","updated_at":"2022-04-12T23:20:50.520Z","versions_total":0,"referenced_by":["my-example-engine-config"],"expiration_date":"2033-04-12T23:20:50.520Z"}]}';
733+
'{"next":{"href":"https://myhost.com/somePath?offset=1"},"total_count":2,"limit":1,"secrets":[{"created_by":"iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21","created_at":"2022-04-12T23:20:50.520Z","retrieved_at":"2025-04-12T23:20:50.520Z","crn":"crn","custom_metadata":{"anyKey":"anyValue"},"description":"Extended description for this secret.","downloaded":true,"id":"b49ad24d-81d4-5ebc-b9b9-b0937d1c84d5","labels":["my-label"],"locks_total":0,"name":"my-secret","secret_group_id":"default","secret_type":"arbitrary","state":0,"state_description":"active","updated_at":"2022-04-12T23:20:50.520Z","versions_total":0,"referenced_by":["my-example-engine-config"],"expiration_date":"2033-04-12T23:20:50.520Z"}]}';
734734
const mockPagerResponse2 =
735-
'{"total_count":2,"limit":1,"secrets":[{"created_by":"iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21","created_at":"2022-04-12T23:20:50.520Z","crn":"crn","custom_metadata":{"anyKey":"anyValue"},"description":"Extended description for this secret.","downloaded":true,"id":"b49ad24d-81d4-5ebc-b9b9-b0937d1c84d5","labels":["my-label"],"locks_total":0,"name":"my-secret","secret_group_id":"default","secret_type":"arbitrary","state":0,"state_description":"active","updated_at":"2022-04-12T23:20:50.520Z","versions_total":0,"referenced_by":["my-example-engine-config"],"expiration_date":"2033-04-12T23:20:50.520Z"}]}';
735+
'{"total_count":2,"limit":1,"secrets":[{"created_by":"iam-ServiceId-e4a2f0a4-3c76-4bef-b1f2-fbeae11c0f21","created_at":"2022-04-12T23:20:50.520Z","retrieved_at":"2025-04-12T23:20:50.520Z","crn":"crn","custom_metadata":{"anyKey":"anyValue"},"description":"Extended description for this secret.","downloaded":true,"id":"b49ad24d-81d4-5ebc-b9b9-b0937d1c84d5","labels":["my-label"],"locks_total":0,"name":"my-secret","secret_group_id":"default","secret_type":"arbitrary","state":0,"state_description":"active","updated_at":"2022-04-12T23:20:50.520Z","versions_total":0,"referenced_by":["my-example-engine-config"],"expiration_date":"2033-04-12T23:20:50.520Z"}]}';
736736

737737
beforeEach(() => {
738738
unmock_createRequest();

0 commit comments

Comments
 (0)