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