@Override public DescribeVolumeAttributeResult describeAttribute( DescribeVolumeAttributeRequest request, ResultCapture<DescribeVolumeAttributeResult> extractor) { ActionResult result = resource.performAction("DescribeAttribute", request, extractor); if (result == null) return null; return (DescribeVolumeAttributeResult) result.getData(); }
@Override public Boolean findAutoEnableIO(Account account, Region region, String volumeId) { AmazonEC2 ec2 = findClient(account, region); DescribeVolumeAttributeRequest req = new DescribeVolumeAttributeRequest(); req.setVolumeId(volumeId); req.setAttribute("autoEnableIO"); log.debug("start describing volume attribute auto enable io for account:{} in region:{} via api", account.getId() + "=>" + account.getName(), region); return ec2.describeVolumeAttribute(req).getAutoEnableIO(); }
@Override public List<ProductCode> findProductCodes(Account account, Region region, String volumeId) { AmazonEC2 ec2 = findClient(account, region); DescribeVolumeAttributeRequest req = new DescribeVolumeAttributeRequest(); req.setVolumeId(volumeId); req.setAttribute("productCodes"); log.debug("start describing volume attribute product codes for account:{} in region:{} via api", account.getId() + "=>" + account.getName(), region); return ec2.describeVolumeAttribute(req).getProductCodes(); }
@Override public DescribeVolumeAttributeResult describeVolumeAttribute(DescribeVolumeAttributeRequest describeVolumeAttributeRequest) throws AmazonServiceException, AmazonClientException { throw new UnsupportedOperationException("Not supported in mock"); }
@Override public DescribeVolumeAttributeResult describeAttribute( DescribeVolumeAttributeRequest request) { return describeAttribute(request, null); }
/** * Performs the <code>DescribeAttribute</code> action. * * <p> * The following request parameters will be populated from the data of this * <code>Volume</code> resource, and any conflicting parameter value set in * the request will be overridden: * <ul> * <li> * <b><code>VolumeId</code></b> * - mapped from the <code>Id</code> identifier. * </li> * </ul> * * <p> * * @return The response of the low-level client operation associated with * this resource action. * @see DescribeVolumeAttributeRequest */ DescribeVolumeAttributeResult describeAttribute( DescribeVolumeAttributeRequest request);
/** * Performs the <code>DescribeAttribute</code> action and use a * ResultCapture to retrieve the low-level client response. * * <p> * The following request parameters will be populated from the data of this * <code>Volume</code> resource, and any conflicting parameter value set in * the request will be overridden: * <ul> * <li> * <b><code>VolumeId</code></b> * - mapped from the <code>Id</code> identifier. * </li> * </ul> * * <p> * * @return The response of the low-level client operation associated with * this resource action. * @see DescribeVolumeAttributeRequest */ DescribeVolumeAttributeResult describeAttribute( DescribeVolumeAttributeRequest request, ResultCapture<DescribeVolumeAttributeResult> extractor);