The parent object that contains your environment's configuration settings.
示例#1
0
        public async Task <State> TouchLambda(State state, ILambdaContext context)
        {
            var client    = new AmazonLambdaClient(RegionEndpoint.APSoutheast2);
            var variables = new Dictionary <string, string>();

            variables["LastTouched"] = DateTime.UtcNow.ToString();

            var updatedEnvironment = new Amazon.Lambda.Model.Environment
            {
                Variables      = variables,
                IsVariablesSet = true
            };

            var updateFunctionConfigurationRequest = new UpdateFunctionConfigurationRequest
            {
                FunctionName = state.FunctionName,
                Environment  = updatedEnvironment
            };

            var response = await client.UpdateFunctionConfigurationAsync(updateFunctionConfigurationRequest);

            return(state);
        }