/** * Create a route table */ public DeferredResult<String> createRouteTable(String vpcId) { CreateRouteTableRequest req = new CreateRouteTableRequest() .withVpcId(vpcId); String message = "Create AWS Route Table on VPC [" + vpcId + "]."; AWSDeferredResultAsyncHandler<CreateRouteTableRequest, CreateRouteTableResult> handler = new AWSDeferredResultAsyncHandler<>(this.service, message); this.client.createRouteTableAsync(req, handler); return handler.toDeferredResult() .thenApply(CreateRouteTableResult::getRouteTable) .thenApply(RouteTable::getRouteTableId); }
@Override public RouteTable createRouteTable(CreateRouteTableRequest request, ResultCapture<CreateRouteTableResult> extractor) { ActionResult result = resource.performAction("CreateRouteTable", request, extractor); if (result == null) return null; return new RouteTableImpl(result.getResource()); }
@Override public RouteTable createRouteTable(CreateRouteTableRequest request, ResultCapture<CreateRouteTableResult> extractor) { ActionResult result = service.performAction("CreateRouteTable", request, extractor); if (result == null) return null; return new RouteTableImpl(result.getResource()); }
/** * Create route table. * * @param vpcId the vpc id * @return RouteTable */ protected final RouteTable createRouteTable(final String vpcId) { RouteTable routeTable = null; CreateRouteTableRequest req = new CreateRouteTableRequest(); req.setVpcId(vpcId); CreateRouteTableResult result = amazonEC2Client.createRouteTable(req); if (result != null) { routeTable = result.getRouteTable(); } return routeTable; }
@Override public CreateRouteTableResult createRouteTable(CreateRouteTableRequest createRouteTableRequest) throws AmazonServiceException, AmazonClientException { throw new UnsupportedOperationException("Not supported in mock"); }
/** * Performs the <code>CreateRouteTable</code> action and use a ResultCapture * to retrieve the low-level client response. * * <p> * The following request parameters will be populated from the data of this * <code>Vpc</code> resource, and any conflicting parameter value set in the * request will be overridden: * <ul> * <li> * <b><code>VpcId</code></b> * - mapped from the <code>Id</code> identifier. * </li> * </ul> * * <p> * * @return The <code>RouteTable</code> resource object associated with the * result of this action. * @see CreateRouteTableRequest */ RouteTable createRouteTable(CreateRouteTableRequest request, ResultCapture<CreateRouteTableResult> extractor);
/** * Performs the <code>CreateRouteTable</code> action and use a ResultCapture * to retrieve the low-level client response. * * <p> * * @return The <code>RouteTable</code> resource object associated with the * result of this action. * @see CreateRouteTableRequest */ com.amazonaws.resources.ec2.RouteTable createRouteTable( CreateRouteTableRequest request, ResultCapture<CreateRouteTableResult> extractor);