| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Paws::CloudFront::DistributionConfig; |
|
2
|
1
|
|
|
1
|
|
623
|
use Moose; |
|
|
1
|
|
|
|
|
5
|
|
|
|
1
|
|
|
|
|
11
|
|
|
3
|
|
|
|
|
|
|
has Aliases => (is => 'ro', isa => 'Paws::CloudFront::Aliases'); |
|
4
|
|
|
|
|
|
|
has CacheBehaviors => (is => 'ro', isa => 'Paws::CloudFront::CacheBehaviors'); |
|
5
|
|
|
|
|
|
|
has CallerReference => (is => 'ro', isa => 'Str', required => 1); |
|
6
|
|
|
|
|
|
|
has Comment => (is => 'ro', isa => 'Str', required => 1); |
|
7
|
|
|
|
|
|
|
has CustomErrorResponses => (is => 'ro', isa => 'Paws::CloudFront::CustomErrorResponses'); |
|
8
|
|
|
|
|
|
|
has DefaultCacheBehavior => (is => 'ro', isa => 'Paws::CloudFront::DefaultCacheBehavior', required => 1); |
|
9
|
|
|
|
|
|
|
has DefaultRootObject => (is => 'ro', isa => 'Str'); |
|
10
|
|
|
|
|
|
|
has Enabled => (is => 'ro', isa => 'Bool', required => 1); |
|
11
|
|
|
|
|
|
|
has HttpVersion => (is => 'ro', isa => 'Str'); |
|
12
|
|
|
|
|
|
|
has IsIPV6Enabled => (is => 'ro', isa => 'Bool'); |
|
13
|
|
|
|
|
|
|
has Logging => (is => 'ro', isa => 'Paws::CloudFront::LoggingConfig'); |
|
14
|
|
|
|
|
|
|
has Origins => (is => 'ro', isa => 'Paws::CloudFront::Origins', required => 1); |
|
15
|
|
|
|
|
|
|
has PriceClass => (is => 'ro', isa => 'Str'); |
|
16
|
|
|
|
|
|
|
has Restrictions => (is => 'ro', isa => 'Paws::CloudFront::Restrictions'); |
|
17
|
|
|
|
|
|
|
has ViewerCertificate => (is => 'ro', isa => 'Paws::CloudFront::ViewerCertificate'); |
|
18
|
|
|
|
|
|
|
has WebACLId => (is => 'ro', isa => 'Str'); |
|
19
|
|
|
|
|
|
|
1; |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
### main pod documentation begin ### |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 NAME |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
Paws::CloudFront::DistributionConfig |
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head1 USAGE |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
This class represents one of two things: |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head3 Arguments in a call to a service |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
Use the attributes of this class as arguments to methods. You shouldn't make instances of this class. |
|
34
|
|
|
|
|
|
|
Each attribute should be used as a named argument in the calls that expect this type of object. |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
As an example, if Att1 is expected to be a Paws::CloudFront::DistributionConfig object: |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
$service_obj->Method(Att1 => { Aliases => $value, ..., WebACLId => $value }); |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head3 Results returned from an API call |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
Use accessors for each attribute. If Att1 is expected to be an Paws::CloudFront::DistributionConfig object: |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
$result = $service_obj->Method(...); |
|
45
|
|
|
|
|
|
|
$result->Att1->Aliases |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
A distribution configuration. |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head2 Aliases => L<Paws::CloudFront::Aliases> |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
A complex type that contains information about CNAMEs (alternate domain |
|
57
|
|
|
|
|
|
|
names), if any, for this distribution. |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head2 CacheBehaviors => L<Paws::CloudFront::CacheBehaviors> |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
A complex type that contains zero or more C<CacheBehavior> elements. |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head2 B<REQUIRED> CallerReference => Str |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
A unique value (for example, a date-time stamp) that ensures that the |
|
68
|
|
|
|
|
|
|
request can't be replayed. |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
If the value of C<CallerReference> is new (regardless of the content of |
|
71
|
|
|
|
|
|
|
the C<DistributionConfig> object), CloudFront creates a new |
|
72
|
|
|
|
|
|
|
distribution. |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
If C<CallerReference> is a value you already sent in a previous request |
|
75
|
|
|
|
|
|
|
to create a distribution, and if the content of the |
|
76
|
|
|
|
|
|
|
C<DistributionConfig> is identical to the original request (ignoring |
|
77
|
|
|
|
|
|
|
white space), CloudFront returns the same the response that it returned |
|
78
|
|
|
|
|
|
|
to the original request. |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
If C<CallerReference> is a value you already sent in a previous request |
|
81
|
|
|
|
|
|
|
to create a distribution but the content of the C<DistributionConfig> |
|
82
|
|
|
|
|
|
|
is different from the original request, CloudFront returns a |
|
83
|
|
|
|
|
|
|
C<DistributionAlreadyExists> error. |
|
84
|
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=head2 B<REQUIRED> Comment => Str |
|
87
|
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
Any comments you want to include about the distribution. |
|
89
|
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
If you don't want to specify a comment, include an empty C<Comment> |
|
91
|
|
|
|
|
|
|
element. |
|
92
|
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
To delete an existing comment, update the distribution configuration |
|
94
|
|
|
|
|
|
|
and include an empty C<Comment> element. |
|
95
|
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
To add or change a comment, update the distribution configuration and |
|
97
|
|
|
|
|
|
|
specify the new comment. |
|
98
|
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=head2 CustomErrorResponses => L<Paws::CloudFront::CustomErrorResponses> |
|
101
|
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
A complex type that controls the following: |
|
103
|
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=over |
|
105
|
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=item * |
|
107
|
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
Whether CloudFront replaces HTTP status codes in the 4xx and 5xx range |
|
109
|
|
|
|
|
|
|
with custom error messages before returning the response to the viewer. |
|
110
|
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=item * |
|
112
|
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
How long CloudFront caches HTTP status codes in the 4xx and 5xx range. |
|
114
|
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=back |
|
116
|
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
For more information about custom error pages, see Customizing Error |
|
118
|
|
|
|
|
|
|
Responses in the I<Amazon CloudFront Developer Guide>. |
|
119
|
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
=head2 B<REQUIRED> DefaultCacheBehavior => L<Paws::CloudFront::DefaultCacheBehavior> |
|
122
|
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
A complex type that describes the default cache behavior if you do not |
|
124
|
|
|
|
|
|
|
specify a C<CacheBehavior> element or if files don't match any of the |
|
125
|
|
|
|
|
|
|
values of C<PathPattern> in C<CacheBehavior> elements. You must create |
|
126
|
|
|
|
|
|
|
exactly one default cache behavior. |
|
127
|
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
=head2 DefaultRootObject => Str |
|
130
|
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
The object that you want CloudFront to request from your origin (for |
|
132
|
|
|
|
|
|
|
example, C<index.html>) when a viewer requests the root URL for your |
|
133
|
|
|
|
|
|
|
distribution (C<http://www.example.com>) instead of an object in your |
|
134
|
|
|
|
|
|
|
distribution (C<http://www.example.com/product-description.html>). |
|
135
|
|
|
|
|
|
|
Specifying a default root object avoids exposing the contents of your |
|
136
|
|
|
|
|
|
|
distribution. |
|
137
|
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
Specify only the object name, for example, C<index.html>. Do not add a |
|
139
|
|
|
|
|
|
|
C</> before the object name. |
|
140
|
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
If you don't want to specify a default root object when you create a |
|
142
|
|
|
|
|
|
|
distribution, include an empty C<DefaultRootObject> element. |
|
143
|
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
To delete the default root object from an existing distribution, update |
|
145
|
|
|
|
|
|
|
the distribution configuration and include an empty |
|
146
|
|
|
|
|
|
|
C<DefaultRootObject> element. |
|
147
|
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
To replace the default root object, update the distribution |
|
149
|
|
|
|
|
|
|
configuration and specify the new object. |
|
150
|
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
For more information about the default root object, see Creating a |
|
152
|
|
|
|
|
|
|
Default Root Object in the I<Amazon CloudFront Developer Guide>. |
|
153
|
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
=head2 B<REQUIRED> Enabled => Bool |
|
156
|
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
From this field, you can enable or disable the selected distribution. |
|
158
|
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
If you specify C<false> for C<Enabled> but you specify values for |
|
160
|
|
|
|
|
|
|
C<Bucket> and C<Prefix>, the values are automatically deleted. |
|
161
|
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
=head2 HttpVersion => Str |
|
164
|
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
(Optional) Specify the maximum HTTP version that you want viewers to |
|
166
|
|
|
|
|
|
|
use to communicate with CloudFront. The default value for new web |
|
167
|
|
|
|
|
|
|
distributions is http2. Viewers that don't support HTTP/2 automatically |
|
168
|
|
|
|
|
|
|
use an earlier HTTP version. |
|
169
|
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
For viewers and CloudFront to use HTTP/2, viewers must support TLS 1.2 |
|
171
|
|
|
|
|
|
|
or later, and must support Server Name Identification (SNI). |
|
172
|
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
In general, configuring CloudFront to communicate with viewers using |
|
174
|
|
|
|
|
|
|
HTTP/2 reduces latency. You can improve performance by optimizing for |
|
175
|
|
|
|
|
|
|
HTTP/2. For more information, do an Internet search for "http/2 |
|
176
|
|
|
|
|
|
|
optimization." |
|
177
|
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
=head2 IsIPV6Enabled => Bool |
|
180
|
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
If you want CloudFront to respond to IPv6 DNS requests with an IPv6 |
|
182
|
|
|
|
|
|
|
address for your distribution, specify C<true>. If you specify |
|
183
|
|
|
|
|
|
|
C<false>, CloudFront responds to IPv6 DNS requests with the DNS |
|
184
|
|
|
|
|
|
|
response code C<NOERROR> and with no IP addresses. This allows viewers |
|
185
|
|
|
|
|
|
|
to submit a second request, for an IPv4 address for your distribution. |
|
186
|
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
In general, you should enable IPv6 if you have users on IPv6 networks |
|
188
|
|
|
|
|
|
|
who want to access your content. However, if you're using signed URLs |
|
189
|
|
|
|
|
|
|
or signed cookies to restrict access to your content, and if you're |
|
190
|
|
|
|
|
|
|
using a custom policy that includes the C<IpAddress> parameter to |
|
191
|
|
|
|
|
|
|
restrict the IP addresses that can access your content, do not enable |
|
192
|
|
|
|
|
|
|
IPv6. If you want to restrict access to some content by IP address and |
|
193
|
|
|
|
|
|
|
not restrict access to other content (or restrict access but not by IP |
|
194
|
|
|
|
|
|
|
address), you can create two distributions. For more information, see |
|
195
|
|
|
|
|
|
|
Creating a Signed URL Using a Custom Policy in the I<Amazon CloudFront |
|
196
|
|
|
|
|
|
|
Developer Guide>. |
|
197
|
|
|
|
|
|
|
|
|
198
|
|
|
|
|
|
|
If you're using an Amazon Route 53 alias resource record set to route |
|
199
|
|
|
|
|
|
|
traffic to your CloudFront distribution, you need to create a second |
|
200
|
|
|
|
|
|
|
alias resource record set when both of the following are true: |
|
201
|
|
|
|
|
|
|
|
|
202
|
|
|
|
|
|
|
=over |
|
203
|
|
|
|
|
|
|
|
|
204
|
|
|
|
|
|
|
=item * |
|
205
|
|
|
|
|
|
|
|
|
206
|
|
|
|
|
|
|
You enable IPv6 for the distribution |
|
207
|
|
|
|
|
|
|
|
|
208
|
|
|
|
|
|
|
=item * |
|
209
|
|
|
|
|
|
|
|
|
210
|
|
|
|
|
|
|
You're using alternate domain names in the URLs for your objects |
|
211
|
|
|
|
|
|
|
|
|
212
|
|
|
|
|
|
|
=back |
|
213
|
|
|
|
|
|
|
|
|
214
|
|
|
|
|
|
|
For more information, see Routing Traffic to an Amazon CloudFront Web |
|
215
|
|
|
|
|
|
|
Distribution by Using Your Domain Name in the I<Amazon Route 53 |
|
216
|
|
|
|
|
|
|
Developer Guide>. |
|
217
|
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
If you created a CNAME resource record set, either with Amazon Route 53 |
|
219
|
|
|
|
|
|
|
or with another DNS service, you don't need to make any changes. A |
|
220
|
|
|
|
|
|
|
CNAME record will route traffic to your distribution regardless of the |
|
221
|
|
|
|
|
|
|
IP address format of the viewer request. |
|
222
|
|
|
|
|
|
|
|
|
223
|
|
|
|
|
|
|
|
|
224
|
|
|
|
|
|
|
=head2 Logging => L<Paws::CloudFront::LoggingConfig> |
|
225
|
|
|
|
|
|
|
|
|
226
|
|
|
|
|
|
|
A complex type that controls whether access logs are written for the |
|
227
|
|
|
|
|
|
|
distribution. |
|
228
|
|
|
|
|
|
|
|
|
229
|
|
|
|
|
|
|
For more information about logging, see Access Logs in the I<Amazon |
|
230
|
|
|
|
|
|
|
CloudFront Developer Guide>. |
|
231
|
|
|
|
|
|
|
|
|
232
|
|
|
|
|
|
|
|
|
233
|
|
|
|
|
|
|
=head2 B<REQUIRED> Origins => L<Paws::CloudFront::Origins> |
|
234
|
|
|
|
|
|
|
|
|
235
|
|
|
|
|
|
|
A complex type that contains information about origins for this |
|
236
|
|
|
|
|
|
|
distribution. |
|
237
|
|
|
|
|
|
|
|
|
238
|
|
|
|
|
|
|
|
|
239
|
|
|
|
|
|
|
=head2 PriceClass => Str |
|
240
|
|
|
|
|
|
|
|
|
241
|
|
|
|
|
|
|
The price class that corresponds with the maximum price that you want |
|
242
|
|
|
|
|
|
|
to pay for CloudFront service. If you specify C<PriceClass_All>, |
|
243
|
|
|
|
|
|
|
CloudFront responds to requests for your objects from all CloudFront |
|
244
|
|
|
|
|
|
|
edge locations. |
|
245
|
|
|
|
|
|
|
|
|
246
|
|
|
|
|
|
|
If you specify a price class other than C<PriceClass_All>, CloudFront |
|
247
|
|
|
|
|
|
|
serves your objects from the CloudFront edge location that has the |
|
248
|
|
|
|
|
|
|
lowest latency among the edge locations in your price class. Viewers |
|
249
|
|
|
|
|
|
|
who are in or near regions that are excluded from your specified price |
|
250
|
|
|
|
|
|
|
class may encounter slower performance. |
|
251
|
|
|
|
|
|
|
|
|
252
|
|
|
|
|
|
|
For more information about price classes, see Choosing the Price Class |
|
253
|
|
|
|
|
|
|
for a CloudFront Distribution in the I<Amazon CloudFront Developer |
|
254
|
|
|
|
|
|
|
Guide>. For information about CloudFront pricing, including how price |
|
255
|
|
|
|
|
|
|
classes map to CloudFront regions, see Amazon CloudFront Pricing. |
|
256
|
|
|
|
|
|
|
|
|
257
|
|
|
|
|
|
|
|
|
258
|
|
|
|
|
|
|
=head2 Restrictions => L<Paws::CloudFront::Restrictions> |
|
259
|
|
|
|
|
|
|
|
|
260
|
|
|
|
|
|
|
|
|
261
|
|
|
|
|
|
|
|
|
262
|
|
|
|
|
|
|
|
|
263
|
|
|
|
|
|
|
=head2 ViewerCertificate => L<Paws::CloudFront::ViewerCertificate> |
|
264
|
|
|
|
|
|
|
|
|
265
|
|
|
|
|
|
|
|
|
266
|
|
|
|
|
|
|
|
|
267
|
|
|
|
|
|
|
|
|
268
|
|
|
|
|
|
|
=head2 WebACLId => Str |
|
269
|
|
|
|
|
|
|
|
|
270
|
|
|
|
|
|
|
A unique identifier that specifies the AWS WAF web ACL, if any, to |
|
271
|
|
|
|
|
|
|
associate with this distribution. |
|
272
|
|
|
|
|
|
|
|
|
273
|
|
|
|
|
|
|
AWS WAF is a web application firewall that lets you monitor the HTTP |
|
274
|
|
|
|
|
|
|
and HTTPS requests that are forwarded to CloudFront, and lets you |
|
275
|
|
|
|
|
|
|
control access to your content. Based on conditions that you specify, |
|
276
|
|
|
|
|
|
|
such as the IP addresses that requests originate from or the values of |
|
277
|
|
|
|
|
|
|
query strings, CloudFront responds to requests either with the |
|
278
|
|
|
|
|
|
|
requested content or with an HTTP 403 status code (Forbidden). You can |
|
279
|
|
|
|
|
|
|
also configure CloudFront to return a custom error page when a request |
|
280
|
|
|
|
|
|
|
is blocked. For more information about AWS WAF, see the AWS WAF |
|
281
|
|
|
|
|
|
|
Developer Guide. |
|
282
|
|
|
|
|
|
|
|
|
283
|
|
|
|
|
|
|
|
|
284
|
|
|
|
|
|
|
|
|
285
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
286
|
|
|
|
|
|
|
|
|
287
|
|
|
|
|
|
|
This class forms part of L<Paws>, describing an object used in L<Paws::CloudFront> |
|
288
|
|
|
|
|
|
|
|
|
289
|
|
|
|
|
|
|
=head1 BUGS and CONTRIBUTIONS |
|
290
|
|
|
|
|
|
|
|
|
291
|
|
|
|
|
|
|
The source code is located here: https://github.com/pplu/aws-sdk-perl |
|
292
|
|
|
|
|
|
|
|
|
293
|
|
|
|
|
|
|
Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues |
|
294
|
|
|
|
|
|
|
|
|
295
|
|
|
|
|
|
|
=cut |
|
296
|
|
|
|
|
|
|
|