Struct aws_sdk_amplify::types::builders::CustomRuleBuilder
source · #[non_exhaustive]pub struct CustomRuleBuilder { /* private fields */ }Expand description
A builder for CustomRule.
Implementations§
source§impl CustomRuleBuilder
impl CustomRuleBuilder
sourcepub fn source(self, input: impl Into<String>) -> Self
pub fn source(self, input: impl Into<String>) -> Self
The source pattern for a URL rewrite or redirect rule.
This field is required.sourcepub fn set_source(self, input: Option<String>) -> Self
pub fn set_source(self, input: Option<String>) -> Self
The source pattern for a URL rewrite or redirect rule.
sourcepub fn get_source(&self) -> &Option<String>
pub fn get_source(&self) -> &Option<String>
The source pattern for a URL rewrite or redirect rule.
sourcepub fn target(self, input: impl Into<String>) -> Self
pub fn target(self, input: impl Into<String>) -> Self
The target pattern for a URL rewrite or redirect rule.
This field is required.sourcepub fn set_target(self, input: Option<String>) -> Self
pub fn set_target(self, input: Option<String>) -> Self
The target pattern for a URL rewrite or redirect rule.
sourcepub fn get_target(&self) -> &Option<String>
pub fn get_target(&self) -> &Option<String>
The target pattern for a URL rewrite or redirect rule.
sourcepub fn status(self, input: impl Into<String>) -> Self
pub fn status(self, input: impl Into<String>) -> Self
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.
sourcepub fn set_status(self, input: Option<String>) -> Self
pub fn set_status(self, input: Option<String>) -> Self
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.
sourcepub fn get_status(&self) -> &Option<String>
pub fn get_status(&self) -> &Option<String>
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.
sourcepub fn condition(self, input: impl Into<String>) -> Self
pub fn condition(self, input: impl Into<String>) -> Self
The condition for a URL rewrite or redirect rule, such as a country code.
sourcepub fn set_condition(self, input: Option<String>) -> Self
pub fn set_condition(self, input: Option<String>) -> Self
The condition for a URL rewrite or redirect rule, such as a country code.
sourcepub fn get_condition(&self) -> &Option<String>
pub fn get_condition(&self) -> &Option<String>
The condition for a URL rewrite or redirect rule, such as a country code.
sourcepub fn build(self) -> Result<CustomRule, BuildError>
pub fn build(self) -> Result<CustomRule, BuildError>
Consumes the builder and constructs a CustomRule.
This method will fail if any of the following fields are not set:
Trait Implementations§
source§impl Clone for CustomRuleBuilder
impl Clone for CustomRuleBuilder
source§fn clone(&self) -> CustomRuleBuilder
fn clone(&self) -> CustomRuleBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for CustomRuleBuilder
impl Debug for CustomRuleBuilder
source§impl Default for CustomRuleBuilder
impl Default for CustomRuleBuilder
source§fn default() -> CustomRuleBuilder
fn default() -> CustomRuleBuilder
source§impl PartialEq for CustomRuleBuilder
impl PartialEq for CustomRuleBuilder
source§fn eq(&self, other: &CustomRuleBuilder) -> bool
fn eq(&self, other: &CustomRuleBuilder) -> bool
self and other values to be equal, and is used
by ==.