interface AddRedirectResponseProps
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.ElasticLoadBalancingV2.AddRedirectResponseProps |
![]() | software.amazon.awscdk.services.elasticloadbalancingv2.AddRedirectResponseProps |
![]() | aws_cdk.aws_elasticloadbalancingv2.AddRedirectResponseProps |
![]() | @aws-cdk/aws-elasticloadbalancingv2 » AddRedirectResponseProps |
⚠️ Deprecated: Use ApplicationListener.addAction
instead.
Properties for adding a redirect response to a listener.
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';
declare const listenerCondition: elbv2.ListenerCondition;
const addRedirectResponseProps: elbv2.AddRedirectResponseProps = {
statusCode: 'statusCode',
// the properties below are optional
conditions: [listenerCondition],
host: 'host',
hostHeader: 'hostHeader',
path: 'path',
pathPattern: 'pathPattern',
pathPatterns: ['pathPatterns'],
port: 'port',
priority: 123,
protocol: 'protocol',
query: 'query',
};
Properties
Name | Type | Description |
---|---|---|
status | string | The HTTP redirect code (HTTP_301 or HTTP_302). |
conditions? | Listener [] | Rule applies if matches the conditions. |
host? | string | The hostname. |
host | string | Rule applies if the requested host matches the indicated host. |
path? | string | The absolute path, starting with the leading "/". |
path | string | Rule applies if the requested path matches the given path pattern. |
path | string[] | Rule applies if the requested path matches any of the given patterns. |
port? | string | The port. |
priority? | number | Priority of this target group. |
protocol? | string | The protocol. |
query? | string | The query parameters, URL-encoded when necessary, but not percent-encoded. |
statusCode
⚠️ Deprecated: Use ApplicationListener.addAction
instead.
Type:
string
The HTTP redirect code (HTTP_301 or HTTP_302).
conditions?
⚠️ Deprecated: Use ApplicationListener.addAction
instead.
Type:
Listener
[]
(optional, default: No conditions.)
Rule applies if matches the conditions.
See also: https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html
host?
⚠️ Deprecated: Use ApplicationListener.addAction
instead.
Type:
string
(optional, default: origin host of request)
The hostname.
This component is not percent-encoded. The hostname can contain #{host}.
hostHeader?
⚠️ Deprecated: Use conditions
instead.
Type:
string
(optional, default: No host condition)
Rule applies if the requested host matches the indicated host.
May contain up to three '*' wildcards.
Requires that priority is set.
path?
⚠️ Deprecated: Use ApplicationListener.addAction
instead.
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}.
pathPattern?
⚠️ Deprecated: Use conditions
instead.
Type:
string
(optional, default: No path condition)
Rule applies if the requested path matches the given path pattern.
May contain up to three '*' wildcards.
Requires that priority is set.
pathPatterns?
⚠️ Deprecated: Use conditions
instead.
Type:
string[]
(optional, default: No path condition.)
Rule applies if the requested path matches any of the given patterns.
May contain up to three '*' wildcards.
Requires that priority is set.
port?
⚠️ Deprecated: Use ApplicationListener.addAction
instead.
Type:
string
(optional, default: origin port of request)
The port.
You can specify a value from 1 to 65535 or #{port}.
priority?
⚠️ Deprecated: Use ApplicationListener.addAction
instead.
Type:
number
(optional, default: Target groups are used as defaults)
Priority of this target group.
The rule with the lowest priority will be used for every request. If priority is not given, these target groups will be added as defaults, and must not have conditions.
Priorities must be unique.
protocol?
⚠️ Deprecated: Use ApplicationListener.addAction
instead.
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: Use ApplicationListener.addAction
instead.
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.