| 1 | # Generated by default/object.tt | ||
| 2 | package Paws::CloudFront::CacheBehavior; | ||
| 3 | use Moose; | ||
| 4 | has AllowedMethods => (is => 'ro', isa => 'Paws::CloudFront::AllowedMethods'); | ||
| 5 | has CachePolicyId => (is => 'ro', isa => 'Str'); | ||
| 6 | has Compress => (is => 'ro', isa => 'Bool'); | ||
| 7 | has DefaultTTL => (is => 'ro', isa => 'Int'); | ||
| 8 | has FieldLevelEncryptionId => (is => 'ro', isa => 'Str'); | ||
| 9 | has ForwardedValues => (is => 'ro', isa => 'Paws::CloudFront::ForwardedValues'); | ||
| 10 | has FunctionAssociations => (is => 'ro', isa => 'Paws::CloudFront::FunctionAssociations'); | ||
| 11 | has LambdaFunctionAssociations => (is => 'ro', isa => 'Paws::CloudFront::LambdaFunctionAssociations'); | ||
| 12 | has MaxTTL => (is => 'ro', isa => 'Int'); | ||
| 13 | has MinTTL => (is => 'ro', isa => 'Int'); | ||
| 14 | has OriginRequestPolicyId => (is => 'ro', isa => 'Str'); | ||
| 15 | has PathPattern => (is => 'ro', isa => 'Str', required => 1); | ||
| 16 | has RealtimeLogConfigArn => (is => 'ro', isa => 'Str'); | ||
| 17 | has SmoothStreaming => (is => 'ro', isa => 'Bool'); | ||
| 18 | has TargetOriginId => (is => 'ro', isa => 'Str', required => 1); | ||
| 19 | has TrustedKeyGroups => (is => 'ro', isa => 'Paws::CloudFront::TrustedKeyGroups'); | ||
| 20 | has TrustedSigners => (is => 'ro', isa => 'Paws::CloudFront::TrustedSigners'); | ||
| 21 | has ViewerProtocolPolicy => (is => 'ro', isa => 'Str', required => 1); | ||
| 22 | |||
| 23 | 1; | ||
| 24 | |||
| 25 | ### main pod documentation begin ### | ||
| 26 | |||
| 27 | =head1 NAME | ||
| 28 | |||
| 29 | Paws::CloudFront::CacheBehavior | ||
| 30 | |||
| 31 | =head1 USAGE | ||
| 32 | |||
| 33 | This class represents one of two things: | ||
| 34 | |||
| 35 | =head3 Arguments in a call to a service | ||
| 36 | |||
| 37 | Use the attributes of this class as arguments to methods. You shouldn't make instances of this class. | ||
| 38 | Each attribute should be used as a named argument in the calls that expect this type of object. | ||
| 39 | |||
| 40 | As an example, if Att1 is expected to be a Paws::CloudFront::CacheBehavior object: | ||
| 41 | |||
| 42 | $service_obj->Method(Att1 => { AllowedMethods => $value, ..., ViewerProtocolPolicy => $value }); | ||
| 43 | |||
| 44 | =head3 Results returned from an API call | ||
| 45 | |||
| 46 | Use accessors for each attribute. If Att1 is expected to be an Paws::CloudFront::CacheBehavior object: | ||
| 47 | |||
| 48 | $result = $service_obj->Method(...); | ||
| 49 | $result->Att1->AllowedMethods | ||
| 50 | |||
| 51 | =head1 DESCRIPTION | ||
| 52 | |||
| 53 | A complex type that describes how CloudFront processes requests. | ||
| 54 | |||
| 55 | You must create at least as many cache behaviors (including the default | ||
| 56 | cache behavior) as you have origins if you want CloudFront to serve | ||
| 57 | objects from all of the origins. Each cache behavior specifies the one | ||
| 58 | origin from which you want CloudFront to get objects. If you have two | ||
| 59 | origins and only the default cache behavior, the default cache behavior | ||
| 60 | will cause CloudFront to get objects from one of the origins, but the | ||
| 61 | other origin is never used. | ||
| 62 | |||
| 63 | For the current quota (formerly known as limit) on the number of cache | ||
| 64 | behaviors that you can add to a distribution, see Quotas | ||
| 65 | (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) | ||
| 66 | in the I<Amazon CloudFront Developer Guide>. | ||
| 67 | |||
| 68 | If you donE<rsquo>t want to specify any cache behaviors, include only | ||
| 69 | an empty C<CacheBehaviors> element. DonE<rsquo>t include an empty | ||
| 70 | C<CacheBehavior> element because this is invalid. | ||
| 71 | |||
| 72 | To delete all cache behaviors in an existing distribution, update the | ||
| 73 | distribution configuration and include only an empty C<CacheBehaviors> | ||
| 74 | element. | ||
| 75 | |||
| 76 | To add, change, or remove one or more cache behaviors, update the | ||
| 77 | distribution configuration and specify all of the cache behaviors that | ||
| 78 | you want to include in the updated distribution. | ||
| 79 | |||
| 80 | For more information about cache behaviors, see Cache Behavior Settings | ||
| 81 | (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesCacheBehavior) | ||
| 82 | in the I<Amazon CloudFront Developer Guide>. | ||
| 83 | |||
| 84 | =head1 ATTRIBUTES | ||
| 85 | |||
| 86 | |||
| 87 | =head2 AllowedMethods => L<Paws::CloudFront::AllowedMethods> | ||
| 88 | |||
| 89 | |||
| 90 | |||
| 91 | |||
| 92 | =head2 CachePolicyId => Str | ||
| 93 | |||
| 94 | The unique identifier of the cache policy that is attached to this | ||
| 95 | cache behavior. For more information, see Creating cache policies | ||
| 96 | (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) | ||
| 97 | or Using the managed cache policies | ||
| 98 | (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html) | ||
| 99 | in the I<Amazon CloudFront Developer Guide>. | ||
| 100 | |||
| 101 | A C<CacheBehavior> must include either a C<CachePolicyId> or | ||
| 102 | C<ForwardedValues>. We recommend that you use a C<CachePolicyId>. | ||
| 103 | |||
| 104 | |||
| 105 | =head2 Compress => Bool | ||
| 106 | |||
| 107 | Whether you want CloudFront to automatically compress certain files for | ||
| 108 | this cache behavior. If so, specify true; if not, specify false. For | ||
| 109 | more information, see Serving Compressed Files | ||
| 110 | (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/ServingCompressedFiles.html) | ||
| 111 | in the I<Amazon CloudFront Developer Guide>. | ||
| 112 | |||
| 113 | |||
| 114 | =head2 DefaultTTL => Int | ||
| 115 | |||
| 116 | This field is deprecated. We recommend that you use the C<DefaultTTL> | ||
| 117 | field in a cache policy instead of this field. For more information, | ||
| 118 | see Creating cache policies | ||
| 119 | (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) | ||
| 120 | or Using the managed cache policies | ||
| 121 | (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html) | ||
| 122 | in the I<Amazon CloudFront Developer Guide>. | ||
| 123 | |||
| 124 | The default amount of time that you want objects to stay in CloudFront | ||
| 125 | caches before CloudFront forwards another request to your origin to | ||
| 126 | determine whether the object has been updated. The value that you | ||
| 127 | specify applies only when your origin does not add HTTP headers such as | ||
| 128 | C<Cache-Control max-age>, C<Cache-Control s-maxage>, and C<Expires> to | ||
| 129 | objects. For more information, see Managing How Long Content Stays in | ||
| 130 | an Edge Cache (Expiration) | ||
| 131 | (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) | ||
| 132 | in the I<Amazon CloudFront Developer Guide>. | ||
| 133 | |||
| 134 | |||
| 135 | =head2 FieldLevelEncryptionId => Str | ||
| 136 | |||
| 137 | The value of C<ID> for the field-level encryption configuration that | ||
| 138 | you want CloudFront to use for encrypting specific fields of data for | ||
| 139 | this cache behavior. | ||
| 140 | |||
| 141 | |||
| 142 | =head2 ForwardedValues => L<Paws::CloudFront::ForwardedValues> | ||
| 143 | |||
| 144 | This field is deprecated. We recommend that you use a cache policy or | ||
| 145 | an origin request policy instead of this field. For more information, | ||
| 146 | see Working with policies | ||
| 147 | (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/working-with-policies.html) | ||
| 148 | in the I<Amazon CloudFront Developer Guide>. | ||
| 149 | |||
| 150 | If you want to include values in the cache key, use a cache policy. For | ||
| 151 | more information, see Creating cache policies | ||
| 152 | (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) | ||
| 153 | or Using the managed cache policies | ||
| 154 | (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html) | ||
| 155 | in the I<Amazon CloudFront Developer Guide>. | ||
| 156 | |||
| 157 | If you want to send values to the origin but not include them in the | ||
| 158 | cache key, use an origin request policy. For more information, see | ||
| 159 | Creating origin request policies | ||
| 160 | (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy) | ||
| 161 | or Using the managed origin request policies | ||
| 162 | (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-origin-request-policies.html) | ||
| 163 | in the I<Amazon CloudFront Developer Guide>. | ||
| 164 | |||
| 165 | A C<CacheBehavior> must include either a C<CachePolicyId> or | ||
| 166 | C<ForwardedValues>. We recommend that you use a C<CachePolicyId>. | ||
| 167 | |||
| 168 | A complex type that specifies how CloudFront handles query strings, | ||
| 169 | cookies, and HTTP headers. | ||
| 170 | |||
| 171 | |||
| 172 | =head2 FunctionAssociations => L<Paws::CloudFront::FunctionAssociations> | ||
| 173 | |||
| 174 | A list of CloudFront functions that are associated with this cache | ||
| 175 | behavior. CloudFront functions must be published to the C<LIVE> stage | ||
| 176 | to associate them with a cache behavior. | ||
| 177 | |||
| 178 | |||
| 179 | =head2 LambdaFunctionAssociations => L<Paws::CloudFront::LambdaFunctionAssociations> | ||
| 180 | |||
| 181 | A complex type that contains zero or more Lambda function associations | ||
| 182 | for a cache behavior. | ||
| 183 | |||
| 184 | |||
| 185 | =head2 MaxTTL => Int | ||
| 186 | |||
| 187 | This field is deprecated. We recommend that you use the C<MaxTTL> field | ||
| 188 | in a cache policy instead of this field. For more information, see | ||
| 189 | Creating cache policies | ||
| 190 | (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) | ||
| 191 | or Using the managed cache policies | ||
| 192 | (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html) | ||
| 193 | in the I<Amazon CloudFront Developer Guide>. | ||
| 194 | |||
| 195 | The maximum amount of time that you want objects to stay in CloudFront | ||
| 196 | caches before CloudFront forwards another request to your origin to | ||
| 197 | determine whether the object has been updated. The value that you | ||
| 198 | specify applies only when your origin adds HTTP headers such as | ||
| 199 | C<Cache-Control max-age>, C<Cache-Control s-maxage>, and C<Expires> to | ||
| 200 | objects. For more information, see Managing How Long Content Stays in | ||
| 201 | an Edge Cache (Expiration) | ||
| 202 | (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) | ||
| 203 | in the I<Amazon CloudFront Developer Guide>. | ||
| 204 | |||
| 205 | |||
| 206 | =head2 MinTTL => Int | ||
| 207 | |||
| 208 | This field is deprecated. We recommend that you use the C<MinTTL> field | ||
| 209 | in a cache policy instead of this field. For more information, see | ||
| 210 | Creating cache policies | ||
| 211 | (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-the-cache-key.html#cache-key-create-cache-policy) | ||
| 212 | or Using the managed cache policies | ||
| 213 | (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html) | ||
| 214 | in the I<Amazon CloudFront Developer Guide>. | ||
| 215 | |||
| 216 | The minimum amount of time that you want objects to stay in CloudFront | ||
| 217 | caches before CloudFront forwards another request to your origin to | ||
| 218 | determine whether the object has been updated. For more information, | ||
| 219 | see Managing How Long Content Stays in an Edge Cache (Expiration) | ||
| 220 | (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) | ||
| 221 | in the I< Amazon CloudFront Developer Guide>. | ||
| 222 | |||
| 223 | You must specify C<0> for C<MinTTL> if you configure CloudFront to | ||
| 224 | forward all headers to your origin (under C<Headers>, if you specify | ||
| 225 | C<1> for C<Quantity> and C<*> for C<Name>). | ||
| 226 | |||
| 227 | |||
| 228 | =head2 OriginRequestPolicyId => Str | ||
| 229 | |||
| 230 | The unique identifier of the origin request policy that is attached to | ||
| 231 | this cache behavior. For more information, see Creating origin request | ||
| 232 | policies | ||
| 233 | (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html#origin-request-create-origin-request-policy) | ||
| 234 | or Using the managed origin request policies | ||
| 235 | (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-origin-request-policies.html) | ||
| 236 | in the I<Amazon CloudFront Developer Guide>. | ||
| 237 | |||
| 238 | |||
| 239 | =head2 B<REQUIRED> PathPattern => Str | ||
| 240 | |||
| 241 | The pattern (for example, C<images/*.jpg>) that specifies which | ||
| 242 | requests to apply the behavior to. When CloudFront receives a viewer | ||
| 243 | request, the requested path is compared with path patterns in the order | ||
| 244 | in which cache behaviors are listed in the distribution. | ||
| 245 | |||
| 246 | You can optionally include a slash (C</>) at the beginning of the path | ||
| 247 | pattern. For example, C</images/*.jpg>. CloudFront behavior is the same | ||
| 248 | with or without the leading C</>. | ||
| 249 | |||
| 250 | The path pattern for the default cache behavior is C<*> and cannot be | ||
| 251 | changed. If the request for an object does not match the path pattern | ||
| 252 | for any cache behaviors, CloudFront applies the behavior in the default | ||
| 253 | cache behavior. | ||
| 254 | |||
| 255 | For more information, see Path Pattern | ||
| 256 | (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesPathPattern) | ||
| 257 | in the I< Amazon CloudFront Developer Guide>. | ||
| 258 | |||
| 259 | |||
| 260 | =head2 RealtimeLogConfigArn => Str | ||
| 261 | |||
| 262 | The Amazon Resource Name (ARN) of the real-time log configuration that | ||
| 263 | is attached to this cache behavior. For more information, see Real-time | ||
| 264 | logs | ||
| 265 | (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/real-time-logs.html) | ||
| 266 | in the I<Amazon CloudFront Developer Guide>. | ||
| 267 | |||
| 268 | |||
| 269 | =head2 SmoothStreaming => Bool | ||
| 270 | |||
| 271 | Indicates whether you want to distribute media files in the Microsoft | ||
| 272 | Smooth Streaming format using the origin that is associated with this | ||
| 273 | cache behavior. If so, specify C<true>; if not, specify C<false>. If | ||
| 274 | you specify C<true> for C<SmoothStreaming>, you can still distribute | ||
| 275 | other content using this cache behavior if the content matches the | ||
| 276 | value of C<PathPattern>. | ||
| 277 | |||
| 278 | |||
| 279 | =head2 B<REQUIRED> TargetOriginId => Str | ||
| 280 | |||
| 281 | The value of C<ID> for the origin that you want CloudFront to route | ||
| 282 | requests to when they match this cache behavior. | ||
| 283 | |||
| 284 | |||
| 285 | =head2 TrustedKeyGroups => L<Paws::CloudFront::TrustedKeyGroups> | ||
| 286 | |||
| 287 | A list of key groups that CloudFront can use to validate signed URLs or | ||
| 288 | signed cookies. | ||
| 289 | |||
| 290 | When a cache behavior contains trusted key groups, CloudFront requires | ||
| 291 | signed URLs or signed cookies for all requests that match the cache | ||
| 292 | behavior. The URLs or cookies must be signed with a private key whose | ||
| 293 | corresponding public key is in the key group. The signed URL or cookie | ||
| 294 | contains information about which public key CloudFront should use to | ||
| 295 | verify the signature. For more information, see Serving private content | ||
| 296 | (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html) | ||
| 297 | in the I<Amazon CloudFront Developer Guide>. | ||
| 298 | |||
| 299 | |||
| 300 | =head2 TrustedSigners => L<Paws::CloudFront::TrustedSigners> | ||
| 301 | |||
| 302 | We recommend using C<TrustedKeyGroups> instead of C<TrustedSigners>. | ||
| 303 | |||
| 304 | A list of AWS account IDs whose public keys CloudFront can use to | ||
| 305 | validate signed URLs or signed cookies. | ||
| 306 | |||
| 307 | When a cache behavior contains trusted signers, CloudFront requires | ||
| 308 | signed URLs or signed cookies for all requests that match the cache | ||
| 309 | behavior. The URLs or cookies must be signed with the private key of a | ||
| 310 | CloudFront key pair in the trusted signerE<rsquo>s AWS account. The | ||
| 311 | signed URL or cookie contains information about which public key | ||
| 312 | CloudFront should use to verify the signature. For more information, | ||
| 313 | see Serving private content | ||
| 314 | (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html) | ||
| 315 | in the I<Amazon CloudFront Developer Guide>. | ||
| 316 | |||
| 317 | |||
| 318 | =head2 B<REQUIRED> ViewerProtocolPolicy => Str | ||
| 319 | |||
| 320 | The protocol that viewers can use to access the files in the origin | ||
| 321 | specified by C<TargetOriginId> when a request matches the path pattern | ||
| 322 | in C<PathPattern>. You can specify the following options: | ||
| 323 | |||
| 324 | =over | ||
| 325 | |||
| 326 | =item * | ||
| 327 | |||
| 328 | C<allow-all>: Viewers can use HTTP or HTTPS. | ||
| 329 | |||
| 330 | =item * | ||
| 331 | |||
| 332 | C<redirect-to-https>: If a viewer submits an HTTP request, CloudFront | ||
| 333 | returns an HTTP status code of 301 (Moved Permanently) to the viewer | ||
| 334 | along with the HTTPS URL. The viewer then resubmits the request using | ||
| 335 | the new URL. | ||
| 336 | |||
| 337 | =item * | ||
| 338 | |||
| 339 | C<https-only>: If a viewer sends an HTTP request, CloudFront returns an | ||
| 340 | HTTP status code of 403 (Forbidden). | ||
| 341 | |||
| 342 | =back | ||
| 343 | |||
| 344 | For more information about requiring the HTTPS protocol, see Requiring | ||
| 345 | HTTPS Between Viewers and CloudFront | ||
| 346 | (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-https-viewers-to-cloudfront.html) | ||
| 347 | in the I<Amazon CloudFront Developer Guide>. | ||
| 348 | |||
| 349 | The only way to guarantee that viewers retrieve an object that was | ||
| 350 | fetched from the origin using HTTPS is never to use any other protocol | ||
| 351 | to fetch the object. If you have recently changed from HTTP to HTTPS, | ||
| 352 | we recommend that you clear your objectsE<rsquo> cache because cached | ||
| 353 | objects are protocol agnostic. That means that an edge location will | ||
| 354 | return an object from the cache regardless of whether the current | ||
| 355 | request protocol matches the protocol used previously. For more | ||
| 356 | information, see Managing Cache Expiration | ||
| 357 | (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html) | ||
| 358 | in the I<Amazon CloudFront Developer Guide>. | ||
| 359 | |||
| 360 | |||
| 361 | |||
| 362 | =head1 SEE ALSO | ||
| 363 | |||
| 364 | This class forms part of L<Paws>, describing an object used in L<Paws::CloudFront> | ||
| 365 | |||
| 366 | =head1 BUGS and CONTRIBUTIONS | ||
| 367 | |||
| 368 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 369 | |||
| 370 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 371 | |||
| 372 | =cut | ||
| 373 |