private ClientConfiguration resolveClientConfiguration() {
            ClientConfiguration config = ClientConfigurationAdapter
                    .adapt(apiGatewayClientConfiguration, clientConfigFactory.getConfig());

            if (apiKey != null) {
                config.addHeader("x-api-key", apiKey);
            }
            config.setUserAgentPrefix(USER_AGENT_PREFIX + UA_NAME_VERSION_SEPERATOR + VersionInfoUtils.getVersion());
            return config;
        }
Sets a custom retry policy to use in the event of an error. See {@link RetryPolicyBuilder} for a declarative way to create
a retry policy.

@param retryPolicy Custom retry policy to use for the client.
aws-java-sdk-opensdk/src/main/java/com/amazonaws/opensdk/protect/client/SdkSyncClientBuilder.java