AddRedirectResponseProps

class aws_cdk.aws_elasticloadbalancingv2.AddRedirectResponseProps(*, conditions=None, host_header=None, path_pattern=None, path_patterns=None, priority=None, status_code, host=None, path=None, port=None, protocol=None, query=None)

Bases: aws_cdk.aws_elasticloadbalancingv2.AddRuleProps, aws_cdk.aws_elasticloadbalancingv2.RedirectResponse

(deprecated) Properties for adding a redirect response to a listener.

Parameters
  • conditions (Optional[List[ListenerCondition]]) – Rule applies if matches the conditions. Default: - No conditions.

  • host_header (Optional[str]) – (deprecated) Rule applies if the requested host matches the indicated host. May contain up to three ‘*’ wildcards. Requires that priority is set. Default: No host condition

  • path_pattern (Optional[str]) – (deprecated) Rule applies if the requested path matches the given path pattern. May contain up to three ‘*’ wildcards. Requires that priority is set. Default: No path condition

  • path_patterns (Optional[List[str]]) – (deprecated) Rule applies if the requested path matches any of the given patterns. May contain up to three ‘*’ wildcards. Requires that priority is set. Default: - No path condition.

  • priority (Union[int, float, None]) – 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. Default: Target groups are used as defaults

  • status_code (str) – The HTTP redirect code (HTTP_301 or HTTP_302).

  • host (Optional[str]) – The hostname. This component is not percent-encoded. The hostname can contain #{host}. Default: origin host of request

  • path (Optional[str]) – 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

  • port (Optional[str]) – The port. You can specify a value from 1 to 65535 or #{port}. Default: origin port of request

  • protocol (Optional[str]) – 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

  • query (Optional[str]) – 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

Use ApplicationListener.addAction instead.

Stability

deprecated

Attributes

conditions

Rule applies if matches the conditions.

Default
  • No conditions.

See

https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html

Return type

Optional[List[ListenerCondition]]

host

The hostname.

This component is not percent-encoded. The hostname can contain #{host}.

Default

origin host of request

Return type

Optional[str]

host_header

(deprecated) Rule applies if the requested host matches the indicated host.

May contain up to three ‘*’ wildcards.

Requires that priority is set.

Default

No host condition

Deprecated

Use conditions instead.

See

https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html#host-conditions

Stability

deprecated

Return type

Optional[str]

path

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

Return type

Optional[str]

path_pattern

(deprecated) Rule applies if the requested path matches the given path pattern.

May contain up to three ‘*’ wildcards.

Requires that priority is set.

Default

No path condition

Deprecated

Use conditions instead.

See

https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html#path-conditions

Stability

deprecated

Return type

Optional[str]

path_patterns

(deprecated) Rule applies if the requested path matches any of the given patterns.

May contain up to three ‘*’ wildcards.

Requires that priority is set.

Default
  • No path condition.

Deprecated

Use conditions instead.

See

https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html#path-conditions

Stability

deprecated

Return type

Optional[List[str]]

port

The port.

You can specify a value from 1 to 65535 or #{port}.

Default

origin port of request

Return type

Optional[str]

priority

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.

Default

Target groups are used as defaults

Return type

Union[int, float, None]

protocol

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

Return type

Optional[str]

query

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

Return type

Optional[str]

status_code

The HTTP redirect code (HTTP_301 or HTTP_302).

Return type

str