@Generated(value="jsii-pacmak/1.60.0 (build ebcefe6)",
date="2022-06-22T23:27:57.447Z")
public class CustomRule
extends software.amazon.jsii.JsiiObject
Example:
App amplifyApp; amplifyApp.addCustomRule(Map.of( "source", "/docs/specific-filename.html", "target", "/documents/different-filename.html", "status", RedirectStatus.TEMPORARY_REDIRECT));
Modifier and Type | Class and Description |
---|---|
static class |
CustomRule.Builder
(experimental) A fluent builder for
CustomRule . |
Modifier and Type | Field and Description |
---|---|
static CustomRule |
SINGLE_PAGE_APPLICATION_REDIRECT
(experimental) Sets up a 200 rewrite for all paths to `index.html` except for path containing a file extension.
|
Modifier | Constructor and Description |
---|---|
protected |
CustomRule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CustomRule(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCondition()
(experimental) The condition for a URL rewrite or redirect rule, e.g.
|
java.lang.String |
getSource()
(experimental) The source pattern for a URL rewrite or redirect rule.
|
RedirectStatus |
getStatus()
(experimental) The status code for a URL rewrite or redirect rule.
|
java.lang.String |
getTarget()
(experimental) The target pattern for a URL rewrite or redirect rule.
|
public static final CustomRule SINGLE_PAGE_APPLICATION_REDIRECT
protected CustomRule(software.amazon.jsii.JsiiObjectRef objRef)
protected CustomRule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public java.lang.String getSource()
public java.lang.String getTarget()
public java.lang.String getCondition()
Default: - no condition
public RedirectStatus getStatus()
Default: PERMANENT_REDIRECT