Struct aws_sdk_cloudfront::operation::create_cache_policy::builders::CreateCachePolicyFluentBuilder
source · pub struct CreateCachePolicyFluentBuilder { /* private fields */ }
Expand description
Fluent builder constructing a request to CreateCachePolicy
.
Creates a cache policy.
After you create a cache policy, you can attach it to one or more cache behaviors. When it's attached to a cache behavior, the cache policy determines the following:
-
The values that CloudFront includes in the cache key. These values can include HTTP headers, cookies, and URL query strings. CloudFront uses the cache key to find an object in its cache that it can return to the viewer.
-
The default, minimum, and maximum time to live (TTL) values that you want objects to stay in the CloudFront cache.
The headers, cookies, and query strings that are included in the cache key are also included in requests that CloudFront sends to the origin. CloudFront sends a request when it can't find an object in its cache that matches the request's cache key. If you want to send values to the origin but not include them in the cache key, use OriginRequestPolicy
.
For more information about cache policies, see Controlling the cache key in the Amazon CloudFront Developer Guide.
Implementations§
source§impl CreateCachePolicyFluentBuilder
impl CreateCachePolicyFluentBuilder
sourcepub fn as_input(&self) -> &CreateCachePolicyInputBuilder
pub fn as_input(&self) -> &CreateCachePolicyInputBuilder
Access the CreateCachePolicy as a reference.
sourcepub async fn send(
self,
) -> Result<CreateCachePolicyOutput, SdkError<CreateCachePolicyError, HttpResponse>>
pub async fn send( self, ) -> Result<CreateCachePolicyOutput, SdkError<CreateCachePolicyError, HttpResponse>>
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub fn customize(
self,
) -> CustomizableOperation<CreateCachePolicyOutput, CreateCachePolicyError, Self>
pub fn customize( self, ) -> CustomizableOperation<CreateCachePolicyOutput, CreateCachePolicyError, Self>
Consumes this builder, creating a customizable operation that can be modified before being sent.
sourcepub fn cache_policy_config(self, input: CachePolicyConfig) -> Self
pub fn cache_policy_config(self, input: CachePolicyConfig) -> Self
A cache policy configuration.
sourcepub fn set_cache_policy_config(self, input: Option<CachePolicyConfig>) -> Self
pub fn set_cache_policy_config(self, input: Option<CachePolicyConfig>) -> Self
A cache policy configuration.
sourcepub fn get_cache_policy_config(&self) -> &Option<CachePolicyConfig>
pub fn get_cache_policy_config(&self) -> &Option<CachePolicyConfig>
A cache policy configuration.
Trait Implementations§
source§impl Clone for CreateCachePolicyFluentBuilder
impl Clone for CreateCachePolicyFluentBuilder
source§fn clone(&self) -> CreateCachePolicyFluentBuilder
fn clone(&self) -> CreateCachePolicyFluentBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for CreateCachePolicyFluentBuilder
impl !RefUnwindSafe for CreateCachePolicyFluentBuilder
impl Send for CreateCachePolicyFluentBuilder
impl Sync for CreateCachePolicyFluentBuilder
impl Unpin for CreateCachePolicyFluentBuilder
impl !UnwindSafe for CreateCachePolicyFluentBuilder
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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