@aws-cdk_aws-amplify-alpha.CustomRuleOptions

interface CustomRuleOptions ๐Ÿ”น

LanguageType name
.NETAmazon.CDK.AWS.Amplify.Alpha.CustomRuleOptions
Gogithub.com/aws/aws-cdk-go/awscdkamplifyalpha/v2#CustomRuleOptions
Javasoftware.amazon.awscdk.services.amplify.alpha.CustomRuleOptions
Pythonaws_cdk.aws_amplify_alpha.CustomRuleOptions
TypeScript (source)@aws-cdk/aws-amplify-alpha ยป 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_alpha from '@aws-cdk/aws-amplify-alpha';
const customRuleOptions: amplify_alpha.CustomRuleOptions = {
  source: 'source',
  target: 'target',

  // the properties below are optional
  condition: 'condition',
  status: amplify_alpha.RedirectStatus.REWRITE,
};

Properties

NameTypeDescription
source๐Ÿ”นstringThe source pattern for a URL rewrite or redirect rule.
target๐Ÿ”นstringThe target pattern for a URL rewrite or redirect rule.
condition?๐Ÿ”นstringThe condition for a URL rewrite or redirect rule, e.g. country code.
status?๐Ÿ”นRedirectStatusThe 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: RedirectStatus (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