Example #1
0
        /// <summary>
        /// Loads the sdk-default-configurations.json file.
        /// </summary>
        private void LoadDefaultConfiguration(string manifestPath)
        {
            // ../../../ServiceModels/ + ../../
            var repositoryRootDirectoryPath = Path.Combine(manifestPath, "..", "..");

            DefaultConfiguration = _defaultConfigurationController.LoadDefaultConfiguration(repositoryRootDirectoryPath);
        }
Example #2
0
        private void EnrichLegacyMode(DefaultConfigurationModel parsedModel)
        {
            var legacyMode =
                parsedModel
                .Modes
                .FirstOrDefault(x => string.Equals(x.Name, "Legacy", StringComparison.OrdinalIgnoreCase));

            if (legacyMode == null)
            {
                throw new Exception(
                          "Did not find required Default Configuration mode 'Legacy'.  " +
                          $"Found: {string.Join(",", parsedModel.Modes.Select(x => x.Name))}");
            }

            legacyMode.RetryMode = RequestRetryMode.Legacy;
            legacyMode.S3UsEast1RegionalEndpoint = S3UsEast1RegionalEndpointValue.Legacy;
            legacyMode.StsRegionalEndpoints      = StsRegionalEndpointsValue.Legacy;
            // default to null for timeouts - this preserves the ServiceConfig
            // behavior of defaulting configurable timeouts to null
            legacyMode.TimeToFirstByteTimeout = null;
            legacyMode.ConnectTimeout         = null;
            legacyMode.HttpRequestTimeout     = null;
            legacyMode.TlsNegotiationTimeout  = null;
        }