AllowedMethods

class aws_cdk.aws_cloudfront.AllowedMethods(*args: Any, **kwargs)

Bases: object

The HTTP methods that the Behavior will accept requests on.

ExampleMetadata:

infused

Example:

# Create a Distribution with configured HTTP methods and viewer protocol policy of the cache.
# my_bucket: s3.Bucket

my_web_distribution = cloudfront.Distribution(self, "myDist",
    default_behavior=cloudfront.BehaviorOptions(
        origin=origins.S3Origin(my_bucket),
        allowed_methods=cloudfront.AllowedMethods.ALLOW_ALL,
        viewer_protocol_policy=cloudfront.ViewerProtocolPolicy.REDIRECT_TO_HTTPS
    )
)

Attributes

ALLOW_ALL = <aws_cdk.aws_cloudfront.AllowedMethods object>
ALLOW_GET_HEAD = <aws_cdk.aws_cloudfront.AllowedMethods object>
ALLOW_GET_HEAD_OPTIONS = <aws_cdk.aws_cloudfront.AllowedMethods object>
methods

HTTP methods supported.