You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::S3::Types::Redirect

Inherits:
Struct
  • Object
show all
Defined in:
gems/aws-sdk-s3/lib/aws-sdk-s3/types.rb

Overview

Note:

When making an API call, you may pass Redirect data as a hash:

{
  host_name: "HostName",
  http_redirect_code: "HttpRedirectCode",
  protocol: "http", # accepts http, https
  replace_key_prefix_with: "ReplaceKeyPrefixWith",
  replace_key_with: "ReplaceKeyWith",
}

Instance Attribute Summary collapse

Instance Attribute Details

#host_nameString

The host name to use in the redirect request.

Returns:

  • (String)


7165
7166
7167
7168
7169
7170
7171
7172
# File 'gems/aws-sdk-s3/lib/aws-sdk-s3/types.rb', line 7165

class Redirect < Struct.new(
  :host_name,
  :http_redirect_code,
  :protocol,
  :replace_key_prefix_with,
  :replace_key_with)
  include Aws::Structure
end

#http_redirect_codeString

The HTTP redirect code to use on the response. Not required if one of the siblings is present.

Returns:

  • (String)


7165
7166
7167
7168
7169
7170
7171
7172
# File 'gems/aws-sdk-s3/lib/aws-sdk-s3/types.rb', line 7165

class Redirect < Struct.new(
  :host_name,
  :http_redirect_code,
  :protocol,
  :replace_key_prefix_with,
  :replace_key_with)
  include Aws::Structure
end

#protocolString

Protocol to use (http, https) when redirecting requests. The default is the protocol that is used in the original request.

Returns:

  • (String)


7165
7166
7167
7168
7169
7170
7171
7172
# File 'gems/aws-sdk-s3/lib/aws-sdk-s3/types.rb', line 7165

class Redirect < Struct.new(
  :host_name,
  :http_redirect_code,
  :protocol,
  :replace_key_prefix_with,
  :replace_key_with)
  include Aws::Structure
end

#replace_key_prefix_withString

The object key prefix to use in the redirect request. For example, to redirect requests for all pages with prefix docs/ (objects in the docs/ folder) to documents/, you can set a condition block with KeyPrefixEquals set to docs/ and in the Redirect set ReplaceKeyPrefixWith to /documents. Not required if one of the siblings is present. Can be present only if ReplaceKeyWith is not provided.

Returns:

  • (String)


7165
7166
7167
7168
7169
7170
7171
7172
# File 'gems/aws-sdk-s3/lib/aws-sdk-s3/types.rb', line 7165

class Redirect < Struct.new(
  :host_name,
  :http_redirect_code,
  :protocol,
  :replace_key_prefix_with,
  :replace_key_with)
  include Aws::Structure
end

#replace_key_withString

The specific object key to use in the redirect request. For example, redirect request to error.html. Not required if one of the sibling is present. Can be present only if ReplaceKeyPrefixWith is not provided.

Returns:

  • (String)


7165
7166
7167
7168
7169
7170
7171
7172
# File 'gems/aws-sdk-s3/lib/aws-sdk-s3/types.rb', line 7165

class Redirect < Struct.new(
  :host_name,
  :http_redirect_code,
  :protocol,
  :replace_key_prefix_with,
  :replace_key_with)
  include Aws::Structure
end