You are viewing documentation for version 3 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Class: Aws::CloudFront::Types::CacheBehaviors

Inherits:
Struct
  • Object
show all
Defined in:
gems/aws-sdk-cloudfront/lib/aws-sdk-cloudfront/types.rb

Overview

Note:

When making an API call, you may pass CacheBehaviors data as a hash:

{
  quantity: 1, # required
  items: [
    {
      path_pattern: "string", # required
      target_origin_id: "string", # required
      forwarded_values: { # required
        query_string: false, # required
        cookies: { # required
          forward: "none", # required, accepts none, whitelist, all
          whitelisted_names: {
            quantity: 1, # required
            items: ["string"],
          },
        },
        headers: {
          quantity: 1, # required
          items: ["string"],
        },
        query_string_cache_keys: {
          quantity: 1, # required
          items: ["string"],
        },
      },
      trusted_signers: { # required
        enabled: false, # required
        quantity: 1, # required
        items: ["string"],
      },
      viewer_protocol_policy: "allow-all", # required, accepts allow-all, https-only, redirect-to-https
      min_ttl: 1, # required
      allowed_methods: {
        quantity: 1, # required
        items: ["GET"], # required, accepts GET, HEAD, POST, PUT, PATCH, OPTIONS, DELETE
        cached_methods: {
          quantity: 1, # required
          items: ["GET"], # required, accepts GET, HEAD, POST, PUT, PATCH, OPTIONS, DELETE
        },
      },
      smooth_streaming: false,
      default_ttl: 1,
      max_ttl: 1,
      compress: false,
      lambda_function_associations: {
        quantity: 1, # required
        items: [
          {
            lambda_function_arn: "string",
            event_type: "viewer-request", # accepts viewer-request, viewer-response, origin-request, origin-response
          },
        ],
      },
    },
  ],
}

A complex type that contains zero or more CacheBehavior elements.

Instance Attribute Summary collapse

Instance Attribute Details

#itemsArray<Types::CacheBehavior>

Optional: A complex type that contains cache behaviors for this distribution. If Quantity is 0, you can omit Items.

Returns:



523
524
525
526
527
# File 'gems/aws-sdk-cloudfront/lib/aws-sdk-cloudfront/types.rb', line 523

class CacheBehaviors < Struct.new(
  :quantity,
  :items)
  include Aws::Structure
end

#quantityInteger

The number of cache behaviors for this distribution.

Returns:

  • (Integer)


523
524
525
526
527
# File 'gems/aws-sdk-cloudfront/lib/aws-sdk-cloudfront/types.rb', line 523

class CacheBehaviors < Struct.new(
  :quantity,
  :items)
  include Aws::Structure
end