public static Uri DetermineEndpoint(IClientConfig config, IRequest request) { Uri endpoint = request.AlternateEndpoint != null ? new Uri(ClientConfig.GetUrl(request.AlternateEndpoint, config.RegionEndpointServiceName, config.UseHttp, config.UseDualstackEndpoint)) : new Uri(config.DetermineServiceURL()); return(InjectHostPrefix(config, request, endpoint)); }
public static Uri DetermineEndpoint(IClientConfig config, IRequest request) { Uri endpoint = request.AlternateEndpoint != null ? new Uri(ClientConfig.GetUrl(config, request.AlternateEndpoint)) : new Uri(config.DetermineServiceURL()); return(InjectHostPrefix(config, request, endpoint)); }
public static Uri DetermineEndpoint(IClientConfig config, IRequest request) { if (request.AlternateEndpoint == null) { return(new Uri(config.DetermineServiceURL())); } return(new Uri(ClientConfig.GetUrl(request.AlternateEndpoint, config.RegionEndpointServiceName, config.UseHttp, config.UseDualstackEndpoint))); }
internal static string DetermineService(IClientConfig clientConfig) { if (string.IsNullOrEmpty(clientConfig.AuthenticationServiceName)) { return(AWSSDKUtils.DetermineService(clientConfig.DetermineServiceURL())); } return(clientConfig.AuthenticationServiceName); }
private static string DetermineBucketRegionCode(IClientConfig config) { if (config.get_RegionEndpoint() != null && string.IsNullOrEmpty(config.get_ServiceURL())) { return(config.get_RegionEndpoint().get_SystemName()); } return(AWSSDKUtils.DetermineRegion(config.DetermineServiceURL())); }
/// <summary> /// Constructor for DefaultRetryPolicy. /// </summary> /// <param name="config">The Client config object. This is used to /// retrieve the maximum number of retries before throwing /// back a exception(This does not count the initial request) and /// the service URL for the request.</param> public DefaultRetryPolicy(IClientConfig config) { this.MaxRetries = config.MaxErrorRetry; if (config.ThrottleRetries) { string serviceURL = config.DetermineServiceURL(); _retryCapacity = _capacityManagerInstance.GetRetryCapacity(serviceURL); } }
static string DetermineBucketRegionCode(IClientConfig config) { if (config.RegionEndpoint != null && string.IsNullOrEmpty(config.ServiceURL)) { return(config.RegionEndpoint.SystemName); } return(AWSSDKUtils.DetermineRegion(config.DetermineServiceURL())); }
public static new AWS4SigningResult SignRequest(IRequest request, IClientConfig clientConfig, RequestMetrics metrics, string awsAccessKeyId, string awsSecretAccessKey) { if (clientConfig is null) { throw new ArgumentNullException(nameof(clientConfig)); } var service = !string.IsNullOrEmpty(clientConfig.AuthenticationServiceName) ? clientConfig.AuthenticationServiceName : AWSSDKUtils.DetermineService(clientConfig.DetermineServiceURL()); return(SignRequest(request, clientConfig, metrics, awsAccessKeyId, awsSecretAccessKey, service, overrideSigningRegion: null)); }
public static void SetClockSkewCorrection(IClientConfig config, TimeSpan value) { var func = typeof(CorrectClockSkew).GetTypeInfo().GetMethod("SetClockCorrectionForEndpoint", BindingFlags.Static | BindingFlags.NonPublic); func.Invoke(null, new object[] { config.DetermineServiceURL(), value }); }
internal static string DetermineService(IClientConfig clientConfig) { return !string.IsNullOrEmpty(clientConfig.AuthenticationServiceName) ? clientConfig.AuthenticationServiceName : AWSSDKUtils.DetermineService(clientConfig.DetermineServiceURL()); }
private static string DetermineService(IClientConfig clientConfig) { return((!string.IsNullOrEmpty(clientConfig.AuthenticationServiceName)) ? clientConfig.AuthenticationServiceName : AWSSDKUtils.DetermineService(clientConfig.DetermineServiceURL())); }