Skip to content

Commit c5fafdb

Browse files
committed
updated wording of comments and errors
1 parent b6275c2 commit c5fafdb

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

packages/@aws-cdk/aws-redshift/lib/cluster.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,9 @@ export interface ClusterProps {
307307

308308
/**
309309
* A single AWS Identity and Access Management (IAM) role to be used as the default role for the cluster.
310+
* The default role must be included in the roles list.
310311
*
311-
* @default - No default role is attached to the cluster.
312+
* @default - No default role is specified for the cluster.
312313
*/
313314
readonly defaultRole?: iam.IRole;
314315

@@ -681,7 +682,7 @@ export class Cluster extends ClusterBase {
681682
}
682683

683684
/**
684-
* Adds default IAM role to cluster
685+
* Adds default IAM role to cluster. The default IAM role must be already associated to the cluster to be added as the default role.
685686
*
686687
* @param defaultIamRole the IAM role to be set as the default role
687688
*/
@@ -698,7 +699,7 @@ export class Cluster extends ClusterBase {
698699
}
699700
}
700701
if (!roleAlreadyOnCluster) {
701-
throw new Error('Default role must be included in role list.');
702+
throw new Error('Default role must be associated to the Redshift cluster to be set as the default role.');
702703
}
703704

704705
// On UPDATE or CREATE define the default IAM role. On DELETE, remove the default IAM role

packages/@aws-cdk/aws-redshift/test/cluster.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ describe('default IAM role', () => {
644644

645645
expect(() => {
646646
cluster.addDefaultIamRole(defaultRole1);
647-
}).toThrow(/Default role must be included in role list./);
647+
}).toThrow(/Default role must be associated to the Redshift cluster to be set as the default role./);
648648
});
649649
});
650650

0 commit comments

Comments
 (0)