RedirectTarget

class aws_cdk.aws_s3.RedirectTarget(*, host_name, protocol=None)

Bases: object

Specifies a redirect behavior of all requests to a website endpoint of a bucket.

Parameters:
  • host_name (str) – Name of the host where requests are redirected.

  • protocol (Optional[RedirectProtocol]) – Protocol to use when redirecting requests. Default: - The protocol used in the original request.

ExampleMetadata:

infused

Example:

bucket = s3.Bucket(self, "MyRedirectedBucket",
    website_redirect=s3.RedirectTarget(host_name="www.example.com")
)

Attributes

host_name

Name of the host where requests are redirected.

protocol

Protocol to use when redirecting requests.

Default:
  • The protocol used in the original request.