Sha256: aa5d926cc0a1b9fbef22edf1d7420e83ba38a324ebf6b801f33aa672aab1daa1
Contents?: true
Size: 946 Bytes
Versions: 40
Compression:
Stored size: 946 Bytes
Contents
require 'sfn' module Sfn module Utils # Helper for scrubbing stack parameters class StackParameterScrubber class << self # Validate attributes within Parameter blocks ALLOWED_PARAMETER_ATTRIBUTES = %w( Type Default NoEcho AllowedValues AllowedPattern MaxLength MinLength MaxValue MinValue Description ConstraintDescription ) # Clean the parameters of the template # # @param template [Hash] # @return [Hash] template def scrub!(template) parameters = template['Parameters'] if(parameters) parameters.each do |name, options| options.delete_if do |attribute, value| !ALLOWED_PARAMETER_ATTRIBUTES.include?(attribute) end end template['Parameters'] = parameters end template end end end end end
Version data entries
40 entries across 40 versions & 1 rubygems