interface CustomRuleProperty
| Language | Type name |
|---|---|
.NET | Amazon.CDK.CfnPropertyMixins.AWS.Amplify.CfnAppPropsMixin.CustomRuleProperty |
Go | github.com/aws/aws-cdk-go/awscdkcfnpropertymixins/v2/awsamplify#CfnAppPropsMixin_CustomRuleProperty |
Java | software.amazon.awscdk.cfnpropertymixins.services.amplify.CfnAppPropsMixin.CustomRuleProperty |
Python | aws_cdk.cfn_property_mixins.aws_amplify.CfnAppPropsMixin.CustomRuleProperty |
TypeScript | @aws-cdk/cfn-property-mixins » aws_amplify » CfnAppPropsMixin » CustomRuleProperty |
The CustomRule property type allows you to specify redirects, rewrites, and reverse proxies.
Redirects enable a web app to reroute navigation from one URL to another.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_amplify as amplify } from '@aws-cdk/cfn-property-mixins';
const customRuleProperty: amplify.CfnAppPropsMixin.CustomRuleProperty = {
condition: 'condition',
source: 'source',
status: 'status',
target: 'target',
};
Properties
| Name | Type | Description |
|---|---|---|
| condition? | string | The condition for a URL rewrite or redirect rule, such as a country code. |
| source? | string | The source pattern for a URL rewrite or redirect rule. |
| status? | string | The status code for a URL rewrite or redirect rule. |
| target? | string | The target pattern for a URL rewrite or redirect rule. |
condition?
Type:
string
(optional)
The condition for a URL rewrite or redirect rule, such as a country code.
source?
Type:
string
(optional)
The source pattern for a URL rewrite or redirect rule.
status?
Type:
string
(optional)
The status code for a URL rewrite or redirect rule.
- 200 - Represents a 200 rewrite rule.
- 301 - Represents a 301 (moved pemanently) redirect rule. This and all future requests should be directed to the target URL.
- 302 - Represents a 302 temporary redirect rule.
- 404 - Represents a 404 redirect rule.
- 404-200 - Represents a 404 rewrite rule.
target?
Type:
string
(optional)
The target pattern for a URL rewrite or redirect rule.

.NET
Go
Java
Python
TypeScript