Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

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

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

Overview

Specifies how requests are redirected. In the event of an error, you can specify a different error code to return.

Constant Summary collapse

SENSITIVE =
[]

Instance Attribute Summary collapse

Instance Attribute Details

#host_nameString

The host name to use in the redirect request.

Returns:

  • (String)

16204
16205
16206
16207
16208
16209
16210
16211
16212
# File 'gems/aws-sdk-s3/lib/aws-sdk-s3/types.rb', line 16204

class Redirect < Struct.new(
  :host_name,
  :http_redirect_code,
  :protocol,
  :replace_key_prefix_with,
  :replace_key_with)
  SENSITIVE = []
  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)

16204
16205
16206
16207
16208
16209
16210
16211
16212
# File 'gems/aws-sdk-s3/lib/aws-sdk-s3/types.rb', line 16204

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

#protocolString

Protocol to use when redirecting requests. The default is the protocol that is used in the original request.

Returns:

  • (String)

16204
16205
16206
16207
16208
16209
16210
16211
16212
# File 'gems/aws-sdk-s3/lib/aws-sdk-s3/types.rb', line 16204

class Redirect < Struct.new(
  :host_name,
  :http_redirect_code,
  :protocol,
  :replace_key_prefix_with,
  :replace_key_with)
  SENSITIVE = []
  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.

Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see XML related object key constraints.

Returns:

  • (String)

16204
16205
16206
16207
16208
16209
16210
16211
16212
# File 'gems/aws-sdk-s3/lib/aws-sdk-s3/types.rb', line 16204

class Redirect < Struct.new(
  :host_name,
  :http_redirect_code,
  :protocol,
  :replace_key_prefix_with,
  :replace_key_with)
  SENSITIVE = []
  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 siblings is present. Can be present only if ReplaceKeyPrefixWith is not provided.

Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see XML related object key constraints.

Returns:

  • (String)

16204
16205
16206
16207
16208
16209
16210
16211
16212
# File 'gems/aws-sdk-s3/lib/aws-sdk-s3/types.rb', line 16204

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