Table of Contents

Enum Effect

Namespace
Amazon.CDK.AWS.IAM
Assembly
Amazon.CDK.AWS.IAM.dll

The Effect element of an IAM policy.

public enum Effect

Fields

ALLOW = 0

Allows access to a resource in an IAM policy statement.

DENY = 1

Explicitly deny access to a resource.

Examples

Resource books;
             User iamUser;


             var getBooks = books.AddMethod("GET", new HttpIntegration("http://amazon.com"), new MethodOptions {
                 AuthorizationType = AuthorizationType.IAM
             });

             iamUser.AttachInlinePolicy(new Policy(this, "AllowBooks", new PolicyProps {
                 Statements = new [] {
                     new PolicyStatement(new PolicyStatementProps {
                         Actions = new [] { "execute-api:Invoke" },
                         Effect = Effect.ALLOW,
                         Resources = new [] { getBooks.MethodArn }
                     }) }
             }));

Remarks