Class: AWSCDK::S3::RedirectTarget
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::S3::RedirectTarget
- Defined in:
- s3/redirect_target.rb
Overview
Specifies a redirect behavior of all requests to a website endpoint of a bucket.
Instance Attribute Summary collapse
-
#host_name ⇒ String
readonly
Name of the host where requests are redirected.
-
#protocol ⇒ AWSCDK::S3::RedirectProtocol?
readonly
Protocol to use when redirecting requests.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(host_name:, protocol: nil) ⇒ RedirectTarget
constructor
A new instance of RedirectTarget.
- #to_jsii ⇒ Object
Constructor Details
#initialize(host_name:, protocol: nil) ⇒ RedirectTarget
Returns a new instance of RedirectTarget.
9 10 11 12 13 14 |
# File 's3/redirect_target.rb', line 9 def initialize(host_name:, protocol: nil) @host_name = host_name Jsii::Type.check_type(@host_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "hostName") @protocol = protocol Jsii::Type.check_type(@protocol, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfczMuUmVkaXJlY3RQcm90b2NvbCJ9")), "protocol") unless @protocol.nil? end |
Instance Attribute Details
#host_name ⇒ String (readonly)
Name of the host where requests are redirected.
19 20 21 |
# File 's3/redirect_target.rb', line 19 def host_name @host_name end |
#protocol ⇒ AWSCDK::S3::RedirectProtocol? (readonly)
Note:
Default: - The protocol used in the original request.
Protocol to use when redirecting requests.
24 25 26 |
# File 's3/redirect_target.rb', line 24 def protocol @protocol end |
Class Method Details
.jsii_properties ⇒ Object
26 27 28 29 30 31 |
# File 's3/redirect_target.rb', line 26 def self.jsii_properties { :host_name => "hostName", :protocol => "protocol", } end |
Instance Method Details
#to_jsii ⇒ Object
33 34 35 36 37 38 39 40 |
# File 's3/redirect_target.rb', line 33 def to_jsii result = {} result.merge!({ "hostName" => @host_name, "protocol" => @protocol, }) result.compact end |