Commit eb560ca 1 parent ed94c5e commit eb560ca Copy full SHA for eb560ca
File tree 4 files changed +45
-1
lines changed
packages/@aws-cdk/aws-ec2
4 files changed +45
-1
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ export enum Protocol {
9
9
UDP = 'udp' ,
10
10
ICMP = 'icmp' ,
11
11
ICMPV6 = '58' ,
12
+ ESP = 'esp' ,
13
+ AH = 'ah' ,
12
14
}
13
15
14
16
/**
@@ -171,6 +173,30 @@ export class Port {
171
173
} ) ;
172
174
}
173
175
176
+ /**
177
+ * A single ESP port
178
+ */
179
+ public static esp ( ) : Port {
180
+ return new Port ( {
181
+ protocol : Protocol . ESP ,
182
+ fromPort : 50 ,
183
+ toPort : 50 ,
184
+ stringRepresentation : 'ESP 50' ,
185
+ } ) ;
186
+ }
187
+
188
+ /**
189
+ * A single AH port
190
+ */
191
+ public static ah ( ) : Port {
192
+ return new Port ( {
193
+ protocol : Protocol . AH ,
194
+ fromPort : 51 ,
195
+ toPort : 51 ,
196
+ stringRepresentation : 'AH 51' ,
197
+ } ) ;
198
+ }
199
+
174
200
/**
175
201
* Whether the rule containing this port range can be inlined into a securitygroup or not.
176
202
*/
Original file line number Diff line number Diff line change 315
315
" docs-public-apis:@aws-cdk/aws-ec2.Protocol.UDP" ,
316
316
" docs-public-apis:@aws-cdk/aws-ec2.Protocol.ICMP" ,
317
317
" docs-public-apis:@aws-cdk/aws-ec2.Protocol.ICMPV6" ,
318
+ " docs-public-apis:@aws-cdk/aws-ec2.Protocol.ESP" ,
319
+ " docs-public-apis:@aws-cdk/aws-ec2.Protocol.AH" ,
318
320
" docs-public-apis:@aws-cdk/aws-ec2.WindowsVersion.WINDOWS_SERVER_2008_SP2_ENGLISH_64BIT_SQL_2008_SP4_EXPRESS" ,
319
321
" docs-public-apis:@aws-cdk/aws-ec2.WindowsVersion.WINDOWS_SERVER_2012_R2_RTM_CHINESE_SIMPLIFIED_64BIT_BASE" ,
320
322
" docs-public-apis:@aws-cdk/aws-ec2.WindowsVersion.WINDOWS_SERVER_2012_R2_RTM_CHINESE_TRADITIONAL_64BIT_BASE" ,
Original file line number Diff line number Diff line change 567
567
"FromPort" : 800 ,
568
568
"IpProtocol" : " udp" ,
569
569
"ToPort" : 801
570
+ },
571
+ {
572
+ "CidrIp" : " 0.0.0.0/0" ,
573
+ "Description" : " from 0.0.0.0/0:ESP 50" ,
574
+ "FromPort" : 50 ,
575
+ "IpProtocol" : " esp" ,
576
+ "ToPort" : 50
577
+ },
578
+ {
579
+ "CidrIp" : " 0.0.0.0/0" ,
580
+ "Description" : " from 0.0.0.0/0:AH 51" ,
581
+ "FromPort" : 51 ,
582
+ "IpProtocol" : " ah" ,
583
+ "ToPort" : 51
570
584
}
571
585
],
572
586
"VpcId" : {
575
589
}
576
590
}
577
591
}
578
- }
592
+ }
Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ const rules = [
16
16
ec2 . Port . allUdp ( ) ,
17
17
ec2 . Port . udp ( 123 ) ,
18
18
ec2 . Port . udpRange ( 800 , 801 ) ,
19
+ ec2 . Port . esp ( ) ,
20
+ ec2 . Port . ah ( ) ,
19
21
] ;
20
22
21
23
for ( const rule of rules ) {
You can’t perform that action at this time.
0 commit comments