#[non_exhaustive]
pub struct OriginAccessControlConfig { /* private fields */ }
Expand description

A CloudFront origin access control configuration.

Implementations§

A name to identify the origin access control.

A description of the origin access control.

The signing protocol of the origin access control, which determines how CloudFront signs (authenticates) requests. The only valid value is sigv4.

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 the Authorization 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 the Authorization header, then CloudFront signs the origin request. If the viewer request contains the Authorization header, then CloudFront doesn't sign the origin request and instead passes along the Authorization header from the viewer request. WARNING: To pass along the Authorization header from the viewer request, you must add the Authorization header to a cache policy for all cache behaviors that use origins associated with this origin access control.

The type of origin that this origin access control is for. The only valid value is s3.

Creates a new builder-style object to manufacture OriginAccessControlConfig.

Examples found in repository?
src/xml_deser.rs (line 7475)
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§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more