Experimental
@aws-cdk/aws-amplify-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
CustomRuleOptions Struct
Options for a custom rewrite/redirect rule for an Amplify App.
Example
ts
import { CustomRule } from '@aws-cdk/aws-amplify-alpha';
declare const amplifyApp: amplify.App;
amplifyApp.addCustomRule(new CustomRule({
source: '/docs/specific-filename.html',
target: '/documents/different-filename.html',
status: amplify.RedirectStatus.TEMPORARY_REDIRECT,
}));
Properties
conditionoptionalstringconditionoptionalstrconditionoptionalStringConditionoptionalstringConditionoptional*string#The condition for a URL rewrite or redirect rule, e.g. country code.
Default: no condition
The source pattern for a URL rewrite or redirect rule.
statusoptionalRedirectStatusstatusoptionalRedirectStatusstatusoptionalRedirectStatusStatusoptionalRedirectStatusStatusoptionalRedirectStatus= PERMANENT_REDIRECT#The status code for a URL rewrite or redirect rule.
The target pattern for a URL rewrite or redirect rule.