Class: AWSCDK::S3::CfnBucket::RedirectAllRequestsToProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
s3/cfn_bucket.rb

Overview

Specifies the redirect behavior of all requests to a website endpoint of an Amazon S3 bucket.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(host_name:, protocol: nil) ⇒ RedirectAllRequestsToProperty

Returns a new instance of RedirectAllRequestsToProperty.

Parameters:

  • host_name (String)

    Name of the host where requests are redirected.

  • protocol (String, nil) (defaults to: nil)

    Protocol to use when redirecting requests.



3170
3171
3172
3173
3174
3175
# File 's3/cfn_bucket.rb', line 3170

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("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "protocol") unless @protocol.nil?
end

Instance Attribute Details

#host_nameString (readonly)

Name of the host where requests are redirected.



3181
3182
3183
# File 's3/cfn_bucket.rb', line 3181

def host_name
  @host_name
end

#protocolString? (readonly)

Protocol to use when redirecting requests.

The default is the protocol that is used in the original request.



3188
3189
3190
# File 's3/cfn_bucket.rb', line 3188

def protocol
  @protocol
end

Class Method Details

.jsii_propertiesObject



3190
3191
3192
3193
3194
3195
# File 's3/cfn_bucket.rb', line 3190

def self.jsii_properties
  {
    :host_name => "hostName",
    :protocol => "protocol",
  }
end

Instance Method Details

#to_jsiiObject



3197
3198
3199
3200
3201
3202
3203
3204
# File 's3/cfn_bucket.rb', line 3197

def to_jsii
  result = {}
  result.merge!({
    "hostName" => @host_name,
    "protocol" => @protocol,
  })
  result.compact
end