All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.ec2.waiters.AmazonEC2Waiters Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon EC2 module holds the client classes that are used for communicating with Amazon EC2 Service

There is a newer version: 1.12.772
Show newest version
/*
 * Copyright 2014-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */
package com.amazonaws.services.ec2.waiters;

import javax.annotation.Generated;

import com.amazonaws.annotation.SdkInternalApi;
import com.amazonaws.services.ec2.AmazonEC2;
import com.amazonaws.services.ec2.model.*;
import com.amazonaws.waiters.*;

import java.util.concurrent.ExecutorService;

@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AmazonEC2Waiters {

    /**
     * Represents the service client
     */
    private final AmazonEC2 client;

    private final ExecutorService executorService = WaiterExecutorServiceFactory.buildExecutorServiceForWaiter("AmazonEC2Waiters");

    /**
     * Constructs a new AmazonEC2Waiters with the given client
     * 
     * @param client
     *        Service client
     */
    @SdkInternalApi
    public AmazonEC2Waiters(AmazonEC2 client) {
        this.client = client;
    }

    /**
     * Builds a PasswordDataAvailable waiter by using custom parameters waiterParameters and other parameters defined in
     * the waiters specification, and then polls until it determines whether the resource entered the desired state or
     * not, where polling criteria is bound by either default polling strategy or custom polling strategy.
     */
    public Waiter passwordDataAvailable() {

        return new WaiterBuilder().withSdkFunction(new GetPasswordDataFunction(client))
                .withAcceptors(new PasswordDataAvailable.IsTrueMatcher())
                .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(15)))
                .withExecutorService(executorService).build();
    }

    /**
     * Builds a VolumeInUse waiter by using custom parameters waiterParameters and other parameters defined in the
     * waiters specification, and then polls until it determines whether the resource entered the desired state or not,
     * where polling criteria is bound by either default polling strategy or custom polling strategy.
     */
    public Waiter volumeInUse() {

        return new WaiterBuilder().withSdkFunction(new DescribeVolumesFunction(client))
                .withAcceptors(new VolumeInUse.IsInuseMatcher(), new VolumeInUse.IsDeletedMatcher())
                .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(15)))
                .withExecutorService(executorService).build();
    }

    /**
     * Builds a ImageAvailable waiter by using custom parameters waiterParameters and other parameters defined in the
     * waiters specification, and then polls until it determines whether the resource entered the desired state or not,
     * where polling criteria is bound by either default polling strategy or custom polling strategy.
     */
    public Waiter imageAvailable() {

        return new WaiterBuilder().withSdkFunction(new DescribeImagesFunction(client))
                .withAcceptors(new ImageAvailable.IsAvailableMatcher(), new ImageAvailable.IsFailedMatcher())
                .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(15)))
                .withExecutorService(executorService).build();
    }

    /**
     * Builds a NetworkInterfaceAvailable waiter by using custom parameters waiterParameters and other parameters
     * defined in the waiters specification, and then polls until it determines whether the resource entered the desired
     * state or not, where polling criteria is bound by either default polling strategy or custom polling strategy.
     */
    public Waiter networkInterfaceAvailable() {

        return new WaiterBuilder()
                .withSdkFunction(new DescribeNetworkInterfacesFunction(client))
                .withAcceptors(new NetworkInterfaceAvailable.IsAvailableMatcher(), new NetworkInterfaceAvailable.IsInvalidNetworkInterfaceIDNotFoundMatcher())
                .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(10), new FixedDelayStrategy(20)))
                .withExecutorService(executorService).build();
    }

    /**
     * Builds a SystemStatusOk waiter by using custom parameters waiterParameters and other parameters defined in the
     * waiters specification, and then polls until it determines whether the resource entered the desired state or not,
     * where polling criteria is bound by either default polling strategy or custom polling strategy.
     */
    public Waiter systemStatusOk() {

        return new WaiterBuilder().withSdkFunction(new DescribeInstanceStatusFunction(client))
                .withAcceptors(new SystemStatusOk.IsOkMatcher())
                .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(15)))
                .withExecutorService(executorService).build();
    }

    /**
     * Builds a VpcPeeringConnectionExists waiter by using custom parameters waiterParameters and other parameters
     * defined in the waiters specification, and then polls until it determines whether the resource entered the desired
     * state or not, where polling criteria is bound by either default polling strategy or custom polling strategy.
     */
    public Waiter vpcPeeringConnectionExists() {

        return new WaiterBuilder()
                .withSdkFunction(new DescribeVpcPeeringConnectionsFunction(client))
                .withAcceptors(new HttpSuccessStatusAcceptor(WaiterState.SUCCESS),
                        new VpcPeeringConnectionExists.IsInvalidVpcPeeringConnectionIDNotFoundMatcher())
                .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(15)))
                .withExecutorService(executorService).build();
    }

    /**
     * Builds a VolumeAvailable waiter by using custom parameters waiterParameters and other parameters defined in the
     * waiters specification, and then polls until it determines whether the resource entered the desired state or not,
     * where polling criteria is bound by either default polling strategy or custom polling strategy.
     */
    public Waiter volumeAvailable() {

        return new WaiterBuilder().withSdkFunction(new DescribeVolumesFunction(client))
                .withAcceptors(new VolumeAvailable.IsAvailableMatcher(), new VolumeAvailable.IsDeletedMatcher())
                .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(15)))
                .withExecutorService(executorService).build();
    }

    /**
     * Builds a InstanceStatusOk waiter by using custom parameters waiterParameters and other parameters defined in the
     * waiters specification, and then polls until it determines whether the resource entered the desired state or not,
     * where polling criteria is bound by either default polling strategy or custom polling strategy.
     */
    public Waiter instanceStatusOk() {

        return new WaiterBuilder().withSdkFunction(new DescribeInstanceStatusFunction(client))
                .withAcceptors(new InstanceStatusOk.IsOkMatcher(), new InstanceStatusOk.IsInvalidInstanceIDNotFoundMatcher())
                .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(15)))
                .withExecutorService(executorService).build();
    }

    /**
     * Builds a VolumeDeleted waiter by using custom parameters waiterParameters and other parameters defined in the
     * waiters specification, and then polls until it determines whether the resource entered the desired state or not,
     * where polling criteria is bound by either default polling strategy or custom polling strategy.
     */
    public Waiter volumeDeleted() {

        return new WaiterBuilder().withSdkFunction(new DescribeVolumesFunction(client))
                .withAcceptors(new VolumeDeleted.IsDeletedMatcher(), new VolumeDeleted.IsInvalidVolumeNotFoundMatcher())
                .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(15)))
                .withExecutorService(executorService).build();
    }

    /**
     * Builds a CustomerGatewayAvailable waiter by using custom parameters waiterParameters and other parameters defined
     * in the waiters specification, and then polls until it determines whether the resource entered the desired state
     * or not, where polling criteria is bound by either default polling strategy or custom polling strategy.
     */
    public Waiter customerGatewayAvailable() {

        return new WaiterBuilder()
                .withSdkFunction(new DescribeCustomerGatewaysFunction(client))
                .withAcceptors(new CustomerGatewayAvailable.IsAvailableMatcher(), new CustomerGatewayAvailable.IsDeletedMatcher(),
                        new CustomerGatewayAvailable.IsDeletingMatcher())
                .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(15)))
                .withExecutorService(executorService).build();
    }

    /**
     * Builds a NatGatewayAvailable waiter by using custom parameters waiterParameters and other parameters defined in
     * the waiters specification, and then polls until it determines whether the resource entered the desired state or
     * not, where polling criteria is bound by either default polling strategy or custom polling strategy.
     */
    public Waiter natGatewayAvailable() {

        return new WaiterBuilder()
                .withSdkFunction(new DescribeNatGatewaysFunction(client))
                .withAcceptors(new NatGatewayAvailable.IsAvailableMatcher(), new NatGatewayAvailable.IsFailedMatcher(),
                        new NatGatewayAvailable.IsDeletingMatcher(), new NatGatewayAvailable.IsDeletedMatcher(),
                        new NatGatewayAvailable.IsNatGatewayNotFoundMatcher())
                .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(15)))
                .withExecutorService(executorService).build();
    }

    /**
     * Builds a VpcExists waiter by using custom parameters waiterParameters and other parameters defined in the waiters
     * specification, and then polls until it determines whether the resource entered the desired state or not, where
     * polling criteria is bound by either default polling strategy or custom polling strategy.
     */
    public Waiter vpcExists() {

        return new WaiterBuilder().withSdkFunction(new DescribeVpcsFunction(client))
                .withAcceptors(new HttpSuccessStatusAcceptor(WaiterState.SUCCESS), new VpcExists.IsInvalidVpcIDNotFoundMatcher())
                .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(5), new FixedDelayStrategy(1)))
                .withExecutorService(executorService).build();
    }

    /**
     * Builds a ConversionTaskDeleted waiter by using custom parameters waiterParameters and other parameters defined in
     * the waiters specification, and then polls until it determines whether the resource entered the desired state or
     * not, where polling criteria is bound by either default polling strategy or custom polling strategy.
     */
    public Waiter conversionTaskDeleted() {

        return new WaiterBuilder().withSdkFunction(new DescribeConversionTasksFunction(client))
                .withAcceptors(new ConversionTaskDeleted.IsDeletedMatcher())
                .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(15)))
                .withExecutorService(executorService).build();
    }

    /**
     * Builds a ImageExists waiter by using custom parameters waiterParameters and other parameters defined in the
     * waiters specification, and then polls until it determines whether the resource entered the desired state or not,
     * where polling criteria is bound by either default polling strategy or custom polling strategy.
     */
    public Waiter imageExists() {

        return new WaiterBuilder().withSdkFunction(new DescribeImagesFunction(client))
                .withAcceptors(new ImageExists.IsTrueMatcher(), new ImageExists.IsInvalidAMIIDNotFoundMatcher())
                .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(15)))
                .withExecutorService(executorService).build();
    }

    /**
     * Builds a VpcAvailable waiter by using custom parameters waiterParameters and other parameters defined in the
     * waiters specification, and then polls until it determines whether the resource entered the desired state or not,
     * where polling criteria is bound by either default polling strategy or custom polling strategy.
     */
    public Waiter vpcAvailable() {

        return new WaiterBuilder().withSdkFunction(new DescribeVpcsFunction(client))
                .withAcceptors(new VpcAvailable.IsAvailableMatcher())
                .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(15)))
                .withExecutorService(executorService).build();
    }

    /**
     * Builds a VpcPeeringConnectionDeleted waiter by using custom parameters waiterParameters and other parameters
     * defined in the waiters specification, and then polls until it determines whether the resource entered the desired
     * state or not, where polling criteria is bound by either default polling strategy or custom polling strategy.
     */
    public Waiter vpcPeeringConnectionDeleted() {

        return new WaiterBuilder()
                .withSdkFunction(new DescribeVpcPeeringConnectionsFunction(client))
                .withAcceptors(new VpcPeeringConnectionDeleted.IsDeletedMatcher(),
                        new VpcPeeringConnectionDeleted.IsInvalidVpcPeeringConnectionIDNotFoundMatcher())
                .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(15)))
                .withExecutorService(executorService).build();
    }

    /**
     * Builds a ConversionTaskCancelled waiter by using custom parameters waiterParameters and other parameters defined
     * in the waiters specification, and then polls until it determines whether the resource entered the desired state
     * or not, where polling criteria is bound by either default polling strategy or custom polling strategy.
     */
    public Waiter conversionTaskCancelled() {

        return new WaiterBuilder().withSdkFunction(new DescribeConversionTasksFunction(client))
                .withAcceptors(new ConversionTaskCancelled.IsCancelledMatcher())
                .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(15)))
                .withExecutorService(executorService).build();
    }

    /**
     * Builds a InstanceExists waiter by using custom parameters waiterParameters and other parameters defined in the
     * waiters specification, and then polls until it determines whether the resource entered the desired state or not,
     * where polling criteria is bound by either default polling strategy or custom polling strategy.
     */
    public Waiter instanceExists() {

        return new WaiterBuilder().withSdkFunction(new DescribeInstancesFunction(client))
                .withAcceptors(new InstanceExists.IsTrueMatcher(), new InstanceExists.IsInvalidInstanceIDNotFoundMatcher())
                .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(5)))
                .withExecutorService(executorService).build();
    }

    /**
     * Builds a InstanceTerminated waiter by using custom parameters waiterParameters and other parameters defined in
     * the waiters specification, and then polls until it determines whether the resource entered the desired state or
     * not, where polling criteria is bound by either default polling strategy or custom polling strategy.
     */
    public Waiter instanceTerminated() {

        return new WaiterBuilder()
                .withSdkFunction(new DescribeInstancesFunction(client))
                .withAcceptors(new InstanceTerminated.IsTerminatedMatcher(), new InstanceTerminated.IsPendingMatcher(),
                        new InstanceTerminated.IsStoppingMatcher())
                .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(15)))
                .withExecutorService(executorService).build();
    }

    /**
     * Builds a ConversionTaskCompleted waiter by using custom parameters waiterParameters and other parameters defined
     * in the waiters specification, and then polls until it determines whether the resource entered the desired state
     * or not, where polling criteria is bound by either default polling strategy or custom polling strategy.
     */
    public Waiter conversionTaskCompleted() {

        return new WaiterBuilder()
                .withSdkFunction(new DescribeConversionTasksFunction(client))
                .withAcceptors(new ConversionTaskCompleted.IsCompletedMatcher(), new ConversionTaskCompleted.IsCancelledMatcher(),
                        new ConversionTaskCompleted.IsCancellingMatcher())
                .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(15)))
                .withExecutorService(executorService).build();
    }

    /**
     * Builds a KeyPairExists waiter by using custom parameters waiterParameters and other parameters defined in the
     * waiters specification, and then polls until it determines whether the resource entered the desired state or not,
     * where polling criteria is bound by either default polling strategy or custom polling strategy.
     */
    public Waiter keyPairExists() {

        return new WaiterBuilder().withSdkFunction(new DescribeKeyPairsFunction(client))
                .withAcceptors(new KeyPairExists.IsTrueMatcher(), new KeyPairExists.IsInvalidKeyPairNotFoundMatcher())
                .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(6), new FixedDelayStrategy(5)))
                .withExecutorService(executorService).build();
    }

    /**
     * Builds a SpotInstanceRequestFulfilled waiter by using custom parameters waiterParameters and other parameters
     * defined in the waiters specification, and then polls until it determines whether the resource entered the desired
     * state or not, where polling criteria is bound by either default polling strategy or custom polling strategy.
     */
    public Waiter spotInstanceRequestFulfilled() {

        return new WaiterBuilder()
                .withSdkFunction(new DescribeSpotInstanceRequestsFunction(client))
                .withAcceptors(new SpotInstanceRequestFulfilled.IsFulfilledMatcher(),
                        new SpotInstanceRequestFulfilled.IsRequestcanceledandinstancerunningMatcher(),
                        new SpotInstanceRequestFulfilled.IsScheduleexpiredMatcher(), new SpotInstanceRequestFulfilled.IsCanceledbeforefulfillmentMatcher(),
                        new SpotInstanceRequestFulfilled.IsBadparametersMatcher(), new SpotInstanceRequestFulfilled.IsSystemerrorMatcher(),
                        new SpotInstanceRequestFulfilled.IsInvalidSpotInstanceRequestIDNotFoundMatcher())
                .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(15)))
                .withExecutorService(executorService).build();
    }

    /**
     * Builds a BundleTaskComplete waiter by using custom parameters waiterParameters and other parameters defined in
     * the waiters specification, and then polls until it determines whether the resource entered the desired state or
     * not, where polling criteria is bound by either default polling strategy or custom polling strategy.
     */
    public Waiter bundleTaskComplete() {

        return new WaiterBuilder().withSdkFunction(new DescribeBundleTasksFunction(client))
                .withAcceptors(new BundleTaskComplete.IsCompleteMatcher(), new BundleTaskComplete.IsFailedMatcher())
                .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(15)))
                .withExecutorService(executorService).build();
    }

    /**
     * Builds a InstanceRunning waiter by using custom parameters waiterParameters and other parameters defined in the
     * waiters specification, and then polls until it determines whether the resource entered the desired state or not,
     * where polling criteria is bound by either default polling strategy or custom polling strategy.
     */
    public Waiter instanceRunning() {

        return new WaiterBuilder()
                .withSdkFunction(new DescribeInstancesFunction(client))
                .withAcceptors(new InstanceRunning.IsRunningMatcher(), new InstanceRunning.IsShuttingdownMatcher(), new InstanceRunning.IsTerminatedMatcher(),
                        new InstanceRunning.IsStoppingMatcher(), new InstanceRunning.IsInvalidInstanceIDNotFoundMatcher())
                .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(15)))
                .withExecutorService(executorService).build();
    }

    /**
     * Builds a ExportTaskCompleted waiter by using custom parameters waiterParameters and other parameters defined in
     * the waiters specification, and then polls until it determines whether the resource entered the desired state or
     * not, where polling criteria is bound by either default polling strategy or custom polling strategy.
     */
    public Waiter exportTaskCompleted() {

        return new WaiterBuilder().withSdkFunction(new DescribeExportTasksFunction(client))
                .withAcceptors(new ExportTaskCompleted.IsCompletedMatcher())
                .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(15)))
                .withExecutorService(executorService).build();
    }

    /**
     * Builds a SnapshotCompleted waiter by using custom parameters waiterParameters and other parameters defined in the
     * waiters specification, and then polls until it determines whether the resource entered the desired state or not,
     * where polling criteria is bound by either default polling strategy or custom polling strategy.
     */
    public Waiter snapshotCompleted() {

        return new WaiterBuilder().withSdkFunction(new DescribeSnapshotsFunction(client))
                .withAcceptors(new SnapshotCompleted.IsCompletedMatcher())
                .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(15)))
                .withExecutorService(executorService).build();
    }

    /**
     * Builds a ExportTaskCancelled waiter by using custom parameters waiterParameters and other parameters defined in
     * the waiters specification, and then polls until it determines whether the resource entered the desired state or
     * not, where polling criteria is bound by either default polling strategy or custom polling strategy.
     */
    public Waiter exportTaskCancelled() {

        return new WaiterBuilder().withSdkFunction(new DescribeExportTasksFunction(client))
                .withAcceptors(new ExportTaskCancelled.IsCancelledMatcher())
                .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(15)))
                .withExecutorService(executorService).build();
    }

    /**
     * Builds a VpnConnectionDeleted waiter by using custom parameters waiterParameters and other parameters defined in
     * the waiters specification, and then polls until it determines whether the resource entered the desired state or
     * not, where polling criteria is bound by either default polling strategy or custom polling strategy.
     */
    public Waiter vpnConnectionDeleted() {

        return new WaiterBuilder().withSdkFunction(new DescribeVpnConnectionsFunction(client))
                .withAcceptors(new VpnConnectionDeleted.IsDeletedMatcher(), new VpnConnectionDeleted.IsPendingMatcher())
                .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(15)))
                .withExecutorService(executorService).build();
    }

    /**
     * Builds a VpnConnectionAvailable waiter by using custom parameters waiterParameters and other parameters defined
     * in the waiters specification, and then polls until it determines whether the resource entered the desired state
     * or not, where polling criteria is bound by either default polling strategy or custom polling strategy.
     */
    public Waiter vpnConnectionAvailable() {

        return new WaiterBuilder()
                .withSdkFunction(new DescribeVpnConnectionsFunction(client))
                .withAcceptors(new VpnConnectionAvailable.IsAvailableMatcher(), new VpnConnectionAvailable.IsDeletingMatcher(),
                        new VpnConnectionAvailable.IsDeletedMatcher())
                .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(15)))
                .withExecutorService(executorService).build();
    }

    /**
     * Builds a InstanceStopped waiter by using custom parameters waiterParameters and other parameters defined in the
     * waiters specification, and then polls until it determines whether the resource entered the desired state or not,
     * where polling criteria is bound by either default polling strategy or custom polling strategy.
     */
    public Waiter instanceStopped() {

        return new WaiterBuilder().withSdkFunction(new DescribeInstancesFunction(client))
                .withAcceptors(new InstanceStopped.IsStoppedMatcher(), new InstanceStopped.IsPendingMatcher(), new InstanceStopped.IsTerminatedMatcher())
                .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(15)))
                .withExecutorService(executorService).build();
    }

    /**
     * Builds a SubnetAvailable waiter by using custom parameters waiterParameters and other parameters defined in the
     * waiters specification, and then polls until it determines whether the resource entered the desired state or not,
     * where polling criteria is bound by either default polling strategy or custom polling strategy.
     */
    public Waiter subnetAvailable() {

        return new WaiterBuilder().withSdkFunction(new DescribeSubnetsFunction(client))
                .withAcceptors(new SubnetAvailable.IsAvailableMatcher())
                .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(15)))
                .withExecutorService(executorService).build();
    }

    public void shutdown() {
        executorService.shutdown();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy