RoutingRule¶
-
class
aws_cdk.aws_s3.
RoutingRule
(*, condition=None, host_name=None, http_redirect_code=None, protocol=None, replace_key=None)¶ Bases:
object
Rule that define when a redirect is applied and the redirect behavior.
- Parameters
condition (
Optional
[RoutingRuleCondition
]) – Specifies a condition that must be met for the specified redirect to apply. Default: - No conditionhost_name (
Optional
[str
]) – The host name to use in the redirect request. Default: - The host name used in the original request.http_redirect_code (
Optional
[str
]) – The HTTP redirect code to use on the response. Default: “301” - Moved Permanentlyprotocol (
Optional
[RedirectProtocol
]) – Protocol to use when redirecting requests. Default: - The protocol used in the original request.replace_key (
Optional
[ReplaceKey
]) – Specifies the object key prefix to use in the redirect request. Default: - The key will not be replaced
- See
https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html
Attributes
-
condition
¶ Specifies a condition that must be met for the specified redirect to apply.
- Default
No condition
- Return type
Optional
[RoutingRuleCondition
]
-
host_name
¶ The host name to use in the redirect request.
- Default
The host name used in the original request.
- Return type
Optional
[str
]
-
http_redirect_code
¶ The HTTP redirect code to use on the response.
- Default
“301” - Moved Permanently
- Return type
Optional
[str
]
-
protocol
¶ Protocol to use when redirecting requests.
- Default
The protocol used in the original request.
- Return type
Optional
[RedirectProtocol
]
-
replace_key
¶ Specifies the object key prefix to use in the redirect request.
- Default
The key will not be replaced
- Return type
Optional
[ReplaceKey
]