#[non_exhaustive]pub struct OriginBuilder { /* private fields */ }
Expand description
A builder for Origin
.
Implementations§
Source§impl OriginBuilder
impl OriginBuilder
Sourcepub fn id(self, input: impl Into<String>) -> Self
pub fn id(self, input: impl Into<String>) -> Self
A unique identifier for the origin. This value must be unique within the distribution.
Use this value to specify the TargetOriginId
in a CacheBehavior
or DefaultCacheBehavior
.
Sourcepub fn set_id(self, input: Option<String>) -> Self
pub fn set_id(self, input: Option<String>) -> Self
A unique identifier for the origin. This value must be unique within the distribution.
Use this value to specify the TargetOriginId
in a CacheBehavior
or DefaultCacheBehavior
.
Sourcepub fn get_id(&self) -> &Option<String>
pub fn get_id(&self) -> &Option<String>
A unique identifier for the origin. This value must be unique within the distribution.
Use this value to specify the TargetOriginId
in a CacheBehavior
or DefaultCacheBehavior
.
Sourcepub fn domain_name(self, input: impl Into<String>) -> Self
pub fn domain_name(self, input: impl Into<String>) -> Self
The domain name for the origin.
For more information, see Origin Domain Name in the Amazon CloudFront Developer Guide.
This field is required.Sourcepub fn set_domain_name(self, input: Option<String>) -> Self
pub fn set_domain_name(self, input: Option<String>) -> Self
The domain name for the origin.
For more information, see Origin Domain Name in the Amazon CloudFront Developer Guide.
Sourcepub fn get_domain_name(&self) -> &Option<String>
pub fn get_domain_name(&self) -> &Option<String>
The domain name for the origin.
For more information, see Origin Domain Name in the Amazon CloudFront Developer Guide.
Sourcepub fn origin_path(self, input: impl Into<String>) -> Self
pub fn origin_path(self, input: impl Into<String>) -> Self
An optional path that CloudFront appends to the origin domain name when CloudFront requests content from the origin.
For more information, see Origin Path in the Amazon CloudFront Developer Guide.
Sourcepub fn set_origin_path(self, input: Option<String>) -> Self
pub fn set_origin_path(self, input: Option<String>) -> Self
An optional path that CloudFront appends to the origin domain name when CloudFront requests content from the origin.
For more information, see Origin Path in the Amazon CloudFront Developer Guide.
Sourcepub fn get_origin_path(&self) -> &Option<String>
pub fn get_origin_path(&self) -> &Option<String>
An optional path that CloudFront appends to the origin domain name when CloudFront requests content from the origin.
For more information, see Origin Path in the Amazon CloudFront Developer Guide.
Sourcepub fn custom_headers(self, input: CustomHeaders) -> Self
pub fn custom_headers(self, input: CustomHeaders) -> Self
A list of HTTP header names and values that CloudFront adds to the requests that it sends to the origin.
For more information, see Adding Custom Headers to Origin Requests in the Amazon CloudFront Developer Guide.
Sourcepub fn set_custom_headers(self, input: Option<CustomHeaders>) -> Self
pub fn set_custom_headers(self, input: Option<CustomHeaders>) -> Self
A list of HTTP header names and values that CloudFront adds to the requests that it sends to the origin.
For more information, see Adding Custom Headers to Origin Requests in the Amazon CloudFront Developer Guide.
Sourcepub fn get_custom_headers(&self) -> &Option<CustomHeaders>
pub fn get_custom_headers(&self) -> &Option<CustomHeaders>
A list of HTTP header names and values that CloudFront adds to the requests that it sends to the origin.
For more information, see Adding Custom Headers to Origin Requests in the Amazon CloudFront Developer Guide.
Sourcepub fn s3_origin_config(self, input: S3OriginConfig) -> Self
pub fn s3_origin_config(self, input: S3OriginConfig) -> Self
Use this type to specify an origin that is an Amazon S3 bucket that is not configured with static website hosting. To specify any other type of origin, including an Amazon S3 bucket that is configured with static website hosting, use the CustomOriginConfig
type instead.
Sourcepub fn set_s3_origin_config(self, input: Option<S3OriginConfig>) -> Self
pub fn set_s3_origin_config(self, input: Option<S3OriginConfig>) -> Self
Use this type to specify an origin that is an Amazon S3 bucket that is not configured with static website hosting. To specify any other type of origin, including an Amazon S3 bucket that is configured with static website hosting, use the CustomOriginConfig
type instead.
Sourcepub fn get_s3_origin_config(&self) -> &Option<S3OriginConfig>
pub fn get_s3_origin_config(&self) -> &Option<S3OriginConfig>
Use this type to specify an origin that is an Amazon S3 bucket that is not configured with static website hosting. To specify any other type of origin, including an Amazon S3 bucket that is configured with static website hosting, use the CustomOriginConfig
type instead.
Sourcepub fn custom_origin_config(self, input: CustomOriginConfig) -> Self
pub fn custom_origin_config(self, input: CustomOriginConfig) -> Self
Use this type to specify an origin that is not an Amazon S3 bucket, with one exception. If the Amazon S3 bucket is configured with static website hosting, use this type. If the Amazon S3 bucket is not configured with static website hosting, use the S3OriginConfig
type instead.
Sourcepub fn set_custom_origin_config(self, input: Option<CustomOriginConfig>) -> Self
pub fn set_custom_origin_config(self, input: Option<CustomOriginConfig>) -> Self
Use this type to specify an origin that is not an Amazon S3 bucket, with one exception. If the Amazon S3 bucket is configured with static website hosting, use this type. If the Amazon S3 bucket is not configured with static website hosting, use the S3OriginConfig
type instead.
Sourcepub fn get_custom_origin_config(&self) -> &Option<CustomOriginConfig>
pub fn get_custom_origin_config(&self) -> &Option<CustomOriginConfig>
Use this type to specify an origin that is not an Amazon S3 bucket, with one exception. If the Amazon S3 bucket is configured with static website hosting, use this type. If the Amazon S3 bucket is not configured with static website hosting, use the S3OriginConfig
type instead.
Sourcepub fn vpc_origin_config(self, input: VpcOriginConfig) -> Self
pub fn vpc_origin_config(self, input: VpcOriginConfig) -> Self
The VPC origin configuration.
Sourcepub fn set_vpc_origin_config(self, input: Option<VpcOriginConfig>) -> Self
pub fn set_vpc_origin_config(self, input: Option<VpcOriginConfig>) -> Self
The VPC origin configuration.
Sourcepub fn get_vpc_origin_config(&self) -> &Option<VpcOriginConfig>
pub fn get_vpc_origin_config(&self) -> &Option<VpcOriginConfig>
The VPC origin configuration.
Sourcepub fn connection_attempts(self, input: i32) -> Self
pub fn connection_attempts(self, input: i32) -> Self
The number of times that CloudFront attempts to connect to the origin. The minimum number is 1, the maximum is 3, and the default (if you don't specify otherwise) is 3.
For a custom origin (including an Amazon S3 bucket that's configured with static website hosting), this value also specifies the number of times that CloudFront attempts to get a response from the origin, in the case of an Origin Response Timeout.
For more information, see Origin Connection Attempts in the Amazon CloudFront Developer Guide.
Sourcepub fn set_connection_attempts(self, input: Option<i32>) -> Self
pub fn set_connection_attempts(self, input: Option<i32>) -> Self
The number of times that CloudFront attempts to connect to the origin. The minimum number is 1, the maximum is 3, and the default (if you don't specify otherwise) is 3.
For a custom origin (including an Amazon S3 bucket that's configured with static website hosting), this value also specifies the number of times that CloudFront attempts to get a response from the origin, in the case of an Origin Response Timeout.
For more information, see Origin Connection Attempts in the Amazon CloudFront Developer Guide.
Sourcepub fn get_connection_attempts(&self) -> &Option<i32>
pub fn get_connection_attempts(&self) -> &Option<i32>
The number of times that CloudFront attempts to connect to the origin. The minimum number is 1, the maximum is 3, and the default (if you don't specify otherwise) is 3.
For a custom origin (including an Amazon S3 bucket that's configured with static website hosting), this value also specifies the number of times that CloudFront attempts to get a response from the origin, in the case of an Origin Response Timeout.
For more information, see Origin Connection Attempts in the Amazon CloudFront Developer Guide.
Sourcepub fn connection_timeout(self, input: i32) -> Self
pub fn connection_timeout(self, input: i32) -> Self
The number of seconds that CloudFront waits when trying to establish a connection to the origin. The minimum timeout is 1 second, the maximum is 10 seconds, and the default (if you don't specify otherwise) is 10 seconds.
For more information, see Origin Connection Timeout in the Amazon CloudFront Developer Guide.
Sourcepub fn set_connection_timeout(self, input: Option<i32>) -> Self
pub fn set_connection_timeout(self, input: Option<i32>) -> Self
The number of seconds that CloudFront waits when trying to establish a connection to the origin. The minimum timeout is 1 second, the maximum is 10 seconds, and the default (if you don't specify otherwise) is 10 seconds.
For more information, see Origin Connection Timeout in the Amazon CloudFront Developer Guide.
Sourcepub fn get_connection_timeout(&self) -> &Option<i32>
pub fn get_connection_timeout(&self) -> &Option<i32>
The number of seconds that CloudFront waits when trying to establish a connection to the origin. The minimum timeout is 1 second, the maximum is 10 seconds, and the default (if you don't specify otherwise) is 10 seconds.
For more information, see Origin Connection Timeout in the Amazon CloudFront Developer Guide.
Sourcepub fn origin_shield(self, input: OriginShield) -> Self
pub fn origin_shield(self, input: OriginShield) -> Self
CloudFront Origin Shield. Using Origin Shield can help reduce the load on your origin.
For more information, see Using Origin Shield in the Amazon CloudFront Developer Guide.
Sourcepub fn set_origin_shield(self, input: Option<OriginShield>) -> Self
pub fn set_origin_shield(self, input: Option<OriginShield>) -> Self
CloudFront Origin Shield. Using Origin Shield can help reduce the load on your origin.
For more information, see Using Origin Shield in the Amazon CloudFront Developer Guide.
Sourcepub fn get_origin_shield(&self) -> &Option<OriginShield>
pub fn get_origin_shield(&self) -> &Option<OriginShield>
CloudFront Origin Shield. Using Origin Shield can help reduce the load on your origin.
For more information, see Using Origin Shield in the Amazon CloudFront Developer Guide.
Sourcepub fn origin_access_control_id(self, input: impl Into<String>) -> Self
pub fn origin_access_control_id(self, input: impl Into<String>) -> Self
The unique identifier of an origin access control for this origin.
For more information, see Restricting access to an Amazon S3 origin in the Amazon CloudFront Developer Guide.
Sourcepub fn set_origin_access_control_id(self, input: Option<String>) -> Self
pub fn set_origin_access_control_id(self, input: Option<String>) -> Self
The unique identifier of an origin access control for this origin.
For more information, see Restricting access to an Amazon S3 origin in the Amazon CloudFront Developer Guide.
Sourcepub fn get_origin_access_control_id(&self) -> &Option<String>
pub fn get_origin_access_control_id(&self) -> &Option<String>
The unique identifier of an origin access control for this origin.
For more information, see Restricting access to an Amazon S3 origin in the Amazon CloudFront Developer Guide.
Trait Implementations§
Source§impl Clone for OriginBuilder
impl Clone for OriginBuilder
Source§fn clone(&self) -> OriginBuilder
fn clone(&self) -> OriginBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for OriginBuilder
impl Debug for OriginBuilder
Source§impl Default for OriginBuilder
impl Default for OriginBuilder
Source§fn default() -> OriginBuilder
fn default() -> OriginBuilder
Source§impl PartialEq for OriginBuilder
impl PartialEq for OriginBuilder
impl StructuralPartialEq for OriginBuilder
Auto Trait Implementations§
impl Freeze for OriginBuilder
impl RefUnwindSafe for OriginBuilder
impl Send for OriginBuilder
impl Sync for OriginBuilder
impl Unpin for OriginBuilder
impl UnwindSafe for OriginBuilder
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the foreground set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red()
and
green()
, which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg()
:
use yansi::{Paint, Color};
painted.fg(Color::White);
Set foreground color to white using white()
.
use yansi::Paint;
painted.white();
Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the background set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red()
and
on_green()
, which have the same functionality but
are pithier.
§Example
Set background color to red using fg()
:
use yansi::{Paint, Color};
painted.bg(Color::Red);
Set background color to red using on_red()
.
use yansi::Paint;
painted.on_red();
Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute
value
.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold()
and
underline()
, which have the same functionality
but are pithier.
§Example
Make text bold using attr()
:
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);
Make text bold using using bold()
.
use yansi::Paint;
painted.bold();
Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi
Quirk
value
.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask()
and
wrap()
, which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk()
:
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);
Enable wrapping using wrap()
.
use yansi::Paint;
painted.wrap();
Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition
value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted
only when both stdout
and stderr
are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);