File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ EC2 Security Groups <using-network-security>` in the |EC2-ug|.
5252 .. code-block :: java
5353
5454 CreateSecurityGroupResult createSecurityGroupResult =
55- amazonEC2Client. createSecurityGroup(createSecurityGroupRequest );
55+ amazonEC2Client. createSecurityGroup(csgr );
5656
5757 If you attempt to create a security group with the same name as an existing security group,
5858 :code: `createSecurityGroup ` throws an exception.
@@ -80,7 +80,10 @@ ports.
8080 IpPermission ipPermission =
8181 new IpPermission ();
8282
83- ipPermission. withIpRanges(" 111.111.111.111/32" , " 150.150.150.150/32" )
83+ IpRange ipRange1 = new IpRange (). withCidrIp(" 111.111.111.111/32" );
84+ IpRange ipRange2 = new IpRange (). withCidrIp(" 150.150.150.150/32" );
85+
86+ ipPermission. withIpv4Ranges(Arrays . asList(new IpRange [] {ipRange1, ipRange2}))
8487 .withIpProtocol(" tcp" )
8588 .withFromPort(22 )
8689 .withToPort(22 );
You can’t perform that action at this time.
0 commit comments