Sha256: 80b899385f3d0456f6d6cec7e543074f30ec24aea496961e677ba45b95a77c75

Contents?: true

Size: 487 Bytes

Versions: 967

Compression:

Stored size: 487 Bytes

Contents

module Aws
  module Plugins
    # @api private
    class EC2RegionValidation < 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

Version data entries

967 entries across 967 versions & 2 rubygems

Version Path
aws-sdk-core-2.11.632 lib/aws-sdk-core/plugins/ec2_region_validation.rb
aws-sdk-core-2.11.631 lib/aws-sdk-core/plugins/ec2_region_validation.rb
aws-sdk-core-2.11.630 lib/aws-sdk-core/plugins/ec2_region_validation.rb
aws-sdk-core-2.11.629 lib/aws-sdk-core/plugins/ec2_region_validation.rb
aws-sdk-core-2.11.628 lib/aws-sdk-core/plugins/ec2_region_validation.rb
aws-sdk-core-2.11.627 lib/aws-sdk-core/plugins/ec2_region_validation.rb
aws-sdk-core-2.11.626 lib/aws-sdk-core/plugins/ec2_region_validation.rb
aws-sdk-core-2.11.625 lib/aws-sdk-core/plugins/ec2_region_validation.rb
aws-sdk-core-2.11.624 lib/aws-sdk-core/plugins/ec2_region_validation.rb
aws-sdk-core-2.11.623 lib/aws-sdk-core/plugins/ec2_region_validation.rb
aws-sdk-core-2.11.622 lib/aws-sdk-core/plugins/ec2_region_validation.rb
aws-sdk-core-2.11.621 lib/aws-sdk-core/plugins/ec2_region_validation.rb
aws-sdk-core-2.11.620 lib/aws-sdk-core/plugins/ec2_region_validation.rb
aws-sdk-core-2.11.619 lib/aws-sdk-core/plugins/ec2_region_validation.rb
aws-sdk-core-2.11.618 lib/aws-sdk-core/plugins/ec2_region_validation.rb
aws-sdk-core-2.11.617 lib/aws-sdk-core/plugins/ec2_region_validation.rb
aws-sdk-core-2.11.616 lib/aws-sdk-core/plugins/ec2_region_validation.rb
aws-sdk-core-2.11.615 lib/aws-sdk-core/plugins/ec2_region_validation.rb
aws-sdk-core-2.11.614 lib/aws-sdk-core/plugins/ec2_region_validation.rb
aws-sdk-core-2.11.613 lib/aws-sdk-core/plugins/ec2_region_validation.rb