Struct aws_sdk_cloudfront::client::fluent_builders::CreateOriginRequestPolicy [−][src]
pub struct CreateOriginRequestPolicy<C = DynConnector, M = AwsMiddleware, R = Standard> { /* fields omitted */ }
Expand description
Fluent builder constructing a request to CreateOriginRequestPolicy
.
Creates an origin request policy.
After you create an origin request policy, you can attach it to one or more cache behaviors. When it’s attached to a cache behavior, the origin request policy determines the values that CloudFront includes in requests that it sends to the origin. Each request that CloudFront sends to the origin includes the following:
-
The request body and the URL path (without the domain name) from the viewer request.
-
The headers that CloudFront automatically includes in every origin request, including
Host
,User-Agent
, andX-Amz-Cf-Id
. -
All HTTP headers, cookies, and URL query strings that are specified in the cache policy or the origin request policy. These can include items from the viewer request and, in the case of headers, additional ones that are added by CloudFront.
CloudFront sends a request when it can’t find a valid object in its cache that matches the
request. If you want to send values to the origin and also include them in the cache
key, use CachePolicy
.
For more information about origin request policies, see Controlling origin requests in the Amazon CloudFront Developer Guide.
Implementations
impl<C, M, R> CreateOriginRequestPolicy<C, M, R> where
C: SmithyConnector,
M: SmithyMiddleware<C>,
R: NewRequestPolicy,
impl<C, M, R> CreateOriginRequestPolicy<C, M, R> where
C: SmithyConnector,
M: SmithyMiddleware<C>,
R: NewRequestPolicy,
pub async fn send(
self
) -> Result<CreateOriginRequestPolicyOutput, SdkError<CreateOriginRequestPolicyError>> where
R::Policy: SmithyRetryPolicy<CreateOriginRequestPolicyInputOperationOutputAlias, CreateOriginRequestPolicyOutput, CreateOriginRequestPolicyError, CreateOriginRequestPolicyInputOperationRetryAlias>,
pub async fn send(
self
) -> Result<CreateOriginRequestPolicyOutput, SdkError<CreateOriginRequestPolicyError>> where
R::Policy: SmithyRetryPolicy<CreateOriginRequestPolicyInputOperationOutputAlias, CreateOriginRequestPolicyOutput, CreateOriginRequestPolicyError, CreateOriginRequestPolicyInputOperationRetryAlias>,
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.
An origin request policy configuration.
pub fn set_origin_request_policy_config(
self,
input: Option<OriginRequestPolicyConfig>
) -> Self
pub fn set_origin_request_policy_config(
self,
input: Option<OriginRequestPolicyConfig>
) -> Self
An origin request policy configuration.
Trait Implementations
Auto Trait Implementations
impl<C = DynConnector, M = AwsMiddleware, R = Standard> !RefUnwindSafe for CreateOriginRequestPolicy<C, M, R>
impl<C, M, R> Send for CreateOriginRequestPolicy<C, M, R> where
C: Send + Sync,
M: Send + Sync,
R: Send + Sync,
impl<C, M, R> Sync for CreateOriginRequestPolicy<C, M, R> where
C: Send + Sync,
M: Send + Sync,
R: Send + Sync,
impl<C, M, R> Unpin for CreateOriginRequestPolicy<C, M, R>
impl<C = DynConnector, M = AwsMiddleware, R = Standard> !UnwindSafe for CreateOriginRequestPolicy<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