public CognitoSyncManager(CognitoAWSCredentials cognitoCredentials, RegionEndpoint endpoint)
     : this(cognitoCredentials, new AmazonCognitoSyncConfig
     {
         RegionEndpoint = endpoint
     })
 {
 }
Example #2
0
        /// <summary>
        /// Generate a presigned URL based on a <see cref="SynthesizeSpeechRequest"/>.
        /// </summary>
        /// <param name="credentials">The credentials to use in the presigned URL.</param>
        /// <param name="region">The region for the URL.</param>
        /// <param name="request">The request to base the presigned URL on.</param>
        /// <returns></returns>
        public static string GeneratePresignedUrl(AWSCredentials credentials, RegionEndpoint region, SynthesizeSpeechRequest request)
        {
            if (credentials == null)
                throw new ArgumentNullException("credentials");

            if (region == null)
                throw new ArgumentNullException("region");

            if (request == null)
                throw new ArgumentNullException("request");

            // Marshall this request and prepare it to be signed
            var marshaller = new SynthesizeSpeechRequestMarshaller();
            var iRequest = marshaller.Marshall(request);
            iRequest.UseQueryString = true;
            iRequest.HttpMethod = HTTPGet;
            iRequest.Endpoint = new UriBuilder(HTTPS, region.GetEndpointForService(PollyServiceName).Hostname).Uri;
            iRequest.Parameters[XAmzExpires] = ((int)FifteenMinutes.TotalSeconds).ToString(CultureInfo.InvariantCulture);

            if (request.IsSetLexiconNames())
            {
                var sortedLexiconNames = new List<string>(request.LexiconNames);
                sortedLexiconNames.Sort(StringComparer.Ordinal);
                iRequest.Parameters[LexiconNamesParameter] = JsonMapper.ToJson(sortedLexiconNames);
            }

            if (request.IsSetOutputFormat())
                iRequest.Parameters["OutputFormat"] = request.OutputFormat.ToString();

            if (request.IsSetSampleRate())
                iRequest.Parameters["SampleRate"] = request.SampleRate.ToString();

            if (request.IsSetText())
                iRequest.Parameters["Text"] = request.Text;

            if (request.IsSetTextType())
                iRequest.Parameters["TextType"] = request.TextType.ToString();

            if (request.IsSetVoiceId())
                iRequest.Parameters["VoiceId"] = request.VoiceId;

            var immutableCredentials = credentials.GetCredentials();
            if (immutableCredentials.UseToken)
            {
                // Don't use HeaderKeys.XAmzSecurityTokenHeader because Polly treats this as case-sensitive
                iRequest.Parameters["X-Amz-Security-Token"] = immutableCredentials.Token;
            }

            // Only the host header should be signed, and the signer adds that.
            // So clear out headers.
            iRequest.Headers.Clear();

            // Create presigned URL and assign it
            var signingResult = SynthesizeSpeechPresignedUrlSigner.SignSynthesizeSpeechRequest(iRequest, new RequestMetrics(),
                immutableCredentials.AccessKey, immutableCredentials.SecretKey, PollyServiceName, region.SystemName);

            var authorization = "&" + signingResult.ForQueryParameters;

            return ComposeUrl(iRequest).AbsoluteUri + authorization;
        }
Example #3
0
        /// <summary>
        /// Constructor of <see cref="Amazon.MobileAnalytics.MobileAnalyticsManager.Internal.DeliveryClient"/> class.
        /// </summary>
        /// <param name="policyFactory">An instance of IDeliveryPolicyFactory. <see cref="Amazon.MobileAnalytics.MobileAnalyticsManager.Internal.IDeliveryPolicyFactory"/></param>
        /// <param name="maConfig">Mobile Analytics Manager configuration. <see cref="Amazon.MobileAnalytics.MobileAnalyticsManager.MobileAnalyticsManagerConfig"/></param>
        /// <param name="clientContext">An instance of ClientContext. <see cref="Amazon.Runtime.Internal.ClientContext"/></param>
        /// <param name="credentials">An instance of Credentials. <see cref="Amazon.Runtime.AWSCredentials"/></param>
        /// <param name="regionEndPoint">Region endpoint. <see cref="Amazon.RegionEndpoint"/></param>
        public DeliveryClient(IDeliveryPolicyFactory policyFactory, MobileAnalyticsManagerConfig maConfig, ClientContext clientContext, AWSCredentials credentials, RegionEndpoint regionEndPoint)
        {
            _policyFactory = policyFactory;
            _deliveryPolicies = new List<IDeliveryPolicy>();
            _deliveryPolicies.Add(_policyFactory.NewConnectivityPolicy());

            _clientContext = clientContext;
            _appID = clientContext.AppID;
            _maConfig = maConfig;
            _eventStore = new SQLiteEventStore(maConfig);

#if PCL
            _mobileAnalyticsLowLevelClient = new AmazonMobileAnalyticsClient(credentials, regionEndPoint);
#elif BCL
            if (null == credentials && null == regionEndPoint)
            {
                _mobileAnalyticsLowLevelClient = new AmazonMobileAnalyticsClient();
            }
            else if (null == credentials)
            {
                _mobileAnalyticsLowLevelClient = new AmazonMobileAnalyticsClient(regionEndPoint);
            }
            else if (null == regionEndPoint)
            {
                _mobileAnalyticsLowLevelClient = new AmazonMobileAnalyticsClient(credentials);
            }
            else
            {
                _mobileAnalyticsLowLevelClient = new AmazonMobileAnalyticsClient(credentials, regionEndPoint);
            }
#endif
        }
 internal void UseClient(ICoreAmazonS3 client, RegionEndpoint region)
 {
     if (this.clientsByRegion.ContainsKey(region.SystemName))
     {
         this.clientsByRegion.Remove(region.SystemName);
     }
     this.clientsByRegion.Add(region.SystemName, client);
 }
        /// <summary>
        /// Gets or creates Mobile Analytics Manager instance. If the instance already exists, returns the instance; otherwise
        /// creates new instance and returns it.
        /// </summary>
        /// <param name="appID">Amazon Mobile Analytics Application ID.</param>
        /// <param name="regionEndpoint">Region endpoint.</param>
        /// <returns>Mobile Analytics Manager instance. </returns>
        public static MobileAnalyticsManager GetOrCreateInstance(string appID, RegionEndpoint regionEndpoint)
        {
            if (string.IsNullOrEmpty(appID))
                throw new ArgumentNullException("appID");
            if (null == regionEndpoint)
                throw new ArgumentNullException("regionEndpoint");

            return GetOrCreateInstanceHelper(appID, null, regionEndpoint, null);
        }
Example #6
0
 internal TransferUtility GetTransferUtility(RegionEndpoint region)
 {
     TransferUtility output;
     if (!this.transferUtilitiesByRegion.TryGetValue(region.SystemName, out output))
     {
         output = new TransferUtility(this.GetClient(region));
         this.transferUtilitiesByRegion.Add(region.SystemName, output);
     }
     return output;
 }
Example #7
0
 internal AmazonS3Client GetClient(RegionEndpoint region)
 {
     AmazonS3Client output;
     if (!this.clientsByRegion.TryGetValue(region.SystemName, out output))
     {
         output = new AmazonS3Client(this.credentials, this.config);
         this.clientsByRegion.Add(region.SystemName, output);
     }
     return output;
 }
Example #8
0
 internal void UseClient(AmazonS3Client client, RegionEndpoint region)
 {
     if (this.clientsByRegion.ContainsKey(region.SystemName))
     {
         this.clientsByRegion.Remove(region.SystemName);
         this.transferUtilitiesByRegion.Remove(region.SystemName);
     }
     this.clientsByRegion.Add(region.SystemName, client);
     this.transferUtilitiesByRegion.Add(region.SystemName, new TransferUtility(client));
 }
 internal ICoreAmazonS3 GetClient(RegionEndpoint region)
 {
     ICoreAmazonS3 output;
     if (!this.clientsByRegion.TryGetValue(region.SystemName, out output))
     {
         output = ServiceClientHelpers.CreateServiceFromAssembly<ICoreAmazonS3>(ServiceClientHelpers.S3_ASSEMBLY_NAME, ServiceClientHelpers.S3_SERVICE_CLASS_NAME, this.ddbClient);
         this.clientsByRegion.Add(region.SystemName, output);
     }
     return output;
 }
Example #10
0
 /// <summary>
 /// Constructor of <see cref="Amazon.MobileAnalytics.MobileAnalyticsManager.DeliveryClient"/> class.
 /// </summary>
 /// <param name="isDataAllowed">An instance of IDeliveryPolicyFactory <see cref="Amazon.MobileAnalytics.MobileAnalyticsManager.Internal.IDeliveryPolicyFactory"/></param>
 /// <param name="clientContext">An instance of ClientContext <see cref="Amazon.MobileAnalytics.MobileAnalyticsManager.Internal.ClientContext"/></param>
 /// <param name="credentials">An instance of Credentials <see cref="Amazon.Runtime.AWSCredentials"/></param>
 /// <param name="regionEndPoint">Region end point <see cref="Amazon.RegionEndpoint"/></param>
 public DeliveryClient(IDeliveryPolicyFactory policyFactory, ClientContext clientContext, AWSCredentials credentials, RegionEndpoint regionEndPoint)
 {
     _policyFactory = policyFactory;
     _mobileAnalyticsLowLevelClient = new AmazonMobileAnalyticsClient(credentials, regionEndPoint);
     _clientContext = clientContext;
     _appId = clientContext.Config.AppId;
     _eventStore = new SQLiteEventStore(AWSConfigsMobileAnalytics.MaxDBSize, AWSConfigsMobileAnalytics.DBWarningThreshold);
     _deliveryPolicies = new List<IDeliveryPolicy>();
     _deliveryPolicies.Add(_policyFactory.NewConnectivityPolicy());
     _deliveryPolicies.Add(_policyFactory.NewBackgroundSubmissionPolicy());
 }
        /// <summary>
        /// Gets or creates Mobile Analytics Manager instance. If the instance already exists, returns the instance; otherwise
        /// creates new instance and returns it.
        /// </summary>
        /// <param name="appID">Amazon Mobile Analytics Application ID.</param>
        /// <param name="credentials">AWS Credentials.</param>
        /// <param name="regionEndpoint">Region endpoint.</param>
        /// <returns>Mobile Analytics Manager instance.</returns>
        public static MobileAnalyticsManager GetOrCreateInstance(string appID, AWSCredentials credentials, RegionEndpoint regionEndpoint)
        {
            if (string.IsNullOrEmpty(appID))
                throw new ArgumentNullException("appID");
            if (null == credentials)
                throw new ArgumentNullException("credentials");
            if (null == regionEndpoint)
                throw new ArgumentNullException("regionEndpoint");

            MobileAnalyticsManagerConfig maConfig = new MobileAnalyticsManagerConfig();
            return GetOrCreateInstanceHelper(appID, credentials, regionEndpoint, maConfig);
        }
Example #12
0
 /// <summary>
 /// Deletes the image file artifacts associated with the specified conversion task.
 /// If the task is still active, ignoreActiveTask must be set true to enable artifact
 /// deletion, which will cause the task to fail. Use this option at your own risk.
 /// </summary>
 /// <param name="awsCredentials">
 /// Credentials to use to instantiate the Amazon EC2 and Amazon S3 clients needed to
 /// complete the operation.
 /// </param>
 /// <param name="region">
 /// The region containing the bucket where the image file artifacts were stored
 /// </param>
 /// <param name="conversionTaskId">
 /// The ID of the conversion task that used the image file
 /// </param>
 /// <param name="ignoreActiveTask">
 /// If true the artifacts are deleted even if the conversion task is still in progress
 /// </param>
 /// <param name="progressCallback">Optional progress callback</param>
 public static void DeleteImageArtifacts(AWSCredentials awsCredentials, 
                                         RegionEndpoint region, 
                                         string conversionTaskId, 
                                         bool ignoreActiveTask,
                                         CleanupProgressCallback progressCallback)
 {
     DeleteImageArtifacts(new AmazonEC2Client(awsCredentials, region),
                          ServiceClientHelpers.CreateServiceFromAssembly<ICoreAmazonS3>(ServiceClientHelpers.S3_ASSEMBLY_NAME, ServiceClientHelpers.S3_SERVICE_CLASS_NAME, awsCredentials, region),
                          conversionTaskId, 
                          ignoreActiveTask,
                          progressCallback);                        
 }
Example #13
0
 /// <summary>
 /// Constructor of <see cref="Amazon.MobileAnalytics.MobileAnalyticsManager.Internal.DeliveryClient"/> class.
 /// </summary>
 /// <param name="policyFactory">An instance of IDeliveryPolicyFactory <see cref="Amazon.MobileAnalytics.MobileAnalyticsManager.Internal.IDeliveryPolicyFactory"/></param>
 /// <param name="maConfig"></param>
 /// <param name="maManager"></param>
 /// <param name="clientContext">An instance of ClientContext <see cref="Amazon.Runtime.Internal.ClientContext"/></param>
 /// <param name="credentials">An instance of Credentials <see cref="Amazon.Runtime.AWSCredentials"/></param>
 /// <param name="regionEndPoint">Region end point <see cref="Amazon.RegionEndpoint"/></param>
 public DeliveryClient(IDeliveryPolicyFactory policyFactory, MobileAnalyticsManagerConfig maConfig, ClientContext clientContext, AWSCredentials credentials, RegionEndpoint regionEndPoint, MobileAnalyticsManager maManager)
 {
     _policyFactory = policyFactory;
     _mobileAnalyticsLowLevelClient = new AmazonMobileAnalyticsClient(credentials, regionEndPoint);
     _clientContext = clientContext;
     _appID = clientContext.AppID;
     _maConfig = maConfig;
     _maManager = maManager;
     _eventStore = new SQLiteEventStore(maConfig);
     _deliveryPolicies = new List<IDeliveryPolicy>();
     _deliveryPolicies.Add(_policyFactory.NewConnectivityPolicy());
 }
Example #14
0
 /// <summary>
 /// Deletes the image file artifacts associated with the specified conversion task.
 /// If the task is still active, ignoreActiveTask must be set true to enable artifact
 /// deletion, which will cause the task to fail. Use this option at your own risk.
 /// </summary>
 /// <param name="awsCredentials">
 /// Credentials to use to instantiate the Amazon EC2 and Amazon S3 clients needed to
 /// complete the operation.
 /// </param>
 /// <param name="region">
 /// The region containing the bucket where the image file artifacts were stored
 /// </param>
 /// <param name="conversionTaskId">
 /// The ID of the conversion task that used the image file
 /// </param>
 /// <param name="ignoreActiveTask">
 /// If true the artifacts are deleted even if the conversion task is still in progress
 /// </param>
 /// <param name="progressCallback">Optional progress callback</param>
 public static void DeleteImageArtifacts(AWSCredentials awsCredentials, 
                                         RegionEndpoint region, 
                                         string conversionTaskId, 
                                         bool ignoreActiveTask,
                                         CleanupProgressCallback progressCallback)
 {
     DeleteImageArtifacts(new AmazonEC2Client(awsCredentials, region), 
                          new AmazonS3Client(awsCredentials, region), 
                          conversionTaskId, 
                          ignoreActiveTask,
                          progressCallback);                        
 }
        /// <summary>
        /// Gets the or creates Mobile Analytics Manager instance. If the instance already exists, returns the instance; otherwise
        /// creates new instance and returns it.
        /// </summary>
        /// <returns>Mobile Analytics Manager instance.</returns>
        /// <param name="credentials">AWS Credentials.</param>
        /// <param name="regionEndpoint">Region endpoint.</param>
        /// <param name="appId">Amazon Mobile Analytics Application ID.</param>
        public static MobileAnalyticsManager GetOrCreateInstance(AWSCredentials credential,
                                                                 RegionEndpoint regionEndpoint,
                                                                 string appId)
        {
            if (credential == null)
                throw new ArgumentNullException("credential");
            if (regionEndpoint == null)
                throw new ArgumentNullException("regionEndpoint");
            if (string.IsNullOrEmpty(appId))
                throw new ArgumentNullException("appId");

            return MobileAnalyticsManager.GetOrCreateInstanceHelper(appId, credential, regionEndpoint);
        }
        /// <summary>
        /// Sends a request to the AWS Storage Gateway server running at the
        /// specified address, and returns the activation key for that server.
        /// </summary>
        /// <param name="gatewayAddress">The DNS name or IP address of a running AWS Storage Gateway</param>
        /// <param name="activationRegion">The region in which the gateway will be activated.</param>
        /// <param name="maxRetries">The maximum number of retries to attempt on failure</param>
        /// <param name="maxBackoff">The maximum backoff time, in milliseconds, for retry attempts. Backoff times between retries rise exponentially until they hit this ceiling.</param>
        /// <returns>The activation key required for some API calls to AWS Storage Gateway.</returns>
        public static string GetActivationKey(string gatewayAddress, RegionEndpoint activationRegion, int maxRetries, int maxBackoff)
        {
            if (maxRetries <= 1)
                maxRetries = defaultMaxRetries;
            if (maxBackoff <= 0)
                maxBackoff = defaultMaxBackoff;

            int retries = 0;
            while (retries < maxRetries)
            {
                try
                {
                    string uri = "http://" + gatewayAddress;
                    if (activationRegion != null)
                        uri = uri + "/?activationRegion=" + activationRegion.SystemName;
                    string locationHeader = GetHeader(uri);
                    var parameters = AWSSDKUtils.ParseQueryParameters(locationHeader);
                    string activationKey;
                    if (parameters.TryGetValue(activationKeyName, out activationKey) && !string.IsNullOrEmpty(activationKey))
                        return activationKey;

                    throw new AmazonStorageGatewayException("Unable to get activation key from : " + uri);
                }
                catch (WebException)
                {
                    retries++;
                    if (retries == maxRetries)
                        break;
                }

                int delay = (int)(Math.Pow(4, retries) * 100);
                delay = Math.Min(delay, maxBackoff);
                AWSSDKUtils.Sleep(delay);
            }

            throw new AmazonStorageGatewayException("Unable to get activation key; retries exhausted");
        }
        /// <summary>
        ///  Given a policy and AWS credentials, produce a S3PostUploadSignedPolicy.
        /// </summary>
        /// <param name="policy">JSON string representing the policy to sign</param>
        /// <param name="credentials">Credentials to sign the policy with</param>
        /// <param name="region">Service region endpoint.</param>
        /// <returns>A signed policy object for use with an S3PostUploadRequest.</returns>
        public static S3PostUploadSignedPolicy GetSignedPolicyV4(string policy, AWSCredentials credentials, RegionEndpoint region)
        {
            var signedAt = AWSSDKUtils.CorrectedUtcNow;

            ImmutableCredentials iCreds = credentials.GetCredentials();
            var algorithm = "AWS4-HMAC-SHA256";
            var dateStamp = Runtime.Internal.Auth.AWS4Signer.FormatDateTime(signedAt, AWSSDKUtils.ISO8601BasicDateFormat);
            var dateTimeStamp = Runtime.Internal.Auth.AWS4Signer.FormatDateTime(signedAt, AWSSDKUtils.ISO8601BasicDateTimeFormat);
            var credentialString = string.Format(CultureInfo.InvariantCulture, "{0}/{1}/{2}/{3}/{4}/", iCreds.AccessKey, dateStamp, region.SystemName, "s3", Runtime.Internal.Auth.AWS4Signer.Terminator);

            Dictionary<string, string> extraConditions = new Dictionary<string, string> {
                { S3Constants.PostFormDataXAmzCredential, credentialString },
                { S3Constants.PostFormDataXAmzAlgorithm, algorithm },
                { S3Constants.PostFormDataXAmzDate, dateTimeStamp }
            };
            if (iCreds.UseToken) { extraConditions[S3Constants.PostFormDataSecurityToken] = iCreds.Token; }

            var policyBytes = addConditionsToPolicy(policy, extraConditions);

            var base64Policy = Convert.ToBase64String(policyBytes);

            var signingKey = Runtime.Internal.Auth.AWS4Signer.ComposeSigningKey(iCreds.SecretKey, region.SystemName, dateStamp, "s3");

            var signature = AWSSDKUtils.ToHex(Runtime.Internal.Auth.AWS4Signer.ComputeKeyedHash(SigningAlgorithm.HmacSHA256, signingKey, base64Policy), true);

            return new S3PostUploadSignedPolicy
            {
                Policy = base64Policy,
                Signature = signature,
                AccessKeyId = iCreds.AccessKey,
                SecurityToken = iCreds.Token,
                SignatureVersion = "4",
                Algorithm = algorithm,
                Date = dateTimeStamp,
                Credential = credentialString
            };
        }
 /// <summary>
 /// Constructs AmazonSecurityTokenServiceClient with the credentials loaded from the application's
 /// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.
 /// 
 /// Example App.config with credentials set. 
 /// <code>
 /// &lt;?xml version="1.0" encoding="utf-8" ?&gt;
 /// &lt;configuration&gt;
 ///     &lt;appSettings&gt;
 ///         &lt;add key="AWSProfileName" value="AWS Default"/&gt;
 ///     &lt;/appSettings&gt;
 /// &lt;/configuration&gt;
 /// </code>
 ///
 /// </summary>
 /// <param name="region">The region to connect.</param>
 public AmazonSecurityTokenServiceClient(RegionEndpoint region)
     : base(FallbackCredentialsFactory.GetCredentials(), new AmazonSecurityTokenServiceConfig{RegionEndpoint = region}) { }
 /// <summary>
 /// Constructs AmazonRoute53Client with AWS Access Key ID and AWS Secret Key
 /// </summary>
 /// <param name="awsAccessKeyId">AWS Access Key ID</param>
 /// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
 /// <param name="region">The region to connect.</param>
 public AmazonRoute53Client(string awsAccessKeyId, string awsSecretAccessKey, RegionEndpoint region)
     : this(awsAccessKeyId, awsSecretAccessKey, new AmazonRoute53Config() {RegionEndpoint=region})
 {
 }
 /// <summary>
 /// Constructs AmazonRoute53Client with AWS Credentials
 /// </summary>
 /// <param name="credentials">AWS Credentials</param>
 /// <param name="region">The region to connect.</param>
 public AmazonRoute53Client(AWSCredentials credentials, RegionEndpoint region)
     : this(credentials, new AmazonRoute53Config(){RegionEndpoint=region})
 {
 }
 /// <summary>
 /// Constructs AmazonCognitoSyncClient with AWS Credentials
 /// </summary>
 /// <param name="credentials">AWS Credentials</param>
 /// <param name="region">The region to connect.</param>
 public AmazonCognitoSyncClient(AWSCredentials credentials, RegionEndpoint region)
     : this(credentials, new AmazonCognitoSyncConfig{RegionEndpoint = region})
 {
 }
 /// <summary>
 /// Constructs AmazonCognitoSyncClient with AWS Access Key ID and AWS Secret Key
 /// </summary>
 /// <param name="awsAccessKeyId">AWS Access Key ID</param>
 /// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
 /// <param name="awsSessionToken">AWS Session Token</param>
 /// <param name="region">The region to connect.</param>
 public AmazonCognitoSyncClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region)
     : this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonCognitoSyncConfig{RegionEndpoint = region})
 {
 }
 /// <summary>
 /// Constructs AmazonElasticTranscoderClient with the credentials loaded from the application's
 /// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.
 /// 
 /// Example App.config with credentials set. 
 /// <code>
 /// &lt;?xml version="1.0" encoding="utf-8" ?&gt;
 /// &lt;configuration&gt;
 ///     &lt;appSettings&gt;
 ///         &lt;add key="AWSProfileName" value="AWS Default"/&gt;
 ///     &lt;/appSettings&gt;
 /// &lt;/configuration&gt;
 /// </code>
 ///
 /// </summary>
 /// <param name="region">The region to connect.</param>
 public AmazonElasticTranscoderClient(RegionEndpoint region)
     : base(FallbackCredentialsFactory.GetCredentials(), new AmazonElasticTranscoderConfig{RegionEndpoint = region}) { }
 /// <summary>
 /// Constructs AmazonElasticTranscoderClient with AWS Access Key ID and AWS Secret Key
 /// </summary>
 /// <param name="awsAccessKeyId">AWS Access Key ID</param>
 /// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
 /// <param name="awsSessionToken">AWS Session Token</param>
 /// <param name="region">The region to connect.</param>
 public AmazonElasticTranscoderClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region)
     : this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonElasticTranscoderConfig{RegionEndpoint = region})
 {
 }
 /// <summary>
 /// Constructs AmazonElasticTranscoderClient with AWS Credentials
 /// </summary>
 /// <param name="credentials">AWS Credentials</param>
 /// <param name="region">The region to connect.</param>
 public AmazonElasticTranscoderClient(AWSCredentials credentials, RegionEndpoint region)
     : this(credentials, new AmazonElasticTranscoderConfig{RegionEndpoint = region})
 {
 }
 /// <summary>
 /// Constructs AmazonElasticLoadBalancingClient with AWS Credentials
 /// </summary>
 /// <param name="credentials">AWS Credentials</param>
 /// <param name="region">The region to connect.</param>
 public AmazonElasticLoadBalancingClient(AWSCredentials credentials, RegionEndpoint region)
     : this(credentials, new AmazonElasticLoadBalancingConfig{RegionEndpoint = region})
 {
 }
 /// <summary>
 /// Constructs AmazonElasticLoadBalancingClient with AWS Access Key ID and AWS Secret Key
 /// </summary>
 /// <param name="awsAccessKeyId">AWS Access Key ID</param>
 /// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
 /// <param name="awsSessionToken">AWS Session Token</param>
 /// <param name="region">The region to connect.</param>
 public AmazonElasticLoadBalancingClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region)
     : this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonElasticLoadBalancingConfig{RegionEndpoint = region})
 {
 }
 /// <summary>
 /// Constructs AmazonSecurityTokenServiceClient with AWS Credentials
 /// </summary>
 /// <param name="credentials">AWS Credentials</param>
 /// <param name="region">The region to connect.</param>
 public AmazonSecurityTokenServiceClient(AWSCredentials credentials, RegionEndpoint region)
     : this(credentials, new AmazonSecurityTokenServiceConfig{RegionEndpoint = region})
 {
 }
 /// <summary>
 /// Constructs AmazonSecurityTokenServiceClient with AWS Access Key ID and AWS Secret Key
 /// </summary>
 /// <param name="awsAccessKeyId">AWS Access Key ID</param>
 /// <param name="awsSecretAccessKey">AWS Secret Access Key</param>
 /// <param name="awsSessionToken">AWS Session Token</param>
 /// <param name="region">The region to connect.</param>
 public AmazonSecurityTokenServiceClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region)
     : this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonSecurityTokenServiceConfig{RegionEndpoint = region})
 {
 }
 /// <summary>
 /// Constructs AmazonRDSClient with the credentials loaded from the application's
 /// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.
 /// 
 /// Example App.config with credentials set. 
 /// <code>
 /// &lt;?xml version="1.0" encoding="utf-8" ?&gt;
 /// &lt;configuration&gt;
 ///     &lt;appSettings&gt;
 ///         &lt;add key="AWSAccessKey" value="********************"/&gt;
 ///         &lt;add key="AWSSecretKey" value="****************************************"/&gt;
 ///     &lt;/appSettings&gt;
 /// &lt;/configuration&gt;
 /// </code>
 ///
 /// </summary>
 /// <param name="region">The region to connect.</param>
 public AmazonRDSClient(RegionEndpoint region)
     : base(FallbackCredentialsFactory.GetCredentials(), new AmazonRDSConfig(){RegionEndpoint = region}, true, AuthenticationTypes.User | AuthenticationTypes.Session)
 {
 }