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

项目: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()));
}
项目:cfnassist    文件:VPCVisitor.java   
private void visitRouteTable(VPCDiagramBuilder vpcDiagram, RouteTable routeTable) throws CfnAssistException {
logger.debug("visit routetable " + routeTable.getRouteTableId());
List<Route> routes = routeTable.getRoutes();
List<RouteTableAssociation> usersOfTable = routeTable.getAssociations();
for (RouteTableAssociation usedBy : usersOfTable) {
    String subnetId = usedBy.getSubnetId(); // can subnet ever be null in an association?

    if (subnetId!=null) {
        vpcDiagram.addAsssociatedRouteTable(routeTable, subnetId); // possible duplication if route table reused?
        for (Route route : routes) {
            vpcDiagram.addRoute(routeTable.getRouteTableId(), subnetId, route);
        }
    } 
}
}
项目:vpcviewer    文件:RouteTableAssociationDTO.java   
public RouteTableAssociationDTO(final RouteTableAssociation rta) {
    this.routeTableAssociationId = rta.getRouteTableAssociationId();
    this.routeTableId = rta.getRouteTableId();
    this.subnetId = rta.getSubnetId();
    this.main = rta.getMain();
}