RedirectDict¶
Dictionary Type¶
RedirectDict
¶
Bases: TypedDict
Dictionary form of Redirect.
Attributes¶
http_redirect_code
instance-attribute
¶
http_redirect_code: str | None
The HTTP redirect code to use on the response. Not required if one of the siblings is present.
protocol
instance-attribute
¶
protocol: str | None
Protocol to use when redirecting requests. The default is the protocol that is used in the original request.
replace_key_prefix_with
instance-attribute
¶
replace_key_prefix_with: str | None
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.
Warning
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.
replace_key_with
instance-attribute
¶
replace_key_with: str | None
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.
Warning
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.