Struct aws_sdk_cloudfront::client::fluent_builders::CreateCachePolicy [−][src]
pub struct CreateCachePolicy<C = DynConnector, M = AwsMiddleware, R = Standard> { /* fields omitted */ }
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 automatically
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
impl<C, M, R> CreateCachePolicy<C, M, R> where
C: SmithyConnector,
M: SmithyMiddleware<C>,
R: NewRequestPolicy,
impl<C, M, R> CreateCachePolicy<C, M, R> where
C: SmithyConnector,
M: SmithyMiddleware<C>,
R: NewRequestPolicy,
pub async fn send(
self
) -> Result<CreateCachePolicyOutput, SdkError<CreateCachePolicyError>> where
R::Policy: SmithyRetryPolicy<CreateCachePolicyInputOperationOutputAlias, CreateCachePolicyOutput, CreateCachePolicyError, CreateCachePolicyInputOperationRetryAlias>,
pub async fn send(
self
) -> Result<CreateCachePolicyOutput, SdkError<CreateCachePolicyError>> where
R::Policy: SmithyRetryPolicy<CreateCachePolicyInputOperationOutputAlias, CreateCachePolicyOutput, CreateCachePolicyError, CreateCachePolicyInputOperationRetryAlias>,
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.
A cache policy configuration.
A cache policy configuration.
Trait Implementations
Auto Trait Implementations
impl<C = DynConnector, M = AwsMiddleware, R = Standard> !RefUnwindSafe for CreateCachePolicy<C, M, R>
impl<C, M, R> Send for CreateCachePolicy<C, M, R> where
C: Send + Sync,
M: Send + Sync,
R: Send + Sync,
impl<C, M, R> Sync for CreateCachePolicy<C, M, R> where
C: Send + Sync,
M: Send + Sync,
R: Send + Sync,
impl<C, M, R> Unpin for CreateCachePolicy<C, M, R>
impl<C = DynConnector, M = AwsMiddleware, R = Standard> !UnwindSafe for CreateCachePolicy<C, M, R>
Blanket Implementations
Mutably borrows from an owned value. Read more
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