本文整理汇总了Java中com.amazonaws.services.ec2.model.DeregisterImageRequest类的典型用法代码示例。如果您正苦于以下问题:Java DeregisterImageRequest类的具体用法?Java DeregisterImageRequest怎么用?Java DeregisterImageRequest使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DeregisterImageRequest类属于com.amazonaws.services.ec2.model包,在下文中一共展示了DeregisterImageRequest类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: deleteImage
import com.amazonaws.services.ec2.model.DeregisterImageRequest; //导入依赖的package包/类
public void deleteImage(Image image) {
String imageId = image.getImageId();
logger.info("delete image, imageId={}", imageId);
ec2.deregisterImage(new DeregisterImageRequest(imageId));
// our image always uses EBS as first and only drive
List<BlockDeviceMapping> mappings = image.getBlockDeviceMappings();
if (!mappings.isEmpty()) {
EbsBlockDevice ebs = mappings.get(0).getEbs();
if (ebs != null) {
String snapshotId = ebs.getSnapshotId();
logger.info("delete snapshot, snapshotId={}", snapshotId);
ec2.deleteSnapshot(new DeleteSnapshotRequest(snapshotId));
}
}
}
开发者ID:neowu,项目名称:cmn-project,代码行数:17,代码来源:EC2.java
示例2: pargeImages
import com.amazonaws.services.ec2.model.DeregisterImageRequest; //导入依赖的package包/类
private void pargeImages(AmazonEC2 ec2, Image image) {
String imageId = image.getImageId();
ec2.deregisterImage(new DeregisterImageRequest(imageId));
for (BlockDeviceMapping block : image.getBlockDeviceMappings()) {
String snapshotId = block.getEbs().getSnapshotId();
ec2.deleteSnapshot(new DeleteSnapshotRequest().withSnapshotId(snapshotId));
}
}
开发者ID:uzresk,项目名称:aws-auto-operations-using-lambda,代码行数:9,代码来源:ImageStateCheckAndPargeFunction.java
示例3: deregisterImage
import com.amazonaws.services.ec2.model.DeregisterImageRequest; //导入依赖的package包/类
@Override
public void deregisterImage(DeregisterImageRequest deregisterImageRequest) throws AmazonServiceException, AmazonClientException {
throw new UnsupportedOperationException("Not supported in mock");
}
开发者ID:justor,项目名称:elasticsearch_my,代码行数:5,代码来源:AmazonEC2Mock.java
示例4: deregisterAMI
import com.amazonaws.services.ec2.model.DeregisterImageRequest; //导入依赖的package包/类
public void deregisterAMI(String ami) {
log.info("Deregistering AMI " + ami);
ec2Client
.deregisterImage(new DeregisterImageRequest().withImageId(ami));
}
开发者ID:krujos,项目名称:data-lifecycle-service-broker,代码行数:6,代码来源:AWSHelper.java
示例5: deregister
import com.amazonaws.services.ec2.model.DeregisterImageRequest; //导入依赖的package包/类
@Override
public void deregister(DeregisterImageRequest request) {
deregister(request, null);
}
开发者ID:awslabs,项目名称:aws-sdk-java-resources,代码行数:5,代码来源:ImageImpl.java
示例6: imageUnregister
import com.amazonaws.services.ec2.model.DeregisterImageRequest; //导入依赖的package包/类
public void imageUnregister(final String imageId) throws Exception {
final DeregisterImageRequest request = new DeregisterImageRequest();
request.setImageId(imageId);
amazonClient.deregisterImage(request);
}
开发者ID:jwrapper,项目名称:jwrapper-maven-plugin,代码行数:9,代码来源:CarrotElasticCompute.java
示例7: deregister
import com.amazonaws.services.ec2.model.DeregisterImageRequest; //导入依赖的package包/类
/**
* Performs the <code>Deregister</code> action.
*
* <p>
* The following request parameters will be populated from the data of this
* <code>Image</code> resource, and any conflicting parameter value set in
* the request will be overridden:
* <ul>
* <li>
* <b><code>ImageId</code></b>
* - mapped from the <code>Id</code> identifier.
* </li>
* </ul>
*
* <p>
*
* @see DeregisterImageRequest
*/
void deregister(DeregisterImageRequest request);
开发者ID:awslabs,项目名称:aws-sdk-java-resources,代码行数:20,代码来源:Image.java
注:本文中的com.amazonaws.services.ec2.model.DeregisterImageRequest类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论