#[non_exhaustive]pub struct OriginAccessControlConfig { /* private fields */ }
Expand description
A CloudFront origin access control configuration.
Implementations§
source§impl OriginAccessControlConfig
impl OriginAccessControlConfig
sourcepub fn description(&self) -> Option<&str>
pub fn description(&self) -> Option<&str>
A description of the origin access control.
sourcepub fn signing_protocol(&self) -> Option<&OriginAccessControlSigningProtocols>
pub fn signing_protocol(&self) -> Option<&OriginAccessControlSigningProtocols>
The signing protocol of the origin access control, which determines how CloudFront signs (authenticates) requests. The only valid value is sigv4
.
sourcepub fn signing_behavior(&self) -> Option<&OriginAccessControlSigningBehaviors>
pub fn signing_behavior(&self) -> Option<&OriginAccessControlSigningBehaviors>
Specifies which requests CloudFront signs (adds authentication information to). Specify always
for the most common use case. For more information, see origin access control advanced settings in the Amazon CloudFront Developer Guide.
This field can have one of the following values:
-
always
– CloudFront signs all origin requests, overwriting theAuthorization
header from the viewer request if one exists. -
never
– CloudFront doesn't sign any origin requests. This value turns off origin access control for all origins in all distributions that use this origin access control. -
no-override
– If the viewer request doesn't contain theAuthorization
header, then CloudFront signs the origin request. If the viewer request contains theAuthorization
header, then CloudFront doesn't sign the origin request and instead passes along theAuthorization
header from the viewer request. WARNING: To pass along theAuthorization
header from the viewer request, you must add theAuthorization
header to a cache policy for all cache behaviors that use origins associated with this origin access control.
sourcepub fn origin_access_control_origin_type(
&self
) -> Option<&OriginAccessControlOriginTypes>
pub fn origin_access_control_origin_type(
&self
) -> Option<&OriginAccessControlOriginTypes>
The type of origin that this origin access control is for. The only valid value is s3
.
source§impl OriginAccessControlConfig
impl OriginAccessControlConfig
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture OriginAccessControlConfig
.
Examples found in repository?
7471 7472 7473 7474 7475 7476 7477 7478 7479 7480 7481 7482 7483 7484 7485 7486 7487 7488 7489 7490 7491 7492 7493 7494 7495 7496 7497 7498 7499 7500 7501 7502 7503 7504 7505 7506 7507 7508 7509 7510 7511 7512 7513 7514 7515 7516 7517 7518 7519 7520 7521 7522 7523 7524 7525 7526 7527 7528 7529 7530 7531 7532 7533 7534 7535 7536 7537 7538 7539 7540 7541 7542 7543 7544 7545 7546 7547 7548 7549 7550
pub fn deser_structure_crate_model_origin_access_control_config(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::OriginAccessControlConfig, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::OriginAccessControlConfig::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Name") /* Name com.amazonaws.cloudfront#OriginAccessControlConfig$Name */ => {
let var_235 =
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_name(var_235);
}
,
s if s.matches("Description") /* Description com.amazonaws.cloudfront#OriginAccessControlConfig$Description */ => {
let var_236 =
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_description(var_236);
}
,
s if s.matches("SigningProtocol") /* SigningProtocol com.amazonaws.cloudfront#OriginAccessControlConfig$SigningProtocol */ => {
let var_237 =
Some(
Result::<crate::model::OriginAccessControlSigningProtocols, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::OriginAccessControlSigningProtocols::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_signing_protocol(var_237);
}
,
s if s.matches("SigningBehavior") /* SigningBehavior com.amazonaws.cloudfront#OriginAccessControlConfig$SigningBehavior */ => {
let var_238 =
Some(
Result::<crate::model::OriginAccessControlSigningBehaviors, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::OriginAccessControlSigningBehaviors::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_signing_behavior(var_238);
}
,
s if s.matches("OriginAccessControlOriginType") /* OriginAccessControlOriginType com.amazonaws.cloudfront#OriginAccessControlConfig$OriginAccessControlOriginType */ => {
let var_239 =
Some(
Result::<crate::model::OriginAccessControlOriginTypes, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::OriginAccessControlOriginTypes::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_origin_access_control_origin_type(var_239);
}
,
_ => {}
}
}
Ok(builder.build())
}
Trait Implementations§
source§impl Clone for OriginAccessControlConfig
impl Clone for OriginAccessControlConfig
source§fn clone(&self) -> OriginAccessControlConfig
fn clone(&self) -> OriginAccessControlConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more