pub struct OriginBuilder<T>where
T: OriginState,{ /* private fields */ }Expand description
Builder for CloudFront distribution origins.
Implementations§
Source§impl OriginBuilder<OriginStartState>
impl OriginBuilder<OriginStartState>
pub fn new(origin_id: &str) -> OriginBuilder<OriginStartState>
Sourcepub fn s3_origin(
self,
bucket: &BucketRef,
oac: &OriginAccessControlRef,
origin_read_timeout: Option<S3OriginReadTimeout>,
) -> OriginBuilder<OriginS3OriginState>
pub fn s3_origin( self, bucket: &BucketRef, oac: &OriginAccessControlRef, origin_read_timeout: Option<S3OriginReadTimeout>, ) -> OriginBuilder<OriginS3OriginState>
Configures an S3 bucket as the origin.
Automatically creates a bucket policy allowing CloudFront access via Origin Access Control.
Sourcepub fn custom_origin(
self,
domain: &str,
policy: OriginProtocolPolicy,
) -> OriginBuilder<OriginCustomOriginState>
pub fn custom_origin( self, domain: &str, policy: OriginProtocolPolicy, ) -> OriginBuilder<OriginCustomOriginState>
Configures a custom origin.
Source§impl<T> OriginBuilder<T>where
T: OriginState,
impl<T> OriginBuilder<T>where
T: OriginState,
pub fn connection_attempts( self, attempts: ConnectionAttempts, ) -> OriginBuilder<T>
pub fn timeouts(self, timeouts: CfConnectionTimeout) -> OriginBuilder<T>
pub fn origin_path(self, path: OriginPath) -> OriginBuilder<T>
Source§impl OriginBuilder<OriginCustomOriginState>
impl OriginBuilder<OriginCustomOriginState>
pub fn ip_address_type( self, address_type: IpAddressType, ) -> OriginBuilder<OriginCustomOriginState>
pub fn http_port(self, port: u16) -> OriginBuilder<OriginCustomOriginState>
pub fn https_port(self, port: u16) -> OriginBuilder<OriginCustomOriginState>
pub fn origin_keep_alive_timeout( self, timeout: u8, ) -> OriginBuilder<OriginCustomOriginState>
pub fn origin_read_timeout( self, timeout: u8, ) -> OriginBuilder<OriginCustomOriginState>
pub fn add_origin_ssl_protocol( self, protocol: String, ) -> OriginBuilder<OriginCustomOriginState>
pub fn build(self) -> Origin
Auto Trait Implementations§
impl<T> Freeze for OriginBuilder<T>
impl<T> RefUnwindSafe for OriginBuilder<T>where
T: RefUnwindSafe,
impl<T> Send for OriginBuilder<T>where
T: Send,
impl<T> Sync for OriginBuilder<T>where
T: Sync,
impl<T> Unpin for OriginBuilder<T>where
T: Unpin,
impl<T> UnwindSafe for OriginBuilder<T>where
T: UnwindSafe,
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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 moreCreates a shared type from an unshared type.