Java 类com.amazonaws.services.ec2.model.DescribeSnapshotAttributeRequest 实例源码

项目:aws-sdk-java-resources    文件:SnapshotImpl.java   
@Override
public DescribeSnapshotAttributeResult describeAttribute(
        DescribeSnapshotAttributeRequest request,
        ResultCapture<DescribeSnapshotAttributeResult> extractor) {

    ActionResult result = resource.performAction("DescribeAttribute",
            request, extractor);

    if (result == null) return null;
    return (DescribeSnapshotAttributeResult) result.getData();
}
项目:aws-sdk-java-resources    文件:SnapshotImpl.java   
@Override
public DescribeSnapshotAttributeResult describeAttribute(String attribute,
        ResultCapture<DescribeSnapshotAttributeResult> extractor) {

    DescribeSnapshotAttributeRequest request = new
            DescribeSnapshotAttributeRequest()

        .withAttribute(attribute);
    return describeAttribute(request, extractor);
}
项目:clouck    文件:Ec2WrapperImpl.java   
@Override
public List<CreateVolumePermission> findCreateVolumePermissions(Account account, Region region, String snapshotId) {
    AmazonEC2 ec2 = findClient(account, region);

    DescribeSnapshotAttributeRequest req = new DescribeSnapshotAttributeRequest();
    req.setAttribute("createVolumePermission");
    req.setSnapshotId(snapshotId);

    log.debug("start describing snapshot create volume permission for account:{} in region:{} via api", account.getId() + "=>" + account.getName(), region);
    DescribeSnapshotAttributeResult res = ec2.describeSnapshotAttribute(req);

    return res.getCreateVolumePermissions();
}
项目:clouck    文件:Ec2WrapperImpl.java   
@Override
public List<ProductCode> findSnapshotProductCodes(Account account, Region region, String snapshotId) {
    AmazonEC2 ec2 = findClient(account, region);

    DescribeSnapshotAttributeRequest req = new DescribeSnapshotAttributeRequest();
    req.setAttribute("productCodes");
    req.setSnapshotId(snapshotId);

    log.debug("start describing snapshot productCodes for account:{} in region:{} via api", account.getId() + "=>" + account.getName(), region);
    DescribeSnapshotAttributeResult res = ec2.describeSnapshotAttribute(req);

    return res.getProductCodes();
}
项目:elasticsearch_my    文件:AmazonEC2Mock.java   
@Override
public DescribeSnapshotAttributeResult describeSnapshotAttribute(DescribeSnapshotAttributeRequest describeSnapshotAttributeRequest) throws AmazonServiceException, AmazonClientException {
    throw new UnsupportedOperationException("Not supported in mock");
}
项目:aws-sdk-java-resources    文件:SnapshotImpl.java   
@Override
public DescribeSnapshotAttributeResult describeAttribute(
        DescribeSnapshotAttributeRequest request) {

    return describeAttribute(request, null);
}
项目:aws-sdk-java-resources    文件:Snapshot.java   
/**
 * Performs the <code>DescribeAttribute</code> action.
 *
 * <p>
 * The following request parameters will be populated from the data of this
 * <code>Snapshot</code> resource, and any conflicting parameter value set
 * in the request will be overridden:
 * <ul>
 *   <li>
 *     <b><code>SnapshotId</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 DescribeSnapshotAttributeRequest
 */
DescribeSnapshotAttributeResult describeAttribute(
        DescribeSnapshotAttributeRequest request);
项目:aws-sdk-java-resources    文件:Snapshot.java   
/**
 * 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>Snapshot</code> resource, and any conflicting parameter value set
 * in the request will be overridden:
 * <ul>
 *   <li>
 *     <b><code>SnapshotId</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 DescribeSnapshotAttributeRequest
 */
DescribeSnapshotAttributeResult describeAttribute(
        DescribeSnapshotAttributeRequest request,
        ResultCapture<DescribeSnapshotAttributeResult> extractor);