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

项目:cmn-project    文件:DeleteInternetGatewayTask.java   
@Override
public void execute(Context context) throws Exception {
    new Runner<Void>()
        .maxAttempts(5)
        .retryInterval(Duration.ofSeconds(60))
        .retryOn(e -> e instanceof AmazonServiceException)
        .run(() -> {
            logger.info("delete internet gateway, internetGatewayId={}", resource.id);

            AWS.vpc.ec2.detachInternetGateway(new DetachInternetGatewayRequest()
                .withVpcId(resource.vpc.remoteVPC.getVpcId())
                .withInternetGatewayId(resource.remoteInternetGatewayId));
            AWS.vpc.ec2.deleteInternetGateway(new DeleteInternetGatewayRequest()
                .withInternetGatewayId(resource.remoteInternetGatewayId));
            return null;
        });
}
项目:aws-mock    文件:BaseTest.java   
/**
 * Delete internet gateway.
 *
 * @param internetGatewayId the internet gateway id
 * @return true if deleted
 */
protected final boolean deleteInternetGateway(final String internetGatewayId) {
    DeleteInternetGatewayRequest req = new DeleteInternetGatewayRequest();
    req.setInternetGatewayId(internetGatewayId);
    DeleteInternetGatewayResult result = amazonEC2Client.deleteInternetGateway(req);

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

    return false;
}
项目:elasticsearch_my    文件:AmazonEC2Mock.java   
@Override
public void deleteInternetGateway(DeleteInternetGatewayRequest deleteInternetGatewayRequest) throws AmazonServiceException, AmazonClientException {
    throw new UnsupportedOperationException("Not supported in mock");
}
项目:photon-model    文件:AWSNetworkClient.java   
public void deleteInternetGateway(String resourceID) {
    DeleteInternetGatewayRequest req = new DeleteInternetGatewayRequest()
            .withInternetGatewayId(resourceID);
    this.client.deleteInternetGateway(req);
}
项目:photon-model    文件:TestAWSSetupUtils.java   
/**
 * Delete an Internet Gateway.
 */
public static void deleteInternetGateway(AmazonEC2AsyncClient client, String internetGatewayId) {
    client.deleteInternetGateway(new DeleteInternetGatewayRequest().withInternetGatewayId(internetGatewayId));
}
项目:aws-sdk-java-resources    文件:InternetGatewayImpl.java   
@Override
public void delete(DeleteInternetGatewayRequest request) {
    delete(request, null);
}
项目:aws-sdk-java-resources    文件:InternetGatewayImpl.java   
@Override
public void delete(DeleteInternetGatewayRequest request, ResultCapture<Void>
        extractor) {

    resource.performAction("Delete", request, extractor);
}
项目:aws-sdk-java-resources    文件:InternetGateway.java   
/**
 * Performs the <code>Delete</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 DeleteInternetGatewayRequest
 */
void delete(DeleteInternetGatewayRequest request);
项目:aws-sdk-java-resources    文件:InternetGateway.java   
/**
 * Performs the <code>Delete</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 DeleteInternetGatewayRequest
 */
void delete(DeleteInternetGatewayRequest request, ResultCapture<Void>
        extractor);