AWS SDK for Go (PILOT)
API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

ForwardedValues

import "github.com/aws/aws-sdk-go/service/cloudfront"

type ForwardedValues struct { Cookies *CookiePreference `type:"structure" required:"true"` Headers *Headers `type:"structure"` QueryString *bool `type:"boolean" required:"true"` QueryStringCacheKeys *QueryStringCacheKeys `type:"structure"` }

A complex type that specifies how CloudFront handles query strings and cookies.

Cookies

A complex type that specifies whether you want CloudFront to forward cookies to the origin and, if so, which ones. For more information about forwarding cookies to the origin, see How CloudFront Forwards, Caches, and Logs Cookies (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Cookies.html) in the Amazon CloudFront Developer Guide.

Headers

A complex type that specifies the request headers, if any, that you want CloudFront to base caching on for this cache behavior.

For the headers that you specify, CloudFront caches separate versions of a specified object based on the header values in viewer requests. For example, suppose viewer requests for logo.jpg contain a custom product header that has a value of either acme or apex, and you configure CloudFront to cache your content based on values in the product header. CloudFront forwards the product header to the origin and caches the response from the origin once for each header value. For more information about caching based on header values, see How CloudFront Forwards and Caches Headers (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/header-caching.html) in the Amazon CloudFront Developer Guide.

QueryString

Type: *bool

Indicates whether you want CloudFront to forward query strings to the origin that is associated with this cache behavior and cache based on the query string parameters. CloudFront behavior depends on the value of QueryString and on the values that you specify for QueryStringCacheKeys, if any:

If you specify true for QueryString and you don't specify any values for QueryStringCacheKeys, CloudFront forwards all query string parameters to the origin and caches based on all query string parameters. Depending on how many query string parameters and values you have, this can adversely affect performance because CloudFront must forward more requests to the origin.

If you specify true for QueryString and you specify one or more values for QueryStringCacheKeys, CloudFront forwards all query string parameters to the origin, but it only caches based on the query string parameters that you specify.

If you specify false for QueryString, CloudFront doesn't forward any query string parameters to the origin, and doesn't cache based on query string parameters.

For more information, see Configuring CloudFront to Cache Based on Query String Parameters (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/QueryStringParameters.html) in the Amazon CloudFront Developer Guide.

QueryString is a required field

QueryStringCacheKeys

Method

GoString

func (s ForwardedValues) GoString() string

GoString returns the string representation

SetCookies

func (s *ForwardedValues) SetCookies(v *CookiePreference) *ForwardedValues

SetCookies sets the Cookies field's value.

SetHeaders

func (s *ForwardedValues) SetHeaders(v *Headers) *ForwardedValues

SetHeaders sets the Headers field's value.

SetQueryString

func (s *ForwardedValues) SetQueryString(v bool) *ForwardedValues

SetQueryString sets the QueryString field's value.

SetQueryStringCacheKeys

func (s *ForwardedValues) SetQueryStringCacheKeys(v *QueryStringCacheKeys) *ForwardedValues

SetQueryStringCacheKeys sets the QueryStringCacheKeys field's value.

String

func (s ForwardedValues) String() string

String returns the string representation

Validate

func (s *ForwardedValues) Validate() error

Validate inspects the fields of the type to determine if they are valid.

On this page: