/** * Attach an Internet Gateway to a VPC. */ public static void attachInternetGateway(AmazonEC2AsyncClient client, String vpcId, String internetGatewayId) { client.attachInternetGateway( new AttachInternetGatewayRequest() .withVpcId(vpcId) .withInternetGatewayId(internetGatewayId)); }
/** * Attach internet gateway with Vpc. * * @param internetGatewayId the internet gateway id * @param vpcId the vpc id * @return true if attach */ protected final boolean attachInternetGateway(final String internetGatewayId, final String vpcId) { AttachInternetGatewayRequest req = new AttachInternetGatewayRequest(); req.setInternetGatewayId(internetGatewayId); req.setVpcId(vpcId); AttachInternetGatewayResult result = amazonEC2Client.attachInternetGateway(req); if (result != null) { return true; } return false; }
@Override public void attachInternetGateway(AttachInternetGatewayRequest attachInternetGatewayRequest) throws AmazonServiceException, AmazonClientException { throw new UnsupportedOperationException("Not supported in mock"); }
public void attachInternetGateway(String vpcId, String gatewayId) { AttachInternetGatewayRequest req = new AttachInternetGatewayRequest() .withVpcId(vpcId) .withInternetGatewayId(gatewayId); this.client.attachInternetGateway(req); }
public InternetGateway createInternetGateway(String vpcId) { logger.info("create internet gateway, vpcId={}", vpcId); InternetGateway internetGateway = ec2.createInternetGateway().getInternetGateway(); ec2.attachInternetGateway(new AttachInternetGatewayRequest().withVpcId(vpcId).withInternetGatewayId(internetGateway.getInternetGatewayId())); return internetGateway; }
@Override public void attachInternetGateway(AttachInternetGatewayRequest request) { attachInternetGateway(request, null); }
@Override public void attachInternetGateway(AttachInternetGatewayRequest request, ResultCapture<Void> extractor) { resource.performAction("AttachInternetGateway", request, extractor); }
@Override public void attachToVpc(AttachInternetGatewayRequest request) { attachToVpc(request, null); }
@Override public void attachToVpc(AttachInternetGatewayRequest request, ResultCapture<Void> extractor) { resource.performAction("AttachToVpc", request, extractor); }
/** * Performs the <code>AttachInternetGateway</code> action. * * <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> * * @see AttachInternetGatewayRequest */ void attachInternetGateway(AttachInternetGatewayRequest request);
/** * Performs the <code>AttachInternetGateway</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> * * @see AttachInternetGatewayRequest */ void attachInternetGateway(AttachInternetGatewayRequest request, ResultCapture<Void> extractor);
/** * Performs the <code>AttachToVpc</code> action. * * <p> * The following request parameters will be populated from the data of this * <code>InternetGateway</code> resource, and any conflicting parameter * value set in the request will be overridden: * <ul> * <li> * <b><code>InternetGatewayId</code></b> * - mapped from the <code>Id</code> identifier. * </li> * </ul> * * <p> * * @see AttachInternetGatewayRequest */ void attachToVpc(AttachInternetGatewayRequest request);
/** * Performs the <code>AttachToVpc</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>InternetGateway</code> resource, and any conflicting parameter * value set in the request will be overridden: * <ul> * <li> * <b><code>InternetGatewayId</code></b> * - mapped from the <code>Id</code> identifier. * </li> * </ul> * * <p> * * @see AttachInternetGatewayRequest */ void attachToVpc(AttachInternetGatewayRequest request, ResultCapture<Void> extractor);