class TransitGatewayRouteTable (construct)
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.ec2.Alpha.TransitGatewayRouteTable |
![]() | github.com/aws/aws-cdk-go/awsec2alpha/v2#TransitGatewayRouteTable |
![]() | software.amazon.awscdk.services.ec2.alpha.TransitGatewayRouteTable |
![]() | aws_cdk.aws_ec2_alpha.TransitGatewayRouteTable |
![]() | @aws-cdk/aws-ec2-alpha ยป TransitGatewayRouteTable |
Implements
IConstruct
, IDependable
, IResource
, ITransit
, IRoute
Creates a Transit Gateway route table.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as ec2_alpha from '@aws-cdk/aws-ec2-alpha';
declare const transitGateway: ec2_alpha.TransitGateway;
const transitGatewayRouteTable = new ec2_alpha.TransitGatewayRouteTable(this, 'MyTransitGatewayRouteTable', {
transitGateway: transitGateway,
// the properties below are optional
transitGatewayRouteTableName: 'transitGatewayRouteTableName',
});
Initializer
new TransitGatewayRouteTable(scope: Construct, id: string, props: TransitGatewayRouteTableProps)
Parameters
- scope
Construct
- id
string
- props
Transit
Gateway Route Table Props
Construct Props
Name | Type | Description |
---|---|---|
transit | ITransit | The Transit Gateway that this route table belongs to. |
transit | string | Physical name of this Transit Gateway Route Table. |
transitGateway
Type:
ITransit
The Transit Gateway that this route table belongs to.
transitGatewayRouteTableName?
Type:
string
(optional, default: Assigned by CloudFormation.)
Physical name of this Transit Gateway Route Table.
Properties
Name | Type | Description |
---|---|---|
env | Resource | The environment this resource belongs to. |
node | Node | The tree node. |
route | string | Route table ID. |
stack | Stack | The stack in which this resource is defined. |
transit | ITransit | The Transit Gateway. |
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.
node
Type:
Node
The tree node.
routeTableId
Type:
string
Route table ID.
stack
Type:
Stack
The stack in which this resource is defined.
transitGateway
Type:
ITransit
The Transit Gateway.
Methods
Name | Description |
---|---|
add | Associate the provided Attachments with this route table. |
add | Add a blackhole route to this route table. |
add | Add an active route to this route table. |
apply | Apply the given removal policy to this resource. |
enable | Enable propagation from the provided Attachments to this route table. |
to | Returns a string representation of this construct. |
addAssociation(id, transitGatewayAttachment)
public addAssociation(id: string, transitGatewayAttachment: ITransitGatewayAttachment): ITransitGatewayRouteTableAssociation
Parameters
- id
string
- transitGatewayAttachment
ITransit
Gateway Attachment
Returns
Associate the provided Attachments with this route table.
addBlackholeRoute(id, destinationCidr)
public addBlackholeRoute(id: string, destinationCidr: string): ITransitGatewayRoute
Parameters
- id
string
- destinationCidr
string
Returns
Add a blackhole route to this route table.
addRoute(id, transitGatewayAttachment, destinationCidr)
public addRoute(id: string, transitGatewayAttachment: ITransitGatewayAttachment, destinationCidr: string): ITransitGatewayRoute
Parameters
- id
string
- transitGatewayAttachment
ITransit
Gateway Attachment - destinationCidr
string
Returns
Add an active route to this route table.
applyRemovalPolicy(policy)
public 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
).
enablePropagation(id, transitGatewayAttachment)
public enablePropagation(id: string, transitGatewayAttachment: ITransitGatewayAttachment): ITransitGatewayRouteTablePropagation
Parameters
- id
string
- transitGatewayAttachment
ITransit
Gateway Attachment
Returns
Enable propagation from the provided Attachments to this route table.
toString()
public toString(): string
Returns
string
Returns a string representation of this construct.