@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:39.755Z") @Stability(value=Stable) public enum Effect extends Enum<Effect>
Example:
Resource books;
User iamUser;
Method getBooks = books.addMethod("GET", new HttpIntegration("http://amazon.com"), MethodOptions.builder()
.authorizationType(AuthorizationType.IAM)
.build());
iamUser.attachInlinePolicy(Policy.Builder.create(this, "AllowBooks")
.statements(List.of(
PolicyStatement.Builder.create()
.actions(List.of("execute-api:Invoke"))
.effect(Effect.ALLOW)
.resources(List.of(getBooks.getMethodArn()))
.build()))
.build());
| Enum Constant and Description |
|---|
ALLOW
Allows access to a resource in an IAM policy statement.
|
DENY
Explicitly deny access to a resource.
|
| Modifier and Type | Method and Description |
|---|---|
static Effect |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Effect[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
@Stability(value=Stable) public static final Effect ALLOW
By default, access to resources are denied.
@Stability(value=Stable) public static final Effect DENY
By default, all requests are denied implicitly.
public static Effect[] values()
for (Effect c : Effect.values()) System.out.println(c);
public static Effect valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2022. All rights reserved.