Interface RoutingRule

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
RoutingRule.Jsii$Proxy

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-12-06T14:43:26.496Z") @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();
 

See Also:
  • Method Details

    • getCondition

      @Stability(Stable) @Nullable default RoutingRuleCondition getCondition()
      Specifies a condition that must be met for the specified redirect to apply.

      Default: - No condition

    • getHostName

      @Stability(Stable) @Nullable default String getHostName()
      The host name to use in the redirect request.

      Default: - The host name used in the original request.

    • getHttpRedirectCode

      @Stability(Stable) @Nullable default String getHttpRedirectCode()
      The HTTP redirect code to use on the response.

      Default: "301" - Moved Permanently

    • getProtocol

      @Stability(Stable) @Nullable default RedirectProtocol getProtocol()
      Protocol to use when redirecting requests.

      Default: - The protocol used in the original request.

    • getReplaceKey

      @Stability(Stable) @Nullable default ReplaceKey getReplaceKey()
      Specifies the object key prefix to use in the redirect request.

      Default: - The key will not be replaced

    • builder

      @Stability(Stable) static RoutingRule.Builder builder()
      Returns:
      a RoutingRule.Builder of RoutingRule