/**
* This only supports a query about description.
*/
public DescribeImageAttributeResponse describeImageAttribute(DescribeImageAttribute describeImageAttribute) {
EC2DescribeImageAttribute request = new EC2DescribeImageAttribute();
DescribeImageAttributeType diat = describeImageAttribute.getDescribeImageAttribute();
DescribeImageAttributesGroup diag = diat.getDescribeImageAttributesGroup();
EmptyElementType description = diag.getDescription();
EmptyElementType launchPermission = diag.getLaunchPermission();
if (null != description) {
request.setImageId(diat.getImageId());
request.setAttribute(ImageAttribute.description);
return toDescribeImageAttributeResponse(engine.describeImageAttribute(request));
} else if (launchPermission != null) {
request.setImageId(diat.getImageId());
request.setAttribute(ImageAttribute.launchPermission);
return toDescribeImageAttributeResponse(engine.describeImageAttribute(request));
} else
throw new EC2ServiceException(ClientError.Unsupported, "Unsupported - only description or launchPermission supported");
}