@Override public DhcpOptionsCollection getDhcpOptionsSets(DescribeDhcpOptionsRequest request) { ResourceCollectionImpl result = service.getCollection("DhcpOptionsSets", request); if (result == null) return null; return new DhcpOptionsCollectionImpl(result); }
@Override public List<AbstractResource<?>> describeDhcpOptions(Account account, Region region, DateTime dt, Ec2Filter... filters) { AmazonEC2 ec2 = findClient(account, region); DescribeDhcpOptionsRequest req = new DescribeDhcpOptionsRequest(); for (Ec2Filter filter : filters) { Filter f = new Filter().withName(filter.getName()).withValues(filter.getValues()); req.withFilters(f); } log.debug("start describing dhcp options for account:{} in region:{} via api", account.getId() + "=>" + account.getName(), region); DescribeDhcpOptionsResult res = ec2.describeDhcpOptions(req); return converter.toVpcDhcpOptions(res.getDhcpOptions(), account.getId(), region, dt); }
@Override public DescribeDhcpOptionsResult describeDhcpOptions(DescribeDhcpOptionsRequest describeDhcpOptionsRequest) throws AmazonServiceException, AmazonClientException { throw new UnsupportedOperationException("Not supported in mock"); }
@Override public DhcpOptionsCollection getDhcpOptionsSets() { return getDhcpOptionsSets((DescribeDhcpOptionsRequest)null); }
@Override public boolean load(DescribeDhcpOptionsRequest request) { return load(request, null); }
@Override public boolean load(DescribeDhcpOptionsRequest request, ResultCapture<DescribeDhcpOptionsResult> extractor) { return resource.load(request, extractor); }
/** * Retrieves the DhcpOptionsSets collection referenced by this resource. */ DhcpOptionsCollection getDhcpOptionsSets(DescribeDhcpOptionsRequest request) ;
/** * Makes a call to the service to load this resource's attributes if they * are not loaded yet. * The following request parameters will be populated from the data of this * <code>DhcpOptions</code> resource, and any conflicting parameter value * set in the request will be overridden: * <ul> * <li> * <b><code>DhcpOptionsIds.0</code></b> * - mapped from the <code>Id</code> identifier. * </li> * </ul> * * <p> * * @return Returns {@code true} if the resource is not yet loaded when this * method was invoked, which indicates that a service call has been * made to retrieve the attributes. * @see DescribeDhcpOptionsRequest */ boolean load(DescribeDhcpOptionsRequest request);
/** * Makes a call to the service to load this resource's attributes if they * are not loaded yet, and use a ResultCapture to retrieve the low-level * client response * The following request parameters will be populated from the data of this * <code>DhcpOptions</code> resource, and any conflicting parameter value * set in the request will be overridden: * <ul> * <li> * <b><code>DhcpOptionsIds.0</code></b> * - mapped from the <code>Id</code> identifier. * </li> * </ul> * * <p> * * @return Returns {@code true} if the resource is not yet loaded when this * method was invoked, which indicates that a service call has been * made to retrieve the attributes. * @see DescribeDhcpOptionsRequest */ boolean load(DescribeDhcpOptionsRequest request, ResultCapture<DescribeDhcpOptionsResult> extractor);