class SubnetNetworkAclAssociation (construct)
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.EC2.SubnetNetworkAclAssociation |
Java | software.amazon.awscdk.services.ec2.SubnetNetworkAclAssociation |
Python | aws_cdk.aws_ec2.SubnetNetworkAclAssociation |
TypeScript (source) | @aws-cdk/aws-ec2 » SubnetNetworkAclAssociation |
Implements
IConstruct
, IConstruct
, IDependable
, IResource
, ISubnet
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as ec2 from '@aws-cdk/aws-ec2';
declare const networkAcl: ec2.NetworkAcl;
declare const subnet: ec2.Subnet;
const subnetNetworkAclAssociation = new ec2.SubnetNetworkAclAssociation(this, 'MySubnetNetworkAclAssociation', {
networkAcl: networkAcl,
subnet: subnet,
// the properties below are optional
subnetNetworkAclAssociationName: 'subnetNetworkAclAssociationName',
});
Initializer
new SubnetNetworkAclAssociation(scope: Construct, id: string, props: SubnetNetworkAclAssociationProps)
Parameters
- scope
Construct
- id
string
- props
Subnet
Network Acl Association Props
Construct Props
Name | Type | Description |
---|---|---|
network | INetwork | The Network ACL this association is defined for. |
subnet | ISubnet | ID of the Subnet. |
subnet | string | The name of the SubnetNetworkAclAssociation. |
networkAcl
Type:
INetwork
The Network ACL this association is defined for.
subnet
Type:
ISubnet
ID of the Subnet.
subnetNetworkAclAssociationName?
Type:
string
(optional, default: If you don't specify a SubnetNetworkAclAssociationName, AWS CloudFormation generates a
unique physical ID and uses that ID for the group name.)
The name of the SubnetNetworkAclAssociation.
It is not recommended to use an explicit name.
Properties
Name | Type | Description |
---|---|---|
env | Resource | The environment this resource belongs to. |
network | INetwork | ID for the current Network ACL. |
node | Construct | The construct tree node associated with this construct. |
stack | Stack | The stack in which this resource is defined. |
subnet | ISubnet | ID of the Subnet. |
subnet | string | ID for the current SubnetNetworkAclAssociation. |
env
Type:
Resource
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
networkAcl
Type:
INetwork
ID for the current Network ACL.
node
Type:
Construct
The construct tree node associated with this construct.
stack
Type:
Stack
The stack in which this resource is defined.
subnet
Type:
ISubnet
ID of the Subnet.
subnetNetworkAclAssociationAssociationId
Type:
string
ID for the current SubnetNetworkAclAssociation.
Methods
Name | Description |
---|---|
apply | Apply the given removal policy to this resource. |
to | Returns a string representation of this construct. |
static from |
RemovalPolicy(policy)
applypublic applyRemovalPolicy(policy: RemovalPolicy): void
Parameters
- policy
Removal
Policy
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY
), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN
).
String()
topublic toString(): string
Returns
string
Returns a string representation of this construct.
SubnetNetworkAclAssociationAssociationId(scope, id, subnetNetworkAclAssociationAssociationId)
static frompublic static fromSubnetNetworkAclAssociationAssociationId(scope: Construct, id: string, subnetNetworkAclAssociationAssociationId: string): ISubnetNetworkAclAssociation
Parameters
- scope
Construct
- id
string
- subnetNetworkAclAssociationAssociationId
string
Returns