Struct aws_sdk_amplify::types::CustomRule
source · #[non_exhaustive]pub struct CustomRule {
pub source: Option<String>,
pub target: Option<String>,
pub status: Option<String>,
pub condition: Option<String>,
}Expand description
Describes a custom rewrite or redirect rule.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.source: Option<String>The source pattern for a URL rewrite or redirect rule.
target: Option<String>The target pattern for a URL rewrite or redirect rule.
status: 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.
condition: Option<String>The condition for a URL rewrite or redirect rule, such as a country code.
Implementations§
source§impl CustomRule
impl CustomRule
sourcepub fn status(&self) -> Option<&str>
pub fn status(&self) -> Option<&str>
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.
source§impl CustomRule
impl CustomRule
sourcepub fn builder() -> CustomRuleBuilder
pub fn builder() -> CustomRuleBuilder
Creates a new builder-style object to manufacture CustomRule.
Trait Implementations§
source§impl Clone for CustomRule
impl Clone for CustomRule
source§fn clone(&self) -> CustomRule
fn clone(&self) -> CustomRule
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for CustomRule
impl Debug for CustomRule
source§impl PartialEq for CustomRule
impl PartialEq for CustomRule
source§fn eq(&self, other: &CustomRule) -> bool
fn eq(&self, other: &CustomRule) -> bool
self and other values to be equal, and is used
by ==.