public void run(WaiterParameters<Input> waiterParameters)
            throws AmazonServiceException, WaiterTimedOutException, WaiterUnrecoverableException {

        ValidationUtils.assertNotNull(waiterParameters, "waiterParameters");
        @SuppressWarnings("unchecked")
        Input request = (Input) ValidationUtils.assertNotNull(waiterParameters.getRequest(), "request").clone();
        request.getRequestClientOptions().appendUserAgent("waiter-request");
        WaiterExecution<Input, Output> waiterExecution = new WaiterExecutionBuilder<Input, Output>()
                .withRequest(request)
                .withPollingStrategy(waiterParameters.getPollingStrategy() != null ? waiterParameters.getPollingStrategy() : defaultPollingStrategy)
                .withAcceptors(acceptors)
                .withSdkFunction(sdkFunction)
                .build();

        waiterExecution.pollResource();

    }
Polls synchronously until it is determined that the resource
transitioned into the desired state or not.

@param waiterParameters Custom provided parameters. Includes request and
                        optional custom polling strategy
@throws AmazonServiceException       If the service exception thrown doesn't match any of the expected
                                     exceptions, it's re-thrown.
@throws WaiterUnrecoverableException If the resource transitions into a failure/unexpected state.
@throws WaiterTimedOutException      If the resource doesn't transition into the desired state
                                     even after a certain number of retries.
aws-java-sdk-core/src/main/java/com/amazonaws/waiters/WaiterImpl.java