Struct aws_sdk_cloudfront::types::builders::OriginBuilder
source · #[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 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
source§fn eq(&self, other: &OriginBuilder) -> bool
fn eq(&self, other: &OriginBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.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> 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