Class: Aws::S3::Plugins::BucketDns

Inherits:
Seahorse::Client::Plugin
  • Object
show all
Defined in:
lib/aws-sdk-s3/plugins/bucket_dns.rb

Overview

Amazon S3 requires DNS style addressing for buckets outside of the classic region when possible.

Defined Under Namespace

Classes: Handler

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.dns_compatible?(bucket_name, ssl) ⇒ Boolean

Parameters:

  • bucket_name (String)
  • ssl (Boolean)

Returns:

  • (Boolean)


68
69
70
71
72
73
74
# File 'lib/aws-sdk-s3/plugins/bucket_dns.rb', line 68

def dns_compatible?(bucket_name, ssl)
  if valid_subdomain?(bucket_name)
    bucket_name.match(/\./) && ssl ? false : true
  else
    false
  end
end

Instance Method Details

#add_handlers(handlers, config) ⇒ Object



24
25
26
# File 'lib/aws-sdk-s3/plugins/bucket_dns.rb', line 24

def add_handlers(handlers, config)
  handlers.add(Handler) unless config.force_path_style
end