software.amazon.awssdk.services.rds.waiters.RdsWaiter Maven / Gradle / Ivy
Show all versions of rds Show documentation
/*
* 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.rds.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.rds.RdsClient;
import software.amazon.awssdk.services.rds.model.DescribeDbClusterSnapshotsRequest;
import software.amazon.awssdk.services.rds.model.DescribeDbClusterSnapshotsResponse;
import software.amazon.awssdk.services.rds.model.DescribeDbClustersRequest;
import software.amazon.awssdk.services.rds.model.DescribeDbClustersResponse;
import software.amazon.awssdk.services.rds.model.DescribeDbInstancesRequest;
import software.amazon.awssdk.services.rds.model.DescribeDbInstancesResponse;
import software.amazon.awssdk.services.rds.model.DescribeDbSnapshotsRequest;
import software.amazon.awssdk.services.rds.model.DescribeDbSnapshotsResponse;
import software.amazon.awssdk.services.rds.model.DescribeTenantDatabasesRequest;
import software.amazon.awssdk.services.rds.model.DescribeTenantDatabasesResponse;
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 RdsWaiter extends SdkAutoCloseable {
/**
* Polls {@link RdsClient#describeDBClusters} API until the desired condition {@code DBClusterAvailable} is met, or
* until it is determined that the resource will never enter into the desired state
*
* @param describeDbClustersRequest
* 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 waitUntilDBClusterAvailable(
DescribeDbClustersRequest describeDbClustersRequest) {
throw new UnsupportedOperationException();
}
/**
* Polls {@link RdsClient#describeDBClusters} API until the desired condition {@code DBClusterAvailable} 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 DescribeDbClustersRequest#builder()}
*
* @param describeDbClustersRequest
* 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 waitUntilDBClusterAvailable(
Consumer describeDbClustersRequest) {
return waitUntilDBClusterAvailable(DescribeDbClustersRequest.builder().applyMutation(describeDbClustersRequest).build());
}
/**
* Polls {@link RdsClient#describeDBClusters} API until the desired condition {@code DBClusterAvailable} is met, or
* until it is determined that the resource will never enter into the desired state
*
* @param describeDbClustersRequest
* 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 waitUntilDBClusterAvailable(
DescribeDbClustersRequest describeDbClustersRequest, WaiterOverrideConfiguration overrideConfig) {
throw new UnsupportedOperationException();
}
/**
* Polls {@link RdsClient#describeDBClusters} API until the desired condition {@code DBClusterAvailable} 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 describeDbClustersRequest
* 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 waitUntilDBClusterAvailable(
Consumer describeDbClustersRequest,
Consumer overrideConfig) {
return waitUntilDBClusterAvailable(DescribeDbClustersRequest.builder().applyMutation(describeDbClustersRequest).build(),
WaiterOverrideConfiguration.builder().applyMutation(overrideConfig).build());
}
/**
* Polls {@link RdsClient#describeDBClusters} API until the desired condition {@code DBClusterDeleted} is met, or
* until it is determined that the resource will never enter into the desired state
*
* @param describeDbClustersRequest
* 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 waitUntilDBClusterDeleted(
DescribeDbClustersRequest describeDbClustersRequest) {
throw new UnsupportedOperationException();
}
/**
* Polls {@link RdsClient#describeDBClusters} API until the desired condition {@code DBClusterDeleted} 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 DescribeDbClustersRequest#builder()}
*
* @param describeDbClustersRequest
* 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 waitUntilDBClusterDeleted(
Consumer describeDbClustersRequest) {
return waitUntilDBClusterDeleted(DescribeDbClustersRequest.builder().applyMutation(describeDbClustersRequest).build());
}
/**
* Polls {@link RdsClient#describeDBClusters} API until the desired condition {@code DBClusterDeleted} is met, or
* until it is determined that the resource will never enter into the desired state
*
* @param describeDbClustersRequest
* 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 waitUntilDBClusterDeleted(
DescribeDbClustersRequest describeDbClustersRequest, WaiterOverrideConfiguration overrideConfig) {
throw new UnsupportedOperationException();
}
/**
* Polls {@link RdsClient#describeDBClusters} API until the desired condition {@code DBClusterDeleted} 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 describeDbClustersRequest
* 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 waitUntilDBClusterDeleted(
Consumer describeDbClustersRequest,
Consumer overrideConfig) {
return waitUntilDBClusterDeleted(DescribeDbClustersRequest.builder().applyMutation(describeDbClustersRequest).build(),
WaiterOverrideConfiguration.builder().applyMutation(overrideConfig).build());
}
/**
* Polls {@link RdsClient#describeDBClusterSnapshots} API until the desired condition
* {@code DBClusterSnapshotAvailable} is met, or until it is determined that the resource will never enter into the
* desired state
*
* @param describeDbClusterSnapshotsRequest
* 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 waitUntilDBClusterSnapshotAvailable(
DescribeDbClusterSnapshotsRequest describeDbClusterSnapshotsRequest) {
throw new UnsupportedOperationException();
}
/**
* Polls {@link RdsClient#describeDBClusterSnapshots} API until the desired condition
* {@code DBClusterSnapshotAvailable} 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 DescribeDbClusterSnapshotsRequest#builder()}
*
* @param describeDbClusterSnapshotsRequest
* 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 waitUntilDBClusterSnapshotAvailable(
Consumer describeDbClusterSnapshotsRequest) {
return waitUntilDBClusterSnapshotAvailable(DescribeDbClusterSnapshotsRequest.builder()
.applyMutation(describeDbClusterSnapshotsRequest).build());
}
/**
* Polls {@link RdsClient#describeDBClusterSnapshots} API until the desired condition
* {@code DBClusterSnapshotAvailable} is met, or until it is determined that the resource will never enter into the
* desired state
*
* @param describeDbClusterSnapshotsRequest
* 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 waitUntilDBClusterSnapshotAvailable(
DescribeDbClusterSnapshotsRequest describeDbClusterSnapshotsRequest, WaiterOverrideConfiguration overrideConfig) {
throw new UnsupportedOperationException();
}
/**
* Polls {@link RdsClient#describeDBClusterSnapshots} API until the desired condition
* {@code DBClusterSnapshotAvailable} 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 describeDbClusterSnapshotsRequest
* 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 waitUntilDBClusterSnapshotAvailable(
Consumer describeDbClusterSnapshotsRequest,
Consumer overrideConfig) {
return waitUntilDBClusterSnapshotAvailable(
DescribeDbClusterSnapshotsRequest.builder().applyMutation(describeDbClusterSnapshotsRequest).build(),
WaiterOverrideConfiguration.builder().applyMutation(overrideConfig).build());
}
/**
* Polls {@link RdsClient#describeDBClusterSnapshots} API until the desired condition
* {@code DBClusterSnapshotDeleted} is met, or until it is determined that the resource will never enter into the
* desired state
*
* @param describeDbClusterSnapshotsRequest
* 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 waitUntilDBClusterSnapshotDeleted(
DescribeDbClusterSnapshotsRequest describeDbClusterSnapshotsRequest) {
throw new UnsupportedOperationException();
}
/**
* Polls {@link RdsClient#describeDBClusterSnapshots} API until the desired condition
* {@code DBClusterSnapshotDeleted} 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 DescribeDbClusterSnapshotsRequest#builder()}
*
* @param describeDbClusterSnapshotsRequest
* 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 waitUntilDBClusterSnapshotDeleted(
Consumer describeDbClusterSnapshotsRequest) {
return waitUntilDBClusterSnapshotDeleted(DescribeDbClusterSnapshotsRequest.builder()
.applyMutation(describeDbClusterSnapshotsRequest).build());
}
/**
* Polls {@link RdsClient#describeDBClusterSnapshots} API until the desired condition
* {@code DBClusterSnapshotDeleted} is met, or until it is determined that the resource will never enter into the
* desired state
*
* @param describeDbClusterSnapshotsRequest
* 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 waitUntilDBClusterSnapshotDeleted(
DescribeDbClusterSnapshotsRequest describeDbClusterSnapshotsRequest, WaiterOverrideConfiguration overrideConfig) {
throw new UnsupportedOperationException();
}
/**
* Polls {@link RdsClient#describeDBClusterSnapshots} API until the desired condition
* {@code DBClusterSnapshotDeleted} 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 describeDbClusterSnapshotsRequest
* 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 waitUntilDBClusterSnapshotDeleted(
Consumer describeDbClusterSnapshotsRequest,
Consumer overrideConfig) {
return waitUntilDBClusterSnapshotDeleted(
DescribeDbClusterSnapshotsRequest.builder().applyMutation(describeDbClusterSnapshotsRequest).build(),
WaiterOverrideConfiguration.builder().applyMutation(overrideConfig).build());
}
/**
* Polls {@link RdsClient#describeDBInstances} API until the desired condition {@code DBInstanceAvailable} is met,
* or until it is determined that the resource will never enter into the desired state
*
* @param describeDbInstancesRequest
* 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 waitUntilDBInstanceAvailable(
DescribeDbInstancesRequest describeDbInstancesRequest) {
throw new UnsupportedOperationException();
}
/**
* Polls {@link RdsClient#describeDBInstances} API until the desired condition {@code DBInstanceAvailable} 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 DescribeDbInstancesRequest#builder()}
*
* @param describeDbInstancesRequest
* 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 waitUntilDBInstanceAvailable(
Consumer describeDbInstancesRequest) {
return waitUntilDBInstanceAvailable(DescribeDbInstancesRequest.builder().applyMutation(describeDbInstancesRequest)
.build());
}
/**
* Polls {@link RdsClient#describeDBInstances} API until the desired condition {@code DBInstanceAvailable} is met,
* or until it is determined that the resource will never enter into the desired state
*
* @param describeDbInstancesRequest
* 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 waitUntilDBInstanceAvailable(
DescribeDbInstancesRequest describeDbInstancesRequest, WaiterOverrideConfiguration overrideConfig) {
throw new UnsupportedOperationException();
}
/**
* Polls {@link RdsClient#describeDBInstances} API until the desired condition {@code DBInstanceAvailable} 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 describeDbInstancesRequest
* 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 waitUntilDBInstanceAvailable(
Consumer describeDbInstancesRequest,
Consumer overrideConfig) {
return waitUntilDBInstanceAvailable(DescribeDbInstancesRequest.builder().applyMutation(describeDbInstancesRequest)
.build(), WaiterOverrideConfiguration.builder().applyMutation(overrideConfig).build());
}
/**
* Polls {@link RdsClient#describeDBInstances} API until the desired condition {@code DBInstanceDeleted} is met, or
* until it is determined that the resource will never enter into the desired state
*
* @param describeDbInstancesRequest
* 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 waitUntilDBInstanceDeleted(
DescribeDbInstancesRequest describeDbInstancesRequest) {
throw new UnsupportedOperationException();
}
/**
* Polls {@link RdsClient#describeDBInstances} API until the desired condition {@code DBInstanceDeleted} 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 DescribeDbInstancesRequest#builder()}
*
* @param describeDbInstancesRequest
* 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 waitUntilDBInstanceDeleted(
Consumer describeDbInstancesRequest) {
return waitUntilDBInstanceDeleted(DescribeDbInstancesRequest.builder().applyMutation(describeDbInstancesRequest).build());
}
/**
* Polls {@link RdsClient#describeDBInstances} API until the desired condition {@code DBInstanceDeleted} is met, or
* until it is determined that the resource will never enter into the desired state
*
* @param describeDbInstancesRequest
* 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 waitUntilDBInstanceDeleted(
DescribeDbInstancesRequest describeDbInstancesRequest, WaiterOverrideConfiguration overrideConfig) {
throw new UnsupportedOperationException();
}
/**
* Polls {@link RdsClient#describeDBInstances} API until the desired condition {@code DBInstanceDeleted} 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 describeDbInstancesRequest
* 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 waitUntilDBInstanceDeleted(
Consumer describeDbInstancesRequest,
Consumer overrideConfig) {
return waitUntilDBInstanceDeleted(DescribeDbInstancesRequest.builder().applyMutation(describeDbInstancesRequest).build(),
WaiterOverrideConfiguration.builder().applyMutation(overrideConfig).build());
}
/**
* Polls {@link RdsClient#describeDBSnapshots} API until the desired condition {@code DBSnapshotAvailable} is met,
* or until it is determined that the resource will never enter into the desired state
*
* @param describeDbSnapshotsRequest
* 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 waitUntilDBSnapshotAvailable(
DescribeDbSnapshotsRequest describeDbSnapshotsRequest) {
throw new UnsupportedOperationException();
}
/**
* Polls {@link RdsClient#describeDBSnapshots} API until the desired condition {@code DBSnapshotAvailable} 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 DescribeDbSnapshotsRequest#builder()}
*
* @param describeDbSnapshotsRequest
* 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 waitUntilDBSnapshotAvailable(
Consumer describeDbSnapshotsRequest) {
return waitUntilDBSnapshotAvailable(DescribeDbSnapshotsRequest.builder().applyMutation(describeDbSnapshotsRequest)
.build());
}
/**
* Polls {@link RdsClient#describeDBSnapshots} API until the desired condition {@code DBSnapshotAvailable} is met,
* or until it is determined that the resource will never enter into the desired state
*
* @param describeDbSnapshotsRequest
* 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 waitUntilDBSnapshotAvailable(
DescribeDbSnapshotsRequest describeDbSnapshotsRequest, WaiterOverrideConfiguration overrideConfig) {
throw new UnsupportedOperationException();
}
/**
* Polls {@link RdsClient#describeDBSnapshots} API until the desired condition {@code DBSnapshotAvailable} 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 describeDbSnapshotsRequest
* 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 waitUntilDBSnapshotAvailable(
Consumer describeDbSnapshotsRequest,
Consumer overrideConfig) {
return waitUntilDBSnapshotAvailable(DescribeDbSnapshotsRequest.builder().applyMutation(describeDbSnapshotsRequest)
.build(), WaiterOverrideConfiguration.builder().applyMutation(overrideConfig).build());
}
/**
* Polls {@link RdsClient#describeDBSnapshots} API until the desired condition {@code DBSnapshotDeleted} is met, or
* until it is determined that the resource will never enter into the desired state
*
* @param describeDbSnapshotsRequest
* 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 waitUntilDBSnapshotDeleted(
DescribeDbSnapshotsRequest describeDbSnapshotsRequest) {
throw new UnsupportedOperationException();
}
/**
* Polls {@link RdsClient#describeDBSnapshots} API until the desired condition {@code DBSnapshotDeleted} 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 DescribeDbSnapshotsRequest#builder()}
*
* @param describeDbSnapshotsRequest
* 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 waitUntilDBSnapshotDeleted(
Consumer describeDbSnapshotsRequest) {
return waitUntilDBSnapshotDeleted(DescribeDbSnapshotsRequest.builder().applyMutation(describeDbSnapshotsRequest).build());
}
/**
* Polls {@link RdsClient#describeDBSnapshots} API until the desired condition {@code DBSnapshotDeleted} is met, or
* until it is determined that the resource will never enter into the desired state
*
* @param describeDbSnapshotsRequest
* 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 waitUntilDBSnapshotDeleted(
DescribeDbSnapshotsRequest describeDbSnapshotsRequest, WaiterOverrideConfiguration overrideConfig) {
throw new UnsupportedOperationException();
}
/**
* Polls {@link RdsClient#describeDBSnapshots} API until the desired condition {@code DBSnapshotDeleted} 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 describeDbSnapshotsRequest
* 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 waitUntilDBSnapshotDeleted(
Consumer describeDbSnapshotsRequest,
Consumer overrideConfig) {
return waitUntilDBSnapshotDeleted(DescribeDbSnapshotsRequest.builder().applyMutation(describeDbSnapshotsRequest).build(),
WaiterOverrideConfiguration.builder().applyMutation(overrideConfig).build());
}
/**
* Polls {@link RdsClient#describeTenantDatabases} API until the desired condition {@code TenantDatabaseAvailable}
* is met, or until it is determined that the resource will never enter into the desired state
*
* @param describeTenantDatabasesRequest
* 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 waitUntilTenantDatabaseAvailable(
DescribeTenantDatabasesRequest describeTenantDatabasesRequest) {
throw new UnsupportedOperationException();
}
/**
* Polls {@link RdsClient#describeTenantDatabases} API until the desired condition {@code TenantDatabaseAvailable}
* 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 DescribeTenantDatabasesRequest#builder()}
*
* @param describeTenantDatabasesRequest
* 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 waitUntilTenantDatabaseAvailable(
Consumer describeTenantDatabasesRequest) {
return waitUntilTenantDatabaseAvailable(DescribeTenantDatabasesRequest.builder()
.applyMutation(describeTenantDatabasesRequest).build());
}
/**
* Polls {@link RdsClient#describeTenantDatabases} API until the desired condition {@code TenantDatabaseAvailable}
* is met, or until it is determined that the resource will never enter into the desired state
*
* @param describeTenantDatabasesRequest
* 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 waitUntilTenantDatabaseAvailable(
DescribeTenantDatabasesRequest describeTenantDatabasesRequest, WaiterOverrideConfiguration overrideConfig) {
throw new UnsupportedOperationException();
}
/**
* Polls {@link RdsClient#describeTenantDatabases} API until the desired condition {@code TenantDatabaseAvailable}
* 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 describeTenantDatabasesRequest
* 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 waitUntilTenantDatabaseAvailable(
Consumer describeTenantDatabasesRequest,
Consumer overrideConfig) {
return waitUntilTenantDatabaseAvailable(
DescribeTenantDatabasesRequest.builder().applyMutation(describeTenantDatabasesRequest).build(),
WaiterOverrideConfiguration.builder().applyMutation(overrideConfig).build());
}
/**
* Polls {@link RdsClient#describeTenantDatabases} API until the desired condition {@code TenantDatabaseDeleted} is
* met, or until it is determined that the resource will never enter into the desired state
*
* @param describeTenantDatabasesRequest
* 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 waitUntilTenantDatabaseDeleted(
DescribeTenantDatabasesRequest describeTenantDatabasesRequest) {
throw new UnsupportedOperationException();
}
/**
* Polls {@link RdsClient#describeTenantDatabases} API until the desired condition {@code TenantDatabaseDeleted} 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 DescribeTenantDatabasesRequest#builder()}
*
* @param describeTenantDatabasesRequest
* 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 waitUntilTenantDatabaseDeleted(
Consumer describeTenantDatabasesRequest) {
return waitUntilTenantDatabaseDeleted(DescribeTenantDatabasesRequest.builder()
.applyMutation(describeTenantDatabasesRequest).build());
}
/**
* Polls {@link RdsClient#describeTenantDatabases} API until the desired condition {@code TenantDatabaseDeleted} is
* met, or until it is determined that the resource will never enter into the desired state
*
* @param describeTenantDatabasesRequest
* 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 waitUntilTenantDatabaseDeleted(
DescribeTenantDatabasesRequest describeTenantDatabasesRequest, WaiterOverrideConfiguration overrideConfig) {
throw new UnsupportedOperationException();
}
/**
* Polls {@link RdsClient#describeTenantDatabases} API until the desired condition {@code TenantDatabaseDeleted} 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 describeTenantDatabasesRequest
* 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 waitUntilTenantDatabaseDeleted(
Consumer describeTenantDatabasesRequest,
Consumer overrideConfig) {
return waitUntilTenantDatabaseDeleted(
DescribeTenantDatabasesRequest.builder().applyMutation(describeTenantDatabasesRequest).build(),
WaiterOverrideConfiguration.builder().applyMutation(overrideConfig).build());
}
/**
* Create a builder that can be used to configure and create a {@link RdsWaiter}.
*
* @return a builder
*/
static Builder builder() {
return DefaultRdsWaiter.builder();
}
/**
* Create an instance of {@link RdsWaiter} with the default configuration.
*
* A default {@link RdsClient} 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 RdsWaiter}
*/
static RdsWaiter create() {
return DefaultRdsWaiter.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 RdsClient} 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(RdsClient client);
/**
* Builds an instance of {@link RdsWaiter} based on the configurations supplied to this builder
*
* @return An initialized {@link RdsWaiter}
*/
RdsWaiter build();
}
}