Sha256: 2413e980a4a3d86de8a6392bf9c13798c8888a380bc0a8526c93b54c9bb666f7

Contents?: true

Size: 531 Bytes

Versions: 172

Compression:

Stored size: 531 Bytes

Contents

module Aws
  module EC2
    module Plugins
      # @api private
      class RegionValidation < Seahorse::Client::Plugin

        def after_initialize(client)
          if region = client.config.region
            if matches = region.match(/^(\w+-\w+-\d+)[a-z]$/)
              msg = ":region option must a region name, not an availability "
              msg << "zone name; try `#{matches[1]}' instead of `#{matches[0]}'"
              raise ArgumentError, msg
            end
          end
        end
      end
    end
  end
end

Version data entries

172 entries across 172 versions & 1 rubygems

Version Path
aws-sdk-ec2-1.153.0 lib/aws-sdk-ec2/plugins/region_validation.rb
aws-sdk-ec2-1.152.0 lib/aws-sdk-ec2/plugins/region_validation.rb
aws-sdk-ec2-1.151.0 lib/aws-sdk-ec2/plugins/region_validation.rb
aws-sdk-ec2-1.149.0 lib/aws-sdk-ec2/plugins/region_validation.rb
aws-sdk-ec2-1.148.0 lib/aws-sdk-ec2/plugins/region_validation.rb
aws-sdk-ec2-1.147.0 lib/aws-sdk-ec2/plugins/region_validation.rb
aws-sdk-ec2-1.146.0 lib/aws-sdk-ec2/plugins/region_validation.rb
aws-sdk-ec2-1.145.0 lib/aws-sdk-ec2/plugins/region_validation.rb
aws-sdk-ec2-1.144.0 lib/aws-sdk-ec2/plugins/region_validation.rb
aws-sdk-ec2-1.143.0 lib/aws-sdk-ec2/plugins/region_validation.rb
aws-sdk-ec2-1.142.0 lib/aws-sdk-ec2/plugins/region_validation.rb
aws-sdk-ec2-1.141.0 lib/aws-sdk-ec2/plugins/region_validation.rb
aws-sdk-ec2-1.140.0 lib/aws-sdk-ec2/plugins/region_validation.rb
aws-sdk-ec2-1.139.0 lib/aws-sdk-ec2/plugins/region_validation.rb
aws-sdk-ec2-1.138.0 lib/aws-sdk-ec2/plugins/region_validation.rb
aws-sdk-ec2-1.137.0 lib/aws-sdk-ec2/plugins/region_validation.rb
aws-sdk-ec2-1.136.0 lib/aws-sdk-ec2/plugins/region_validation.rb
aws-sdk-ec2-1.135.0 lib/aws-sdk-ec2/plugins/region_validation.rb
aws-sdk-ec2-1.134.0 lib/aws-sdk-ec2/plugins/region_validation.rb
aws-sdk-ec2-1.133.0 lib/aws-sdk-ec2/plugins/region_validation.rb