Rule

A forwarding rule is configured in HTTP/HTTPS listener and it used to listen a list of backend servers which in one specified virtual backend server group. You can add forwarding rules to a listener to forward requests based on the domain names or the URL in the request.

NOTE: One virtual backend server group can be attached in multiple forwarding rules.

NOTE: At least one “Domain” or “Url” must be specified when creating a new rule.

NOTE: Having the same ‘Domain’ and ‘Url’ rule can not be created repeatedly in the one listener.

NOTE: Rule only be created in the HTTP or HTTPS listener.

NOTE: Only rule’s virtual server group can be modified.

Create Rule Resource

new Rule(name: string, args: RuleArgs, opts?: CustomResourceOptions);
@overload
def Rule(resource_name: str,
         opts: Optional[ResourceOptions] = None,
         cookie: Optional[str] = None,
         cookie_timeout: Optional[int] = None,
         delete_protection_validation: Optional[bool] = None,
         domain: Optional[str] = None,
         frontend_port: Optional[int] = None,
         health_check: Optional[str] = None,
         health_check_connect_port: Optional[int] = None,
         health_check_domain: Optional[str] = None,
         health_check_http_code: Optional[str] = None,
         health_check_interval: Optional[int] = None,
         health_check_timeout: Optional[int] = None,
         health_check_uri: Optional[str] = None,
         healthy_threshold: Optional[int] = None,
         listener_sync: Optional[str] = None,
         load_balancer_id: Optional[str] = None,
         name: Optional[str] = None,
         scheduler: Optional[str] = None,
         server_group_id: Optional[str] = None,
         sticky_session: Optional[str] = None,
         sticky_session_type: Optional[str] = None,
         unhealthy_threshold: Optional[int] = None,
         url: Optional[str] = None)
@overload
def Rule(resource_name: str,
         args: RuleArgs,
         opts: Optional[ResourceOptions] = None)
func NewRule(ctx *Context, name string, args RuleArgs, opts ...ResourceOption) (*Rule, error)
public Rule(string name, RuleArgs args, CustomResourceOptions? opts = null)
public Rule(String name, RuleArgs args)
public Rule(String name, RuleArgs args, CustomResourceOptions options)
type: alicloud:slb:Rule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args RuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args RuleArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args RuleArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args RuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args RuleArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Rule Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The Rule resource accepts the following input properties:

FrontendPort int

The listener frontend port which is used to launch the new forwarding rule. Valid range: [1-65535].

LoadBalancerId string

The Load Balancer ID which is used to launch the new forwarding rule.

ServerGroupId string

ID of a virtual server group that will be forwarded.

Cookie string

The cookie configured on the server. It is mandatory when sticky_session is "on" and sticky_session_type is "server". Otherwise, it will be ignored. Valid value:String in line with RFC 2965, with length being 1- 200. It only contains characters such as ASCII codes, English letters and digits instead of the comma, semicolon or spacing, and it cannot start with $.

CookieTimeout int

Cookie timeout. It is mandatory when sticky_session is "on" and sticky_session_type is "insert". Otherwise, it will be ignored. Valid value range: [1-86400] in seconds.

DeleteProtectionValidation bool

Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.

Domain string

Domain name of the forwarding rule. It can contain letters a-z, numbers 0-9, hyphens (-), and periods (.), and wildcard characters. The following two domain name formats are supported:

  • Standard domain name: www.test.com
  • Wildcard domain name: .test.com. wildcard () must be the first character in the format of (*.)
HealthCheck string

Whether to enable health check. Valid values areon and off. TCP and UDP listener's HealthCheck is always on, so it will be ignore when launching TCP or UDP listener. This parameter is required and takes effect only when ListenerSync is set to off.

HealthCheckConnectPort int

Port used for health check. Valid value range: [1-65535]. Default to "None" means the backend server port is used.

HealthCheckDomain string

Domain name used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and only characters such as letters, digits, ‘-‘ and ‘.’ are allowed. When it is not set or empty, Server Load Balancer uses the private network IP address of each backend server as Domain used for health check.

HealthCheckHttpCode string

Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when health_check is on. Default to http_2xx. Valid values are: http_2xx, http_3xx, http_4xx and http_5xx.

HealthCheckInterval int

Time interval of health checks. It is required when health_check is on. Valid value range: [1-50] in seconds. Default to 2.

HealthCheckTimeout int

Maximum timeout of each health check response. It is required when health_check is on. Valid value range: [1-300] in seconds. Default to 5. Note: If health_check_timeout < health_check_interval, its will be replaced by health_check_interval.

HealthCheckUri string

URI used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and it must start with /. Only characters such as letters, digits, ‘-’, ‘/’, ‘.’, ‘%’, ‘?’, #’ and ‘&’ are allowed.

HealthyThreshold int

Threshold determining the result of the health check is success. It is required when health_check is on. Valid value range: [1-10] in seconds. Default to 3.

ListenerSync string

Indicates whether a forwarding rule inherits the settings of a health check , session persistence, and scheduling algorithm from a listener. Default to on.

Name string

Name of the forwarding rule. Our plugin provides a default name: "tf-slb-rule".

Scheduler string

Scheduling algorithm, Valid values are wrr, rr and wlc. Default to "wrr". This parameter is required and takes effect only when ListenerSync is set to off.

StickySession string

Whether to enable session persistence, Valid values are on and off. Default to off. This parameter is required and takes effect only when ListenerSync is set to off.

StickySessionType string

Mode for handling the cookie. If sticky_session is "on", it is mandatory. Otherwise, it will be ignored. Valid values are insert and server. insert means it is inserted from Server Load Balancer; server means the Server Load Balancer learns from the backend server.

UnhealthyThreshold int

Threshold determining the result of the health check is fail. It is required when health_check is on. Valid value range: [1-10] in seconds. Default to 3.

Url string

Domain of the forwarding rule. It must be 2-80 characters in length. Only letters a-z, numbers 0-9, and characters '-' '/' '?' '%' '#' and '&' are allowed. URLs must be started with the character '/', but cannot be '/' alone.

FrontendPort int

The listener frontend port which is used to launch the new forwarding rule. Valid range: [1-65535].

LoadBalancerId string

The Load Balancer ID which is used to launch the new forwarding rule.

ServerGroupId string

ID of a virtual server group that will be forwarded.

Cookie string

The cookie configured on the server. It is mandatory when sticky_session is "on" and sticky_session_type is "server". Otherwise, it will be ignored. Valid value:String in line with RFC 2965, with length being 1- 200. It only contains characters such as ASCII codes, English letters and digits instead of the comma, semicolon or spacing, and it cannot start with $.

CookieTimeout int

Cookie timeout. It is mandatory when sticky_session is "on" and sticky_session_type is "insert". Otherwise, it will be ignored. Valid value range: [1-86400] in seconds.

DeleteProtectionValidation bool

Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.

Domain string

Domain name of the forwarding rule. It can contain letters a-z, numbers 0-9, hyphens (-), and periods (.), and wildcard characters. The following two domain name formats are supported:

  • Standard domain name: www.test.com
  • Wildcard domain name: .test.com. wildcard () must be the first character in the format of (*.)
HealthCheck string

Whether to enable health check. Valid values areon and off. TCP and UDP listener's HealthCheck is always on, so it will be ignore when launching TCP or UDP listener. This parameter is required and takes effect only when ListenerSync is set to off.

HealthCheckConnectPort int

Port used for health check. Valid value range: [1-65535]. Default to "None" means the backend server port is used.

HealthCheckDomain string

Domain name used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and only characters such as letters, digits, ‘-‘ and ‘.’ are allowed. When it is not set or empty, Server Load Balancer uses the private network IP address of each backend server as Domain used for health check.

HealthCheckHttpCode string

Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when health_check is on. Default to http_2xx. Valid values are: http_2xx, http_3xx, http_4xx and http_5xx.

HealthCheckInterval int

Time interval of health checks. It is required when health_check is on. Valid value range: [1-50] in seconds. Default to 2.

HealthCheckTimeout int

Maximum timeout of each health check response. It is required when health_check is on. Valid value range: [1-300] in seconds. Default to 5. Note: If health_check_timeout < health_check_interval, its will be replaced by health_check_interval.

HealthCheckUri string

URI used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and it must start with /. Only characters such as letters, digits, ‘-’, ‘/’, ‘.’, ‘%’, ‘?’, #’ and ‘&’ are allowed.

HealthyThreshold int

Threshold determining the result of the health check is success. It is required when health_check is on. Valid value range: [1-10] in seconds. Default to 3.

ListenerSync string

Indicates whether a forwarding rule inherits the settings of a health check , session persistence, and scheduling algorithm from a listener. Default to on.

Name string

Name of the forwarding rule. Our plugin provides a default name: "tf-slb-rule".

Scheduler string

Scheduling algorithm, Valid values are wrr, rr and wlc. Default to "wrr". This parameter is required and takes effect only when ListenerSync is set to off.

StickySession string

Whether to enable session persistence, Valid values are on and off. Default to off. This parameter is required and takes effect only when ListenerSync is set to off.

StickySessionType string

Mode for handling the cookie. If sticky_session is "on", it is mandatory. Otherwise, it will be ignored. Valid values are insert and server. insert means it is inserted from Server Load Balancer; server means the Server Load Balancer learns from the backend server.

UnhealthyThreshold int

Threshold determining the result of the health check is fail. It is required when health_check is on. Valid value range: [1-10] in seconds. Default to 3.

Url string

Domain of the forwarding rule. It must be 2-80 characters in length. Only letters a-z, numbers 0-9, and characters '-' '/' '?' '%' '#' and '&' are allowed. URLs must be started with the character '/', but cannot be '/' alone.

frontendPort Integer

The listener frontend port which is used to launch the new forwarding rule. Valid range: [1-65535].

loadBalancerId String

The Load Balancer ID which is used to launch the new forwarding rule.

serverGroupId String

ID of a virtual server group that will be forwarded.

cookie String

The cookie configured on the server. It is mandatory when sticky_session is "on" and sticky_session_type is "server". Otherwise, it will be ignored. Valid value:String in line with RFC 2965, with length being 1- 200. It only contains characters such as ASCII codes, English letters and digits instead of the comma, semicolon or spacing, and it cannot start with $.

cookieTimeout Integer

Cookie timeout. It is mandatory when sticky_session is "on" and sticky_session_type is "insert". Otherwise, it will be ignored. Valid value range: [1-86400] in seconds.

deleteProtectionValidation Boolean

Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.

domain String

Domain name of the forwarding rule. It can contain letters a-z, numbers 0-9, hyphens (-), and periods (.), and wildcard characters. The following two domain name formats are supported:

  • Standard domain name: www.test.com
  • Wildcard domain name: .test.com. wildcard () must be the first character in the format of (*.)
healthCheck String

Whether to enable health check. Valid values areon and off. TCP and UDP listener's HealthCheck is always on, so it will be ignore when launching TCP or UDP listener. This parameter is required and takes effect only when ListenerSync is set to off.

healthCheckConnectPort Integer

Port used for health check. Valid value range: [1-65535]. Default to "None" means the backend server port is used.

healthCheckDomain String

Domain name used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and only characters such as letters, digits, ‘-‘ and ‘.’ are allowed. When it is not set or empty, Server Load Balancer uses the private network IP address of each backend server as Domain used for health check.

healthCheckHttpCode String

Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when health_check is on. Default to http_2xx. Valid values are: http_2xx, http_3xx, http_4xx and http_5xx.

healthCheckInterval Integer

Time interval of health checks. It is required when health_check is on. Valid value range: [1-50] in seconds. Default to 2.

healthCheckTimeout Integer

Maximum timeout of each health check response. It is required when health_check is on. Valid value range: [1-300] in seconds. Default to 5. Note: If health_check_timeout < health_check_interval, its will be replaced by health_check_interval.

healthCheckUri String

URI used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and it must start with /. Only characters such as letters, digits, ‘-’, ‘/’, ‘.’, ‘%’, ‘?’, #’ and ‘&’ are allowed.

healthyThreshold Integer

Threshold determining the result of the health check is success. It is required when health_check is on. Valid value range: [1-10] in seconds. Default to 3.

listenerSync String

Indicates whether a forwarding rule inherits the settings of a health check , session persistence, and scheduling algorithm from a listener. Default to on.

name String

Name of the forwarding rule. Our plugin provides a default name: "tf-slb-rule".

scheduler String

Scheduling algorithm, Valid values are wrr, rr and wlc. Default to "wrr". This parameter is required and takes effect only when ListenerSync is set to off.

stickySession String

Whether to enable session persistence, Valid values are on and off. Default to off. This parameter is required and takes effect only when ListenerSync is set to off.

stickySessionType String

Mode for handling the cookie. If sticky_session is "on", it is mandatory. Otherwise, it will be ignored. Valid values are insert and server. insert means it is inserted from Server Load Balancer; server means the Server Load Balancer learns from the backend server.

unhealthyThreshold Integer

Threshold determining the result of the health check is fail. It is required when health_check is on. Valid value range: [1-10] in seconds. Default to 3.

url String

Domain of the forwarding rule. It must be 2-80 characters in length. Only letters a-z, numbers 0-9, and characters '-' '/' '?' '%' '#' and '&' are allowed. URLs must be started with the character '/', but cannot be '/' alone.

frontendPort number

The listener frontend port which is used to launch the new forwarding rule. Valid range: [1-65535].

loadBalancerId string

The Load Balancer ID which is used to launch the new forwarding rule.

serverGroupId string

ID of a virtual server group that will be forwarded.

cookie string

The cookie configured on the server. It is mandatory when sticky_session is "on" and sticky_session_type is "server". Otherwise, it will be ignored. Valid value:String in line with RFC 2965, with length being 1- 200. It only contains characters such as ASCII codes, English letters and digits instead of the comma, semicolon or spacing, and it cannot start with $.

cookieTimeout number

Cookie timeout. It is mandatory when sticky_session is "on" and sticky_session_type is "insert". Otherwise, it will be ignored. Valid value range: [1-86400] in seconds.

deleteProtectionValidation boolean

Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.

domain string

Domain name of the forwarding rule. It can contain letters a-z, numbers 0-9, hyphens (-), and periods (.), and wildcard characters. The following two domain name formats are supported:

  • Standard domain name: www.test.com
  • Wildcard domain name: .test.com. wildcard () must be the first character in the format of (*.)
healthCheck string

Whether to enable health check. Valid values areon and off. TCP and UDP listener's HealthCheck is always on, so it will be ignore when launching TCP or UDP listener. This parameter is required and takes effect only when ListenerSync is set to off.

healthCheckConnectPort number

Port used for health check. Valid value range: [1-65535]. Default to "None" means the backend server port is used.

healthCheckDomain string

Domain name used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and only characters such as letters, digits, ‘-‘ and ‘.’ are allowed. When it is not set or empty, Server Load Balancer uses the private network IP address of each backend server as Domain used for health check.

healthCheckHttpCode string

Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when health_check is on. Default to http_2xx. Valid values are: http_2xx, http_3xx, http_4xx and http_5xx.

healthCheckInterval number

Time interval of health checks. It is required when health_check is on. Valid value range: [1-50] in seconds. Default to 2.

healthCheckTimeout number

Maximum timeout of each health check response. It is required when health_check is on. Valid value range: [1-300] in seconds. Default to 5. Note: If health_check_timeout < health_check_interval, its will be replaced by health_check_interval.

healthCheckUri string

URI used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and it must start with /. Only characters such as letters, digits, ‘-’, ‘/’, ‘.’, ‘%’, ‘?’, #’ and ‘&’ are allowed.

healthyThreshold number

Threshold determining the result of the health check is success. It is required when health_check is on. Valid value range: [1-10] in seconds. Default to 3.

listenerSync string

Indicates whether a forwarding rule inherits the settings of a health check , session persistence, and scheduling algorithm from a listener. Default to on.

name string

Name of the forwarding rule. Our plugin provides a default name: "tf-slb-rule".

scheduler string

Scheduling algorithm, Valid values are wrr, rr and wlc. Default to "wrr". This parameter is required and takes effect only when ListenerSync is set to off.

stickySession string

Whether to enable session persistence, Valid values are on and off. Default to off. This parameter is required and takes effect only when ListenerSync is set to off.

stickySessionType string

Mode for handling the cookie. If sticky_session is "on", it is mandatory. Otherwise, it will be ignored. Valid values are insert and server. insert means it is inserted from Server Load Balancer; server means the Server Load Balancer learns from the backend server.

unhealthyThreshold number

Threshold determining the result of the health check is fail. It is required when health_check is on. Valid value range: [1-10] in seconds. Default to 3.

url string

Domain of the forwarding rule. It must be 2-80 characters in length. Only letters a-z, numbers 0-9, and characters '-' '/' '?' '%' '#' and '&' are allowed. URLs must be started with the character '/', but cannot be '/' alone.

frontend_port int

The listener frontend port which is used to launch the new forwarding rule. Valid range: [1-65535].

load_balancer_id str

The Load Balancer ID which is used to launch the new forwarding rule.

server_group_id str

ID of a virtual server group that will be forwarded.

cookie str

The cookie configured on the server. It is mandatory when sticky_session is "on" and sticky_session_type is "server". Otherwise, it will be ignored. Valid value:String in line with RFC 2965, with length being 1- 200. It only contains characters such as ASCII codes, English letters and digits instead of the comma, semicolon or spacing, and it cannot start with $.

cookie_timeout int

Cookie timeout. It is mandatory when sticky_session is "on" and sticky_session_type is "insert". Otherwise, it will be ignored. Valid value range: [1-86400] in seconds.

delete_protection_validation bool

Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.

domain str

Domain name of the forwarding rule. It can contain letters a-z, numbers 0-9, hyphens (-), and periods (.), and wildcard characters. The following two domain name formats are supported:

  • Standard domain name: www.test.com
  • Wildcard domain name: .test.com. wildcard () must be the first character in the format of (*.)
health_check str

Whether to enable health check. Valid values areon and off. TCP and UDP listener's HealthCheck is always on, so it will be ignore when launching TCP or UDP listener. This parameter is required and takes effect only when ListenerSync is set to off.

health_check_connect_port int

Port used for health check. Valid value range: [1-65535]. Default to "None" means the backend server port is used.

health_check_domain str

Domain name used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and only characters such as letters, digits, ‘-‘ and ‘.’ are allowed. When it is not set or empty, Server Load Balancer uses the private network IP address of each backend server as Domain used for health check.

health_check_http_code str

Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when health_check is on. Default to http_2xx. Valid values are: http_2xx, http_3xx, http_4xx and http_5xx.

health_check_interval int

Time interval of health checks. It is required when health_check is on. Valid value range: [1-50] in seconds. Default to 2.

health_check_timeout int

Maximum timeout of each health check response. It is required when health_check is on. Valid value range: [1-300] in seconds. Default to 5. Note: If health_check_timeout < health_check_interval, its will be replaced by health_check_interval.

health_check_uri str

URI used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and it must start with /. Only characters such as letters, digits, ‘-’, ‘/’, ‘.’, ‘%’, ‘?’, #’ and ‘&’ are allowed.

healthy_threshold int

Threshold determining the result of the health check is success. It is required when health_check is on. Valid value range: [1-10] in seconds. Default to 3.

listener_sync str

Indicates whether a forwarding rule inherits the settings of a health check , session persistence, and scheduling algorithm from a listener. Default to on.

name str

Name of the forwarding rule. Our plugin provides a default name: "tf-slb-rule".

scheduler str

Scheduling algorithm, Valid values are wrr, rr and wlc. Default to "wrr". This parameter is required and takes effect only when ListenerSync is set to off.

sticky_session str

Whether to enable session persistence, Valid values are on and off. Default to off. This parameter is required and takes effect only when ListenerSync is set to off.

sticky_session_type str

Mode for handling the cookie. If sticky_session is "on", it is mandatory. Otherwise, it will be ignored. Valid values are insert and server. insert means it is inserted from Server Load Balancer; server means the Server Load Balancer learns from the backend server.

unhealthy_threshold int

Threshold determining the result of the health check is fail. It is required when health_check is on. Valid value range: [1-10] in seconds. Default to 3.

url str

Domain of the forwarding rule. It must be 2-80 characters in length. Only letters a-z, numbers 0-9, and characters '-' '/' '?' '%' '#' and '&' are allowed. URLs must be started with the character '/', but cannot be '/' alone.

frontendPort Number

The listener frontend port which is used to launch the new forwarding rule. Valid range: [1-65535].

loadBalancerId String

The Load Balancer ID which is used to launch the new forwarding rule.

serverGroupId String

ID of a virtual server group that will be forwarded.

cookie String

The cookie configured on the server. It is mandatory when sticky_session is "on" and sticky_session_type is "server". Otherwise, it will be ignored. Valid value:String in line with RFC 2965, with length being 1- 200. It only contains characters such as ASCII codes, English letters and digits instead of the comma, semicolon or spacing, and it cannot start with $.

cookieTimeout Number

Cookie timeout. It is mandatory when sticky_session is "on" and sticky_session_type is "insert". Otherwise, it will be ignored. Valid value range: [1-86400] in seconds.

deleteProtectionValidation Boolean

Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.

domain String

Domain name of the forwarding rule. It can contain letters a-z, numbers 0-9, hyphens (-), and periods (.), and wildcard characters. The following two domain name formats are supported:

  • Standard domain name: www.test.com
  • Wildcard domain name: .test.com. wildcard () must be the first character in the format of (*.)
healthCheck String

Whether to enable health check. Valid values areon and off. TCP and UDP listener's HealthCheck is always on, so it will be ignore when launching TCP or UDP listener. This parameter is required and takes effect only when ListenerSync is set to off.

healthCheckConnectPort Number

Port used for health check. Valid value range: [1-65535]. Default to "None" means the backend server port is used.

healthCheckDomain String

Domain name used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and only characters such as letters, digits, ‘-‘ and ‘.’ are allowed. When it is not set or empty, Server Load Balancer uses the private network IP address of each backend server as Domain used for health check.

healthCheckHttpCode String

Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when health_check is on. Default to http_2xx. Valid values are: http_2xx, http_3xx, http_4xx and http_5xx.

healthCheckInterval Number

Time interval of health checks. It is required when health_check is on. Valid value range: [1-50] in seconds. Default to 2.

healthCheckTimeout Number

Maximum timeout of each health check response. It is required when health_check is on. Valid value range: [1-300] in seconds. Default to 5. Note: If health_check_timeout < health_check_interval, its will be replaced by health_check_interval.

healthCheckUri String

URI used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and it must start with /. Only characters such as letters, digits, ‘-’, ‘/’, ‘.’, ‘%’, ‘?’, #’ and ‘&’ are allowed.

healthyThreshold Number

Threshold determining the result of the health check is success. It is required when health_check is on. Valid value range: [1-10] in seconds. Default to 3.

listenerSync String

Indicates whether a forwarding rule inherits the settings of a health check , session persistence, and scheduling algorithm from a listener. Default to on.

name String

Name of the forwarding rule. Our plugin provides a default name: "tf-slb-rule".

scheduler String

Scheduling algorithm, Valid values are wrr, rr and wlc. Default to "wrr". This parameter is required and takes effect only when ListenerSync is set to off.

stickySession String

Whether to enable session persistence, Valid values are on and off. Default to off. This parameter is required and takes effect only when ListenerSync is set to off.

stickySessionType String

Mode for handling the cookie. If sticky_session is "on", it is mandatory. Otherwise, it will be ignored. Valid values are insert and server. insert means it is inserted from Server Load Balancer; server means the Server Load Balancer learns from the backend server.

unhealthyThreshold Number

Threshold determining the result of the health check is fail. It is required when health_check is on. Valid value range: [1-10] in seconds. Default to 3.

url String

Domain of the forwarding rule. It must be 2-80 characters in length. Only letters a-z, numbers 0-9, and characters '-' '/' '?' '%' '#' and '&' are allowed. URLs must be started with the character '/', but cannot be '/' alone.

Outputs

All input properties are implicitly available as output properties. Additionally, the Rule resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up Existing Rule Resource

Get an existing Rule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: RuleState, opts?: CustomResourceOptions): Rule
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        cookie: Optional[str] = None,
        cookie_timeout: Optional[int] = None,
        delete_protection_validation: Optional[bool] = None,
        domain: Optional[str] = None,
        frontend_port: Optional[int] = None,
        health_check: Optional[str] = None,
        health_check_connect_port: Optional[int] = None,
        health_check_domain: Optional[str] = None,
        health_check_http_code: Optional[str] = None,
        health_check_interval: Optional[int] = None,
        health_check_timeout: Optional[int] = None,
        health_check_uri: Optional[str] = None,
        healthy_threshold: Optional[int] = None,
        listener_sync: Optional[str] = None,
        load_balancer_id: Optional[str] = None,
        name: Optional[str] = None,
        scheduler: Optional[str] = None,
        server_group_id: Optional[str] = None,
        sticky_session: Optional[str] = None,
        sticky_session_type: Optional[str] = None,
        unhealthy_threshold: Optional[int] = None,
        url: Optional[str] = None) -> Rule
func GetRule(ctx *Context, name string, id IDInput, state *RuleState, opts ...ResourceOption) (*Rule, error)
public static Rule Get(string name, Input<string> id, RuleState? state, CustomResourceOptions? opts = null)
public static Rule get(String name, Output<String> id, RuleState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Cookie string

The cookie configured on the server. It is mandatory when sticky_session is "on" and sticky_session_type is "server". Otherwise, it will be ignored. Valid value:String in line with RFC 2965, with length being 1- 200. It only contains characters such as ASCII codes, English letters and digits instead of the comma, semicolon or spacing, and it cannot start with $.

CookieTimeout int

Cookie timeout. It is mandatory when sticky_session is "on" and sticky_session_type is "insert". Otherwise, it will be ignored. Valid value range: [1-86400] in seconds.

DeleteProtectionValidation bool

Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.

Domain string

Domain name of the forwarding rule. It can contain letters a-z, numbers 0-9, hyphens (-), and periods (.), and wildcard characters. The following two domain name formats are supported:

  • Standard domain name: www.test.com
  • Wildcard domain name: .test.com. wildcard () must be the first character in the format of (*.)
FrontendPort int

The listener frontend port which is used to launch the new forwarding rule. Valid range: [1-65535].

HealthCheck string

Whether to enable health check. Valid values areon and off. TCP and UDP listener's HealthCheck is always on, so it will be ignore when launching TCP or UDP listener. This parameter is required and takes effect only when ListenerSync is set to off.

HealthCheckConnectPort int

Port used for health check. Valid value range: [1-65535]. Default to "None" means the backend server port is used.

HealthCheckDomain string

Domain name used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and only characters such as letters, digits, ‘-‘ and ‘.’ are allowed. When it is not set or empty, Server Load Balancer uses the private network IP address of each backend server as Domain used for health check.

HealthCheckHttpCode string

Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when health_check is on. Default to http_2xx. Valid values are: http_2xx, http_3xx, http_4xx and http_5xx.

HealthCheckInterval int

Time interval of health checks. It is required when health_check is on. Valid value range: [1-50] in seconds. Default to 2.

HealthCheckTimeout int

Maximum timeout of each health check response. It is required when health_check is on. Valid value range: [1-300] in seconds. Default to 5. Note: If health_check_timeout < health_check_interval, its will be replaced by health_check_interval.

HealthCheckUri string

URI used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and it must start with /. Only characters such as letters, digits, ‘-’, ‘/’, ‘.’, ‘%’, ‘?’, #’ and ‘&’ are allowed.

HealthyThreshold int

Threshold determining the result of the health check is success. It is required when health_check is on. Valid value range: [1-10] in seconds. Default to 3.

ListenerSync string

Indicates whether a forwarding rule inherits the settings of a health check , session persistence, and scheduling algorithm from a listener. Default to on.

LoadBalancerId string

The Load Balancer ID which is used to launch the new forwarding rule.

Name string

Name of the forwarding rule. Our plugin provides a default name: "tf-slb-rule".

Scheduler string

Scheduling algorithm, Valid values are wrr, rr and wlc. Default to "wrr". This parameter is required and takes effect only when ListenerSync is set to off.

ServerGroupId string

ID of a virtual server group that will be forwarded.

StickySession string

Whether to enable session persistence, Valid values are on and off. Default to off. This parameter is required and takes effect only when ListenerSync is set to off.

StickySessionType string

Mode for handling the cookie. If sticky_session is "on", it is mandatory. Otherwise, it will be ignored. Valid values are insert and server. insert means it is inserted from Server Load Balancer; server means the Server Load Balancer learns from the backend server.

UnhealthyThreshold int

Threshold determining the result of the health check is fail. It is required when health_check is on. Valid value range: [1-10] in seconds. Default to 3.

Url string

Domain of the forwarding rule. It must be 2-80 characters in length. Only letters a-z, numbers 0-9, and characters '-' '/' '?' '%' '#' and '&' are allowed. URLs must be started with the character '/', but cannot be '/' alone.

Cookie string

The cookie configured on the server. It is mandatory when sticky_session is "on" and sticky_session_type is "server". Otherwise, it will be ignored. Valid value:String in line with RFC 2965, with length being 1- 200. It only contains characters such as ASCII codes, English letters and digits instead of the comma, semicolon or spacing, and it cannot start with $.

CookieTimeout int

Cookie timeout. It is mandatory when sticky_session is "on" and sticky_session_type is "insert". Otherwise, it will be ignored. Valid value range: [1-86400] in seconds.

DeleteProtectionValidation bool

Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.

Domain string

Domain name of the forwarding rule. It can contain letters a-z, numbers 0-9, hyphens (-), and periods (.), and wildcard characters. The following two domain name formats are supported:

  • Standard domain name: www.test.com
  • Wildcard domain name: .test.com. wildcard () must be the first character in the format of (*.)
FrontendPort int

The listener frontend port which is used to launch the new forwarding rule. Valid range: [1-65535].

HealthCheck string

Whether to enable health check. Valid values areon and off. TCP and UDP listener's HealthCheck is always on, so it will be ignore when launching TCP or UDP listener. This parameter is required and takes effect only when ListenerSync is set to off.

HealthCheckConnectPort int

Port used for health check. Valid value range: [1-65535]. Default to "None" means the backend server port is used.

HealthCheckDomain string

Domain name used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and only characters such as letters, digits, ‘-‘ and ‘.’ are allowed. When it is not set or empty, Server Load Balancer uses the private network IP address of each backend server as Domain used for health check.

HealthCheckHttpCode string

Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when health_check is on. Default to http_2xx. Valid values are: http_2xx, http_3xx, http_4xx and http_5xx.

HealthCheckInterval int

Time interval of health checks. It is required when health_check is on. Valid value range: [1-50] in seconds. Default to 2.

HealthCheckTimeout int

Maximum timeout of each health check response. It is required when health_check is on. Valid value range: [1-300] in seconds. Default to 5. Note: If health_check_timeout < health_check_interval, its will be replaced by health_check_interval.

HealthCheckUri string

URI used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and it must start with /. Only characters such as letters, digits, ‘-’, ‘/’, ‘.’, ‘%’, ‘?’, #’ and ‘&’ are allowed.

HealthyThreshold int

Threshold determining the result of the health check is success. It is required when health_check is on. Valid value range: [1-10] in seconds. Default to 3.

ListenerSync string

Indicates whether a forwarding rule inherits the settings of a health check , session persistence, and scheduling algorithm from a listener. Default to on.

LoadBalancerId string

The Load Balancer ID which is used to launch the new forwarding rule.

Name string

Name of the forwarding rule. Our plugin provides a default name: "tf-slb-rule".

Scheduler string

Scheduling algorithm, Valid values are wrr, rr and wlc. Default to "wrr". This parameter is required and takes effect only when ListenerSync is set to off.

ServerGroupId string

ID of a virtual server group that will be forwarded.

StickySession string

Whether to enable session persistence, Valid values are on and off. Default to off. This parameter is required and takes effect only when ListenerSync is set to off.

StickySessionType string

Mode for handling the cookie. If sticky_session is "on", it is mandatory. Otherwise, it will be ignored. Valid values are insert and server. insert means it is inserted from Server Load Balancer; server means the Server Load Balancer learns from the backend server.

UnhealthyThreshold int

Threshold determining the result of the health check is fail. It is required when health_check is on. Valid value range: [1-10] in seconds. Default to 3.

Url string

Domain of the forwarding rule. It must be 2-80 characters in length. Only letters a-z, numbers 0-9, and characters '-' '/' '?' '%' '#' and '&' are allowed. URLs must be started with the character '/', but cannot be '/' alone.

cookie String

The cookie configured on the server. It is mandatory when sticky_session is "on" and sticky_session_type is "server". Otherwise, it will be ignored. Valid value:String in line with RFC 2965, with length being 1- 200. It only contains characters such as ASCII codes, English letters and digits instead of the comma, semicolon or spacing, and it cannot start with $.

cookieTimeout Integer

Cookie timeout. It is mandatory when sticky_session is "on" and sticky_session_type is "insert". Otherwise, it will be ignored. Valid value range: [1-86400] in seconds.

deleteProtectionValidation Boolean

Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.

domain String

Domain name of the forwarding rule. It can contain letters a-z, numbers 0-9, hyphens (-), and periods (.), and wildcard characters. The following two domain name formats are supported:

  • Standard domain name: www.test.com
  • Wildcard domain name: .test.com. wildcard () must be the first character in the format of (*.)
frontendPort Integer

The listener frontend port which is used to launch the new forwarding rule. Valid range: [1-65535].

healthCheck String

Whether to enable health check. Valid values areon and off. TCP and UDP listener's HealthCheck is always on, so it will be ignore when launching TCP or UDP listener. This parameter is required and takes effect only when ListenerSync is set to off.

healthCheckConnectPort Integer

Port used for health check. Valid value range: [1-65535]. Default to "None" means the backend server port is used.

healthCheckDomain String

Domain name used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and only characters such as letters, digits, ‘-‘ and ‘.’ are allowed. When it is not set or empty, Server Load Balancer uses the private network IP address of each backend server as Domain used for health check.

healthCheckHttpCode String

Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when health_check is on. Default to http_2xx. Valid values are: http_2xx, http_3xx, http_4xx and http_5xx.

healthCheckInterval Integer

Time interval of health checks. It is required when health_check is on. Valid value range: [1-50] in seconds. Default to 2.

healthCheckTimeout Integer

Maximum timeout of each health check response. It is required when health_check is on. Valid value range: [1-300] in seconds. Default to 5. Note: If health_check_timeout < health_check_interval, its will be replaced by health_check_interval.

healthCheckUri String

URI used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and it must start with /. Only characters such as letters, digits, ‘-’, ‘/’, ‘.’, ‘%’, ‘?’, #’ and ‘&’ are allowed.

healthyThreshold Integer

Threshold determining the result of the health check is success. It is required when health_check is on. Valid value range: [1-10] in seconds. Default to 3.

listenerSync String

Indicates whether a forwarding rule inherits the settings of a health check , session persistence, and scheduling algorithm from a listener. Default to on.

loadBalancerId String

The Load Balancer ID which is used to launch the new forwarding rule.

name String

Name of the forwarding rule. Our plugin provides a default name: "tf-slb-rule".

scheduler String

Scheduling algorithm, Valid values are wrr, rr and wlc. Default to "wrr". This parameter is required and takes effect only when ListenerSync is set to off.

serverGroupId String

ID of a virtual server group that will be forwarded.

stickySession String

Whether to enable session persistence, Valid values are on and off. Default to off. This parameter is required and takes effect only when ListenerSync is set to off.

stickySessionType String

Mode for handling the cookie. If sticky_session is "on", it is mandatory. Otherwise, it will be ignored. Valid values are insert and server. insert means it is inserted from Server Load Balancer; server means the Server Load Balancer learns from the backend server.

unhealthyThreshold Integer

Threshold determining the result of the health check is fail. It is required when health_check is on. Valid value range: [1-10] in seconds. Default to 3.

url String

Domain of the forwarding rule. It must be 2-80 characters in length. Only letters a-z, numbers 0-9, and characters '-' '/' '?' '%' '#' and '&' are allowed. URLs must be started with the character '/', but cannot be '/' alone.

cookie string

The cookie configured on the server. It is mandatory when sticky_session is "on" and sticky_session_type is "server". Otherwise, it will be ignored. Valid value:String in line with RFC 2965, with length being 1- 200. It only contains characters such as ASCII codes, English letters and digits instead of the comma, semicolon or spacing, and it cannot start with $.

cookieTimeout number

Cookie timeout. It is mandatory when sticky_session is "on" and sticky_session_type is "insert". Otherwise, it will be ignored. Valid value range: [1-86400] in seconds.

deleteProtectionValidation boolean

Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.

domain string

Domain name of the forwarding rule. It can contain letters a-z, numbers 0-9, hyphens (-), and periods (.), and wildcard characters. The following two domain name formats are supported:

  • Standard domain name: www.test.com
  • Wildcard domain name: .test.com. wildcard () must be the first character in the format of (*.)
frontendPort number

The listener frontend port which is used to launch the new forwarding rule. Valid range: [1-65535].

healthCheck string

Whether to enable health check. Valid values areon and off. TCP and UDP listener's HealthCheck is always on, so it will be ignore when launching TCP or UDP listener. This parameter is required and takes effect only when ListenerSync is set to off.

healthCheckConnectPort number

Port used for health check. Valid value range: [1-65535]. Default to "None" means the backend server port is used.

healthCheckDomain string

Domain name used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and only characters such as letters, digits, ‘-‘ and ‘.’ are allowed. When it is not set or empty, Server Load Balancer uses the private network IP address of each backend server as Domain used for health check.

healthCheckHttpCode string

Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when health_check is on. Default to http_2xx. Valid values are: http_2xx, http_3xx, http_4xx and http_5xx.

healthCheckInterval number

Time interval of health checks. It is required when health_check is on. Valid value range: [1-50] in seconds. Default to 2.

healthCheckTimeout number

Maximum timeout of each health check response. It is required when health_check is on. Valid value range: [1-300] in seconds. Default to 5. Note: If health_check_timeout < health_check_interval, its will be replaced by health_check_interval.

healthCheckUri string

URI used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and it must start with /. Only characters such as letters, digits, ‘-’, ‘/’, ‘.’, ‘%’, ‘?’, #’ and ‘&’ are allowed.

healthyThreshold number

Threshold determining the result of the health check is success. It is required when health_check is on. Valid value range: [1-10] in seconds. Default to 3.

listenerSync string

Indicates whether a forwarding rule inherits the settings of a health check , session persistence, and scheduling algorithm from a listener. Default to on.

loadBalancerId string

The Load Balancer ID which is used to launch the new forwarding rule.

name string

Name of the forwarding rule. Our plugin provides a default name: "tf-slb-rule".

scheduler string

Scheduling algorithm, Valid values are wrr, rr and wlc. Default to "wrr". This parameter is required and takes effect only when ListenerSync is set to off.

serverGroupId string

ID of a virtual server group that will be forwarded.

stickySession string

Whether to enable session persistence, Valid values are on and off. Default to off. This parameter is required and takes effect only when ListenerSync is set to off.

stickySessionType string

Mode for handling the cookie. If sticky_session is "on", it is mandatory. Otherwise, it will be ignored. Valid values are insert and server. insert means it is inserted from Server Load Balancer; server means the Server Load Balancer learns from the backend server.

unhealthyThreshold number

Threshold determining the result of the health check is fail. It is required when health_check is on. Valid value range: [1-10] in seconds. Default to 3.

url string

Domain of the forwarding rule. It must be 2-80 characters in length. Only letters a-z, numbers 0-9, and characters '-' '/' '?' '%' '#' and '&' are allowed. URLs must be started with the character '/', but cannot be '/' alone.

cookie str

The cookie configured on the server. It is mandatory when sticky_session is "on" and sticky_session_type is "server". Otherwise, it will be ignored. Valid value:String in line with RFC 2965, with length being 1- 200. It only contains characters such as ASCII codes, English letters and digits instead of the comma, semicolon or spacing, and it cannot start with $.

cookie_timeout int

Cookie timeout. It is mandatory when sticky_session is "on" and sticky_session_type is "insert". Otherwise, it will be ignored. Valid value range: [1-86400] in seconds.

delete_protection_validation bool

Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.

domain str

Domain name of the forwarding rule. It can contain letters a-z, numbers 0-9, hyphens (-), and periods (.), and wildcard characters. The following two domain name formats are supported:

  • Standard domain name: www.test.com
  • Wildcard domain name: .test.com. wildcard () must be the first character in the format of (*.)
frontend_port int

The listener frontend port which is used to launch the new forwarding rule. Valid range: [1-65535].

health_check str

Whether to enable health check. Valid values areon and off. TCP and UDP listener's HealthCheck is always on, so it will be ignore when launching TCP or UDP listener. This parameter is required and takes effect only when ListenerSync is set to off.

health_check_connect_port int

Port used for health check. Valid value range: [1-65535]. Default to "None" means the backend server port is used.

health_check_domain str

Domain name used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and only characters such as letters, digits, ‘-‘ and ‘.’ are allowed. When it is not set or empty, Server Load Balancer uses the private network IP address of each backend server as Domain used for health check.

health_check_http_code str

Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when health_check is on. Default to http_2xx. Valid values are: http_2xx, http_3xx, http_4xx and http_5xx.

health_check_interval int

Time interval of health checks. It is required when health_check is on. Valid value range: [1-50] in seconds. Default to 2.

health_check_timeout int

Maximum timeout of each health check response. It is required when health_check is on. Valid value range: [1-300] in seconds. Default to 5. Note: If health_check_timeout < health_check_interval, its will be replaced by health_check_interval.

health_check_uri str

URI used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and it must start with /. Only characters such as letters, digits, ‘-’, ‘/’, ‘.’, ‘%’, ‘?’, #’ and ‘&’ are allowed.

healthy_threshold int

Threshold determining the result of the health check is success. It is required when health_check is on. Valid value range: [1-10] in seconds. Default to 3.

listener_sync str

Indicates whether a forwarding rule inherits the settings of a health check , session persistence, and scheduling algorithm from a listener. Default to on.

load_balancer_id str

The Load Balancer ID which is used to launch the new forwarding rule.

name str

Name of the forwarding rule. Our plugin provides a default name: "tf-slb-rule".

scheduler str

Scheduling algorithm, Valid values are wrr, rr and wlc. Default to "wrr". This parameter is required and takes effect only when ListenerSync is set to off.

server_group_id str

ID of a virtual server group that will be forwarded.

sticky_session str

Whether to enable session persistence, Valid values are on and off. Default to off. This parameter is required and takes effect only when ListenerSync is set to off.

sticky_session_type str

Mode for handling the cookie. If sticky_session is "on", it is mandatory. Otherwise, it will be ignored. Valid values are insert and server. insert means it is inserted from Server Load Balancer; server means the Server Load Balancer learns from the backend server.

unhealthy_threshold int

Threshold determining the result of the health check is fail. It is required when health_check is on. Valid value range: [1-10] in seconds. Default to 3.

url str

Domain of the forwarding rule. It must be 2-80 characters in length. Only letters a-z, numbers 0-9, and characters '-' '/' '?' '%' '#' and '&' are allowed. URLs must be started with the character '/', but cannot be '/' alone.

cookie String

The cookie configured on the server. It is mandatory when sticky_session is "on" and sticky_session_type is "server". Otherwise, it will be ignored. Valid value:String in line with RFC 2965, with length being 1- 200. It only contains characters such as ASCII codes, English letters and digits instead of the comma, semicolon or spacing, and it cannot start with $.

cookieTimeout Number

Cookie timeout. It is mandatory when sticky_session is "on" and sticky_session_type is "insert". Otherwise, it will be ignored. Valid value range: [1-86400] in seconds.

deleteProtectionValidation Boolean

Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.

domain String

Domain name of the forwarding rule. It can contain letters a-z, numbers 0-9, hyphens (-), and periods (.), and wildcard characters. The following two domain name formats are supported:

  • Standard domain name: www.test.com
  • Wildcard domain name: .test.com. wildcard () must be the first character in the format of (*.)
frontendPort Number

The listener frontend port which is used to launch the new forwarding rule. Valid range: [1-65535].

healthCheck String

Whether to enable health check. Valid values areon and off. TCP and UDP listener's HealthCheck is always on, so it will be ignore when launching TCP or UDP listener. This parameter is required and takes effect only when ListenerSync is set to off.

healthCheckConnectPort Number

Port used for health check. Valid value range: [1-65535]. Default to "None" means the backend server port is used.

healthCheckDomain String

Domain name used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and only characters such as letters, digits, ‘-‘ and ‘.’ are allowed. When it is not set or empty, Server Load Balancer uses the private network IP address of each backend server as Domain used for health check.

healthCheckHttpCode String

Regular health check HTTP status code. Multiple codes are segmented by “,”. It is required when health_check is on. Default to http_2xx. Valid values are: http_2xx, http_3xx, http_4xx and http_5xx.

healthCheckInterval Number

Time interval of health checks. It is required when health_check is on. Valid value range: [1-50] in seconds. Default to 2.

healthCheckTimeout Number

Maximum timeout of each health check response. It is required when health_check is on. Valid value range: [1-300] in seconds. Default to 5. Note: If health_check_timeout < health_check_interval, its will be replaced by health_check_interval.

healthCheckUri String

URI used for health check. When it used to launch TCP listener, health_check_type must be "http". Its length is limited to 1-80 and it must start with /. Only characters such as letters, digits, ‘-’, ‘/’, ‘.’, ‘%’, ‘?’, #’ and ‘&’ are allowed.

healthyThreshold Number

Threshold determining the result of the health check is success. It is required when health_check is on. Valid value range: [1-10] in seconds. Default to 3.

listenerSync String

Indicates whether a forwarding rule inherits the settings of a health check , session persistence, and scheduling algorithm from a listener. Default to on.

loadBalancerId String

The Load Balancer ID which is used to launch the new forwarding rule.

name String

Name of the forwarding rule. Our plugin provides a default name: "tf-slb-rule".

scheduler String

Scheduling algorithm, Valid values are wrr, rr and wlc. Default to "wrr". This parameter is required and takes effect only when ListenerSync is set to off.

serverGroupId String

ID of a virtual server group that will be forwarded.

stickySession String

Whether to enable session persistence, Valid values are on and off. Default to off. This parameter is required and takes effect only when ListenerSync is set to off.

stickySessionType String

Mode for handling the cookie. If sticky_session is "on", it is mandatory. Otherwise, it will be ignored. Valid values are insert and server. insert means it is inserted from Server Load Balancer; server means the Server Load Balancer learns from the backend server.

unhealthyThreshold Number

Threshold determining the result of the health check is fail. It is required when health_check is on. Valid value range: [1-10] in seconds. Default to 3.

url String

Domain of the forwarding rule. It must be 2-80 characters in length. Only letters a-z, numbers 0-9, and characters '-' '/' '?' '%' '#' and '&' are allowed. URLs must be started with the character '/', but cannot be '/' alone.

Import

Load balancer forwarding rule can be imported using the id, e.g.

 $ pulumi import alicloud:slb/rule:Rule example rule-abc123456

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.