Skip to content

Commit d268bd4

Browse files
committed
feat: Add optional description field to CfnDatabaseUserProps and update documentation of using empty string for custom db role
1 parent 863fe7d commit d268bd4

File tree

3 files changed

+25
-4
lines changed

3 files changed

+25
-4
lines changed

API.md

Lines changed: 15 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/l1-resources/custom-db-role/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,14 +154,14 @@ export function toJson_InheritedRole(
154154
*/
155155
export interface Resource {
156156
/**
157-
* Human-readable label that identifies the collection on which you grant the action to one MongoDB user. If you don't set this parameter, you grant the action to all collections in the database specified in the actions.resources.db parameter. If you set "actions.resources.cluster" : true, MongoDB Cloud ignores this parameter.
157+
* Human-readable label that identifies the collection on which you grant the action to one MongoDB user. If you don't set this parameter, you grant the action to all collections in the database specified in the actions.resources.db parameter. If you set "actions.resources.cluster" : true, MongoDB Cloud ignores this parameter. Use the empty string ("") to allow an action on all collections.
158158
*
159159
* @schema Resource#Collection
160160
*/
161161
readonly collection?: string;
162162

163163
/**
164-
* Human-readable label that identifies the database on which you grant the action to one MongoDB user. If you set "actions.resources.cluster" : true, MongoDB Cloud ignores this parameter.
164+
* Human-readable label that identifies the database on which you grant the action to one MongoDB user. If you set "actions.resources.cluster" : true, MongoDB Cloud ignores this parameter. Use the empty string ("") to allow an action on all databases.
165165
*
166166
* @schema Resource#DB
167167
*/

src/l1-resources/database-user/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ export interface CfnDatabaseUserProps {
2929
*/
3030
readonly databaseName: string;
3131

32+
/**
33+
* Description of this database user.
34+
*
35+
* @schema CfnDatabaseUserProps#Description
36+
*/
37+
readonly description?: string;
38+
3239
/**
3340
* List that contains the key-value pairs for tagging and categorizing the MongoDB database user. The labels that you define do not appear in the console.
3441
*
@@ -107,6 +114,7 @@ export function toJson_CfnDatabaseUserProps(
107114
DeleteAfterDate: obj.deleteAfterDate,
108115
AWSIAMType: obj.awsiamType,
109116
DatabaseName: obj.databaseName,
117+
Description: obj.description,
110118
Labels: obj.labels?.map((y) => toJson_LabelDefinition(y)),
111119
LdapAuthType: obj.ldapAuthType,
112120
X509Type: obj.x509Type,

0 commit comments

Comments
 (0)