Interface RoutingRuleCondition

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

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-02T15:58:32.899Z") @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