Provides a resource to manage alb rule
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";
// Basic edition
const foo = new volcengine.alb.Rule("foo", {
description: "test",
domain: "www.test.com",
listenerId: "lsn-1iidd19u4oni874adhezjkyj3",
redirectConfig: {
redirectDomain: "www.testtest.com",
redirectHttpCode: "302",
redirectPort: "555",
redirectUri: "/testtest",
},
rewriteConfig: {
rewritePath: "/test",
},
rewriteEnabled: "off",
ruleAction: "Redirect",
serverGroupId: "rsp-1g72w74y4umf42zbhq4k4hnln",
trafficLimitEnabled: "off",
trafficLimitQps: 100,
url: "/test",
});
// Standard edition
const example = new volcengine.alb.Rule("example", {
description: "standard edition alb rule",
listenerId: "lsn-bddjp5fcof0g8dv40naga1yd",
priority: 1,
ruleAction: "",
ruleActions: [{
forwardGroupConfig: {
serverGroupStickySession: {
enabled: "off",
},
serverGroupTuples: [{
serverGroupId: "rsp-bdd1lpcbvv288dv40ov1sye0",
weight: 50,
}],
},
type: "ForwardGroup",
}],
ruleConditions: [
{
hostConfig: {
values: ["www.example.com"],
},
type: "Host",
},
{
pathConfig: {
values: ["/app/*"],
},
type: "Path",
},
],
url: "",
});
import pulumi
import pulumi_volcengine as volcengine
# Basic edition
foo = volcengine.alb.Rule("foo",
description="test",
domain="www.test.com",
listener_id="lsn-1iidd19u4oni874adhezjkyj3",
redirect_config=volcengine.alb.RuleRedirectConfigArgs(
redirect_domain="www.testtest.com",
redirect_http_code="302",
redirect_port="555",
redirect_uri="/testtest",
),
rewrite_config=volcengine.alb.RuleRewriteConfigArgs(
rewrite_path="/test",
),
rewrite_enabled="off",
rule_action="Redirect",
server_group_id="rsp-1g72w74y4umf42zbhq4k4hnln",
traffic_limit_enabled="off",
traffic_limit_qps=100,
url="/test")
# Standard edition
example = volcengine.alb.Rule("example",
description="standard edition alb rule",
listener_id="lsn-bddjp5fcof0g8dv40naga1yd",
priority=1,
rule_action="",
rule_actions=[volcengine.alb.RuleRuleActionArgs(
forward_group_config=volcengine.alb.RuleRuleActionForwardGroupConfigArgs(
server_group_sticky_session=volcengine.alb.RuleRuleActionForwardGroupConfigServerGroupStickySessionArgs(
enabled="off",
),
server_group_tuples=[volcengine.alb.RuleRuleActionForwardGroupConfigServerGroupTupleArgs(
server_group_id="rsp-bdd1lpcbvv288dv40ov1sye0",
weight=50,
)],
),
type="ForwardGroup",
)],
rule_conditions=[
volcengine.alb.RuleRuleConditionArgs(
host_config=volcengine.alb.RuleRuleConditionHostConfigArgs(
values=["www.example.com"],
),
type="Host",
),
volcengine.alb.RuleRuleConditionArgs(
path_config=volcengine.alb.RuleRuleConditionPathConfigArgs(
values=["/app/*"],
),
type="Path",
),
],
url="")
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/alb"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Basic edition
_, err := alb.NewRule(ctx, "foo", &alb.RuleArgs{
Description: pulumi.String("test"),
Domain: pulumi.String("www.test.com"),
ListenerId: pulumi.String("lsn-1iidd19u4oni874adhezjkyj3"),
RedirectConfig: &alb.RuleRedirectConfigArgs{
RedirectDomain: pulumi.String("www.testtest.com"),
RedirectHttpCode: pulumi.String("302"),
RedirectPort: pulumi.String("555"),
RedirectUri: pulumi.String("/testtest"),
},
RewriteConfig: &alb.RuleRewriteConfigArgs{
RewritePath: pulumi.String("/test"),
},
RewriteEnabled: pulumi.String("off"),
RuleAction: pulumi.String("Redirect"),
ServerGroupId: pulumi.String("rsp-1g72w74y4umf42zbhq4k4hnln"),
TrafficLimitEnabled: pulumi.String("off"),
TrafficLimitQps: pulumi.Int(100),
Url: pulumi.String("/test"),
})
if err != nil {
return err
}
// Standard edition
_, err = alb.NewRule(ctx, "example", &alb.RuleArgs{
Description: pulumi.String("standard edition alb rule"),
ListenerId: pulumi.String("lsn-bddjp5fcof0g8dv40naga1yd"),
Priority: pulumi.Int(1),
RuleAction: pulumi.String(""),
RuleActions: alb.RuleRuleActionArray{
&alb.RuleRuleActionArgs{
ForwardGroupConfig: &alb.RuleRuleActionForwardGroupConfigArgs{
ServerGroupStickySession: &alb.RuleRuleActionForwardGroupConfigServerGroupStickySessionArgs{
Enabled: pulumi.String("off"),
},
ServerGroupTuples: alb.RuleRuleActionForwardGroupConfigServerGroupTupleArray{
&alb.RuleRuleActionForwardGroupConfigServerGroupTupleArgs{
ServerGroupId: pulumi.String("rsp-bdd1lpcbvv288dv40ov1sye0"),
Weight: pulumi.Int(50),
},
},
},
Type: pulumi.String("ForwardGroup"),
},
},
RuleConditions: alb.RuleRuleConditionArray{
&alb.RuleRuleConditionArgs{
HostConfig: &alb.RuleRuleConditionHostConfigArgs{
Values: pulumi.StringArray{
pulumi.String("www.example.com"),
},
},
Type: pulumi.String("Host"),
},
&alb.RuleRuleConditionArgs{
PathConfig: &alb.RuleRuleConditionPathConfigArgs{
Values: pulumi.StringArray{
pulumi.String("/app/*"),
},
},
Type: pulumi.String("Path"),
},
},
Url: pulumi.String(""),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
// Basic edition
var foo = new Volcengine.Alb.Rule("foo", new()
{
Description = "test",
Domain = "www.test.com",
ListenerId = "lsn-1iidd19u4oni874adhezjkyj3",
RedirectConfig = new Volcengine.Alb.Inputs.RuleRedirectConfigArgs
{
RedirectDomain = "www.testtest.com",
RedirectHttpCode = "302",
RedirectPort = "555",
RedirectUri = "/testtest",
},
RewriteConfig = new Volcengine.Alb.Inputs.RuleRewriteConfigArgs
{
RewritePath = "/test",
},
RewriteEnabled = "off",
RuleAction = "Redirect",
ServerGroupId = "rsp-1g72w74y4umf42zbhq4k4hnln",
TrafficLimitEnabled = "off",
TrafficLimitQps = 100,
Url = "/test",
});
// Standard edition
var example = new Volcengine.Alb.Rule("example", new()
{
Description = "standard edition alb rule",
ListenerId = "lsn-bddjp5fcof0g8dv40naga1yd",
Priority = 1,
RuleAction = "",
RuleActions = new[]
{
new Volcengine.Alb.Inputs.RuleRuleActionArgs
{
ForwardGroupConfig = new Volcengine.Alb.Inputs.RuleRuleActionForwardGroupConfigArgs
{
ServerGroupStickySession = new Volcengine.Alb.Inputs.RuleRuleActionForwardGroupConfigServerGroupStickySessionArgs
{
Enabled = "off",
},
ServerGroupTuples = new[]
{
new Volcengine.Alb.Inputs.RuleRuleActionForwardGroupConfigServerGroupTupleArgs
{
ServerGroupId = "rsp-bdd1lpcbvv288dv40ov1sye0",
Weight = 50,
},
},
},
Type = "ForwardGroup",
},
},
RuleConditions = new[]
{
new Volcengine.Alb.Inputs.RuleRuleConditionArgs
{
HostConfig = new Volcengine.Alb.Inputs.RuleRuleConditionHostConfigArgs
{
Values = new[]
{
"www.example.com",
},
},
Type = "Host",
},
new Volcengine.Alb.Inputs.RuleRuleConditionArgs
{
PathConfig = new Volcengine.Alb.Inputs.RuleRuleConditionPathConfigArgs
{
Values = new[]
{
"/app/*",
},
},
Type = "Path",
},
},
Url = "",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.alb.Rule;
import com.pulumi.volcengine.alb.RuleArgs;
import com.pulumi.volcengine.alb.inputs.RuleRedirectConfigArgs;
import com.pulumi.volcengine.alb.inputs.RuleRewriteConfigArgs;
import com.pulumi.volcengine.alb.inputs.RuleRuleActionArgs;
import com.pulumi.volcengine.alb.inputs.RuleRuleActionForwardGroupConfigArgs;
import com.pulumi.volcengine.alb.inputs.RuleRuleActionForwardGroupConfigServerGroupStickySessionArgs;
import com.pulumi.volcengine.alb.inputs.RuleRuleConditionArgs;
import com.pulumi.volcengine.alb.inputs.RuleRuleConditionHostConfigArgs;
import com.pulumi.volcengine.alb.inputs.RuleRuleConditionPathConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
// Basic edition
var foo = new Rule("foo", RuleArgs.builder()
.description("test")
.domain("www.test.com")
.listenerId("lsn-1iidd19u4oni874adhezjkyj3")
.redirectConfig(RuleRedirectConfigArgs.builder()
.redirectDomain("www.testtest.com")
.redirectHttpCode("302")
.redirectPort("555")
.redirectUri("/testtest")
.build())
.rewriteConfig(RuleRewriteConfigArgs.builder()
.rewritePath("/test")
.build())
.rewriteEnabled("off")
.ruleAction("Redirect")
.serverGroupId("rsp-1g72w74y4umf42zbhq4k4hnln")
.trafficLimitEnabled("off")
.trafficLimitQps(100)
.url("/test")
.build());
// Standard edition
var example = new Rule("example", RuleArgs.builder()
.description("standard edition alb rule")
.listenerId("lsn-bddjp5fcof0g8dv40naga1yd")
.priority(1)
.ruleAction("")
.ruleActions(RuleRuleActionArgs.builder()
.forwardGroupConfig(RuleRuleActionForwardGroupConfigArgs.builder()
.serverGroupStickySession(RuleRuleActionForwardGroupConfigServerGroupStickySessionArgs.builder()
.enabled("off")
.build())
.serverGroupTuples(RuleRuleActionForwardGroupConfigServerGroupTupleArgs.builder()
.serverGroupId("rsp-bdd1lpcbvv288dv40ov1sye0")
.weight(50)
.build())
.build())
.type("ForwardGroup")
.build())
.ruleConditions(
RuleRuleConditionArgs.builder()
.hostConfig(RuleRuleConditionHostConfigArgs.builder()
.values("www.example.com")
.build())
.type("Host")
.build(),
RuleRuleConditionArgs.builder()
.pathConfig(RuleRuleConditionPathConfigArgs.builder()
.values("/app/*")
.build())
.type("Path")
.build())
.url("")
.build());
}
}
resources:
# Basic edition
foo:
type: volcengine:alb:Rule
properties:
description: test
domain: www.test.com
listenerId: lsn-1iidd19u4oni874adhezjkyj3
redirectConfig:
redirectDomain: www.testtest.com
redirectHttpCode: '302'
redirectPort: '555'
redirectUri: /testtest
rewriteConfig:
rewritePath: /test
rewriteEnabled: off
ruleAction: Redirect
serverGroupId: rsp-1g72w74y4umf42zbhq4k4hnln
trafficLimitEnabled: off
trafficLimitQps: 100
url: /test
# Standard edition
example:
type: volcengine:alb:Rule
properties:
description: standard edition alb rule
listenerId: lsn-bddjp5fcof0g8dv40naga1yd
priority: 1
ruleAction:
ruleActions:
- forwardGroupConfig:
serverGroupStickySession:
enabled: off
serverGroupTuples:
- serverGroupId: rsp-bdd1lpcbvv288dv40ov1sye0
weight: 50
type: ForwardGroup
ruleConditions:
- hostConfig:
values:
- www.example.com
type: Host
- pathConfig:
values:
- /app/*
type: Path
url:
Create Rule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Rule(name: string, args: RuleArgs, opts?: CustomResourceOptions);@overload
def Rule(resource_name: str,
args: RuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Rule(resource_name: str,
opts: Optional[ResourceOptions] = None,
listener_id: Optional[str] = None,
rule_action: Optional[str] = None,
rule_actions: Optional[Sequence[RuleRuleActionArgs]] = None,
rule_conditions: Optional[Sequence[RuleRuleConditionArgs]] = None,
redirect_config: Optional[RuleRedirectConfigArgs] = None,
rewrite_config: Optional[RuleRewriteConfigArgs] = None,
rewrite_enabled: Optional[str] = None,
domain: Optional[str] = None,
description: Optional[str] = None,
priority: Optional[int] = None,
server_group_id: Optional[str] = None,
server_group_tuples: Optional[Sequence[RuleServerGroupTupleArgs]] = None,
sticky_session_enabled: Optional[str] = None,
sticky_session_timeout: Optional[int] = None,
traffic_limit_enabled: Optional[str] = None,
traffic_limit_qps: Optional[int] = None,
url: Optional[str] = None)func NewRule(ctx *Context, name string, args RuleArgs, opts ...ResourceOption) (*Rule, error)public Rule(string name, RuleArgs args, CustomResourceOptions? opts = null)type: volcengine:alb:Rule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var ruleResource = new Volcengine.Alb.Rule("ruleResource", new()
{
ListenerId = "string",
RuleAction = "string",
RuleActions = new[]
{
new Volcengine.Alb.Inputs.RuleRuleActionArgs
{
FixedResponseConfig = new Volcengine.Alb.Inputs.RuleRuleActionFixedResponseConfigArgs
{
ContentType = "string",
ResponseBody = "string",
ResponseCode = "string",
ResponseMessage = "string",
},
ForwardGroupConfig = new Volcengine.Alb.Inputs.RuleRuleActionForwardGroupConfigArgs
{
ServerGroupStickySession = new Volcengine.Alb.Inputs.RuleRuleActionForwardGroupConfigServerGroupStickySessionArgs
{
Enabled = "string",
Timeout = 0,
},
ServerGroupTuples = new[]
{
new Volcengine.Alb.Inputs.RuleRuleActionForwardGroupConfigServerGroupTupleArgs
{
ServerGroupId = "string",
Weight = 0,
},
},
},
RedirectConfig = new Volcengine.Alb.Inputs.RuleRuleActionRedirectConfigArgs
{
Host = "string",
HttpCode = "string",
Path = "string",
Port = "string",
Protocol = "string",
},
RewriteConfig = new Volcengine.Alb.Inputs.RuleRuleActionRewriteConfigArgs
{
Path = "string",
},
TrafficLimitConfig = new Volcengine.Alb.Inputs.RuleRuleActionTrafficLimitConfigArgs
{
Qps = 0,
},
Type = "string",
},
},
RuleConditions = new[]
{
new Volcengine.Alb.Inputs.RuleRuleConditionArgs
{
HeaderConfig = new Volcengine.Alb.Inputs.RuleRuleConditionHeaderConfigArgs
{
Key = "string",
Values = new[]
{
"string",
},
},
HostConfig = new Volcengine.Alb.Inputs.RuleRuleConditionHostConfigArgs
{
Values = new[]
{
"string",
},
},
MethodConfig = new Volcengine.Alb.Inputs.RuleRuleConditionMethodConfigArgs
{
Values = new[]
{
"string",
},
},
PathConfig = new Volcengine.Alb.Inputs.RuleRuleConditionPathConfigArgs
{
Values = new[]
{
"string",
},
},
QueryStringConfig = new Volcengine.Alb.Inputs.RuleRuleConditionQueryStringConfigArgs
{
Values = new[]
{
new Volcengine.Alb.Inputs.RuleRuleConditionQueryStringConfigValueArgs
{
Key = "string",
Value = "string",
},
},
},
Type = "string",
},
},
RedirectConfig = new Volcengine.Alb.Inputs.RuleRedirectConfigArgs
{
RedirectDomain = "string",
RedirectHttpCode = "string",
RedirectPort = "string",
RedirectProtocol = "string",
RedirectUri = "string",
},
RewriteConfig = new Volcengine.Alb.Inputs.RuleRewriteConfigArgs
{
RewritePath = "string",
},
RewriteEnabled = "string",
Domain = "string",
Description = "string",
Priority = 0,
ServerGroupId = "string",
ServerGroupTuples = new[]
{
new Volcengine.Alb.Inputs.RuleServerGroupTupleArgs
{
ServerGroupId = "string",
Weight = 0,
},
},
StickySessionEnabled = "string",
StickySessionTimeout = 0,
TrafficLimitEnabled = "string",
TrafficLimitQps = 0,
Url = "string",
});
example, err := alb.NewRule(ctx, "ruleResource", &alb.RuleArgs{
ListenerId: pulumi.String("string"),
RuleAction: pulumi.String("string"),
RuleActions: alb.RuleRuleActionArray{
&alb.RuleRuleActionArgs{
FixedResponseConfig: &alb.RuleRuleActionFixedResponseConfigArgs{
ContentType: pulumi.String("string"),
ResponseBody: pulumi.String("string"),
ResponseCode: pulumi.String("string"),
ResponseMessage: pulumi.String("string"),
},
ForwardGroupConfig: &alb.RuleRuleActionForwardGroupConfigArgs{
ServerGroupStickySession: &alb.RuleRuleActionForwardGroupConfigServerGroupStickySessionArgs{
Enabled: pulumi.String("string"),
Timeout: pulumi.Int(0),
},
ServerGroupTuples: alb.RuleRuleActionForwardGroupConfigServerGroupTupleArray{
&alb.RuleRuleActionForwardGroupConfigServerGroupTupleArgs{
ServerGroupId: pulumi.String("string"),
Weight: pulumi.Int(0),
},
},
},
RedirectConfig: &alb.RuleRuleActionRedirectConfigArgs{
Host: pulumi.String("string"),
HttpCode: pulumi.String("string"),
Path: pulumi.String("string"),
Port: pulumi.String("string"),
Protocol: pulumi.String("string"),
},
RewriteConfig: &alb.RuleRuleActionRewriteConfigArgs{
Path: pulumi.String("string"),
},
TrafficLimitConfig: &alb.RuleRuleActionTrafficLimitConfigArgs{
Qps: pulumi.Int(0),
},
Type: pulumi.String("string"),
},
},
RuleConditions: alb.RuleRuleConditionArray{
&alb.RuleRuleConditionArgs{
HeaderConfig: &alb.RuleRuleConditionHeaderConfigArgs{
Key: pulumi.String("string"),
Values: pulumi.StringArray{
pulumi.String("string"),
},
},
HostConfig: &alb.RuleRuleConditionHostConfigArgs{
Values: pulumi.StringArray{
pulumi.String("string"),
},
},
MethodConfig: &alb.RuleRuleConditionMethodConfigArgs{
Values: pulumi.StringArray{
pulumi.String("string"),
},
},
PathConfig: &alb.RuleRuleConditionPathConfigArgs{
Values: pulumi.StringArray{
pulumi.String("string"),
},
},
QueryStringConfig: &alb.RuleRuleConditionQueryStringConfigArgs{
Values: alb.RuleRuleConditionQueryStringConfigValueArray{
&alb.RuleRuleConditionQueryStringConfigValueArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
},
Type: pulumi.String("string"),
},
},
RedirectConfig: &alb.RuleRedirectConfigArgs{
RedirectDomain: pulumi.String("string"),
RedirectHttpCode: pulumi.String("string"),
RedirectPort: pulumi.String("string"),
RedirectProtocol: pulumi.String("string"),
RedirectUri: pulumi.String("string"),
},
RewriteConfig: &alb.RuleRewriteConfigArgs{
RewritePath: pulumi.String("string"),
},
RewriteEnabled: pulumi.String("string"),
Domain: pulumi.String("string"),
Description: pulumi.String("string"),
Priority: pulumi.Int(0),
ServerGroupId: pulumi.String("string"),
ServerGroupTuples: alb.RuleServerGroupTupleArray{
&alb.RuleServerGroupTupleArgs{
ServerGroupId: pulumi.String("string"),
Weight: pulumi.Int(0),
},
},
StickySessionEnabled: pulumi.String("string"),
StickySessionTimeout: pulumi.Int(0),
TrafficLimitEnabled: pulumi.String("string"),
TrafficLimitQps: pulumi.Int(0),
Url: pulumi.String("string"),
})
var ruleResource = new com.pulumi.volcengine.alb.Rule("ruleResource", com.pulumi.volcengine.alb.RuleArgs.builder()
.listenerId("string")
.ruleAction("string")
.ruleActions(RuleRuleActionArgs.builder()
.fixedResponseConfig(RuleRuleActionFixedResponseConfigArgs.builder()
.contentType("string")
.responseBody("string")
.responseCode("string")
.responseMessage("string")
.build())
.forwardGroupConfig(RuleRuleActionForwardGroupConfigArgs.builder()
.serverGroupStickySession(RuleRuleActionForwardGroupConfigServerGroupStickySessionArgs.builder()
.enabled("string")
.timeout(0)
.build())
.serverGroupTuples(RuleRuleActionForwardGroupConfigServerGroupTupleArgs.builder()
.serverGroupId("string")
.weight(0)
.build())
.build())
.redirectConfig(RuleRuleActionRedirectConfigArgs.builder()
.host("string")
.httpCode("string")
.path("string")
.port("string")
.protocol("string")
.build())
.rewriteConfig(RuleRuleActionRewriteConfigArgs.builder()
.path("string")
.build())
.trafficLimitConfig(RuleRuleActionTrafficLimitConfigArgs.builder()
.qps(0)
.build())
.type("string")
.build())
.ruleConditions(RuleRuleConditionArgs.builder()
.headerConfig(RuleRuleConditionHeaderConfigArgs.builder()
.key("string")
.values("string")
.build())
.hostConfig(RuleRuleConditionHostConfigArgs.builder()
.values("string")
.build())
.methodConfig(RuleRuleConditionMethodConfigArgs.builder()
.values("string")
.build())
.pathConfig(RuleRuleConditionPathConfigArgs.builder()
.values("string")
.build())
.queryStringConfig(RuleRuleConditionQueryStringConfigArgs.builder()
.values(RuleRuleConditionQueryStringConfigValueArgs.builder()
.key("string")
.value("string")
.build())
.build())
.type("string")
.build())
.redirectConfig(RuleRedirectConfigArgs.builder()
.redirectDomain("string")
.redirectHttpCode("string")
.redirectPort("string")
.redirectProtocol("string")
.redirectUri("string")
.build())
.rewriteConfig(RuleRewriteConfigArgs.builder()
.rewritePath("string")
.build())
.rewriteEnabled("string")
.domain("string")
.description("string")
.priority(0)
.serverGroupId("string")
.serverGroupTuples(RuleServerGroupTupleArgs.builder()
.serverGroupId("string")
.weight(0)
.build())
.stickySessionEnabled("string")
.stickySessionTimeout(0)
.trafficLimitEnabled("string")
.trafficLimitQps(0)
.url("string")
.build());
rule_resource = volcengine.alb.Rule("ruleResource",
listener_id="string",
rule_action="string",
rule_actions=[{
"fixed_response_config": {
"content_type": "string",
"response_body": "string",
"response_code": "string",
"response_message": "string",
},
"forward_group_config": {
"server_group_sticky_session": {
"enabled": "string",
"timeout": 0,
},
"server_group_tuples": [{
"server_group_id": "string",
"weight": 0,
}],
},
"redirect_config": {
"host": "string",
"http_code": "string",
"path": "string",
"port": "string",
"protocol": "string",
},
"rewrite_config": {
"path": "string",
},
"traffic_limit_config": {
"qps": 0,
},
"type": "string",
}],
rule_conditions=[{
"header_config": {
"key": "string",
"values": ["string"],
},
"host_config": {
"values": ["string"],
},
"method_config": {
"values": ["string"],
},
"path_config": {
"values": ["string"],
},
"query_string_config": {
"values": [{
"key": "string",
"value": "string",
}],
},
"type": "string",
}],
redirect_config={
"redirect_domain": "string",
"redirect_http_code": "string",
"redirect_port": "string",
"redirect_protocol": "string",
"redirect_uri": "string",
},
rewrite_config={
"rewrite_path": "string",
},
rewrite_enabled="string",
domain="string",
description="string",
priority=0,
server_group_id="string",
server_group_tuples=[{
"server_group_id": "string",
"weight": 0,
}],
sticky_session_enabled="string",
sticky_session_timeout=0,
traffic_limit_enabled="string",
traffic_limit_qps=0,
url="string")
const ruleResource = new volcengine.alb.Rule("ruleResource", {
listenerId: "string",
ruleAction: "string",
ruleActions: [{
fixedResponseConfig: {
contentType: "string",
responseBody: "string",
responseCode: "string",
responseMessage: "string",
},
forwardGroupConfig: {
serverGroupStickySession: {
enabled: "string",
timeout: 0,
},
serverGroupTuples: [{
serverGroupId: "string",
weight: 0,
}],
},
redirectConfig: {
host: "string",
httpCode: "string",
path: "string",
port: "string",
protocol: "string",
},
rewriteConfig: {
path: "string",
},
trafficLimitConfig: {
qps: 0,
},
type: "string",
}],
ruleConditions: [{
headerConfig: {
key: "string",
values: ["string"],
},
hostConfig: {
values: ["string"],
},
methodConfig: {
values: ["string"],
},
pathConfig: {
values: ["string"],
},
queryStringConfig: {
values: [{
key: "string",
value: "string",
}],
},
type: "string",
}],
redirectConfig: {
redirectDomain: "string",
redirectHttpCode: "string",
redirectPort: "string",
redirectProtocol: "string",
redirectUri: "string",
},
rewriteConfig: {
rewritePath: "string",
},
rewriteEnabled: "string",
domain: "string",
description: "string",
priority: 0,
serverGroupId: "string",
serverGroupTuples: [{
serverGroupId: "string",
weight: 0,
}],
stickySessionEnabled: "string",
stickySessionTimeout: 0,
trafficLimitEnabled: "string",
trafficLimitQps: 0,
url: "string",
});
type: volcengine:alb:Rule
properties:
description: string
domain: string
listenerId: string
priority: 0
redirectConfig:
redirectDomain: string
redirectHttpCode: string
redirectPort: string
redirectProtocol: string
redirectUri: string
rewriteConfig:
rewritePath: string
rewriteEnabled: string
ruleAction: string
ruleActions:
- fixedResponseConfig:
contentType: string
responseBody: string
responseCode: string
responseMessage: string
forwardGroupConfig:
serverGroupStickySession:
enabled: string
timeout: 0
serverGroupTuples:
- serverGroupId: string
weight: 0
redirectConfig:
host: string
httpCode: string
path: string
port: string
protocol: string
rewriteConfig:
path: string
trafficLimitConfig:
qps: 0
type: string
ruleConditions:
- headerConfig:
key: string
values:
- string
hostConfig:
values:
- string
methodConfig:
values:
- string
pathConfig:
values:
- string
queryStringConfig:
values:
- key: string
value: string
type: string
serverGroupId: string
serverGroupTuples:
- serverGroupId: string
weight: 0
stickySessionEnabled: string
stickySessionTimeout: 0
trafficLimitEnabled: string
trafficLimitQps: 0
url: string
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Rule resource accepts the following input properties:
- Listener
Id string - The ID of listener.
- Rule
Action string - The forwarding rule action, if this parameter is empty(
""), forward to server group, if value isRedirect, will redirect. - Description string
- The description of the Rule.
- Domain string
- The domain of Rule.
- Priority int
- The priority of the Rule.Only the standard version is supported.
- Redirect
Config RuleRedirect Config - The redirect related configuration.
- Rewrite
Config RuleRewrite Config - The list of rewrite configurations.
- Rewrite
Enabled string - Rewrite configuration switch for forwarding rules, only allows configuration and takes effect when RuleAction is empty (i.e., forwarding to server group). Only available for whitelist users, please submit an application to experience. Supported values are as follows: on: enable. off: disable.
- Rule
Actions List<RuleRule Action> - The rule actions for standard edition forwarding rules.
- Rule
Conditions List<RuleRule Condition> - The rule conditions for standard edition forwarding rules.
- Server
Group stringId - Server group ID, this parameter is required if
rule_actionis empty. - Server
Group List<RuleTuples Server Group Tuple> - Weight forwarded to the corresponding backend server group.
- Sticky
Session stringEnabled - Whether to enable group session stickiness. Valid values are 'on' and 'off'.
- Sticky
Session intTimeout - The group session stickiness timeout, in seconds.
- Traffic
Limit stringEnabled - Forwarding rule QPS rate limiting switch: on: enable. off: disable (default).
- Traffic
Limit intQps - When Rules.N.TrafficLimitEnabled is turned on, this field is required. Requests per second. Valid values are between 100 and 100000.
- Url string
- The Url of Rule.
- Listener
Id string - The ID of listener.
- Rule
Action string - The forwarding rule action, if this parameter is empty(
""), forward to server group, if value isRedirect, will redirect. - Description string
- The description of the Rule.
- Domain string
- The domain of Rule.
- Priority int
- The priority of the Rule.Only the standard version is supported.
- Redirect
Config RuleRedirect Config Args - The redirect related configuration.
- Rewrite
Config RuleRewrite Config Args - The list of rewrite configurations.
- Rewrite
Enabled string - Rewrite configuration switch for forwarding rules, only allows configuration and takes effect when RuleAction is empty (i.e., forwarding to server group). Only available for whitelist users, please submit an application to experience. Supported values are as follows: on: enable. off: disable.
- Rule
Actions []RuleRule Action Args - The rule actions for standard edition forwarding rules.
- Rule
Conditions []RuleRule Condition Args - The rule conditions for standard edition forwarding rules.
- Server
Group stringId - Server group ID, this parameter is required if
rule_actionis empty. - Server
Group []RuleTuples Server Group Tuple Args - Weight forwarded to the corresponding backend server group.
- Sticky
Session stringEnabled - Whether to enable group session stickiness. Valid values are 'on' and 'off'.
- Sticky
Session intTimeout - The group session stickiness timeout, in seconds.
- Traffic
Limit stringEnabled - Forwarding rule QPS rate limiting switch: on: enable. off: disable (default).
- Traffic
Limit intQps - When Rules.N.TrafficLimitEnabled is turned on, this field is required. Requests per second. Valid values are between 100 and 100000.
- Url string
- The Url of Rule.
- listener
Id String - The ID of listener.
- rule
Action String - The forwarding rule action, if this parameter is empty(
""), forward to server group, if value isRedirect, will redirect. - description String
- The description of the Rule.
- domain String
- The domain of Rule.
- priority Integer
- The priority of the Rule.Only the standard version is supported.
- redirect
Config RuleRedirect Config - The redirect related configuration.
- rewrite
Config RuleRewrite Config - The list of rewrite configurations.
- rewrite
Enabled String - Rewrite configuration switch for forwarding rules, only allows configuration and takes effect when RuleAction is empty (i.e., forwarding to server group). Only available for whitelist users, please submit an application to experience. Supported values are as follows: on: enable. off: disable.
- rule
Actions List<RuleRule Action> - The rule actions for standard edition forwarding rules.
- rule
Conditions List<RuleRule Condition> - The rule conditions for standard edition forwarding rules.
- server
Group StringId - Server group ID, this parameter is required if
rule_actionis empty. - server
Group List<RuleTuples Server Group Tuple> - Weight forwarded to the corresponding backend server group.
- sticky
Session StringEnabled - Whether to enable group session stickiness. Valid values are 'on' and 'off'.
- sticky
Session IntegerTimeout - The group session stickiness timeout, in seconds.
- traffic
Limit StringEnabled - Forwarding rule QPS rate limiting switch: on: enable. off: disable (default).
- traffic
Limit IntegerQps - When Rules.N.TrafficLimitEnabled is turned on, this field is required. Requests per second. Valid values are between 100 and 100000.
- url String
- The Url of Rule.
- listener
Id string - The ID of listener.
- rule
Action string - The forwarding rule action, if this parameter is empty(
""), forward to server group, if value isRedirect, will redirect. - description string
- The description of the Rule.
- domain string
- The domain of Rule.
- priority number
- The priority of the Rule.Only the standard version is supported.
- redirect
Config RuleRedirect Config - The redirect related configuration.
- rewrite
Config RuleRewrite Config - The list of rewrite configurations.
- rewrite
Enabled string - Rewrite configuration switch for forwarding rules, only allows configuration and takes effect when RuleAction is empty (i.e., forwarding to server group). Only available for whitelist users, please submit an application to experience. Supported values are as follows: on: enable. off: disable.
- rule
Actions RuleRule Action[] - The rule actions for standard edition forwarding rules.
- rule
Conditions RuleRule Condition[] - The rule conditions for standard edition forwarding rules.
- server
Group stringId - Server group ID, this parameter is required if
rule_actionis empty. - server
Group RuleTuples Server Group Tuple[] - Weight forwarded to the corresponding backend server group.
- sticky
Session stringEnabled - Whether to enable group session stickiness. Valid values are 'on' and 'off'.
- sticky
Session numberTimeout - The group session stickiness timeout, in seconds.
- traffic
Limit stringEnabled - Forwarding rule QPS rate limiting switch: on: enable. off: disable (default).
- traffic
Limit numberQps - When Rules.N.TrafficLimitEnabled is turned on, this field is required. Requests per second. Valid values are between 100 and 100000.
- url string
- The Url of Rule.
- listener_
id str - The ID of listener.
- rule_
action str - The forwarding rule action, if this parameter is empty(
""), forward to server group, if value isRedirect, will redirect. - description str
- The description of the Rule.
- domain str
- The domain of Rule.
- priority int
- The priority of the Rule.Only the standard version is supported.
- redirect_
config RuleRedirect Config Args - The redirect related configuration.
- rewrite_
config RuleRewrite Config Args - The list of rewrite configurations.
- rewrite_
enabled str - Rewrite configuration switch for forwarding rules, only allows configuration and takes effect when RuleAction is empty (i.e., forwarding to server group). Only available for whitelist users, please submit an application to experience. Supported values are as follows: on: enable. off: disable.
- rule_
actions Sequence[RuleRule Action Args] - The rule actions for standard edition forwarding rules.
- rule_
conditions Sequence[RuleRule Condition Args] - The rule conditions for standard edition forwarding rules.
- server_
group_ strid - Server group ID, this parameter is required if
rule_actionis empty. - server_
group_ Sequence[Ruletuples Server Group Tuple Args] - Weight forwarded to the corresponding backend server group.
- sticky_
session_ strenabled - Whether to enable group session stickiness. Valid values are 'on' and 'off'.
- sticky_
session_ inttimeout - The group session stickiness timeout, in seconds.
- traffic_
limit_ strenabled - Forwarding rule QPS rate limiting switch: on: enable. off: disable (default).
- traffic_
limit_ intqps - When Rules.N.TrafficLimitEnabled is turned on, this field is required. Requests per second. Valid values are between 100 and 100000.
- url str
- The Url of Rule.
- listener
Id String - The ID of listener.
- rule
Action String - The forwarding rule action, if this parameter is empty(
""), forward to server group, if value isRedirect, will redirect. - description String
- The description of the Rule.
- domain String
- The domain of Rule.
- priority Number
- The priority of the Rule.Only the standard version is supported.
- redirect
Config Property Map - The redirect related configuration.
- rewrite
Config Property Map - The list of rewrite configurations.
- rewrite
Enabled String - Rewrite configuration switch for forwarding rules, only allows configuration and takes effect when RuleAction is empty (i.e., forwarding to server group). Only available for whitelist users, please submit an application to experience. Supported values are as follows: on: enable. off: disable.
- rule
Actions List<Property Map> - The rule actions for standard edition forwarding rules.
- rule
Conditions List<Property Map> - The rule conditions for standard edition forwarding rules.
- server
Group StringId - Server group ID, this parameter is required if
rule_actionis empty. - server
Group List<Property Map>Tuples - Weight forwarded to the corresponding backend server group.
- sticky
Session StringEnabled - Whether to enable group session stickiness. Valid values are 'on' and 'off'.
- sticky
Session NumberTimeout - The group session stickiness timeout, in seconds.
- traffic
Limit StringEnabled - Forwarding rule QPS rate limiting switch: on: enable. off: disable (default).
- traffic
Limit NumberQps - When Rules.N.TrafficLimitEnabled is turned on, this field is required. Requests per second. Valid values are between 100 and 100000.
- url String
- The Url of Rule.
Outputs
All input properties are implicitly available as output properties. Additionally, the Rule resource produces the following output properties:
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,
description: Optional[str] = None,
domain: Optional[str] = None,
listener_id: Optional[str] = None,
priority: Optional[int] = None,
redirect_config: Optional[RuleRedirectConfigArgs] = None,
rewrite_config: Optional[RuleRewriteConfigArgs] = None,
rewrite_enabled: Optional[str] = None,
rule_action: Optional[str] = None,
rule_actions: Optional[Sequence[RuleRuleActionArgs]] = None,
rule_conditions: Optional[Sequence[RuleRuleConditionArgs]] = None,
rule_id: Optional[str] = None,
server_group_id: Optional[str] = None,
server_group_tuples: Optional[Sequence[RuleServerGroupTupleArgs]] = None,
sticky_session_enabled: Optional[str] = None,
sticky_session_timeout: Optional[int] = None,
traffic_limit_enabled: Optional[str] = None,
traffic_limit_qps: Optional[int] = None,
url: Optional[str] = None) -> Rulefunc 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)resources: _: type: volcengine:alb:Rule get: id: ${id}- 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.
- Description string
- The description of the Rule.
- Domain string
- The domain of Rule.
- Listener
Id string - The ID of listener.
- Priority int
- The priority of the Rule.Only the standard version is supported.
- Redirect
Config RuleRedirect Config - The redirect related configuration.
- Rewrite
Config RuleRewrite Config - The list of rewrite configurations.
- Rewrite
Enabled string - Rewrite configuration switch for forwarding rules, only allows configuration and takes effect when RuleAction is empty (i.e., forwarding to server group). Only available for whitelist users, please submit an application to experience. Supported values are as follows: on: enable. off: disable.
- Rule
Action string - The forwarding rule action, if this parameter is empty(
""), forward to server group, if value isRedirect, will redirect. - Rule
Actions List<RuleRule Action> - The rule actions for standard edition forwarding rules.
- Rule
Conditions List<RuleRule Condition> - The rule conditions for standard edition forwarding rules.
- Rule
Id string - The ID of rule.
- Server
Group stringId - Server group ID, this parameter is required if
rule_actionis empty. - Server
Group List<RuleTuples Server Group Tuple> - Weight forwarded to the corresponding backend server group.
- Sticky
Session stringEnabled - Whether to enable group session stickiness. Valid values are 'on' and 'off'.
- Sticky
Session intTimeout - The group session stickiness timeout, in seconds.
- Traffic
Limit stringEnabled - Forwarding rule QPS rate limiting switch: on: enable. off: disable (default).
- Traffic
Limit intQps - When Rules.N.TrafficLimitEnabled is turned on, this field is required. Requests per second. Valid values are between 100 and 100000.
- Url string
- The Url of Rule.
- Description string
- The description of the Rule.
- Domain string
- The domain of Rule.
- Listener
Id string - The ID of listener.
- Priority int
- The priority of the Rule.Only the standard version is supported.
- Redirect
Config RuleRedirect Config Args - The redirect related configuration.
- Rewrite
Config RuleRewrite Config Args - The list of rewrite configurations.
- Rewrite
Enabled string - Rewrite configuration switch for forwarding rules, only allows configuration and takes effect when RuleAction is empty (i.e., forwarding to server group). Only available for whitelist users, please submit an application to experience. Supported values are as follows: on: enable. off: disable.
- Rule
Action string - The forwarding rule action, if this parameter is empty(
""), forward to server group, if value isRedirect, will redirect. - Rule
Actions []RuleRule Action Args - The rule actions for standard edition forwarding rules.
- Rule
Conditions []RuleRule Condition Args - The rule conditions for standard edition forwarding rules.
- Rule
Id string - The ID of rule.
- Server
Group stringId - Server group ID, this parameter is required if
rule_actionis empty. - Server
Group []RuleTuples Server Group Tuple Args - Weight forwarded to the corresponding backend server group.
- Sticky
Session stringEnabled - Whether to enable group session stickiness. Valid values are 'on' and 'off'.
- Sticky
Session intTimeout - The group session stickiness timeout, in seconds.
- Traffic
Limit stringEnabled - Forwarding rule QPS rate limiting switch: on: enable. off: disable (default).
- Traffic
Limit intQps - When Rules.N.TrafficLimitEnabled is turned on, this field is required. Requests per second. Valid values are between 100 and 100000.
- Url string
- The Url of Rule.
- description String
- The description of the Rule.
- domain String
- The domain of Rule.
- listener
Id String - The ID of listener.
- priority Integer
- The priority of the Rule.Only the standard version is supported.
- redirect
Config RuleRedirect Config - The redirect related configuration.
- rewrite
Config RuleRewrite Config - The list of rewrite configurations.
- rewrite
Enabled String - Rewrite configuration switch for forwarding rules, only allows configuration and takes effect when RuleAction is empty (i.e., forwarding to server group). Only available for whitelist users, please submit an application to experience. Supported values are as follows: on: enable. off: disable.
- rule
Action String - The forwarding rule action, if this parameter is empty(
""), forward to server group, if value isRedirect, will redirect. - rule
Actions List<RuleRule Action> - The rule actions for standard edition forwarding rules.
- rule
Conditions List<RuleRule Condition> - The rule conditions for standard edition forwarding rules.
- rule
Id String - The ID of rule.
- server
Group StringId - Server group ID, this parameter is required if
rule_actionis empty. - server
Group List<RuleTuples Server Group Tuple> - Weight forwarded to the corresponding backend server group.
- sticky
Session StringEnabled - Whether to enable group session stickiness. Valid values are 'on' and 'off'.
- sticky
Session IntegerTimeout - The group session stickiness timeout, in seconds.
- traffic
Limit StringEnabled - Forwarding rule QPS rate limiting switch: on: enable. off: disable (default).
- traffic
Limit IntegerQps - When Rules.N.TrafficLimitEnabled is turned on, this field is required. Requests per second. Valid values are between 100 and 100000.
- url String
- The Url of Rule.
- description string
- The description of the Rule.
- domain string
- The domain of Rule.
- listener
Id string - The ID of listener.
- priority number
- The priority of the Rule.Only the standard version is supported.
- redirect
Config RuleRedirect Config - The redirect related configuration.
- rewrite
Config RuleRewrite Config - The list of rewrite configurations.
- rewrite
Enabled string - Rewrite configuration switch for forwarding rules, only allows configuration and takes effect when RuleAction is empty (i.e., forwarding to server group). Only available for whitelist users, please submit an application to experience. Supported values are as follows: on: enable. off: disable.
- rule
Action string - The forwarding rule action, if this parameter is empty(
""), forward to server group, if value isRedirect, will redirect. - rule
Actions RuleRule Action[] - The rule actions for standard edition forwarding rules.
- rule
Conditions RuleRule Condition[] - The rule conditions for standard edition forwarding rules.
- rule
Id string - The ID of rule.
- server
Group stringId - Server group ID, this parameter is required if
rule_actionis empty. - server
Group RuleTuples Server Group Tuple[] - Weight forwarded to the corresponding backend server group.
- sticky
Session stringEnabled - Whether to enable group session stickiness. Valid values are 'on' and 'off'.
- sticky
Session numberTimeout - The group session stickiness timeout, in seconds.
- traffic
Limit stringEnabled - Forwarding rule QPS rate limiting switch: on: enable. off: disable (default).
- traffic
Limit numberQps - When Rules.N.TrafficLimitEnabled is turned on, this field is required. Requests per second. Valid values are between 100 and 100000.
- url string
- The Url of Rule.
- description str
- The description of the Rule.
- domain str
- The domain of Rule.
- listener_
id str - The ID of listener.
- priority int
- The priority of the Rule.Only the standard version is supported.
- redirect_
config RuleRedirect Config Args - The redirect related configuration.
- rewrite_
config RuleRewrite Config Args - The list of rewrite configurations.
- rewrite_
enabled str - Rewrite configuration switch for forwarding rules, only allows configuration and takes effect when RuleAction is empty (i.e., forwarding to server group). Only available for whitelist users, please submit an application to experience. Supported values are as follows: on: enable. off: disable.
- rule_
action str - The forwarding rule action, if this parameter is empty(
""), forward to server group, if value isRedirect, will redirect. - rule_
actions Sequence[RuleRule Action Args] - The rule actions for standard edition forwarding rules.
- rule_
conditions Sequence[RuleRule Condition Args] - The rule conditions for standard edition forwarding rules.
- rule_
id str - The ID of rule.
- server_
group_ strid - Server group ID, this parameter is required if
rule_actionis empty. - server_
group_ Sequence[Ruletuples Server Group Tuple Args] - Weight forwarded to the corresponding backend server group.
- sticky_
session_ strenabled - Whether to enable group session stickiness. Valid values are 'on' and 'off'.
- sticky_
session_ inttimeout - The group session stickiness timeout, in seconds.
- traffic_
limit_ strenabled - Forwarding rule QPS rate limiting switch: on: enable. off: disable (default).
- traffic_
limit_ intqps - When Rules.N.TrafficLimitEnabled is turned on, this field is required. Requests per second. Valid values are between 100 and 100000.
- url str
- The Url of Rule.
- description String
- The description of the Rule.
- domain String
- The domain of Rule.
- listener
Id String - The ID of listener.
- priority Number
- The priority of the Rule.Only the standard version is supported.
- redirect
Config Property Map - The redirect related configuration.
- rewrite
Config Property Map - The list of rewrite configurations.
- rewrite
Enabled String - Rewrite configuration switch for forwarding rules, only allows configuration and takes effect when RuleAction is empty (i.e., forwarding to server group). Only available for whitelist users, please submit an application to experience. Supported values are as follows: on: enable. off: disable.
- rule
Action String - The forwarding rule action, if this parameter is empty(
""), forward to server group, if value isRedirect, will redirect. - rule
Actions List<Property Map> - The rule actions for standard edition forwarding rules.
- rule
Conditions List<Property Map> - The rule conditions for standard edition forwarding rules.
- rule
Id String - The ID of rule.
- server
Group StringId - Server group ID, this parameter is required if
rule_actionis empty. - server
Group List<Property Map>Tuples - Weight forwarded to the corresponding backend server group.
- sticky
Session StringEnabled - Whether to enable group session stickiness. Valid values are 'on' and 'off'.
- sticky
Session NumberTimeout - The group session stickiness timeout, in seconds.
- traffic
Limit StringEnabled - Forwarding rule QPS rate limiting switch: on: enable. off: disable (default).
- traffic
Limit NumberQps - When Rules.N.TrafficLimitEnabled is turned on, this field is required. Requests per second. Valid values are between 100 and 100000.
- url String
- The Url of Rule.
Supporting Types
RuleRedirectConfig, RuleRedirectConfigArgs
- Redirect
Domain string - The redirect domain, only support exact domain name.
- Redirect
Http stringCode - The redirect http code, support 301(default), 302, 307, 308.
- Redirect
Port string - The redirect port.
- Redirect
Protocol string - The redirect protocol, support HTTP, HTTPS(default).
- Redirect
Uri string - The redirect URI.
- Redirect
Domain string - The redirect domain, only support exact domain name.
- Redirect
Http stringCode - The redirect http code, support 301(default), 302, 307, 308.
- Redirect
Port string - The redirect port.
- Redirect
Protocol string - The redirect protocol, support HTTP, HTTPS(default).
- Redirect
Uri string - The redirect URI.
- redirect
Domain String - The redirect domain, only support exact domain name.
- redirect
Http StringCode - The redirect http code, support 301(default), 302, 307, 308.
- redirect
Port String - The redirect port.
- redirect
Protocol String - The redirect protocol, support HTTP, HTTPS(default).
- redirect
Uri String - The redirect URI.
- redirect
Domain string - The redirect domain, only support exact domain name.
- redirect
Http stringCode - The redirect http code, support 301(default), 302, 307, 308.
- redirect
Port string - The redirect port.
- redirect
Protocol string - The redirect protocol, support HTTP, HTTPS(default).
- redirect
Uri string - The redirect URI.
- redirect_
domain str - The redirect domain, only support exact domain name.
- redirect_
http_ strcode - The redirect http code, support 301(default), 302, 307, 308.
- redirect_
port str - The redirect port.
- redirect_
protocol str - The redirect protocol, support HTTP, HTTPS(default).
- redirect_
uri str - The redirect URI.
- redirect
Domain String - The redirect domain, only support exact domain name.
- redirect
Http StringCode - The redirect http code, support 301(default), 302, 307, 308.
- redirect
Port String - The redirect port.
- redirect
Protocol String - The redirect protocol, support HTTP, HTTPS(default).
- redirect
Uri String - The redirect URI.
RuleRewriteConfig, RuleRewriteConfigArgs
- Rewrite
Path string - Rewrite path.
- Rewrite
Path string - Rewrite path.
- rewrite
Path String - Rewrite path.
- rewrite
Path string - Rewrite path.
- rewrite_
path str - Rewrite path.
- rewrite
Path String - Rewrite path.
RuleRuleAction, RuleRuleActionArgs
- Fixed
Response RuleConfig Rule Action Fixed Response Config - Fixed response configuration for fixed response type rule.
- Forward
Group RuleConfig Rule Action Forward Group Config - Forward group configuration for ForwardGroup type action.
- Redirect
Config RuleRule Action Redirect Config - Redirect configuration for Redirect type action.
- Rewrite
Config RuleRule Action Rewrite Config - Rewrite configuration for Rewrite type action.
- Traffic
Limit RuleConfig Rule Action Traffic Limit Config - Traffic limit configuration for TrafficLimit type action.
- Type string
- The type of rule action. Valid values: ForwardGroup, Redirect, Rewrite, TrafficLimit.
- Fixed
Response RuleConfig Rule Action Fixed Response Config - Fixed response configuration for fixed response type rule.
- Forward
Group RuleConfig Rule Action Forward Group Config - Forward group configuration for ForwardGroup type action.
- Redirect
Config RuleRule Action Redirect Config - Redirect configuration for Redirect type action.
- Rewrite
Config RuleRule Action Rewrite Config - Rewrite configuration for Rewrite type action.
- Traffic
Limit RuleConfig Rule Action Traffic Limit Config - Traffic limit configuration for TrafficLimit type action.
- Type string
- The type of rule action. Valid values: ForwardGroup, Redirect, Rewrite, TrafficLimit.
- fixed
Response RuleConfig Rule Action Fixed Response Config - Fixed response configuration for fixed response type rule.
- forward
Group RuleConfig Rule Action Forward Group Config - Forward group configuration for ForwardGroup type action.
- redirect
Config RuleRule Action Redirect Config - Redirect configuration for Redirect type action.
- rewrite
Config RuleRule Action Rewrite Config - Rewrite configuration for Rewrite type action.
- traffic
Limit RuleConfig Rule Action Traffic Limit Config - Traffic limit configuration for TrafficLimit type action.
- type String
- The type of rule action. Valid values: ForwardGroup, Redirect, Rewrite, TrafficLimit.
- fixed
Response RuleConfig Rule Action Fixed Response Config - Fixed response configuration for fixed response type rule.
- forward
Group RuleConfig Rule Action Forward Group Config - Forward group configuration for ForwardGroup type action.
- redirect
Config RuleRule Action Redirect Config - Redirect configuration for Redirect type action.
- rewrite
Config RuleRule Action Rewrite Config - Rewrite configuration for Rewrite type action.
- traffic
Limit RuleConfig Rule Action Traffic Limit Config - Traffic limit configuration for TrafficLimit type action.
- type string
- The type of rule action. Valid values: ForwardGroup, Redirect, Rewrite, TrafficLimit.
- fixed_
response_ Ruleconfig Rule Action Fixed Response Config - Fixed response configuration for fixed response type rule.
- forward_
group_ Ruleconfig Rule Action Forward Group Config - Forward group configuration for ForwardGroup type action.
- redirect_
config RuleRule Action Redirect Config - Redirect configuration for Redirect type action.
- rewrite_
config RuleRule Action Rewrite Config - Rewrite configuration for Rewrite type action.
- traffic_
limit_ Ruleconfig Rule Action Traffic Limit Config - Traffic limit configuration for TrafficLimit type action.
- type str
- The type of rule action. Valid values: ForwardGroup, Redirect, Rewrite, TrafficLimit.
- fixed
Response Property MapConfig - Fixed response configuration for fixed response type rule.
- forward
Group Property MapConfig - Forward group configuration for ForwardGroup type action.
- redirect
Config Property Map - Redirect configuration for Redirect type action.
- rewrite
Config Property Map - Rewrite configuration for Rewrite type action.
- traffic
Limit Property MapConfig - Traffic limit configuration for TrafficLimit type action.
- type String
- The type of rule action. Valid values: ForwardGroup, Redirect, Rewrite, TrafficLimit.
RuleRuleActionFixedResponseConfig, RuleRuleActionFixedResponseConfigArgs
- Content
Type string - The content type of the fixed response.
- Response
Body string - The response body of the fixed response.
- Response
Code string - The fixed response HTTP status code.
- Response
Message string - The fixed response message.
- Content
Type string - The content type of the fixed response.
- Response
Body string - The response body of the fixed response.
- Response
Code string - The fixed response HTTP status code.
- Response
Message string - The fixed response message.
- content
Type String - The content type of the fixed response.
- response
Body String - The response body of the fixed response.
- response
Code String - The fixed response HTTP status code.
- response
Message String - The fixed response message.
- content
Type string - The content type of the fixed response.
- response
Body string - The response body of the fixed response.
- response
Code string - The fixed response HTTP status code.
- response
Message string - The fixed response message.
- content_
type str - The content type of the fixed response.
- response_
body str - The response body of the fixed response.
- response_
code str - The fixed response HTTP status code.
- response_
message str - The fixed response message.
- content
Type String - The content type of the fixed response.
- response
Body String - The response body of the fixed response.
- response
Code String - The fixed response HTTP status code.
- response
Message String - The fixed response message.
RuleRuleActionForwardGroupConfig, RuleRuleActionForwardGroupConfigArgs
- Server
Group RuleSticky Session Rule Action Forward Group Config Server Group Sticky Session - The config of group session stickiness.
- Server
Group List<RuleTuples Rule Action Forward Group Config Server Group Tuple> - The server group tuples.
- Server
Group RuleSticky Session Rule Action Forward Group Config Server Group Sticky Session - The config of group session stickiness.
- Server
Group []RuleTuples Rule Action Forward Group Config Server Group Tuple - The server group tuples.
- server
Group RuleSticky Session Rule Action Forward Group Config Server Group Sticky Session - The config of group session stickiness.
- server
Group List<RuleTuples Rule Action Forward Group Config Server Group Tuple> - The server group tuples.
- server
Group RuleSticky Session Rule Action Forward Group Config Server Group Sticky Session - The config of group session stickiness.
- server
Group RuleTuples Rule Action Forward Group Config Server Group Tuple[] - The server group tuples.
- server_
group_ Rulesticky_ session Rule Action Forward Group Config Server Group Sticky Session - The config of group session stickiness.
- server_
group_ Sequence[Ruletuples Rule Action Forward Group Config Server Group Tuple] - The server group tuples.
- server
Group Property MapSticky Session - The config of group session stickiness.
- server
Group List<Property Map>Tuples - The server group tuples.
RuleRuleActionForwardGroupConfigServerGroupStickySession, RuleRuleActionForwardGroupConfigServerGroupStickySessionArgs
RuleRuleActionForwardGroupConfigServerGroupTuple, RuleRuleActionForwardGroupConfigServerGroupTupleArgs
- Server
Group stringId - The server group ID. The priority of this parameter is higher than that of
server_group_id. - Weight int
- The weight of the server group.
- Server
Group stringId - The server group ID. The priority of this parameter is higher than that of
server_group_id. - Weight int
- The weight of the server group.
- server
Group StringId - The server group ID. The priority of this parameter is higher than that of
server_group_id. - weight Integer
- The weight of the server group.
- server
Group stringId - The server group ID. The priority of this parameter is higher than that of
server_group_id. - weight number
- The weight of the server group.
- server_
group_ strid - The server group ID. The priority of this parameter is higher than that of
server_group_id. - weight int
- The weight of the server group.
- server
Group StringId - The server group ID. The priority of this parameter is higher than that of
server_group_id. - weight Number
- The weight of the server group.
RuleRuleActionRedirectConfig, RuleRuleActionRedirectConfigArgs
RuleRuleActionRewriteConfig, RuleRuleActionRewriteConfigArgs
- Path string
- The rewrite path.
- Path string
- The rewrite path.
- path String
- The rewrite path.
- path string
- The rewrite path.
- path str
- The rewrite path.
- path String
- The rewrite path.
RuleRuleActionTrafficLimitConfig, RuleRuleActionTrafficLimitConfigArgs
- Qps int
- The QPS limit.
- Qps int
- The QPS limit.
- qps Integer
- The QPS limit.
- qps number
- The QPS limit.
- qps int
- The QPS limit.
- qps Number
- The QPS limit.
RuleRuleCondition, RuleRuleConditionArgs
- Header
Config RuleRule Condition Header Config - Header configuration for Header type condition.
- Host
Config RuleRule Condition Host Config - Host configuration for Host type condition.
- Method
Config RuleRule Condition Method Config - Method configuration for Method type condition.
- Path
Config RuleRule Condition Path Config - Path configuration for Path type condition.
- Query
String RuleConfig Rule Condition Query String Config - Query string configuration for QueryString type condition.
- Type string
- The type of rule condition. Valid values: Host, Path, Header, Method, QueryString.
- Header
Config RuleRule Condition Header Config - Header configuration for Header type condition.
- Host
Config RuleRule Condition Host Config - Host configuration for Host type condition.
- Method
Config RuleRule Condition Method Config - Method configuration for Method type condition.
- Path
Config RuleRule Condition Path Config - Path configuration for Path type condition.
- Query
String RuleConfig Rule Condition Query String Config - Query string configuration for QueryString type condition.
- Type string
- The type of rule condition. Valid values: Host, Path, Header, Method, QueryString.
- header
Config RuleRule Condition Header Config - Header configuration for Header type condition.
- host
Config RuleRule Condition Host Config - Host configuration for Host type condition.
- method
Config RuleRule Condition Method Config - Method configuration for Method type condition.
- path
Config RuleRule Condition Path Config - Path configuration for Path type condition.
- query
String RuleConfig Rule Condition Query String Config - Query string configuration for QueryString type condition.
- type String
- The type of rule condition. Valid values: Host, Path, Header, Method, QueryString.
- header
Config RuleRule Condition Header Config - Header configuration for Header type condition.
- host
Config RuleRule Condition Host Config - Host configuration for Host type condition.
- method
Config RuleRule Condition Method Config - Method configuration for Method type condition.
- path
Config RuleRule Condition Path Config - Path configuration for Path type condition.
- query
String RuleConfig Rule Condition Query String Config - Query string configuration for QueryString type condition.
- type string
- The type of rule condition. Valid values: Host, Path, Header, Method, QueryString.
- header_
config RuleRule Condition Header Config - Header configuration for Header type condition.
- host_
config RuleRule Condition Host Config - Host configuration for Host type condition.
- method_
config RuleRule Condition Method Config - Method configuration for Method type condition.
- path_
config RuleRule Condition Path Config - Path configuration for Path type condition.
- query_
string_ Ruleconfig Rule Condition Query String Config - Query string configuration for QueryString type condition.
- type str
- The type of rule condition. Valid values: Host, Path, Header, Method, QueryString.
- header
Config Property Map - Header configuration for Header type condition.
- host
Config Property Map - Host configuration for Host type condition.
- method
Config Property Map - Method configuration for Method type condition.
- path
Config Property Map - Path configuration for Path type condition.
- query
String Property MapConfig - Query string configuration for QueryString type condition.
- type String
- The type of rule condition. Valid values: Host, Path, Header, Method, QueryString.
RuleRuleConditionHeaderConfig, RuleRuleConditionHeaderConfigArgs
RuleRuleConditionHostConfig, RuleRuleConditionHostConfigArgs
- Values List<string>
- The list of domain names.
- Values []string
- The list of domain names.
- values List<String>
- The list of domain names.
- values string[]
- The list of domain names.
- values Sequence[str]
- The list of domain names.
- values List<String>
- The list of domain names.
RuleRuleConditionMethodConfig, RuleRuleConditionMethodConfigArgs
- Values List<string>
- The values of the method. Vaild values: HEAD,GET,POST,OPTIONS,PUT,PATCH,DELETE.
- Values []string
- The values of the method. Vaild values: HEAD,GET,POST,OPTIONS,PUT,PATCH,DELETE.
- values List<String>
- The values of the method. Vaild values: HEAD,GET,POST,OPTIONS,PUT,PATCH,DELETE.
- values string[]
- The values of the method. Vaild values: HEAD,GET,POST,OPTIONS,PUT,PATCH,DELETE.
- values Sequence[str]
- The values of the method. Vaild values: HEAD,GET,POST,OPTIONS,PUT,PATCH,DELETE.
- values List<String>
- The values of the method. Vaild values: HEAD,GET,POST,OPTIONS,PUT,PATCH,DELETE.
RuleRuleConditionPathConfig, RuleRuleConditionPathConfigArgs
- Values List<string>
- The list of absolute paths.
- Values []string
- The list of absolute paths.
- values List<String>
- The list of absolute paths.
- values string[]
- The list of absolute paths.
- values Sequence[str]
- The list of absolute paths.
- values List<String>
- The list of absolute paths.
RuleRuleConditionQueryStringConfig, RuleRuleConditionQueryStringConfigArgs
- Values
List<Rule
Rule Condition Query String Config Value> - The list of query string values.
- Values
[]Rule
Rule Condition Query String Config Value - The list of query string values.
- values
List<Rule
Rule Condition Query String Config Value> - The list of query string values.
- values
Rule
Rule Condition Query String Config Value[] - The list of query string values.
- values
Sequence[Rule
Rule Condition Query String Config Value] - The list of query string values.
- values List<Property Map>
- The list of query string values.
RuleRuleConditionQueryStringConfigValue, RuleRuleConditionQueryStringConfigValueArgs
RuleServerGroupTuple, RuleServerGroupTupleArgs
- Server
Group stringId - The server group ID. The priority of this parameter is higher than that of
server_group_id. - Weight int
- The weight of the server group.
- Server
Group stringId - The server group ID. The priority of this parameter is higher than that of
server_group_id. - Weight int
- The weight of the server group.
- server
Group StringId - The server group ID. The priority of this parameter is higher than that of
server_group_id. - weight Integer
- The weight of the server group.
- server
Group stringId - The server group ID. The priority of this parameter is higher than that of
server_group_id. - weight number
- The weight of the server group.
- server_
group_ strid - The server group ID. The priority of this parameter is higher than that of
server_group_id. - weight int
- The weight of the server group.
- server
Group StringId - The server group ID. The priority of this parameter is higher than that of
server_group_id. - weight Number
- The weight of the server group.
Import
AlbRule can be imported using the listener id and rule id, e.g.
$ pulumi import volcengine:alb/rule:Rule default lsn-273yv0mhs5xj47fap8sehiiso:rule-****
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengineTerraform Provider.
