enum Effect
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.IAM.Effect |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsiam#Effect |
Java | software.amazon.awscdk.services.iam.Effect |
Python | aws_cdk.aws_iam.Effect |
TypeScript (source) | aws-cdk-lib » aws_iam » Effect |
The Effect element of an IAM policy.
Example
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
Name | Description |
---|---|
ALLOW | Allows access to a resource in an IAM policy statement. |
DENY | Explicitly deny access to a resource. |
ALLOW
Allows access to a resource in an IAM policy statement.
By default, access to resources are denied.
DENY
Explicitly deny access to a resource.
By default, all requests are denied implicitly.