interface CustomRuleOptions
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Amplify.Alpha.CustomRuleOptions |
![]() | github.com/aws/aws-cdk-go/awscdkamplifyalpha/v2#CustomRuleOptions |
![]() | software.amazon.awscdk.services.amplify.alpha.CustomRuleOptions |
![]() | aws_cdk.aws_amplify_alpha.CustomRuleOptions |
![]() | @aws-cdk/aws-amplify-alpha ยป CustomRuleOptions |
Options for a custom rewrite/redirect rule for an Amplify App.
Example
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
Name | Type | Description |
---|---|---|
source | string | The source pattern for a URL rewrite or redirect rule. |
target | string | The target pattern for a URL rewrite or redirect rule. |
condition? | string | The condition for a URL rewrite or redirect rule, e.g. country code. |
status? | Redirect | The status code for a URL rewrite or redirect rule. |
source
Type:
string
The source pattern for a URL rewrite or redirect rule.
See also: https://docs.aws.amazon.com/amplify/latest/userguide/redirects.html
target
Type:
string
The target pattern for a URL rewrite or redirect rule.
See also: https://docs.aws.amazon.com/amplify/latest/userguide/redirects.html
condition?
Type:
string
(optional, default: no condition)
The condition for a URL rewrite or redirect rule, e.g. country code.
See also: https://docs.aws.amazon.com/amplify/latest/userguide/redirects.html
status?
Type:
Redirect
(optional, default: PERMANENT_REDIRECT)
The status code for a URL rewrite or redirect rule.
See also: https://docs.aws.amazon.com/amplify/latest/userguide/redirects.html