io.quarkus.dynamodb.runtime.SdkConfig Maven / Gradle / Ivy
package io.quarkus.dynamodb.runtime;
import java.net.URI;
import java.time.Duration;
import java.util.List;
import java.util.Optional;
import io.quarkus.runtime.annotations.ConfigGroup;
import io.quarkus.runtime.annotations.ConfigItem;
/**
* AWS SDK specific configurations
*/
@ConfigGroup
public class SdkConfig {
/**
* The endpoint URI with which the SDK should communicate.
*
* If not specified, an appropriate endpoint to be used for DynamoDB service and region.
*/
@ConfigItem
public Optional endpointOverride;
/**
* The amount of time to allow the client to complete the execution of an API call.
*
* This timeout covers the entire client execution except for marshalling. This includes request handler execution, all HTTP
* requests including retries, unmarshalling, etc.
*
* This value should always be positive, if present.
*
* @see software.amazon.awssdk.core.client.config.ClientOverrideConfiguration#apiCallTimeout()
**/
@ConfigItem
public Optional apiCallTimeout;
/**
* The amount of time to wait for the HTTP request to complete before giving up and timing out.
*
* This value should always be positive, if present.
*
* @see software.amazon.awssdk.core.client.config.ClientOverrideConfiguration#apiCallAttemptTimeout()
*/
@ConfigItem
public Optional apiCallAttemptTimeout;
/**
* List of execution interceptors that will have access to read and modify the request and response objects as they are
* processed by the AWS SDK.
*
* The list should consists of class names which implements
* {@code software.amazon.awssdk.core.interceptor.ExecutionInterceptor} interface.
*
* @see software.amazon.awssdk.core.interceptor.ExecutionInterceptor
*/
@ConfigItem
public List> interceptors;
public boolean isClientOverrideConfig() {
return apiCallTimeout.isPresent() || apiCallAttemptTimeout.isPresent()
|| (interceptors != null && !interceptors.isEmpty());
}
}