List of usage examples for com.amazonaws.services.ec2.model CreateInternetGatewayResult getInternetGateway
public InternetGateway getInternetGateway()
Information about the internet gateway.
From source file:com.urbancode.terraform.tasks.aws.helpers.AWSHelper.java
License:Apache License
/** * Creates an internetGateway and returns the id it was created with. * * @param ec2Client//from w w w . j a va 2 s .c o m * @return InternetGatewayId */ public String createInternetGateway(AmazonEC2 ec2Client) { String gatewayId = null; CreateInternetGatewayRequest request = new CreateInternetGatewayRequest(); CreateInternetGatewayResult result = ec2Client.createInternetGateway(request); if (result != null && result.getInternetGateway() != null) { gatewayId = result.getInternetGateway().getInternetGatewayId(); } return gatewayId; }
From source file:com.vmware.photon.controller.model.adapters.awsadapter.AWSNetworkService.java
License:Open Source License
public String createInternetGateway(AmazonEC2AsyncClient client) { CreateInternetGatewayResult result = client.createInternetGateway(); return result.getInternetGateway().getInternetGatewayId(); }