List of usage examples for com.amazonaws.services.ec2.model DescribeVpcPeeringConnectionsRequest getVpcPeeringConnectionIds
public java.util.List<String> getVpcPeeringConnectionIds()
One or more VPC peering connection IDs.
From source file:com.netflix.edda.EddaEc2Client.java
License:Apache License
public DescribeVpcPeeringConnectionsResult describeVpcPeeringConnections( DescribeVpcPeeringConnectionsRequest request) { validateEmpty("Filter", request.getFilters()); TypeReference<List<VpcPeeringConnection>> ref = new TypeReference<List<VpcPeeringConnection>>() { };/*from ww w .ja v a2 s . c o m*/ String url = config.url() + "/api/v2/aws/vpcPeeringConnections;_expand"; try { List<VpcPeeringConnection> vpcs = parse(ref, doGet(url)); List<String> ids = request.getVpcPeeringConnectionIds(); if (shouldFilter(ids)) { List<VpcPeeringConnection> vs = new ArrayList<VpcPeeringConnection>(); for (VpcPeeringConnection v : vpcs) { if (matches(ids, v.getVpcPeeringConnectionId())) vs.add(v); } vpcs = vs; } return new DescribeVpcPeeringConnectionsResult().withVpcPeeringConnections(vpcs); } catch (IOException e) { throw new AmazonClientException("Faled to parse " + url, e); } }