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 permanently) 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 permanently) 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 permanently) 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 ==
.impl StructuralPartialEq for CustomRuleBuilder
Auto Trait Implementations§
impl Freeze for CustomRuleBuilder
impl RefUnwindSafe for CustomRuleBuilder
impl Send for CustomRuleBuilder
impl Sync for CustomRuleBuilder
impl Unpin for CustomRuleBuilder
impl UnwindSafe for CustomRuleBuilder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more