/**
  * A list of filters used to match properties for VPN Gateways. For a complete reference to the
  * available filter keys for this operation, see the <a
  * href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/">Amazon EC2 API
  * reference</a>.
  *
  * <p>Returns a reference to this object so that method calls can be chained together.
  *
  * @param vpnGatewayIds A list of filters used to match properties for VPN Gateways. For a
  *     complete reference to the available filter keys for this operation, see the <a
  *     href="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/">Amazon EC2 API
  *     reference</a>.
  * @return A reference to this updated object so that method calls can be chained together.
  */
 public DescribeVpnGatewaysRequest withVpnGatewayIds(String... vpnGatewayIds) {
   if (getVpnGatewayIds() == null)
     setVpnGatewayIds(new java.util.ArrayList<String>(vpnGatewayIds.length));
   for (String value : vpnGatewayIds) {
     getVpnGatewayIds().add(value);
   }
   return this;
 }
예제 #2
0
  @Override
  public void doWork() throws BuildException {
    DescribeVpnGatewaysRequest request = new DescribeVpnGatewaysRequest();

    if (gatewayIds != null) {
      request.setVpnGatewayIds(CollectionsHelper.asList(gatewayIds));
    }

    if (filters != null) {
      request.setFilters(filters);
    }

    DescribeVpnGatewaysResult result = getEc2Client().describeVpnGateways(request);

    for (VpnGateway gateway : result.getVpnGateways()) {
      this.setPropertyThreadSafe(property, gateway.toString());

      for (Task task : tasks) {
        task.perform();
      }
    }
  }