Class CfnApp.CustomRuleProperty.Builder
java.lang.Object
software.amazon.awscdk.services.amplify.CfnApp.CustomRuleProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnApp.CustomRuleProperty>
- Enclosing interface:
- CfnApp.CustomRuleProperty
@Stability(Stable)
public static final class CfnApp.CustomRuleProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnApp.CustomRuleProperty>
A builder for
CfnApp.CustomRuleProperty
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofCfnApp.CustomRuleProperty.getCondition()
Sets the value ofCfnApp.CustomRuleProperty.getSource()
Sets the value ofCfnApp.CustomRuleProperty.getStatus()
Sets the value ofCfnApp.CustomRuleProperty.getTarget()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
source
Sets the value ofCfnApp.CustomRuleProperty.getSource()
- Parameters:
source
- The source pattern for a URL rewrite or redirect rule. This parameter is required. Length Constraints: Minimum length of 1. Maximum length of 2048.Pattern: (?s).+
- Returns:
this
-
target
Sets the value ofCfnApp.CustomRuleProperty.getTarget()
- Parameters:
target
- The target pattern for a URL rewrite or redirect rule. This parameter is required. Length Constraints: Minimum length of 1. Maximum length of 2048.Pattern: (?s).+
- Returns:
this
-
condition
Sets the value ofCfnApp.CustomRuleProperty.getCondition()
- Parameters:
condition
- The condition for a URL rewrite or redirect rule, such as a country code. Length Constraints: Minimum length of 0. Maximum length of 2048.Pattern: (?s).*
- Returns:
this
-
status
Sets the value ofCfnApp.CustomRuleProperty.getStatus()
- Parameters:
status
- 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.
Length Constraints: Minimum length of 3. Maximum length of 7.
Pattern: .{3,7}
- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnApp.CustomRuleProperty>
- Returns:
- a new instance of
CfnApp.CustomRuleProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-