Skip to content

RedirectRuleProps

Properties for defining a RedirectRule.

See https://www.alibabacloud.com/help/ros/developer-reference/aliyun-esa-redirectrule

Initializer

import ros_cdk_esa
ros_cdk_esa.RedirectRuleProps(
  reserve_query_string: typing.Union[str, IResolvable],
  site_id: typing.Union[typing.Union[int, float], IResolvable],
  status_code: typing.Union[typing.Union[int, float], IResolvable],
  target_url: typing.Union[str, IResolvable],
  type: typing.Union[str, IResolvable],
  rule: typing.Union[str, IResolvable] = None,
  rule_enable: typing.Union[str, IResolvable] = None,
  rule_name: typing.Union[str, IResolvable] = None,
  site_version: typing.Union[typing.Union[int, float], IResolvable] = None
)

Properties

Name Type Description
reserve_query_string typing.Union[str, ros_cdk_core.IResolvable] Property reserveQueryString: Indicates whether the feature of retaining the query string is enabled.
site_id typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property siteId: The website ID.
status_code typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property statusCode: The response code that you want to use to indicate URL redirection.
target_url typing.Union[str, ros_cdk_core.IResolvable] Property targetUrl: The destination URL to which requests are redirected.
type typing.Union[str, ros_cdk_core.IResolvable] Property type: The redirect type.
rule typing.Union[str, ros_cdk_core.IResolvable] Property rule: Rule content, using conditional expressions to match user requests.
rule_enable typing.Union[str, ros_cdk_core.IResolvable] Property ruleEnable: Rule switch.
rule_name typing.Union[str, ros_cdk_core.IResolvable] Property ruleName: Rule name.
site_version typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property siteVersion: The version number of the site configuration.

reserve_query_stringRequired

reserve_query_string: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property reserveQueryString: Indicates whether the feature of retaining the query string is enabled.

Valid values: on off.


site_idRequired

site_id: typing.Union[typing.Union[int, float], IResolvable]
  • Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]

Property siteId: The website ID.


status_codeRequired

status_code: typing.Union[typing.Union[int, float], IResolvable]
  • Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]

Property statusCode: The response code that you want to use to indicate URL redirection.

Valid values:

  • 301
  • 302
  • 303
  • 307
  • 1.

target_urlRequired

target_url: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property targetUrl: The destination URL to which requests are redirected.


typeRequired

type: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property type: The redirect type.

Valid value:

  • static.

ruleOptional

rule: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property rule: Rule content, using conditional expressions to match user requests.

When adding global configuration, this parameter does not need to be set. There are two usage scenarios: Match all incoming requests: value set to true Match specified request: Set the value to a custom expression, for example: (http.host eq "video.example.com").


rule_enableOptional

rule_enable: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property ruleEnable: Rule switch.

When adding global configuration, this parameter does not need to be set. Value range: on off.


rule_nameOptional

rule_name: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property ruleName: Rule name.

When adding global configuration, this parameter does not need to be set.


site_versionOptional

site_version: typing.Union[typing.Union[int, float], IResolvable]
  • Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]

Property siteVersion: The version number of the site configuration.

For sites that have enabled configuration version management, this parameter can be used to specify the effective version of the configuration site, which defaults to version 0.