class Aws::Plugins::EC2RegionValidation

@api private

Public Instance Methods

after_initialize(client) click to toggle source
# File lib/aws-sdk-core/plugins/ec2_region_validation.rb, line 6
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