List of usage examples for com.amazonaws.services.ec2.model DescribeInternetGatewaysRequest getFilters
public java.util.List<Filter> getFilters()
One or more filters.
From source file:com.vmware.photon.controller.model.adapters.awsadapter.enumeration.AWSComputeStateCreationAdapterService.java
License:Open Source License
/** * Gets the Internet gateways that are attached to the VPCs that were discovered during the enumeration process. */// w w w . ja va2 s. c o m private void getInternetGatewayInformation(AWSComputeServiceCreationContext context, AWSNetworkCreationStage next) { DescribeInternetGatewaysRequest internetGatewayRequest = new DescribeInternetGatewaysRequest(); List<String> vpcList = new ArrayList<String>(context.discoveredVpcNetworkStateMap.keySet()); Filter filter = new Filter(AWS_ATTACHMENT_VPC_FILTER, vpcList); internetGatewayRequest.getFilters().add(filter); AWSInternetGatewayAsyncHandler asyncHandler = new AWSInternetGatewayAsyncHandler(this, next, context); context.amazonEC2Client.describeInternetGatewaysAsync(internetGatewayRequest, asyncHandler); }
From source file:com.vmware.photon.controller.model.adapters.awsadapter.enumeration.AWSNetworkStateCreationAdapterService.java
License:Open Source License
/** * Gets the Internet gateways that are attached to the VPCs that were discovered during the * enumeration process.//from w w w. j a v a2 s . c o m */ private void getInternetGatewayInformation(AWSNetworkServiceCreationContext context, AWSNetworkCreationStage next) { DescribeInternetGatewaysRequest internetGatewayRequest = new DescribeInternetGatewaysRequest(); List<String> vpcList = new ArrayList<String>(context.vpcs.keySet()); Filter filter = new Filter(AWS_ATTACHMENT_VPC_FILTER, vpcList); internetGatewayRequest.getFilters().add(filter); AWSInternetGatewayAsyncHandler asyncHandler = new AWSInternetGatewayAsyncHandler(this, next, context); context.amazonEC2Client.describeInternetGatewaysAsync(internetGatewayRequest, asyncHandler); }