Skip to content

Commit 00b6795

Browse files
author
awstools
committed
feat(client-redshift-serverless): Added support for managing credentials of serverless namespace admin using AWS Secrets Manager.
1 parent 90dcb19 commit 00b6795

16 files changed

+175
-9
lines changed

clients/client-redshift-serverless/src/commands/ConvertRecoveryPointToSnapshotCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ export interface ConvertRecoveryPointToSnapshotCommandOutput
9393
* // accountsWithProvisionedRestoreAccess: [
9494
* // "STRING_VALUE",
9595
* // ],
96+
* // adminPasswordSecretArn: "STRING_VALUE",
97+
* // adminPasswordSecretKmsKeyId: "STRING_VALUE",
9698
* // },
9799
* // };
98100
*

clients/client-redshift-serverless/src/commands/CreateNamespaceCommand.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ export interface CreateNamespaceCommandOutput extends CreateNamespaceResponse, _
7272
* value: "STRING_VALUE", // required
7373
* },
7474
* ],
75+
* manageAdminPassword: true || false,
76+
* adminPasswordSecretKmsKeyId: "STRING_VALUE",
7577
* };
7678
* const command = new CreateNamespaceCommand(input);
7779
* const response = await client.send(command);
@@ -92,6 +94,8 @@ export interface CreateNamespaceCommandOutput extends CreateNamespaceResponse, _
9294
* // ],
9395
* // status: "STRING_VALUE",
9496
* // creationDate: new Date("TIMESTAMP"),
97+
* // adminPasswordSecretArn: "STRING_VALUE",
98+
* // adminPasswordSecretKmsKeyId: "STRING_VALUE",
9599
* // },
96100
* // };
97101
*

clients/client-redshift-serverless/src/commands/CreateSnapshotCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ export interface CreateSnapshotCommandOutput extends CreateSnapshotResponse, __M
9090
* // accountsWithProvisionedRestoreAccess: [
9191
* // "STRING_VALUE",
9292
* // ],
93+
* // adminPasswordSecretArn: "STRING_VALUE",
94+
* // adminPasswordSecretKmsKeyId: "STRING_VALUE",
9395
* // },
9496
* // };
9597
*

clients/client-redshift-serverless/src/commands/DeleteNamespaceCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ export interface DeleteNamespaceCommandOutput extends DeleteNamespaceResponse, _
7777
* // ],
7878
* // status: "STRING_VALUE",
7979
* // creationDate: new Date("TIMESTAMP"),
80+
* // adminPasswordSecretArn: "STRING_VALUE",
81+
* // adminPasswordSecretKmsKeyId: "STRING_VALUE",
8082
* // },
8183
* // };
8284
*

clients/client-redshift-serverless/src/commands/DeleteSnapshotCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ export interface DeleteSnapshotCommandOutput extends DeleteSnapshotResponse, __M
7979
* // accountsWithProvisionedRestoreAccess: [
8080
* // "STRING_VALUE",
8181
* // ],
82+
* // adminPasswordSecretArn: "STRING_VALUE",
83+
* // adminPasswordSecretKmsKeyId: "STRING_VALUE",
8284
* // },
8385
* // };
8486
*

clients/client-redshift-serverless/src/commands/GetNamespaceCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ export interface GetNamespaceCommandOutput extends GetNamespaceResponse, __Metad
7070
* // ],
7171
* // status: "STRING_VALUE",
7272
* // creationDate: new Date("TIMESTAMP"),
73+
* // adminPasswordSecretArn: "STRING_VALUE",
74+
* // adminPasswordSecretKmsKeyId: "STRING_VALUE",
7375
* // },
7476
* // };
7577
*

clients/client-redshift-serverless/src/commands/GetSnapshotCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ export interface GetSnapshotCommandOutput extends GetSnapshotResponse, __Metadat
8181
* // accountsWithProvisionedRestoreAccess: [
8282
* // "STRING_VALUE",
8383
* // ],
84+
* // adminPasswordSecretArn: "STRING_VALUE",
85+
* // adminPasswordSecretKmsKeyId: "STRING_VALUE",
8486
* // },
8587
* // };
8688
*

clients/client-redshift-serverless/src/commands/ListNamespacesCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ export interface ListNamespacesCommandOutput extends ListNamespacesResponse, __M
7777
* // ],
7878
* // status: "STRING_VALUE",
7979
* // creationDate: new Date("TIMESTAMP"),
80+
* // adminPasswordSecretArn: "STRING_VALUE",
81+
* // adminPasswordSecretKmsKeyId: "STRING_VALUE",
8082
* // },
8183
* // ],
8284
* // };

clients/client-redshift-serverless/src/commands/ListSnapshotsCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ export interface ListSnapshotsCommandOutput extends ListSnapshotsResponse, __Met
8787
* // accountsWithProvisionedRestoreAccess: [
8888
* // "STRING_VALUE",
8989
* // ],
90+
* // adminPasswordSecretArn: "STRING_VALUE",
91+
* // adminPasswordSecretKmsKeyId: "STRING_VALUE",
9092
* // },
9193
* // ],
9294
* // };

clients/client-redshift-serverless/src/commands/RestoreFromRecoveryPointCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ export interface RestoreFromRecoveryPointCommandOutput extends RestoreFromRecove
7777
* // ],
7878
* // status: "STRING_VALUE",
7979
* // creationDate: new Date("TIMESTAMP"),
80+
* // adminPasswordSecretArn: "STRING_VALUE",
81+
* // adminPasswordSecretKmsKeyId: "STRING_VALUE",
8082
* // },
8183
* // };
8284
*

clients/client-redshift-serverless/src/commands/RestoreFromSnapshotCommand.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ export interface RestoreFromSnapshotCommandOutput extends RestoreFromSnapshotRes
5858
* snapshotName: "STRING_VALUE",
5959
* snapshotArn: "STRING_VALUE",
6060
* ownerAccount: "STRING_VALUE",
61+
* manageAdminPassword: true || false,
62+
* adminPasswordSecretKmsKeyId: "STRING_VALUE",
6163
* };
6264
* const command = new RestoreFromSnapshotCommand(input);
6365
* const response = await client.send(command);
@@ -80,6 +82,8 @@ export interface RestoreFromSnapshotCommandOutput extends RestoreFromSnapshotRes
8082
* // ],
8183
* // status: "STRING_VALUE",
8284
* // creationDate: new Date("TIMESTAMP"),
85+
* // adminPasswordSecretArn: "STRING_VALUE",
86+
* // adminPasswordSecretKmsKeyId: "STRING_VALUE",
8387
* // },
8488
* // };
8589
*

clients/client-redshift-serverless/src/commands/UpdateNamespaceCommand.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ export interface UpdateNamespaceCommandOutput extends UpdateNamespaceResponse, _
6767
* logExports: [ // LogExportList
6868
* "STRING_VALUE",
6969
* ],
70+
* manageAdminPassword: true || false,
71+
* adminPasswordSecretKmsKeyId: "STRING_VALUE",
7072
* };
7173
* const command = new UpdateNamespaceCommand(input);
7274
* const response = await client.send(command);
@@ -87,6 +89,8 @@ export interface UpdateNamespaceCommandOutput extends UpdateNamespaceResponse, _
8789
* // ],
8890
* // status: "STRING_VALUE",
8991
* // creationDate: new Date("TIMESTAMP"),
92+
* // adminPasswordSecretArn: "STRING_VALUE",
93+
* // adminPasswordSecretKmsKeyId: "STRING_VALUE",
9094
* // },
9195
* // };
9296
*

clients/client-redshift-serverless/src/commands/UpdateSnapshotCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ export interface UpdateSnapshotCommandOutput extends UpdateSnapshotResponse, __M
8080
* // accountsWithProvisionedRestoreAccess: [
8181
* // "STRING_VALUE",
8282
* // ],
83+
* // adminPasswordSecretArn: "STRING_VALUE",
84+
* // adminPasswordSecretKmsKeyId: "STRING_VALUE",
8385
* // },
8486
* // };
8587
*

clients/client-redshift-serverless/src/models/models_0.ts

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,18 @@ export interface Snapshot {
258258
* <p>All of the Amazon Web Services accounts that have access to restore a snapshot to a provisioned cluster.</p>
259259
*/
260260
accountsWithProvisionedRestoreAccess?: string[];
261+
262+
/**
263+
* @public
264+
* <p>The Amazon Resource Name (ARN) for the namespace's admin user credentials secret.</p>
265+
*/
266+
adminPasswordSecretArn?: string;
267+
268+
/**
269+
* @public
270+
* <p>The ID of the Key Management Service (KMS) key used to encrypt and store the namespace's admin credentials secret.</p>
271+
*/
272+
adminPasswordSecretKmsKeyId?: string;
261273
}
262274

263275
/**
@@ -605,6 +617,7 @@ export interface CreateNamespaceRequest {
605617
/**
606618
* @public
607619
* <p>The password of the administrator for the first database created in the namespace.</p>
620+
* <p>You can't use <code>adminUserPassword</code> if <code>manageAdminPassword</code> is true. </p>
608621
*/
609622
adminUserPassword?: string;
610623

@@ -644,6 +657,23 @@ export interface CreateNamespaceRequest {
644657
* <p>A list of tag instances.</p>
645658
*/
646659
tags?: Tag[];
660+
661+
/**
662+
* @public
663+
* <p>If <code>true</code>, Amazon Redshift uses Secrets Manager to manage the namespace's admin credentials.
664+
* You can't use <code>adminUserPassword</code> if <code>manageAdminPassword</code> is true.
665+
* If <code>manageAdminPassword</code> is false or not set, Amazon Redshift uses
666+
* <code>adminUserPassword</code> for the admin user account's password.
667+
* </p>
668+
*/
669+
manageAdminPassword?: boolean;
670+
671+
/**
672+
* @public
673+
* <p>The ID of the Key Management Service (KMS) key used to encrypt and store the namespace's admin credentials secret.
674+
* You can only use this parameter if <code>manageAdminPassword</code> is true.</p>
675+
*/
676+
adminPasswordSecretKmsKeyId?: string;
647677
}
648678

649679
/**
@@ -734,6 +764,18 @@ export interface Namespace {
734764
* <p>The date of when the namespace was created.</p>
735765
*/
736766
creationDate?: Date;
767+
768+
/**
769+
* @public
770+
* <p>The Amazon Resource Name (ARN) for the namespace's admin user credentials secret.</p>
771+
*/
772+
adminPasswordSecretArn?: string;
773+
774+
/**
775+
* @public
776+
* <p>The ID of the Key Management Service (KMS) key used to encrypt and store the namespace's admin credentials secret.</p>
777+
*/
778+
adminPasswordSecretKmsKeyId?: string;
737779
}
738780

739781
/**
@@ -2200,6 +2242,7 @@ export interface UpdateNamespaceRequest {
22002242
* @public
22012243
* <p>The password of the administrator for the first database created in the namespace. This parameter must be updated together
22022244
* with <code>adminUsername</code>.</p>
2245+
* <p>You can't use <code>adminUserPassword</code> if <code>manageAdminPassword</code> is true. </p>
22032246
*/
22042247
adminUserPassword?: string;
22052248

@@ -2234,6 +2277,23 @@ export interface UpdateNamespaceRequest {
22342277
* <p>The types of logs the namespace can export. The export types are <code>userlog</code>, <code>connectionlog</code>, and <code>useractivitylog</code>.</p>
22352278
*/
22362279
logExports?: LogExport[];
2280+
2281+
/**
2282+
* @public
2283+
* <p>If <code>true</code>, Amazon Redshift uses Secrets Manager to manage the namespace's admin credentials.
2284+
* You can't use <code>adminUserPassword</code> if <code>manageAdminPassword</code> is true.
2285+
* If <code>manageAdminPassword</code> is false or not set, Amazon Redshift uses
2286+
* <code>adminUserPassword</code> for the admin user account's password.
2287+
* </p>
2288+
*/
2289+
manageAdminPassword?: boolean;
2290+
2291+
/**
2292+
* @public
2293+
* <p>The ID of the Key Management Service (KMS) key used to encrypt and store the namespace's admin credentials secret.
2294+
* You can only use this parameter if <code>manageAdminPassword</code> is true.</p>
2295+
*/
2296+
adminPasswordSecretKmsKeyId?: string;
22372297
}
22382298

22392299
/**
@@ -2356,6 +2416,21 @@ export interface RestoreFromSnapshotRequest {
23562416
* <p>The Amazon Web Services account that owns the snapshot.</p>
23572417
*/
23582418
ownerAccount?: string;
2419+
2420+
/**
2421+
* @public
2422+
* <p>If <code>true</code>, Amazon Redshift uses Secrets Manager to manage the restored
2423+
* snapshot's admin credentials. If <code>MmanageAdminPassword</code> is false or not set,
2424+
* Amazon Redshift uses the admin credentials that the namespace or cluster
2425+
* had at the time the snapshot was taken.</p>
2426+
*/
2427+
manageAdminPassword?: boolean;
2428+
2429+
/**
2430+
* @public
2431+
* <p>The ID of the Key Management Service (KMS) key used to encrypt and store the namespace's admin credentials secret.</p>
2432+
*/
2433+
adminPasswordSecretKmsKeyId?: string;
23592434
}
23602435

23612436
/**

clients/client-redshift-serverless/src/protocols/Aws_json1_1.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3462,6 +3462,8 @@ const de_ListWorkgroupsResponse = (output: any, context: __SerdeContext): ListWo
34623462
*/
34633463
const de_Namespace = (output: any, context: __SerdeContext): Namespace => {
34643464
return take(output, {
3465+
adminPasswordSecretArn: __expectString,
3466+
adminPasswordSecretKmsKeyId: __expectString,
34653467
adminUsername: __expectString,
34663468
creationDate: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
34673469
dbName: __expectString,
@@ -3572,6 +3574,8 @@ const de_Snapshot = (output: any, context: __SerdeContext): Snapshot => {
35723574
accountsWithProvisionedRestoreAccess: _json,
35733575
accountsWithRestoreAccess: _json,
35743576
actualIncrementalBackupSizeInMegaBytes: __limitedParseDouble,
3577+
adminPasswordSecretArn: __expectString,
3578+
adminPasswordSecretKmsKeyId: __expectString,
35753579
adminUsername: __expectString,
35763580
backupProgressInMegaBytes: __limitedParseDouble,
35773581
currentBackupRateInMegaBytesPerSecond: __limitedParseDouble,

0 commit comments

Comments
 (0)