Interface RoutingRule
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
RoutingRule.Jsii$Proxy
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:37.716Z")
@Stability(Stable)
public interface RoutingRule
extends software.amazon.jsii.JsiiSerializable
Rule that define when a redirect is applied and the redirect behavior.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.s3.*;
ReplaceKey replaceKey;
RoutingRule routingRule = RoutingRule.builder()
.condition(RoutingRuleCondition.builder()
.httpErrorCodeReturnedEquals("httpErrorCodeReturnedEquals")
.keyPrefixEquals("keyPrefixEquals")
.build())
.hostName("hostName")
.httpRedirectCode("httpRedirectCode")
.protocol(RedirectProtocol.HTTP)
.replaceKey(replaceKey)
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forRoutingRulestatic final classAn implementation forRoutingRule -
Method Summary
Modifier and TypeMethodDescriptionstatic RoutingRule.Builderbuilder()default RoutingRuleConditionSpecifies a condition that must be met for the specified redirect to apply.default StringThe host name to use in the redirect request.default StringThe HTTP redirect code to use on the response.default RedirectProtocolProtocol to use when redirecting requests.default ReplaceKeySpecifies the object key prefix to use in the redirect request.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getCondition
Specifies a condition that must be met for the specified redirect to apply.Default: - No condition
-
getHostName
The host name to use in the redirect request.Default: - The host name used in the original request.
-
getHttpRedirectCode
The HTTP redirect code to use on the response.Default: "301" - Moved Permanently
-
getProtocol
Protocol to use when redirecting requests.Default: - The protocol used in the original request.
-
getReplaceKey
Specifies the object key prefix to use in the redirect request.Default: - The key will not be replaced
-
builder
- Returns:
- a
RoutingRule.BuilderofRoutingRule
-