Skip to content

CloudFront  >  Dictionaries  >  AllowedMethodsDict

AllowedMethodsDict

Dictionary Type

AllowedMethodsDict

Bases: TypedDict

Dictionary form of AllowedMethods.

Attributes

cached_methods instance-attribute
cached_methods: CachedMethods | CachedMethodsDict | None

A complex type that controls whether CloudFront caches the response to requests using the specified HTTP methods. There are two choices:

  • CloudFront caches responses to GET and HEAD requests.

  • CloudFront caches responses to GET, HEAD, and OPTIONS requests.

If you pick the second choice for your Amazon S3 Origin, you may need to forward Access-Control-Request-Method, Access-Control-Request-Headers, and Origin headers for the responses to be cached correctly.

items instance-attribute

A complex type that contains the HTTP methods that you want CloudFront to process and forward to your origin.

quantity instance-attribute
quantity: Required[int]

The number of HTTP methods that you want CloudFront to forward to your origin. Valid values are 2 (for GET and HEAD requests), 3 (for GET, HEAD, and OPTIONS requests) and 7 (for GET, HEAD, OPTIONS, PUT, PATCH, POST, and DELETE requests).