public ApigatewayConfigChangeEventHandler( IOptions <ApiGatewayOptions> options, IFileConfigurationRepository fileConfigRepo, IInternalConfigurationRepository internalConfigRepo, IInternalConfigurationCreator internalConfigCreator, ILogger <ApigatewayConfigChangeEventHandler> logger) { _fileConfigRepo = fileConfigRepo; _internalConfigRepo = internalConfigRepo; _internalConfigCreator = internalConfigCreator; _logger = logger; Options = options.Value; }
public ApiHttpClientFileConfigurationRepository( IObjectMapper objectMapper, IOptions <ApiGatewayOptions> options, IReRouteAppService reRouteAppService, IDynamicReRouteAppService dynamicReRouteAppService, IAggregateReRouteAppService aggregateReRouteAppServicem, IGlobalConfigurationAppService globalConfigurationAppService ) { _objectMapper = objectMapper; _reRouteAppService = reRouteAppService; _dynamicReRouteAppService = dynamicReRouteAppService; _aggregateReRouteAppService = aggregateReRouteAppServicem; _globalConfigurationAppService = globalConfigurationAppService; ApiGatewayOptions = options.Value; }
private void GetApiGatewayResources(ApiGatewayOptions apiGatewayOption, out IFunction lambdaFunction, out bool enableAccessLogging, out bool tracingEnabled, out MethodLoggingLevel cloudWatchLoggingLevel) { // Locate lambda function lambdaFunction = LocateLambda(apiGatewayOption.LambdaName, $"The lambda name {apiGatewayOption.LambdaName} of the api gateway {apiGatewayOption.RestApiName} was not found", $"The api gateway {apiGatewayOption.RestApiName} must have a lambda to execute"); enableAccessLogging = apiGatewayOption.EnableAccessLogging ?? true; tracingEnabled = apiGatewayOption.TracingEnabled ?? true; if (string.IsNullOrWhiteSpace(apiGatewayOption.CloudWatchLoggingLevel)) { cloudWatchLoggingLevel = MethodLoggingLevel.OFF; } else { if (!Enum.TryParse(apiGatewayOption.CloudWatchLoggingLevel, out cloudWatchLoggingLevel)) { throw new ArgumentException($"The CloudWatchLoggingLevel option {apiGatewayOption.CloudWatchLoggingLevel} of the api gateway {apiGatewayOption.RestApiName} is not correct"); } } }
public ApiGatewayHandler( IOptions <ApiGatewayOptions> apiGatewayOptions) { _apiGatewayOptions = apiGatewayOptions.Value; }