@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:38.488Z") @Stability(value=Stable) public class NetworkAcl extends Resource implements INetworkAcl
By default, will deny all inbound and outbound traffic unless entries are added explicitly allowing it.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ec2.*;
Subnet subnet;
SubnetFilter subnetFilter;
Vpc vpc;
NetworkAcl networkAcl = NetworkAcl.Builder.create(this, "MyNetworkAcl")
.vpc(vpc)
// the properties below are optional
.networkAclName("networkAclName")
.subnetSelection(SubnetSelection.builder()
.availabilityZones(List.of("availabilityZones"))
.onePerAz(false)
.subnetFilters(List.of(subnetFilter))
.subnetGroupName("subnetGroupName")
.subnets(List.of(subnet))
.subnetType(SubnetType.PRIVATE_ISOLATED)
.build())
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
NetworkAcl.Builder
A fluent builder for
NetworkAcl. |
software.amazon.jsii.JsiiObject.InitializationModeINetworkAcl.Jsii$Default, INetworkAcl.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
|
NetworkAcl(software.constructs.Construct scope,
String id,
NetworkAclProps props) |
protected |
NetworkAcl(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
NetworkAcl(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
NetworkAclEntry |
addEntry(String id,
CommonNetworkAclEntryOptions options)
Add a new entry to the ACL.
|
void |
associateWithSubnet(String id,
SubnetSelection selection)
Associate the ACL with a given set of subnets.
|
static INetworkAcl |
fromNetworkAclId(software.constructs.Construct scope,
String id,
String networkAclId)
Import an existing NetworkAcl into this app.
|
String |
getNetworkAclId()
The ID of the NetworkACL.
|
String |
getNetworkAclVpcId()
The VPC ID for this NetworkACL.
|
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourcejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitapplyRemovalPolicy, getEnv, getStackprotected NetworkAcl(software.amazon.jsii.JsiiObjectRef objRef)
protected NetworkAcl(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public NetworkAcl(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
NetworkAclProps props)
scope - This parameter is required.id - This parameter is required.props - This parameter is required.@Stability(value=Stable) @NotNull public static INetworkAcl fromNetworkAclId(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String networkAclId)
scope - This parameter is required.id - This parameter is required.networkAclId - This parameter is required.@Stability(value=Stable) @NotNull public NetworkAclEntry addEntry(@NotNull String id, @NotNull CommonNetworkAclEntryOptions options)
addEntry in interface INetworkAclid - This parameter is required.options - This parameter is required.@Stability(value=Stable)
public void associateWithSubnet(@NotNull
String id,
@NotNull
SubnetSelection selection)
id - This parameter is required.selection - This parameter is required.@Stability(value=Stable) @NotNull public String getNetworkAclId()
getNetworkAclId in interface INetworkAcl@Stability(value=Stable) @NotNull public String getNetworkAclVpcId()
Copyright © 2022. All rights reserved.