Struct aws_sdk_cloudfront::types::builders::S3OriginConfigBuilder
source · #[non_exhaustive]pub struct S3OriginConfigBuilder { /* private fields */ }
Expand description
A builder for S3OriginConfig
.
Implementations§
source§impl S3OriginConfigBuilder
impl S3OriginConfigBuilder
sourcepub fn origin_access_identity(self, input: impl Into<String>) -> Self
pub fn origin_access_identity(self, input: impl Into<String>) -> Self
If you're using origin access control (OAC) instead of origin access identity, specify an empty OriginAccessIdentity
element. For more information, see Restricting access to an Amazon Web Services in the Amazon CloudFront Developer Guide.
The CloudFront origin access identity to associate with the origin. Use an origin access identity to configure the origin so that viewers can only access objects in an Amazon S3 bucket through CloudFront. The format of the value is:
origin-access-identity/cloudfront/ID-of-origin-access-identity
The ID-of-origin-access-identity
is the value that CloudFront returned in the ID
element when you created the origin access identity.
If you want viewers to be able to access objects using either the CloudFront URL or the Amazon S3 URL, specify an empty OriginAccessIdentity
element.
To delete the origin access identity from an existing distribution, update the distribution configuration and include an empty OriginAccessIdentity
element.
To replace the origin access identity, update the distribution configuration and specify the new origin access identity.
For more information about the origin access identity, see Serving Private Content through CloudFront in the Amazon CloudFront Developer Guide.
This field is required.sourcepub fn set_origin_access_identity(self, input: Option<String>) -> Self
pub fn set_origin_access_identity(self, input: Option<String>) -> Self
If you're using origin access control (OAC) instead of origin access identity, specify an empty OriginAccessIdentity
element. For more information, see Restricting access to an Amazon Web Services in the Amazon CloudFront Developer Guide.
The CloudFront origin access identity to associate with the origin. Use an origin access identity to configure the origin so that viewers can only access objects in an Amazon S3 bucket through CloudFront. The format of the value is:
origin-access-identity/cloudfront/ID-of-origin-access-identity
The ID-of-origin-access-identity
is the value that CloudFront returned in the ID
element when you created the origin access identity.
If you want viewers to be able to access objects using either the CloudFront URL or the Amazon S3 URL, specify an empty OriginAccessIdentity
element.
To delete the origin access identity from an existing distribution, update the distribution configuration and include an empty OriginAccessIdentity
element.
To replace the origin access identity, update the distribution configuration and specify the new origin access identity.
For more information about the origin access identity, see Serving Private Content through CloudFront in the Amazon CloudFront Developer Guide.
sourcepub fn get_origin_access_identity(&self) -> &Option<String>
pub fn get_origin_access_identity(&self) -> &Option<String>
If you're using origin access control (OAC) instead of origin access identity, specify an empty OriginAccessIdentity
element. For more information, see Restricting access to an Amazon Web Services in the Amazon CloudFront Developer Guide.
The CloudFront origin access identity to associate with the origin. Use an origin access identity to configure the origin so that viewers can only access objects in an Amazon S3 bucket through CloudFront. The format of the value is:
origin-access-identity/cloudfront/ID-of-origin-access-identity
The ID-of-origin-access-identity
is the value that CloudFront returned in the ID
element when you created the origin access identity.
If you want viewers to be able to access objects using either the CloudFront URL or the Amazon S3 URL, specify an empty OriginAccessIdentity
element.
To delete the origin access identity from an existing distribution, update the distribution configuration and include an empty OriginAccessIdentity
element.
To replace the origin access identity, update the distribution configuration and specify the new origin access identity.
For more information about the origin access identity, see Serving Private Content through CloudFront in the Amazon CloudFront Developer Guide.
sourcepub fn build(self) -> Result<S3OriginConfig, BuildError>
pub fn build(self) -> Result<S3OriginConfig, BuildError>
Consumes the builder and constructs a S3OriginConfig
.
This method will fail if any of the following fields are not set:
Trait Implementations§
source§impl Clone for S3OriginConfigBuilder
impl Clone for S3OriginConfigBuilder
source§fn clone(&self) -> S3OriginConfigBuilder
fn clone(&self) -> S3OriginConfigBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for S3OriginConfigBuilder
impl Debug for S3OriginConfigBuilder
source§impl Default for S3OriginConfigBuilder
impl Default for S3OriginConfigBuilder
source§fn default() -> S3OriginConfigBuilder
fn default() -> S3OriginConfigBuilder
source§impl PartialEq for S3OriginConfigBuilder
impl PartialEq for S3OriginConfigBuilder
source§fn eq(&self, other: &S3OriginConfigBuilder) -> bool
fn eq(&self, other: &S3OriginConfigBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for S3OriginConfigBuilder
Auto Trait Implementations§
impl Freeze for S3OriginConfigBuilder
impl RefUnwindSafe for S3OriginConfigBuilder
impl Send for S3OriginConfigBuilder
impl Sync for S3OriginConfigBuilder
impl Unpin for S3OriginConfigBuilder
impl UnwindSafe for S3OriginConfigBuilder
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