List of usage examples for com.amazonaws.services.ec2 AmazonEC2 disassociateRouteTable
DisassociateRouteTableResult disassociateRouteTable( DisassociateRouteTableRequest disassociateRouteTableRequest);
Disassociates a subnet from a route table.
From source file:com.urbancode.terraform.tasks.aws.helpers.AWSHelper.java
License:Apache License
/** * * @param associationId/*from w w w. j a v a2s. co m*/ * @param ec2Client */ public void disassociateRouteTableFromSubnet(String associationId, AmazonEC2 ec2Client) { try { DisassociateRouteTableRequest request = new DisassociateRouteTableRequest() .withAssociationId(associationId); ec2Client.disassociateRouteTable(request); } catch (AmazonServiceException e) { log.error("Failed to disassociate Route Table from Subnet", e); if (!"InvalidAssociationID.NotFound".equalsIgnoreCase(e.getErrorCode())) { throw e; } } }