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

software.amazon.awssdk.services.eks.waiters.EksWaiter Maven / Gradle / Ivy

/*
 * Copyright 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 software.amazon.awssdk.services.eks.waiters;

import java.util.function.Consumer;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.annotations.Immutable;
import software.amazon.awssdk.annotations.SdkPublicApi;
import software.amazon.awssdk.annotations.ThreadSafe;
import software.amazon.awssdk.core.waiters.WaiterOverrideConfiguration;
import software.amazon.awssdk.core.waiters.WaiterResponse;
import software.amazon.awssdk.services.eks.EksClient;
import software.amazon.awssdk.services.eks.model.DescribeAddonRequest;
import software.amazon.awssdk.services.eks.model.DescribeAddonResponse;
import software.amazon.awssdk.services.eks.model.DescribeClusterRequest;
import software.amazon.awssdk.services.eks.model.DescribeClusterResponse;
import software.amazon.awssdk.services.eks.model.DescribeFargateProfileRequest;
import software.amazon.awssdk.services.eks.model.DescribeFargateProfileResponse;
import software.amazon.awssdk.services.eks.model.DescribeNodegroupRequest;
import software.amazon.awssdk.services.eks.model.DescribeNodegroupResponse;
import software.amazon.awssdk.utils.SdkAutoCloseable;

/**
 * Waiter utility class that polls a resource until a desired state is reached or until it is determined that the
 * resource will never enter into the desired state. This can be created using the static {@link #builder()} method
 */
@Generated("software.amazon.awssdk:codegen")
@SdkPublicApi
@ThreadSafe
@Immutable
public interface EksWaiter extends SdkAutoCloseable {
    /**
     * Polls {@link EksClient#describeAddon} API until the desired condition {@code AddonActive} is met, or until it is
     * determined that the resource will never enter into the desired state
     *
     * @param describeAddonRequest
     *        the request to be used for polling
     * @return WaiterResponse containing either a response or an exception that has matched with the waiter success
     *         condition
     */
    default WaiterResponse waitUntilAddonActive(DescribeAddonRequest describeAddonRequest) {
        throw new UnsupportedOperationException();
    }

    /**
     * Polls {@link EksClient#describeAddon} API until the desired condition {@code AddonActive} is met, or until it is
     * determined that the resource will never enter into the desired state.
     * 

* This is a convenience method to create an instance of the request builder without the need to create one manually * using {@link DescribeAddonRequest#builder()} * * @param describeAddonRequest * The consumer that will configure the request to be used for polling * @return WaiterResponse containing either a response or an exception that has matched with the waiter success * condition */ default WaiterResponse waitUntilAddonActive(Consumer describeAddonRequest) { return waitUntilAddonActive(DescribeAddonRequest.builder().applyMutation(describeAddonRequest).build()); } /** * Polls {@link EksClient#describeAddon} API until the desired condition {@code AddonActive} is met, or until it is * determined that the resource will never enter into the desired state * * @param describeAddonRequest * The request to be used for polling * @param overrideConfig * Per request override configuration for waiters * @return WaiterResponse containing either a response or an exception that has matched with the waiter success * condition */ default WaiterResponse waitUntilAddonActive(DescribeAddonRequest describeAddonRequest, WaiterOverrideConfiguration overrideConfig) { throw new UnsupportedOperationException(); } /** * Polls {@link EksClient#describeAddon} API until the desired condition {@code AddonActive} is met, or until it is * determined that the resource will never enter into the desired state. *

* This is a convenience method to create an instance of the request builder and instance of the override config * builder * * @param describeAddonRequest * The consumer that will configure the request to be used for polling * @param overrideConfig * The consumer that will configure the per request override configuration for waiters * @return WaiterResponse containing either a response or an exception that has matched with the waiter success * condition */ default WaiterResponse waitUntilAddonActive( Consumer describeAddonRequest, Consumer overrideConfig) { return waitUntilAddonActive(DescribeAddonRequest.builder().applyMutation(describeAddonRequest).build(), WaiterOverrideConfiguration.builder().applyMutation(overrideConfig).build()); } /** * Polls {@link EksClient#describeAddon} API until the desired condition {@code AddonDeleted} is met, or until it is * determined that the resource will never enter into the desired state * * @param describeAddonRequest * the request to be used for polling * @return WaiterResponse containing either a response or an exception that has matched with the waiter success * condition */ default WaiterResponse waitUntilAddonDeleted(DescribeAddonRequest describeAddonRequest) { throw new UnsupportedOperationException(); } /** * Polls {@link EksClient#describeAddon} API until the desired condition {@code AddonDeleted} is met, or until it is * determined that the resource will never enter into the desired state. *

* This is a convenience method to create an instance of the request builder without the need to create one manually * using {@link DescribeAddonRequest#builder()} * * @param describeAddonRequest * The consumer that will configure the request to be used for polling * @return WaiterResponse containing either a response or an exception that has matched with the waiter success * condition */ default WaiterResponse waitUntilAddonDeleted( Consumer describeAddonRequest) { return waitUntilAddonDeleted(DescribeAddonRequest.builder().applyMutation(describeAddonRequest).build()); } /** * Polls {@link EksClient#describeAddon} API until the desired condition {@code AddonDeleted} is met, or until it is * determined that the resource will never enter into the desired state * * @param describeAddonRequest * The request to be used for polling * @param overrideConfig * Per request override configuration for waiters * @return WaiterResponse containing either a response or an exception that has matched with the waiter success * condition */ default WaiterResponse waitUntilAddonDeleted(DescribeAddonRequest describeAddonRequest, WaiterOverrideConfiguration overrideConfig) { throw new UnsupportedOperationException(); } /** * Polls {@link EksClient#describeAddon} API until the desired condition {@code AddonDeleted} is met, or until it is * determined that the resource will never enter into the desired state. *

* This is a convenience method to create an instance of the request builder and instance of the override config * builder * * @param describeAddonRequest * The consumer that will configure the request to be used for polling * @param overrideConfig * The consumer that will configure the per request override configuration for waiters * @return WaiterResponse containing either a response or an exception that has matched with the waiter success * condition */ default WaiterResponse waitUntilAddonDeleted( Consumer describeAddonRequest, Consumer overrideConfig) { return waitUntilAddonDeleted(DescribeAddonRequest.builder().applyMutation(describeAddonRequest).build(), WaiterOverrideConfiguration.builder().applyMutation(overrideConfig).build()); } /** * Polls {@link EksClient#describeCluster} API until the desired condition {@code ClusterActive} is met, or until it * is determined that the resource will never enter into the desired state * * @param describeClusterRequest * the request to be used for polling * @return WaiterResponse containing either a response or an exception that has matched with the waiter success * condition */ default WaiterResponse waitUntilClusterActive(DescribeClusterRequest describeClusterRequest) { throw new UnsupportedOperationException(); } /** * Polls {@link EksClient#describeCluster} API until the desired condition {@code ClusterActive} is met, or until it * is determined that the resource will never enter into the desired state. *

* This is a convenience method to create an instance of the request builder without the need to create one manually * using {@link DescribeClusterRequest#builder()} * * @param describeClusterRequest * The consumer that will configure the request to be used for polling * @return WaiterResponse containing either a response or an exception that has matched with the waiter success * condition */ default WaiterResponse waitUntilClusterActive( Consumer describeClusterRequest) { return waitUntilClusterActive(DescribeClusterRequest.builder().applyMutation(describeClusterRequest).build()); } /** * Polls {@link EksClient#describeCluster} API until the desired condition {@code ClusterActive} is met, or until it * is determined that the resource will never enter into the desired state * * @param describeClusterRequest * The request to be used for polling * @param overrideConfig * Per request override configuration for waiters * @return WaiterResponse containing either a response or an exception that has matched with the waiter success * condition */ default WaiterResponse waitUntilClusterActive(DescribeClusterRequest describeClusterRequest, WaiterOverrideConfiguration overrideConfig) { throw new UnsupportedOperationException(); } /** * Polls {@link EksClient#describeCluster} API until the desired condition {@code ClusterActive} is met, or until it * is determined that the resource will never enter into the desired state. *

* This is a convenience method to create an instance of the request builder and instance of the override config * builder * * @param describeClusterRequest * The consumer that will configure the request to be used for polling * @param overrideConfig * The consumer that will configure the per request override configuration for waiters * @return WaiterResponse containing either a response or an exception that has matched with the waiter success * condition */ default WaiterResponse waitUntilClusterActive( Consumer describeClusterRequest, Consumer overrideConfig) { return waitUntilClusterActive(DescribeClusterRequest.builder().applyMutation(describeClusterRequest).build(), WaiterOverrideConfiguration.builder().applyMutation(overrideConfig).build()); } /** * Polls {@link EksClient#describeCluster} API until the desired condition {@code ClusterDeleted} is met, or until * it is determined that the resource will never enter into the desired state * * @param describeClusterRequest * the request to be used for polling * @return WaiterResponse containing either a response or an exception that has matched with the waiter success * condition */ default WaiterResponse waitUntilClusterDeleted(DescribeClusterRequest describeClusterRequest) { throw new UnsupportedOperationException(); } /** * Polls {@link EksClient#describeCluster} API until the desired condition {@code ClusterDeleted} is met, or until * it is determined that the resource will never enter into the desired state. *

* This is a convenience method to create an instance of the request builder without the need to create one manually * using {@link DescribeClusterRequest#builder()} * * @param describeClusterRequest * The consumer that will configure the request to be used for polling * @return WaiterResponse containing either a response or an exception that has matched with the waiter success * condition */ default WaiterResponse waitUntilClusterDeleted( Consumer describeClusterRequest) { return waitUntilClusterDeleted(DescribeClusterRequest.builder().applyMutation(describeClusterRequest).build()); } /** * Polls {@link EksClient#describeCluster} API until the desired condition {@code ClusterDeleted} is met, or until * it is determined that the resource will never enter into the desired state * * @param describeClusterRequest * The request to be used for polling * @param overrideConfig * Per request override configuration for waiters * @return WaiterResponse containing either a response or an exception that has matched with the waiter success * condition */ default WaiterResponse waitUntilClusterDeleted(DescribeClusterRequest describeClusterRequest, WaiterOverrideConfiguration overrideConfig) { throw new UnsupportedOperationException(); } /** * Polls {@link EksClient#describeCluster} API until the desired condition {@code ClusterDeleted} is met, or until * it is determined that the resource will never enter into the desired state. *

* This is a convenience method to create an instance of the request builder and instance of the override config * builder * * @param describeClusterRequest * The consumer that will configure the request to be used for polling * @param overrideConfig * The consumer that will configure the per request override configuration for waiters * @return WaiterResponse containing either a response or an exception that has matched with the waiter success * condition */ default WaiterResponse waitUntilClusterDeleted( Consumer describeClusterRequest, Consumer overrideConfig) { return waitUntilClusterDeleted(DescribeClusterRequest.builder().applyMutation(describeClusterRequest).build(), WaiterOverrideConfiguration.builder().applyMutation(overrideConfig).build()); } /** * Polls {@link EksClient#describeFargateProfile} API until the desired condition {@code FargateProfileActive} is * met, or until it is determined that the resource will never enter into the desired state * * @param describeFargateProfileRequest * the request to be used for polling * @return WaiterResponse containing either a response or an exception that has matched with the waiter success * condition */ default WaiterResponse waitUntilFargateProfileActive( DescribeFargateProfileRequest describeFargateProfileRequest) { throw new UnsupportedOperationException(); } /** * Polls {@link EksClient#describeFargateProfile} API until the desired condition {@code FargateProfileActive} is * met, or until it is determined that the resource will never enter into the desired state. *

* This is a convenience method to create an instance of the request builder without the need to create one manually * using {@link DescribeFargateProfileRequest#builder()} * * @param describeFargateProfileRequest * The consumer that will configure the request to be used for polling * @return WaiterResponse containing either a response or an exception that has matched with the waiter success * condition */ default WaiterResponse waitUntilFargateProfileActive( Consumer describeFargateProfileRequest) { return waitUntilFargateProfileActive(DescribeFargateProfileRequest.builder().applyMutation(describeFargateProfileRequest) .build()); } /** * Polls {@link EksClient#describeFargateProfile} API until the desired condition {@code FargateProfileActive} is * met, or until it is determined that the resource will never enter into the desired state * * @param describeFargateProfileRequest * The request to be used for polling * @param overrideConfig * Per request override configuration for waiters * @return WaiterResponse containing either a response or an exception that has matched with the waiter success * condition */ default WaiterResponse waitUntilFargateProfileActive( DescribeFargateProfileRequest describeFargateProfileRequest, WaiterOverrideConfiguration overrideConfig) { throw new UnsupportedOperationException(); } /** * Polls {@link EksClient#describeFargateProfile} API until the desired condition {@code FargateProfileActive} is * met, or until it is determined that the resource will never enter into the desired state. *

* This is a convenience method to create an instance of the request builder and instance of the override config * builder * * @param describeFargateProfileRequest * The consumer that will configure the request to be used for polling * @param overrideConfig * The consumer that will configure the per request override configuration for waiters * @return WaiterResponse containing either a response or an exception that has matched with the waiter success * condition */ default WaiterResponse waitUntilFargateProfileActive( Consumer describeFargateProfileRequest, Consumer overrideConfig) { return waitUntilFargateProfileActive(DescribeFargateProfileRequest.builder().applyMutation(describeFargateProfileRequest) .build(), WaiterOverrideConfiguration.builder().applyMutation(overrideConfig).build()); } /** * Polls {@link EksClient#describeFargateProfile} API until the desired condition {@code FargateProfileDeleted} is * met, or until it is determined that the resource will never enter into the desired state * * @param describeFargateProfileRequest * the request to be used for polling * @return WaiterResponse containing either a response or an exception that has matched with the waiter success * condition */ default WaiterResponse waitUntilFargateProfileDeleted( DescribeFargateProfileRequest describeFargateProfileRequest) { throw new UnsupportedOperationException(); } /** * Polls {@link EksClient#describeFargateProfile} API until the desired condition {@code FargateProfileDeleted} is * met, or until it is determined that the resource will never enter into the desired state. *

* This is a convenience method to create an instance of the request builder without the need to create one manually * using {@link DescribeFargateProfileRequest#builder()} * * @param describeFargateProfileRequest * The consumer that will configure the request to be used for polling * @return WaiterResponse containing either a response or an exception that has matched with the waiter success * condition */ default WaiterResponse waitUntilFargateProfileDeleted( Consumer describeFargateProfileRequest) { return waitUntilFargateProfileDeleted(DescribeFargateProfileRequest.builder() .applyMutation(describeFargateProfileRequest).build()); } /** * Polls {@link EksClient#describeFargateProfile} API until the desired condition {@code FargateProfileDeleted} is * met, or until it is determined that the resource will never enter into the desired state * * @param describeFargateProfileRequest * The request to be used for polling * @param overrideConfig * Per request override configuration for waiters * @return WaiterResponse containing either a response or an exception that has matched with the waiter success * condition */ default WaiterResponse waitUntilFargateProfileDeleted( DescribeFargateProfileRequest describeFargateProfileRequest, WaiterOverrideConfiguration overrideConfig) { throw new UnsupportedOperationException(); } /** * Polls {@link EksClient#describeFargateProfile} API until the desired condition {@code FargateProfileDeleted} is * met, or until it is determined that the resource will never enter into the desired state. *

* This is a convenience method to create an instance of the request builder and instance of the override config * builder * * @param describeFargateProfileRequest * The consumer that will configure the request to be used for polling * @param overrideConfig * The consumer that will configure the per request override configuration for waiters * @return WaiterResponse containing either a response or an exception that has matched with the waiter success * condition */ default WaiterResponse waitUntilFargateProfileDeleted( Consumer describeFargateProfileRequest, Consumer overrideConfig) { return waitUntilFargateProfileDeleted(DescribeFargateProfileRequest.builder() .applyMutation(describeFargateProfileRequest).build(), WaiterOverrideConfiguration.builder().applyMutation(overrideConfig).build()); } /** * Polls {@link EksClient#describeNodegroup} API until the desired condition {@code NodegroupActive} is met, or * until it is determined that the resource will never enter into the desired state * * @param describeNodegroupRequest * the request to be used for polling * @return WaiterResponse containing either a response or an exception that has matched with the waiter success * condition */ default WaiterResponse waitUntilNodegroupActive(DescribeNodegroupRequest describeNodegroupRequest) { throw new UnsupportedOperationException(); } /** * Polls {@link EksClient#describeNodegroup} API until the desired condition {@code NodegroupActive} is met, or * until it is determined that the resource will never enter into the desired state. *

* This is a convenience method to create an instance of the request builder without the need to create one manually * using {@link DescribeNodegroupRequest#builder()} * * @param describeNodegroupRequest * The consumer that will configure the request to be used for polling * @return WaiterResponse containing either a response or an exception that has matched with the waiter success * condition */ default WaiterResponse waitUntilNodegroupActive( Consumer describeNodegroupRequest) { return waitUntilNodegroupActive(DescribeNodegroupRequest.builder().applyMutation(describeNodegroupRequest).build()); } /** * Polls {@link EksClient#describeNodegroup} API until the desired condition {@code NodegroupActive} is met, or * until it is determined that the resource will never enter into the desired state * * @param describeNodegroupRequest * The request to be used for polling * @param overrideConfig * Per request override configuration for waiters * @return WaiterResponse containing either a response or an exception that has matched with the waiter success * condition */ default WaiterResponse waitUntilNodegroupActive(DescribeNodegroupRequest describeNodegroupRequest, WaiterOverrideConfiguration overrideConfig) { throw new UnsupportedOperationException(); } /** * Polls {@link EksClient#describeNodegroup} API until the desired condition {@code NodegroupActive} is met, or * until it is determined that the resource will never enter into the desired state. *

* This is a convenience method to create an instance of the request builder and instance of the override config * builder * * @param describeNodegroupRequest * The consumer that will configure the request to be used for polling * @param overrideConfig * The consumer that will configure the per request override configuration for waiters * @return WaiterResponse containing either a response or an exception that has matched with the waiter success * condition */ default WaiterResponse waitUntilNodegroupActive( Consumer describeNodegroupRequest, Consumer overrideConfig) { return waitUntilNodegroupActive(DescribeNodegroupRequest.builder().applyMutation(describeNodegroupRequest).build(), WaiterOverrideConfiguration.builder().applyMutation(overrideConfig).build()); } /** * Polls {@link EksClient#describeNodegroup} API until the desired condition {@code NodegroupDeleted} is met, or * until it is determined that the resource will never enter into the desired state * * @param describeNodegroupRequest * the request to be used for polling * @return WaiterResponse containing either a response or an exception that has matched with the waiter success * condition */ default WaiterResponse waitUntilNodegroupDeleted(DescribeNodegroupRequest describeNodegroupRequest) { throw new UnsupportedOperationException(); } /** * Polls {@link EksClient#describeNodegroup} API until the desired condition {@code NodegroupDeleted} is met, or * until it is determined that the resource will never enter into the desired state. *

* This is a convenience method to create an instance of the request builder without the need to create one manually * using {@link DescribeNodegroupRequest#builder()} * * @param describeNodegroupRequest * The consumer that will configure the request to be used for polling * @return WaiterResponse containing either a response or an exception that has matched with the waiter success * condition */ default WaiterResponse waitUntilNodegroupDeleted( Consumer describeNodegroupRequest) { return waitUntilNodegroupDeleted(DescribeNodegroupRequest.builder().applyMutation(describeNodegroupRequest).build()); } /** * Polls {@link EksClient#describeNodegroup} API until the desired condition {@code NodegroupDeleted} is met, or * until it is determined that the resource will never enter into the desired state * * @param describeNodegroupRequest * The request to be used for polling * @param overrideConfig * Per request override configuration for waiters * @return WaiterResponse containing either a response or an exception that has matched with the waiter success * condition */ default WaiterResponse waitUntilNodegroupDeleted( DescribeNodegroupRequest describeNodegroupRequest, WaiterOverrideConfiguration overrideConfig) { throw new UnsupportedOperationException(); } /** * Polls {@link EksClient#describeNodegroup} API until the desired condition {@code NodegroupDeleted} is met, or * until it is determined that the resource will never enter into the desired state. *

* This is a convenience method to create an instance of the request builder and instance of the override config * builder * * @param describeNodegroupRequest * The consumer that will configure the request to be used for polling * @param overrideConfig * The consumer that will configure the per request override configuration for waiters * @return WaiterResponse containing either a response or an exception that has matched with the waiter success * condition */ default WaiterResponse waitUntilNodegroupDeleted( Consumer describeNodegroupRequest, Consumer overrideConfig) { return waitUntilNodegroupDeleted(DescribeNodegroupRequest.builder().applyMutation(describeNodegroupRequest).build(), WaiterOverrideConfiguration.builder().applyMutation(overrideConfig).build()); } /** * Create a builder that can be used to configure and create a {@link EksWaiter}. * * @return a builder */ static Builder builder() { return DefaultEksWaiter.builder(); } /** * Create an instance of {@link EksWaiter} with the default configuration. *

* A default {@link EksClient} will be created to poll resources. It is recommended to share a single instance of * the waiter created via this method. If it is not desirable to share a waiter instance, invoke {@link #close()} to * release the resources once the waiter is not needed. * * @return an instance of {@link EksWaiter} */ static EksWaiter create() { return DefaultEksWaiter.builder().build(); } interface Builder { /** * Defines overrides to the default SDK waiter configuration that should be used for waiters created from this * builder * * @param overrideConfiguration * the override configuration to set * @return a reference to this object so that method calls can be chained together. */ Builder overrideConfiguration(WaiterOverrideConfiguration overrideConfiguration); /** * This is a convenient method to pass the override configuration without the need to create an instance * manually via {@link WaiterOverrideConfiguration#builder()} * * @param overrideConfiguration * The consumer that will configure the overrideConfiguration * @return a reference to this object so that method calls can be chained together. * @see #overrideConfiguration(WaiterOverrideConfiguration) */ default Builder overrideConfiguration(Consumer overrideConfiguration) { WaiterOverrideConfiguration.Builder builder = WaiterOverrideConfiguration.builder(); overrideConfiguration.accept(builder); return overrideConfiguration(builder.build()); } /** * Sets a custom {@link EksClient} that will be used to poll the resource *

* This SDK client must be closed by the caller when it is ready to be disposed. The SDK will not close the * client when the waiter is closed * * @param client * the client to send the request * @return a reference to this object so that method calls can be chained together. */ Builder client(EksClient client); /** * Builds an instance of {@link EksWaiter} based on the configurations supplied to this builder * * @return An initialized {@link EksWaiter} */ EksWaiter build(); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy