public AwsClient(AwsService service, AwsRegion region, IAwsCredential credential) { this.service = service ?? throw new ArgumentNullException(nameof(service)); Region = region ?? throw new ArgumentNullException(nameof(region)); this.credential = credential ?? throw new ArgumentNullException(nameof(credential)); Endpoint = $"https://{service.Name}.{region.Name}.amazonaws.com/"; }
public AwsClient(AwsService service, AwsRegion region, IAwsCredentials credentials) { #region Preconditions if (credentials == null) { throw new ArgumentNullException(nameof(credentials)); } #endregion this.service = service; this.region = region; this.credentials = credentials; Endpoint = $"https://{service.Name}.{region.Name}.amazonaws.com/"; }
public AwsClient(AwsService service, AwsRegion region, IAwsCredential credential) { this.service = service ?? throw new ArgumentNullException(nameof(service)); Region = region ?? throw new ArgumentNullException(nameof(region)); this.credential = credential ?? throw new ArgumentNullException(nameof(credential)); Endpoint = $"https://{service.Name}.{region.Name}.amazonaws.com/"; this.httpClient = new HttpClient(new HttpClientHandler { AutomaticDecompression = DecompressionMethods.GZip }) { DefaultRequestHeaders = { { "User-Agent", "Carbon/2.5" } } }; }
public CredentialScope(DateTime date, AwsRegion region, AwsService service) { #region Preconditions if (region == null) { throw new ArgumentNullException(nameof(region)); } if (service == null) { throw new ArgumentNullException(nameof(service)); } #endregion Date = date; Region = region; Service = service; }