interface CustomRuleOptions
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Amplify.CustomRuleOptions |
![]() | software.amazon.awscdk.services.amplify.CustomRuleOptions |
![]() | aws_cdk.aws_amplify.CustomRuleOptions |
![]() | @aws-cdk/aws-amplify » CustomRuleOptions |
Options for a custom rewrite/redirect rule for an Amplify App.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as amplify from '@aws-cdk/aws-amplify';
const customRuleOptions: amplify.CustomRuleOptions = {
source: 'source',
target: 'target',
// the properties below are optional
condition: 'condition',
status: amplify.RedirectStatus.REWRITE,
};
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