Class AWSClientUtil


  • @Internal
    public class AWSClientUtil
    extends AWSGeneralUtil
    Some utilities specific to Amazon Web Service.
    • Constructor Detail

      • AWSClientUtil

        public AWSClientUtil()
    • Method Detail

      • formatFlinkUserAgentPrefix

        public static String formatFlinkUserAgentPrefix​(String userAgentFormat)
        Creates a user agent prefix for Flink. This can be used by HTTP Clients.
        Parameters:
        userAgentFormat - flink user agent prefix format with placeholders for version and commit id.
        Returns:
        a user agent prefix for Flink
      • createAwsAsyncClient

        public static <S extends software.amazon.awssdk.core.SdkClient,​T extends software.amazon.awssdk.awscore.client.builder.AwsAsyncClientBuilder<? extends T,​S> & software.amazon.awssdk.awscore.client.builder.AwsClientBuilder<? extends T,​S>> S createAwsAsyncClient​(Properties configProps,
                                                                                                                                                                                                                                                                                              software.amazon.awssdk.http.async.SdkAsyncHttpClient httpClient,
                                                                                                                                                                                                                                                                                              T clientBuilder,
                                                                                                                                                                                                                                                                                              String awsUserAgentPrefixFormat,
                                                                                                                                                                                                                                                                                              String awsClientUserAgentPrefix)
        Creates an AWS Async Client.
        Parameters:
        configProps - configuration properties
        httpClient - the underlying HTTP client used to talk to AWS
        Returns:
        a new AWS Async Client
      • createAwsAsyncClient

        public static <S extends software.amazon.awssdk.core.SdkClient,​T extends software.amazon.awssdk.awscore.client.builder.AwsAsyncClientBuilder<? extends T,​S> & software.amazon.awssdk.awscore.client.builder.AwsClientBuilder<? extends T,​S>> S createAwsAsyncClient​(Properties configProps,
                                                                                                                                                                                                                                                                                              software.amazon.awssdk.core.client.config.SdkClientConfiguration clientConfiguration,
                                                                                                                                                                                                                                                                                              software.amazon.awssdk.http.async.SdkAsyncHttpClient httpClient,
                                                                                                                                                                                                                                                                                              T clientBuilder,
                                                                                                                                                                                                                                                                                              String awsUserAgentPrefixFormat,
                                                                                                                                                                                                                                                                                              String awsClientUserAgentPrefix)
        Creates an AWS Async Client.
        Parameters:
        configProps - configuration properties
        clientConfiguration - the AWS SDK v2 config to instantiate the client
        httpClient - the underlying HTTP client used to talk to AWS
        clientBuilder - httpClientBuilder to build the underlying HTTP client
        awsUserAgentPrefixFormat - user agent prefix for Flink
        awsClientUserAgentPrefix - user agent prefix for kinesis client
        Returns:
        a new AWS Async Client
      • createAwsSyncClient

        public static <S extends software.amazon.awssdk.core.SdkClient,​T extends software.amazon.awssdk.awscore.client.builder.AwsSyncClientBuilder<? extends T,​S> & software.amazon.awssdk.awscore.client.builder.AwsClientBuilder<? extends T,​S>> S createAwsSyncClient​(Properties configProps,
                                                                                                                                                                                                                                                                                            software.amazon.awssdk.http.SdkHttpClient httpClient,
                                                                                                                                                                                                                                                                                            T clientBuilder,
                                                                                                                                                                                                                                                                                            String awsUserAgentPrefixFormat,
                                                                                                                                                                                                                                                                                            String awsClientUserAgentPrefix)
        Creates an AWS Sync Client.
        Parameters:
        configProps - configuration properties
        httpClient - the underlying HTTP client used to talk to AWS
        clientBuilder - the builder for the AWS SDK client
        awsUserAgentPrefixFormat - user agent prefix for Flink
        awsClientUserAgentPrefix - user agent prefix for kinesis client
        Returns:
        a new AWS Sync Client