File Coverage

blib/lib/Paws/CloudFront/DefaultCacheBehavior.pm
Criterion Covered Total %
statement 3 3 100.0
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 4 4 100.0


line stmt bran cond sub pod time code
1             package Paws::CloudFront::DefaultCacheBehavior;
2 1     1   944 use Moose;
  1         5  
  1         11  
3             has AllowedMethods => (is => 'ro', isa => 'Paws::CloudFront::AllowedMethods');
4             has Compress => (is => 'ro', isa => 'Bool');
5             has DefaultTTL => (is => 'ro', isa => 'Int');
6             has ForwardedValues => (is => 'ro', isa => 'Paws::CloudFront::ForwardedValues', required => 1);
7             has LambdaFunctionAssociations => (is => 'ro', isa => 'Paws::CloudFront::LambdaFunctionAssociations');
8             has MaxTTL => (is => 'ro', isa => 'Int');
9             has MinTTL => (is => 'ro', isa => 'Int', required => 1);
10             has SmoothStreaming => (is => 'ro', isa => 'Bool');
11             has TargetOriginId => (is => 'ro', isa => 'Str', required => 1);
12             has TrustedSigners => (is => 'ro', isa => 'Paws::CloudFront::TrustedSigners', required => 1);
13             has ViewerProtocolPolicy => (is => 'ro', isa => 'Str', required => 1);
14             1;
15              
16             ### main pod documentation begin ###
17              
18             =head1 NAME
19              
20             Paws::CloudFront::DefaultCacheBehavior
21              
22             =head1 USAGE
23              
24             This class represents one of two things:
25              
26             =head3 Arguments in a call to a service
27              
28             Use the attributes of this class as arguments to methods. You shouldn't make instances of this class.
29             Each attribute should be used as a named argument in the calls that expect this type of object.
30              
31             As an example, if Att1 is expected to be a Paws::CloudFront::DefaultCacheBehavior object:
32              
33             $service_obj->Method(Att1 => { AllowedMethods => $value, ..., ViewerProtocolPolicy => $value });
34              
35             =head3 Results returned from an API call
36              
37             Use accessors for each attribute. If Att1 is expected to be an Paws::CloudFront::DefaultCacheBehavior object:
38              
39             $result = $service_obj->Method(...);
40             $result->Att1->AllowedMethods
41              
42             =head1 DESCRIPTION
43              
44             A complex type that describes the default cache behavior if you do not
45             specify a C<CacheBehavior> element or if files don't match any of the
46             values of C<PathPattern> in C<CacheBehavior> elements. You must create
47             exactly one default cache behavior.
48              
49             =head1 ATTRIBUTES
50              
51              
52             =head2 AllowedMethods => L<Paws::CloudFront::AllowedMethods>
53              
54            
55              
56              
57             =head2 Compress => Bool
58              
59             Whether you want CloudFront to automatically compress certain files for
60             this cache behavior. If so, specify C<true>; if not, specify C<false>.
61             For more information, see Serving Compressed Files in the I<Amazon
62             CloudFront Developer Guide>.
63              
64              
65             =head2 DefaultTTL => Int
66              
67             The default amount of time that you want objects to stay in CloudFront
68             caches before CloudFront forwards another request to your origin to
69             determine whether the object has been updated. The value that you
70             specify applies only when your origin does not add HTTP headers such as
71             C<Cache-Control max-age>, C<Cache-Control s-maxage>, and C<Expires> to
72             objects. For more information, see Specifying How Long Objects and
73             Errors Stay in a CloudFront Edge Cache (Expiration) in the I<Amazon
74             CloudFront Developer Guide>.
75              
76              
77             =head2 B<REQUIRED> ForwardedValues => L<Paws::CloudFront::ForwardedValues>
78              
79             A complex type that specifies how CloudFront handles query strings and
80             cookies.
81              
82              
83             =head2 LambdaFunctionAssociations => L<Paws::CloudFront::LambdaFunctionAssociations>
84              
85             A complex type that contains zero or more Lambda function associations
86             for a cache behavior.
87              
88              
89             =head2 MaxTTL => Int
90              
91            
92              
93              
94             =head2 B<REQUIRED> MinTTL => Int
95              
96             The minimum amount of time that you want objects to stay in CloudFront
97             caches before CloudFront forwards another request to your origin to
98             determine whether the object has been updated. For more information,
99             see Specifying How Long Objects and Errors Stay in a CloudFront Edge
100             Cache (Expiration) in the I<Amazon Amazon CloudFront Developer Guide>.
101              
102             You must specify C<0> for C<MinTTL> if you configure CloudFront to
103             forward all headers to your origin (under C<Headers>, if you specify
104             C<1> for C<Quantity> and C<*> for C<Name>).
105              
106              
107             =head2 SmoothStreaming => Bool
108              
109             Indicates whether you want to distribute media files in the Microsoft
110             Smooth Streaming format using the origin that is associated with this
111             cache behavior. If so, specify C<true>; if not, specify C<false>. If
112             you specify C<true> for C<SmoothStreaming>, you can still distribute
113             other content using this cache behavior if the content matches the
114             value of C<PathPattern>.
115              
116              
117             =head2 B<REQUIRED> TargetOriginId => Str
118              
119             The value of C<ID> for the origin that you want CloudFront to route
120             requests to when a request matches the path pattern either for a cache
121             behavior or for the default cache behavior.
122              
123              
124             =head2 B<REQUIRED> TrustedSigners => L<Paws::CloudFront::TrustedSigners>
125              
126             A complex type that specifies the AWS accounts, if any, that you want
127             to allow to create signed URLs for private content.
128              
129             If you want to require signed URLs in requests for objects in the
130             target origin that match the C<PathPattern> for this cache behavior,
131             specify C<true> for C<Enabled>, and specify the applicable values for
132             C<Quantity> and C<Items>. For more information, see Serving Private
133             Content through CloudFront in the I<Amazon Amazon CloudFront Developer
134             Guide>.
135              
136             If you don't want to require signed URLs in requests for objects that
137             match C<PathPattern>, specify C<false> for C<Enabled> and C<0> for
138             C<Quantity>. Omit C<Items>.
139              
140             To add, change, or remove one or more trusted signers, change
141             C<Enabled> to C<true> (if it's currently C<false>), change C<Quantity>
142             as applicable, and specify all of the trusted signers that you want to
143             include in the updated distribution.
144              
145              
146             =head2 B<REQUIRED> ViewerProtocolPolicy => Str
147              
148             The protocol that viewers can use to access the files in the origin
149             specified by C<TargetOriginId> when a request matches the path pattern
150             in C<PathPattern>. You can specify the following options:
151              
152             =over
153              
154             =item *
155              
156             C<allow-all>: Viewers can use HTTP or HTTPS.
157              
158             =item *
159              
160             C<redirect-to-https>: If a viewer submits an HTTP request, CloudFront
161             returns an HTTP status code of 301 (Moved Permanently) to the viewer
162             along with the HTTPS URL. The viewer then resubmits the request using
163             the new URL.
164              
165             =item *
166              
167             C<https-only>: If a viewer sends an HTTP request, CloudFront returns an
168             HTTP status code of 403 (Forbidden).
169              
170             =back
171              
172             For more information about requiring the HTTPS protocol, see Using an
173             HTTPS Connection to Access Your Objects in the I<Amazon CloudFront
174             Developer Guide>.
175              
176             The only way to guarantee that viewers retrieve an object that was
177             fetched from the origin using HTTPS is never to use any other protocol
178             to fetch the object. If you have recently changed from HTTP to HTTPS,
179             we recommend that you clear your objects' cache because cached objects
180             are protocol agnostic. That means that an edge location will return an
181             object from the cache regardless of whether the current request
182             protocol matches the protocol used previously. For more information,
183             see Specifying How Long Objects and Errors Stay in a CloudFront Edge
184             Cache (Expiration) in the I<Amazon CloudFront Developer Guide>.
185              
186              
187              
188             =head1 SEE ALSO
189              
190             This class forms part of L<Paws>, describing an object used in L<Paws::CloudFront>
191              
192             =head1 BUGS and CONTRIBUTIONS
193              
194             The source code is located here: https://github.com/pplu/aws-sdk-perl
195              
196             Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues
197              
198             =cut
199