We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4667b60 commit 6679e86Copy full SHA for 6679e86
packages/@aws-cdk/aws-iam/lib/policy-statement.ts
@@ -19,7 +19,7 @@ export class PolicyStatement {
19
private condition: { [key: string]: any } = { };
20
21
constructor(props: PolicyStatementProps = {}) {
22
- this.effect = Effect.ALLOW;
+ this.effect = props.effect || Effect.ALLOW;
23
24
this.addActions(...props.actions || []);
25
this.addPrincipals(...props.principals || []);
@@ -249,6 +249,13 @@ export interface PolicyStatementProps {
249
* @default - no condition
250
*/
251
readonly conditions?: {[key: string]: any};
252
+
253
+ /**
254
+ * Whether to allow or deny the actions in this statement
255
+ *
256
+ * @default - allow
257
+ */
258
+ readonly effect?: Effect;
259
}
260
261
function noUndef(x: any): any {
0 commit comments