RedirectProtocol

class aws_cdk.aws_s3.RedirectProtocol(value)

Bases: Enum

All http request methods.

ExampleMetadata:

infused

Example:

bucket = s3.Bucket(self, "MyRedirectedBucket",
    website_routing_rules=[s3.RoutingRule(
        host_name="www.example.com",
        http_redirect_code="302",
        protocol=s3.RedirectProtocol.HTTPS,
        replace_key=s3.ReplaceKey.prefix_with("test/"),
        condition=s3.RoutingRuleCondition(
            http_error_code_returned_equals="200",
            key_prefix_equals="prefix"
        )
    )]
)

Attributes

HTTP = 'HTTP'
HTTPS = 'HTTPS'