Interface RoutingRuleCondition

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

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-22T02:24:08.936Z") @Stability(Stable) public interface RoutingRuleCondition extends software.amazon.jsii.JsiiSerializable
Example:

 Bucket bucket = Bucket.Builder.create(this, "MyRedirectedBucket")
         .websiteRoutingRules(List.of(RoutingRule.builder()
                 .hostName("www.example.com")
                 .httpRedirectCode("302")
                 .protocol(RedirectProtocol.HTTPS)
                 .replaceKey(ReplaceKey.prefixWith("test/"))
                 .condition(RoutingRuleCondition.builder()
                         .httpErrorCodeReturnedEquals("200")
                         .keyPrefixEquals("prefix")
                         .build())
                 .build()))
         .build();
 
  • Method Details

    • getHttpErrorCodeReturnedEquals

      @Stability(Stable) @Nullable default String getHttpErrorCodeReturnedEquals()
      The HTTP error code when the redirect is applied.

      In the event of an error, if the error code equals this value, then the specified redirect is applied.

      If both condition properties are specified, both must be true for the redirect to be applied.

      Default: - The HTTP error code will not be verified

    • getKeyPrefixEquals

      @Stability(Stable) @Nullable default String getKeyPrefixEquals()
      The object key name prefix when the redirect is applied.

      If both condition properties are specified, both must be true for the redirect to be applied.

      Default: - The object key name will not be verified

    • builder

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