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

项目:photon-model    文件:AWSNetworkClient.java   
/**
 * Delete a route table
 */
public DeferredResult<Void> deleteRouteTable(String routeTableId) {
    DeleteRouteTableRequest req = new DeleteRouteTableRequest()
            .withRouteTableId(routeTableId);

    String message = "Delete AWS Route Table with id [" + routeTableId + "].";

    AWSDeferredResultAsyncHandler<DeleteRouteTableRequest, DeleteRouteTableResult> handler = new
            AWSDeferredResultAsyncHandler<>(this.service, message);
    this.client.deleteRouteTableAsync(req, handler);
    return handler.toDeferredResult()
            .thenApply(ignore -> null);
}
项目:cmn-project    文件:DeleteRouteTableTask.java   
@Override
public void execute(Context context) throws Exception {
    logger.info("delete route table, routeTableId={}", resource.id);
    for (RouteTableAssociation association : resource.remoteRouteTable.getAssociations()) {
        AWS.vpc.ec2.disassociateRouteTable(new DisassociateRouteTableRequest().withAssociationId(association.getRouteTableAssociationId()));
    }
    AWS.vpc.ec2.deleteRouteTable(new DeleteRouteTableRequest().withRouteTableId(resource.remoteRouteTable.getRouteTableId()));
}
项目:aws-mock    文件:BaseTest.java   
/**
 * Delete route table.
 *
 * @param routeTableId the route table id
 * @return true if deleted
 */
protected final boolean deleteRouteTable(final String routeTableId) {
    DeleteRouteTableRequest req = new DeleteRouteTableRequest();
    req.setRouteTableId(routeTableId);
    DeleteRouteTableResult result = amazonEC2Client.deleteRouteTable(req);

    if (result != null) {
        return true;
    }

    return false;
}
项目:elasticsearch_my    文件:AmazonEC2Mock.java   
@Override
public void deleteRouteTable(DeleteRouteTableRequest deleteRouteTableRequest) throws AmazonServiceException, AmazonClientException {
    throw new UnsupportedOperationException("Not supported in mock");
}