Skip to content
v2.274.0

Effect Enum ​

The Effect element of an IAM policy.

Example ​

ts
declare const books: apigateway.Resource;
declare const iamUser: iam.User;

const getBooks = books.addMethod('GET', new apigateway.HttpIntegration('http://amazon.com'), {
  authorizationType: apigateway.AuthorizationType.IAM
});

iamUser.attachInlinePolicy(new iam.Policy(this, 'AllowBooks', {
  statements: [
    new iam.PolicyStatement({
      actions: [ 'execute-api:Invoke' ],
      effect: iam.Effect.ALLOW,
      resources: [ getBooks.methodArn ]
    })
  ]
}))

Members ​

MemberDescription
ALLOWAllows access to a resource in an IAM policy statement.
DENYExplicitly deny access to a resource.

Referenced by ​