Amazon.KinesisTap.AWS/AWSUtilities.cs
/// <summary>
/// Generate AWS Client using credential and region
/// </summary>
/// <typeparam name="TAWSClient">The type of AWS Client</typeparam>
/// <param name="credential">AWSCredentials</param>
/// <param name="region">RegionEndpoint</param>
/// <returns></returns>
Generate AWS Client using credential and region
Generate AWS Client using credential and region
public static TAWSClient CreateAWSClient<TAWSClient>(AWSCredentials credential, RegionEndpoint region) where TAWSClient : AmazonServiceClient
        {
            TAWSClient awsClient;
            if (region != null)
            {
                awsClient = (TAWSClient)Activator.CreateInstance(typeof(TAWSClient), credential, region);
            }
            else
            {
                awsClient = (TAWSClient)Activator.CreateInstance(typeof(TAWSClient), credential);
            }
            return awsClient;
        }
public static TAWSClient CreateAWSClient < TAWSClient > ( AWSCredentials credential , RegionEndpoint region ) where TAWSClient : AmazonServiceClient { TAWSClient awsClient ; if ( region != null ) { awsClient = ( TAWSClient ) Activator . CreateInstance ( typeof ( TAWSClient ) , credential , region ) ; } else { awsClient = ( TAWSClient ) Activator . CreateInstance ( typeof ( TAWSClient ) , credential ) ; } return awsClient ; }
Generate AWS Client using credential and region
Generate AWS Client using credential and region
None
credential
AWSCredentials
None
region
RegionEndpoint
None
typeparam
The type of AWS Client
The type of AWS Client