@Generated(value="jsii-pacmak/1.58.0 (build f8ba112)", date="2022-05-11T19:24:22.909Z") @Stability(value=Experimental) 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));
https://docs.aws.amazon.com/amplify/latest/userguide/redirects.html| 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 |
|---|---|
|
CustomRule(CustomRuleOptions options) |
protected |
CustomRule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CustomRule(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
String |
getCondition()
(experimental) The condition for a URL rewrite or redirect rule, e.g.
|
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.
|
String |
getTarget()
(experimental) The target pattern for a URL rewrite or redirect rule.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Experimental) public static final CustomRule SINGLE_PAGE_APPLICATION_REDIRECT
protected CustomRule(software.amazon.jsii.JsiiObjectRef objRef)
protected CustomRule(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental)
public CustomRule(@NotNull
CustomRuleOptions options)
options - This parameter is required.@Stability(value=Experimental) @NotNull public String getSource()
https://docs.aws.amazon.com/amplify/latest/userguide/redirects.html@Stability(value=Experimental) @NotNull public String getTarget()
https://docs.aws.amazon.com/amplify/latest/userguide/redirects.html@Stability(value=Experimental) @Nullable public String getCondition()
Default: - no condition
https://docs.aws.amazon.com/amplify/latest/userguide/redirects.html@Stability(value=Experimental) @Nullable public RedirectStatus getStatus()
Default: PERMANENT_REDIRECT
https://docs.aws.amazon.com/amplify/latest/userguide/redirects.htmlCopyright © 2022. All rights reserved.