You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.
Class: Aws::S3::Types::Redirect
- Inherits:
-
Struct
- Object
- Struct
- Aws::S3::Types::Redirect
- Defined in:
- (unknown)
Overview
When passing Redirect as input to an Aws::Client method, you can use a vanilla Hash:
{
host_name: "HostName",
http_redirect_code: "HttpRedirectCode",
protocol: "http", # accepts http, https
replace_key_prefix_with: "ReplaceKeyPrefixWith",
replace_key_with: "ReplaceKeyWith",
}
Specifies how requests are redirected. In the event of an error, you can specify a different error code to return.
Returned by:
Instance Attribute Summary collapse
-
#host_name ⇒ String
The host name to use in the redirect request.
-
#http_redirect_code ⇒ String
The HTTP redirect code to use on the response.
-
#protocol ⇒ String
Protocol to use when redirecting requests.
-
#replace_key_prefix_with ⇒ String
The object key prefix to use in the redirect request.
-
#replace_key_with ⇒ String
The specific object key to use in the redirect request.
Instance Attribute Details
#host_name ⇒ String
The host name to use in the redirect request.
#http_redirect_code ⇒ String
The HTTP redirect code to use on the response. Not required if one of the siblings is present.
#protocol ⇒ String
Protocol to use when redirecting requests. The default is the protocol that is used in the original request.
Possible values:
- http
- https
#replace_key_prefix_with ⇒ String
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.
#replace_key_with ⇒ String
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.