List of usage examples for com.amazonaws.services.ec2.model DescribeInternetGatewaysRequest withInternetGatewayIds
public DescribeInternetGatewaysRequest withInternetGatewayIds(java.util.Collection<String> internetGatewayIds)
One or more internet gateway IDs.
From source file:com.urbancode.terraform.tasks.aws.helpers.AWSHelper.java
License:Apache License
/** * * @param gatewayIds//from w w w . j a va 2 s .c o m * @param ec2Client * @return */ public List<InternetGateway> getInternetGateways(List<String> gatewayIds, AmazonEC2 ec2Client) { DescribeInternetGatewaysRequest request = new DescribeInternetGatewaysRequest(); if (gatewayIds != null && !gatewayIds.isEmpty()) { request = request.withInternetGatewayIds(gatewayIds); } DescribeInternetGatewaysResult result = ec2Client.describeInternetGateways(request); return result.getInternetGateways(); }