Skip to content

Latest commit

 

History

History
812 lines (499 loc) · 28.2 KB

API.md

File metadata and controls

812 lines (499 loc) · 28.2 KB

API Reference

Constructs

Network

Initializers

import { Network } from '@smallcase/cdk-vpc-module'

new Network(scope: Construct, id: string, props: VPCProps)
Name Type Description
scope constructs.Construct No description.
id string No description.
props VPCProps No description.

scopeRequired
  • Type: constructs.Construct

idRequired
  • Type: string

propsRequired

Methods

Name Description
toString Returns a string representation of this construct.
createSubnet No description.

toString
public toString(): string

Returns a string representation of this construct.

createSubnet
public createSubnet(option: ISubnetsProps, vpc: Vpc, peeringConnectionId?: PeeringConnectionInternalType): Subnet[]
optionRequired

vpcRequired
  • Type: aws-cdk-lib.aws_ec2.Vpc

peeringConnectionIdOptional

Static Functions

Name Description
isConstruct Checks if x is a construct.

isConstruct
import { Network } from '@smallcase/cdk-vpc-module'

Network.isConstruct(x: any)

Checks if x is a construct.

xRequired
  • Type: any

Any object.


Properties

Name Type Description
node constructs.Node The tree node.
endpointOutputs {[ key: string ]: aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint | aws-cdk-lib.aws_ec2.GatewayVpcEndpoint} No description.
natProvider aws-cdk-lib.aws_ec2.NatProvider No description.
securityGroupOutputs {[ key: string ]: aws-cdk-lib.aws_ec2.SecurityGroup} No description.
vpc aws-cdk-lib.aws_ec2.Vpc No description.
natSubnets aws-cdk-lib.aws_ec2.PublicSubnet[] No description.
pbSubnets aws-cdk-lib.aws_ec2.PublicSubnet[] No description.
pvSubnets aws-cdk-lib.aws_ec2.PrivateSubnet[] No description.
subnets {[ key: string ]: aws-cdk-lib.aws_ec2.Subnet[]} No description.

nodeRequired
public readonly node: Node;
  • Type: constructs.Node

The tree node.


endpointOutputsRequired
public readonly endpointOutputs: {[ key: string ]: InterfaceVpcEndpoint | GatewayVpcEndpoint};
  • Type: {[ key: string ]: aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint | aws-cdk-lib.aws_ec2.GatewayVpcEndpoint}

natProviderRequired
public readonly natProvider: NatProvider;
  • Type: aws-cdk-lib.aws_ec2.NatProvider

securityGroupOutputsRequired
public readonly securityGroupOutputs: {[ key: string ]: SecurityGroup};
  • Type: {[ key: string ]: aws-cdk-lib.aws_ec2.SecurityGroup}

vpcRequired
public readonly vpc: Vpc;
  • Type: aws-cdk-lib.aws_ec2.Vpc

natSubnetsRequired
public readonly natSubnets: PublicSubnet[];
  • Type: aws-cdk-lib.aws_ec2.PublicSubnet[]

pbSubnetsRequired
public readonly pbSubnets: PublicSubnet[];
  • Type: aws-cdk-lib.aws_ec2.PublicSubnet[]

pvSubnetsRequired
public readonly pvSubnets: PrivateSubnet[];
  • Type: aws-cdk-lib.aws_ec2.PrivateSubnet[]

subnetsRequired
public readonly subnets: {[ key: string ]: Subnet[]};
  • Type: {[ key: string ]: aws-cdk-lib.aws_ec2.Subnet[]}

Structs

AddRouteOptions

Initializer

import { AddRouteOptions } from '@smallcase/cdk-vpc-module'

const addRouteOptions: AddRouteOptions = { ... }

Properties

Name Type Description
routerType aws-cdk-lib.aws_ec2.RouterType What type of router to route this traffic to.
destinationCidrBlock string IPv4 range this route applies to.
destinationIpv6CidrBlock string IPv6 range this route applies to.
enablesInternetConnectivity boolean Whether this route will enable internet connectivity.
existingVpcPeeringRouteKey string No description.
routerId string No description.

routerTypeRequired
public readonly routerType: RouterType;
  • Type: aws-cdk-lib.aws_ec2.RouterType

What type of router to route this traffic to.


destinationCidrBlockOptional
public readonly destinationCidrBlock: string;
  • Type: string
  • Default: '0.0.0.0/0'

IPv4 range this route applies to.


destinationIpv6CidrBlockOptional
public readonly destinationIpv6CidrBlock: string;
  • Type: string
  • Default: Uses IPv6

IPv6 range this route applies to.


enablesInternetConnectivityOptional
public readonly enablesInternetConnectivity: boolean;
  • Type: boolean
  • Default: false

Whether this route will enable internet connectivity.

If true, this route will be added before any AWS resources that depend on internet connectivity in the VPC will be created.


existingVpcPeeringRouteKeyOptional
public readonly existingVpcPeeringRouteKey: string;
  • Type: string

routerIdOptional
public readonly routerId: string;
  • Type: string

NetworkACL

Initializer

import { NetworkACL } from '@smallcase/cdk-vpc-module'

const networkACL: NetworkACL = { ... }

Properties

Name Type Description
cidr aws-cdk-lib.aws_ec2.AclCidr No description.
traffic aws-cdk-lib.aws_ec2.AclTraffic No description.

cidrRequired
public readonly cidr: AclCidr;
  • Type: aws-cdk-lib.aws_ec2.AclCidr

trafficRequired
public readonly traffic: AclTraffic;
  • Type: aws-cdk-lib.aws_ec2.AclTraffic

PeeringConfig

Initializer

import { PeeringConfig } from '@smallcase/cdk-vpc-module'

const peeringConfig: PeeringConfig = { ... }

Properties

Name Type Description
peeringVpcId string No description.
tags {[ key: string ]: string} No description.
peerAssumeRoleArn string No description.
peerOwnerId string No description.
peerRegion string No description.

peeringVpcIdRequired
public readonly peeringVpcId: string;
  • Type: string

tagsRequired
public readonly tags: {[ key: string ]: string};
  • Type: {[ key: string ]: string}

peerAssumeRoleArnOptional
public readonly peerAssumeRoleArn: string;
  • Type: string

peerOwnerIdOptional
public readonly peerOwnerId: string;
  • Type: string

peerRegionOptional
public readonly peerRegion: string;
  • Type: string

PeeringConnectionInternalType

Initializer

import { PeeringConnectionInternalType } from '@smallcase/cdk-vpc-module'

const peeringConnectionInternalType: PeeringConnectionInternalType = { ... }

SecurityGroupRule

Initializer

import { SecurityGroupRule } from '@smallcase/cdk-vpc-module'

const securityGroupRule: SecurityGroupRule = { ... }

Properties

Name Type Description
peer aws-cdk-lib.aws_ec2.IPeer | aws-cdk-lib.aws_ec2.ISecurityGroup No description.
port aws-cdk-lib.aws_ec2.Port No description.
description string No description.

peerRequired
public readonly peer: IPeer | ISecurityGroup;
  • Type: aws-cdk-lib.aws_ec2.IPeer | aws-cdk-lib.aws_ec2.ISecurityGroup

portRequired
public readonly port: Port;
  • Type: aws-cdk-lib.aws_ec2.Port

descriptionOptional
public readonly description: string;
  • Type: string

VpcEndpointConfig

Initializer

import { VpcEndpointConfig } from '@smallcase/cdk-vpc-module'

const vpcEndpointConfig: VpcEndpointConfig = { ... }

Properties

Name Type Description
name string No description.
service aws-cdk-lib.aws_ec2.InterfaceVpcEndpointAwsService | aws-cdk-lib.aws_ec2.GatewayVpcEndpointAwsService | aws-cdk-lib.aws_ec2.InterfaceVpcEndpointService No description.
subnetGroupNames string[] No description.
additionalTags {[ key: string ]: string} No description.
externalSubnets IExternalVPEndpointSubnets[] No description.
iamPolicyStatements aws-cdk-lib.aws_iam.PolicyStatement[] No description.
securityGroupRules SecurityGroupRule[] No description.

nameRequired
public readonly name: string;
  • Type: string

serviceRequired
public readonly service: InterfaceVpcEndpointAwsService | GatewayVpcEndpointAwsService | InterfaceVpcEndpointService;
  • Type: aws-cdk-lib.aws_ec2.InterfaceVpcEndpointAwsService | aws-cdk-lib.aws_ec2.GatewayVpcEndpointAwsService | aws-cdk-lib.aws_ec2.InterfaceVpcEndpointService

subnetGroupNamesRequired
public readonly subnetGroupNames: string[];
  • Type: string[]

additionalTagsOptional
public readonly additionalTags: {[ key: string ]: string};
  • Type: {[ key: string ]: string}

externalSubnetsOptional
public readonly externalSubnets: IExternalVPEndpointSubnets[];

iamPolicyStatementsOptional
public readonly iamPolicyStatements: PolicyStatement[];
  • Type: aws-cdk-lib.aws_iam.PolicyStatement[]

securityGroupRulesOptional
public readonly securityGroupRules: SecurityGroupRule[];

VPCProps

Initializer

import { VPCProps } from '@smallcase/cdk-vpc-module'

const vPCProps: VPCProps = { ... }

Properties

Name Type Description
subnets ISubnetsProps[] No description.
vpc aws-cdk-lib.aws_ec2.VpcProps No description.
natEipAllocationIds string[] No description.
peeringConfigs {[ key: string ]: PeeringConfig} No description.
vpcEndpoints VpcEndpointConfig[] No description.

subnetsRequired
public readonly subnets: ISubnetsProps[];

vpcRequired
public readonly vpc: VpcProps;
  • Type: aws-cdk-lib.aws_ec2.VpcProps

natEipAllocationIdsOptional
public readonly natEipAllocationIds: string[];
  • Type: string[]

peeringConfigsOptional
public readonly peeringConfigs: {[ key: string ]: PeeringConfig};

vpcEndpointsOptional
public readonly vpcEndpoints: VpcEndpointConfig[];

Protocols

IExternalVPEndpointSubnets

Properties

Name Type Description
availabilityZone string No description.
id string No description.
routeTableId string No description.

availabilityZoneRequired
public readonly availabilityZone: string;
  • Type: string

idRequired
public readonly id: string;
  • Type: string

routeTableIdRequired
public readonly routeTableId: string;
  • Type: string

ISubnetsProps

Properties

Name Type Description
availabilityZones string[] No description.
cidrBlock string[] No description.
subnetGroupName string No description.
subnetType aws-cdk-lib.aws_ec2.SubnetType No description.
egressNetworkACL NetworkACL[] No description.
ingressNetworkACL NetworkACL[] No description.
routes AddRouteOptions[] No description.
tags {[ key: string ]: string} No description.
useSubnetForNAT boolean No description.

availabilityZonesRequired
public readonly availabilityZones: string[];
  • Type: string[]

cidrBlockRequired
public readonly cidrBlock: string[];
  • Type: string[]

subnetGroupNameRequired
public readonly subnetGroupName: string;
  • Type: string

subnetTypeRequired
public readonly subnetType: SubnetType;
  • Type: aws-cdk-lib.aws_ec2.SubnetType

egressNetworkACLOptional
public readonly egressNetworkACL: NetworkACL[];

ingressNetworkACLOptional
public readonly ingressNetworkACL: NetworkACL[];

routesOptional
public readonly routes: AddRouteOptions[];

tagsOptional
public readonly tags: {[ key: string ]: string};
  • Type: {[ key: string ]: string}

useSubnetForNATOptional
public readonly useSubnetForNAT: boolean;
  • Type: boolean