attachInternetGateway

Attaches an internet gateway or a virtual private gateway to a VPC, enabling connectivity between the internet and the VPC. For more information, see Internet gateways in the Amazon VPC User Guide.

Samples


fun main() { 
   //sampleStart 
   // This example attaches the specified Internet gateway to the specified VPC.
ec2Client.attachInternetGateway {
    internetGatewayId = "igw-c0a643a9"
    vpcId = "vpc-a01106c2"
} 
   //sampleEnd
}