class Aws::S3::Types::Redirect

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

@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",
    }

@!attribute [rw] host_name

The host name to use in the redirect request.
@return [String]

@!attribute [rw] http_redirect_code

The HTTP redirect code to use on the response. Not required if one
of the siblings is present.
@return [String]

@!attribute [rw] protocol

Protocol to use when redirecting requests. The default is the
protocol that is used in the original request.
@return [String]

@!attribute [rw] replace_key_prefix_with

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][1].

[1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints
@return [String]

@!attribute [rw] replace_key_with

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][1].

[1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints
@return [String]

@see docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Redirect AWS API Documentation

Constants

SENSITIVE