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.

CacheBehaviors

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

type CacheBehaviors struct { Items []*CacheBehavior `locationNameList:"CacheBehavior" type:"list"` Quantity *int64 `type:"integer" required:"true"` }

A complex type that contains zero or more CacheBehavior elements.

Items

A complex type that describes how CloudFront processes requests.

You must create at least as many cache behaviors (including the default cache behavior) as you have origins if you want CloudFront to distribute objects from all of the origins. Each cache behavior specifies the one origin from which you want CloudFront to get objects. If you have two origins and only the default cache behavior, the default cache behavior will cause CloudFront to get objects from one of the origins, but the other origin is never used.

For the current limit on the number of cache behaviors that you can add to a distribution, see Amazon CloudFront Limits (https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_cloudfront) in the AWS General Reference.

If you don't want to specify any cache behaviors, include only an empty CacheBehaviors element. Don't include an empty CacheBehavior element, or CloudFront returns a MalformedXML error.

To delete all cache behaviors in an existing distribution, update the distribution configuration and include only an empty CacheBehaviors element.

To add, change, or remove one or more cache behaviors, update the distribution configuration and specify all of the cache behaviors that you want to include in the updated distribution.

For more information about cache behaviors, see Cache Behaviors (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesCacheBehavior) in the Amazon CloudFront Developer Guide.

Quantity

Type: *int64

The number of cache behaviors for this distribution.

Quantity is a required field

Method

GoString

func (s CacheBehaviors) GoString() string

GoString returns the string representation

SetItems

func (s *CacheBehaviors) SetItems(v []*CacheBehavior) *CacheBehaviors

SetItems sets the Items field's value.

SetQuantity

func (s *CacheBehaviors) SetQuantity(v int64) *CacheBehaviors

SetQuantity sets the Quantity field's value.

String

func (s CacheBehaviors) String() string

String returns the string representation

Validate

func (s *CacheBehaviors) Validate() error

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

On this page: