Struct aws_sdk_cloudfront::model::s3_origin::Builder
source · pub struct Builder { /* private fields */ }Expand description
A builder for S3Origin.
Implementations§
source§impl Builder
impl Builder
sourcepub fn domain_name(self, input: impl Into<String>) -> Self
pub fn domain_name(self, input: impl Into<String>) -> Self
The DNS name of the Amazon S3 origin.
sourcepub fn set_domain_name(self, input: Option<String>) -> Self
pub fn set_domain_name(self, input: Option<String>) -> Self
The DNS name of the Amazon S3 origin.
Examples found in repository?
10764 10765 10766 10767 10768 10769 10770 10771 10772 10773 10774 10775 10776 10777 10778 10779 10780 10781 10782 10783 10784 10785 10786 10787 10788 10789 10790 10791 10792 10793 10794 10795 10796 10797 10798 10799 10800 10801
pub fn deser_structure_crate_model_s3_origin(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::S3Origin, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::S3Origin::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("DomainName") /* DomainName com.amazonaws.cloudfront#S3Origin$DomainName */ => {
let var_435 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_domain_name(var_435);
}
,
s if s.matches("OriginAccessIdentity") /* OriginAccessIdentity com.amazonaws.cloudfront#S3Origin$OriginAccessIdentity */ => {
let var_436 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_origin_access_identity(var_436);
}
,
_ => {}
}
}
Ok(builder.build())
}sourcepub fn origin_access_identity(self, input: impl Into<String>) -> Self
pub fn origin_access_identity(self, input: impl Into<String>) -> Self
The CloudFront origin access identity to associate with the distribution. Use an origin access identity to configure the distribution so that end users can only access objects in an Amazon S3 bucket through CloudFront.
If you want end users 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, see Using an Origin Access Identity to Restrict Access to Your Amazon S3 Content in the Amazon CloudFront Developer Guide.
sourcepub fn set_origin_access_identity(self, input: Option<String>) -> Self
pub fn set_origin_access_identity(self, input: Option<String>) -> Self
The CloudFront origin access identity to associate with the distribution. Use an origin access identity to configure the distribution so that end users can only access objects in an Amazon S3 bucket through CloudFront.
If you want end users 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, see Using an Origin Access Identity to Restrict Access to Your Amazon S3 Content in the Amazon CloudFront Developer Guide.
Examples found in repository?
10764 10765 10766 10767 10768 10769 10770 10771 10772 10773 10774 10775 10776 10777 10778 10779 10780 10781 10782 10783 10784 10785 10786 10787 10788 10789 10790 10791 10792 10793 10794 10795 10796 10797 10798 10799 10800 10801
pub fn deser_structure_crate_model_s3_origin(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::S3Origin, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::S3Origin::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("DomainName") /* DomainName com.amazonaws.cloudfront#S3Origin$DomainName */ => {
let var_435 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_domain_name(var_435);
}
,
s if s.matches("OriginAccessIdentity") /* OriginAccessIdentity com.amazonaws.cloudfront#S3Origin$OriginAccessIdentity */ => {
let var_436 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_origin_access_identity(var_436);
}
,
_ => {}
}
}
Ok(builder.build())
}sourcepub fn build(self) -> S3Origin
pub fn build(self) -> S3Origin
Consumes the builder and constructs a S3Origin.
Examples found in repository?
10764 10765 10766 10767 10768 10769 10770 10771 10772 10773 10774 10775 10776 10777 10778 10779 10780 10781 10782 10783 10784 10785 10786 10787 10788 10789 10790 10791 10792 10793 10794 10795 10796 10797 10798 10799 10800 10801
pub fn deser_structure_crate_model_s3_origin(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::S3Origin, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::S3Origin::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("DomainName") /* DomainName com.amazonaws.cloudfront#S3Origin$DomainName */ => {
let var_435 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_domain_name(var_435);
}
,
s if s.matches("OriginAccessIdentity") /* OriginAccessIdentity com.amazonaws.cloudfront#S3Origin$OriginAccessIdentity */ => {
let var_436 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_origin_access_identity(var_436);
}
,
_ => {}
}
}
Ok(builder.build())
}