RedirectResponse
- class aws_cdk.aws_elasticloadbalancingv2.RedirectResponse(*, status_code, host=None, path=None, port=None, protocol=None, query=None)
Bases:
object
(deprecated) A redirect response.
- Parameters:
status_code (
str
) – (deprecated) The HTTP redirect code (HTTP_301 or HTTP_302).host (
Optional
[str
]) – (deprecated) The hostname. This component is not percent-encoded. The hostname can contain #{host}. Default: origin host of requestpath (
Optional
[str
]) – (deprecated) The absolute path, starting with the leading “/”. This component is not percent-encoded. The path can contain #{host}, #{path}, and #{port}. Default: origin path of requestport (
Optional
[str
]) – (deprecated) The port. You can specify a value from 1 to 65535 or #{port}. Default: origin port of requestprotocol (
Optional
[str
]) – (deprecated) The protocol. You can specify HTTP, HTTPS, or #{protocol}. You can redirect HTTP to HTTP, HTTP to HTTPS, and HTTPS to HTTPS. You cannot redirect HTTPS to HTTP. Default: origin protocol of requestquery (
Optional
[str
]) – (deprecated) The query parameters, URL-encoded when necessary, but not percent-encoded. Do not include the leading “?”, as it is automatically added. You can specify any of the reserved keywords. Default: origin query string of request
- Deprecated:
superceded by
ListenerAction.redirect()
.- Stability:
deprecated
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_elasticloadbalancingv2 as elbv2 redirect_response = elbv2.RedirectResponse( status_code="statusCode", # the properties below are optional host="host", path="path", port="port", protocol="protocol", query="query" )
Attributes
- host
(deprecated) The hostname.
This component is not percent-encoded. The hostname can contain #{host}.
- Default:
origin host of request
- Stability:
deprecated
- path
(deprecated) The absolute path, starting with the leading “/”.
This component is not percent-encoded. The path can contain #{host}, #{path}, and #{port}.
- Default:
origin path of request
- Stability:
deprecated
- port
(deprecated) The port.
You can specify a value from 1 to 65535 or #{port}.
- Default:
origin port of request
- Stability:
deprecated
- protocol
(deprecated) The protocol.
You can specify HTTP, HTTPS, or #{protocol}. You can redirect HTTP to HTTP, HTTP to HTTPS, and HTTPS to HTTPS. You cannot redirect HTTPS to HTTP.
- Default:
origin protocol of request
- Stability:
deprecated
- query
(deprecated) The query parameters, URL-encoded when necessary, but not percent-encoded.
Do not include the leading “?”, as it is automatically added. You can specify any of the reserved keywords.
- Default:
origin query string of request
- Stability:
deprecated
- status_code
(deprecated) The HTTP redirect code (HTTP_301 or HTTP_302).
- Stability:
deprecated