interface RedirectResponse
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.ElasticLoadBalancingV2.RedirectResponse |
Java | software.amazon.awscdk.services.elasticloadbalancingv2.RedirectResponse |
Python | aws_cdk.aws_elasticloadbalancingv2.RedirectResponse |
TypeScript (source) | @aws-cdk/aws-elasticloadbalancingv2 » RedirectResponse |
⚠️ Deprecated: superceded by ListenerAction.redirect()
.
A redirect response.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as elbv2 from '@aws-cdk/aws-elasticloadbalancingv2';
const redirectResponse: elbv2.RedirectResponse = {
statusCode: 'statusCode',
// the properties below are optional
host: 'host',
path: 'path',
port: 'port',
protocol: 'protocol',
query: 'query',
};
Properties
Name | Type | Description |
---|---|---|
status | string | The HTTP redirect code (HTTP_301 or HTTP_302). |
host? | string | The hostname. |
path? | string | The absolute path, starting with the leading "/". |
port? | string | The port. |
protocol? | string | The protocol. |
query? | string | The query parameters, URL-encoded when necessary, but not percent-encoded. |
statusCode
⚠️ Deprecated: superceded by ListenerAction.redirect()
.
Type:
string
The HTTP redirect code (HTTP_301 or HTTP_302).
host?
⚠️ Deprecated: superceded by ListenerAction.redirect()
.
Type:
string
(optional, default: origin host of request)
The hostname.
This component is not percent-encoded. The hostname can contain #{host}.
path?
⚠️ Deprecated: superceded by ListenerAction.redirect()
.
Type:
string
(optional, default: origin path of request)
The absolute path, starting with the leading "/".
This component is not percent-encoded. The path can contain #{host}, #{path}, and #{port}.
port?
⚠️ Deprecated: superceded by ListenerAction.redirect()
.
Type:
string
(optional, default: origin port of request)
The port.
You can specify a value from 1 to 65535 or #{port}.
protocol?
⚠️ Deprecated: superceded by ListenerAction.redirect()
.
Type:
string
(optional, default: origin protocol of request)
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.
query?
⚠️ Deprecated: superceded by ListenerAction.redirect()
.
Type:
string
(optional, default: origin query string of request)
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.