Examples of LaunchPermissionOperationType


Examples of com.amazon.ec2.LaunchPermissionOperationType

        ModifyImageAttributeType miat = modifyImageAttribute.getModifyImageAttribute();
        ModifyImageAttributeTypeChoice_type0 item = miat.getModifyImageAttributeTypeChoice_type0();

        AttributeValueType description = item.getDescription();

        LaunchPermissionOperationType launchPermOp = item.getLaunchPermission();

        if (null != description) {
            request.setImageId(miat.getImageId());
            request.setAttribute(ImageAttribute.description);
            request.setDescription(description.getValue());
            return toModifyImageAttributeResponse(engine.modifyImageAttribute(request));
        } else if (launchPermOp != null) {
            request.setImageId(miat.getImageId());
            request.setAttribute(ImageAttribute.launchPermission);
            if (launchPermOp.getAdd() != null) {
                setAccountOrGroupList(launchPermOp.getAdd().getItem(), request, "add");
            } else if (launchPermOp.getRemove() != null) {
                setAccountOrGroupList(launchPermOp.getRemove().getItem(), request, "remove");
            }
            return toModifyImageAttributeResponse(engine.modifyImageAttribute(request));
        }
        throw new EC2ServiceException(ClientError.Unsupported, "Unsupported - can only modify image description or launchPermission");
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.