Skip to main content

DistributionConfig

Struct DistributionConfig 

Source
pub struct DistributionConfig {
    pub caller_reference: String,
    pub aliases: Option<Aliases>,
    pub default_root_object: Option<String>,
    pub origins: Origins,
    pub default_cache_behavior: DefaultCacheBehavior,
    pub comment: String,
    pub price_class: Option<String>,
    pub enabled: bool,
    pub viewer_certificate: Option<ViewerCertificate>,
}
Expand description

A distribution configuration.

AWS API: cloudfront.v1.DistributionConfig Reference: https://docs.aws.amazon.com/cloudfront/latest/APIReference/DistributionConfig

§Coverage

9 of 24 fields included. Omitted fields:

  • OriginGroups — not selected in manifest
  • CacheBehaviors — not selected in manifest
  • CustomErrorResponses — not selected in manifest
  • Logging — not selected in manifest
  • Restrictions — not selected in manifest
  • WebACLId — not selected in manifest
  • HttpVersion — not selected in manifest
  • IsIPV6Enabled — not selected in manifest
  • ContinuousDeploymentPolicyId — not selected in manifest
  • Staging — not selected in manifest
  • AnycastIpListId — not selected in manifest
  • TenantConfig — not selected in manifest
  • ConnectionMode — not selected in manifest
  • ViewerMtlsConfig — not selected in manifest
  • ConnectionFunctionAssociation — not selected in manifest

Fields§

§caller_reference: String

A unique value (for example, a date-time stamp) that ensures that the request can’t be replayed. If the value of CallerReference is new (regardless of the content of the DistributionConfig object), CloudFront creates a new distribution. If CallerReference is a value that you already sent in a previous request to create a distribution, CloudFront returns a DistributionAlreadyExists error.

§aliases: Option<Aliases>

This field only supports standard distributions. You can’t specify this field for multi- tenant distributions. For more information, see Unsupported features for SaaS Manager for Amazon CloudFront in the Amazon CloudFront Developer Guide. A complex type that contains information about CNAMEs (alternate domain names), if any, for this distribution.

§default_root_object: Option<String>

When a viewer requests the root URL for your distribution, the default root object is the object that you want CloudFront to request from your origin. For example, if your root URL is https://www.example.com, you can specify CloudFront to return the index.html file as the default root object. You can specify a default root object so that viewers see a specific file or object, instead of another object in your distribution (for example, https://www.example.com/product-description.html). A default root object avoids exposing the contents of your distribution. You can specify the object name or a path to the object name (for example, index.html or exampleFolderName/index.html). Your string can’t begin with a forward slash (/). Only specify the object name or the path to the object. If you don’t want to specify a default root object when you create a distribution, include an empty DefaultRootObject element. To delete the default root object from an existing distribution, update the distribution configuration and include an empty DefaultRootObject element. To replace the default root object, update the distribution configuration and specify the new object. For more information about the default root object, see Specify a default root object in the Amazon CloudFront Developer Guide.

§origins: Origins

A complex type that contains information about origins for this distribution.

§default_cache_behavior: DefaultCacheBehavior

A complex type that describes the default cache behavior if you don’t specify a CacheBehavior element or if files don’t match any of the values of PathPattern in CacheBehavior elements. You must create exactly one default cache behavior.

§comment: String

A comment to describe the distribution. The comment cannot be longer than 128 characters.

§price_class: Option<String>

This field only supports standard distributions. You can’t specify this field for multi- tenant distributions. For more information, see Unsupported features for SaaS Manager for Amazon CloudFront in the Amazon CloudFront Developer Guide. The price class that corresponds with the maximum price that you want to pay for CloudFront service. If you specify PriceClass_All, CloudFront responds to requests for your objects from all CloudFront edge locations. If you specify a price class other than PriceClass_All, CloudFront serves your objects from the CloudFront edge location that has the lowest latency among the edge locations in your price class. Viewers who are in or near regions that are excluded from your specified price class may encounter slower performance. For more information about price classes, see Choosing the Price Class for a CloudFront Distribution in the Amazon CloudFront Developer Guide. For information about CloudFront pricing, including how price classes (such as Price Class 100) map to CloudFront regions, see Amazon CloudFront Pricing.

§enabled: bool

From this field, you can enable or disable the selected distribution.

§viewer_certificate: Option<ViewerCertificate>

A complex type that determines the distribution’s SSL/TLS configuration for communicating with viewers.

Trait Implementations§

Source§

impl Clone for DistributionConfig

Source§

fn clone(&self) -> DistributionConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DistributionConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for DistributionConfig

Source§

fn default() -> DistributionConfig

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for DistributionConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for DistributionConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

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

fn in_current_span(self) -> Instrumented<Self>

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

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,