volcenginecc.clb.Rule
转发规则用于将指定域名和URL的请求引流至指定的后端服务器组。
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcenginecc from "@volcengine/pulumi-volcenginecc";
const ruleDemo = new volcenginecc.clb.Rule("RuleDemo", {
listenerId: "lsn-13****",
description: "RuleDemo Example",
domain: "www.***.com",
actionType: "Forward",
serverGroupId: "rsp-mj***",
url: "/co3cee",
tags: [{
key: "env",
value: "test",
}],
});
import pulumi
import pulumi_volcenginecc as volcenginecc
rule_demo = volcenginecc.clb.Rule("RuleDemo",
listener_id="lsn-13****",
description="RuleDemo Example",
domain="www.***.com",
action_type="Forward",
server_group_id="rsp-mj***",
url="/co3cee",
tags=[{
"key": "env",
"value": "test",
}])
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcenginecc/sdk/go/volcenginecc/clb"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := clb.NewRule(ctx, "RuleDemo", &clb.RuleArgs{
ListenerId: pulumi.String("lsn-13****"),
Description: pulumi.String("RuleDemo Example"),
Domain: pulumi.String("www.***.com"),
ActionType: pulumi.String("Forward"),
ServerGroupId: pulumi.String("rsp-mj***"),
Url: pulumi.String("/co3cee"),
Tags: clb.RuleTagArray{
&clb.RuleTagArgs{
Key: pulumi.String("env"),
Value: pulumi.String("test"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcenginecc = Volcengine.Pulumi.Volcenginecc;
return await Deployment.RunAsync(() =>
{
var ruleDemo = new Volcenginecc.Clb.Rule("RuleDemo", new()
{
ListenerId = "lsn-13****",
Description = "RuleDemo Example",
Domain = "www.***.com",
ActionType = "Forward",
ServerGroupId = "rsp-mj***",
Url = "/co3cee",
Tags = new[]
{
new Volcenginecc.Clb.Inputs.RuleTagArgs
{
Key = "env",
Value = "test",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.volcengine.volcenginecc.clb.Rule;
import com.volcengine.volcenginecc.clb.RuleArgs;
import com.pulumi.volcenginecc.clb.inputs.RuleTagArgs;
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) {
var ruleDemo = new Rule("ruleDemo", RuleArgs.builder()
.listenerId("lsn-13****")
.description("RuleDemo Example")
.domain("www.***.com")
.actionType("Forward")
.serverGroupId("rsp-mj***")
.url("/co3cee")
.tags(RuleTagArgs.builder()
.key("env")
.value("test")
.build())
.build());
}
}
resources:
ruleDemo:
type: volcenginecc:clb:Rule
name: RuleDemo
properties:
listenerId: lsn-13****
description: RuleDemo Example
domain: www.***.com
actionType: Forward
serverGroupId: rsp-mj***
url: /co3cee
tags:
- key: env
value: test
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,
action_type: Optional[str] = None,
description: Optional[str] = None,
domain: Optional[str] = None,
redirect_config: Optional[RuleRedirectConfigArgs] = None,
server_group_id: Optional[str] = None,
tags: Optional[Sequence[RuleTagArgs]] = 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: volcenginecc:clb: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 Volcenginecc.Clb.Rule("ruleResource", new()
{
ListenerId = "string",
ActionType = "string",
Description = "string",
Domain = "string",
RedirectConfig = new Volcenginecc.Clb.Inputs.RuleRedirectConfigArgs
{
Host = "string",
Path = "string",
Port = "string",
Protocol = "string",
StatusCode = "string",
},
ServerGroupId = "string",
Tags = new[]
{
new Volcenginecc.Clb.Inputs.RuleTagArgs
{
Key = "string",
Value = "string",
},
},
Url = "string",
});
example, err := clb.NewRule(ctx, "ruleResource", &clb.RuleArgs{
ListenerId: pulumi.String("string"),
ActionType: pulumi.String("string"),
Description: pulumi.String("string"),
Domain: pulumi.String("string"),
RedirectConfig: &clb.RuleRedirectConfigArgs{
Host: pulumi.String("string"),
Path: pulumi.String("string"),
Port: pulumi.String("string"),
Protocol: pulumi.String("string"),
StatusCode: pulumi.String("string"),
},
ServerGroupId: pulumi.String("string"),
Tags: clb.RuleTagArray{
&clb.RuleTagArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
Url: pulumi.String("string"),
})
var ruleResource = new Rule("ruleResource", RuleArgs.builder()
.listenerId("string")
.actionType("string")
.description("string")
.domain("string")
.redirectConfig(RuleRedirectConfigArgs.builder()
.host("string")
.path("string")
.port("string")
.protocol("string")
.statusCode("string")
.build())
.serverGroupId("string")
.tags(RuleTagArgs.builder()
.key("string")
.value("string")
.build())
.url("string")
.build());
rule_resource = volcenginecc.clb.Rule("ruleResource",
listener_id="string",
action_type="string",
description="string",
domain="string",
redirect_config={
"host": "string",
"path": "string",
"port": "string",
"protocol": "string",
"status_code": "string",
},
server_group_id="string",
tags=[{
"key": "string",
"value": "string",
}],
url="string")
const ruleResource = new volcenginecc.clb.Rule("ruleResource", {
listenerId: "string",
actionType: "string",
description: "string",
domain: "string",
redirectConfig: {
host: "string",
path: "string",
port: "string",
protocol: "string",
statusCode: "string",
},
serverGroupId: "string",
tags: [{
key: "string",
value: "string",
}],
url: "string",
});
type: volcenginecc:clb:Rule
properties:
actionType: string
description: string
domain: string
listenerId: string
redirectConfig:
host: string
path: string
port: string
protocol: string
statusCode: string
serverGroupId: string
tags:
- key: string
value: string
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 - 监听器ID。
- Action
Type string - 转发规则的转发动作。取值如下:Forward:转发至。Redirect:重定向至。
- Description string
- 转发规则的描述,默认值为空字符串。规范如下:必须以字母、数字或中文开头,可包含字母、数字、中文及以下特殊字符:英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、中划线(-)、中文逗号(,)、中文句号(。)。长度限制为0 ~ 255个字符。
- Domain string
- 转发规则的域名。
- Redirect
Config Volcengine.Rule Redirect Config - 重定向相关配置信息。
- Server
Group stringId - 转发规则关联的后端服务器组的ID。
-
List<Volcengine.
Rule Tag> - Url string
- 转发规则的URL。
- Listener
Id string - 监听器ID。
- Action
Type string - 转发规则的转发动作。取值如下:Forward:转发至。Redirect:重定向至。
- Description string
- 转发规则的描述,默认值为空字符串。规范如下:必须以字母、数字或中文开头,可包含字母、数字、中文及以下特殊字符:英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、中划线(-)、中文逗号(,)、中文句号(。)。长度限制为0 ~ 255个字符。
- Domain string
- 转发规则的域名。
- Redirect
Config RuleRedirect Config Args - 重定向相关配置信息。
- Server
Group stringId - 转发规则关联的后端服务器组的ID。
-
[]Rule
Tag Args - Url string
- 转发规则的URL。
- listener
Id String - 监听器ID。
- action
Type String - 转发规则的转发动作。取值如下:Forward:转发至。Redirect:重定向至。
- description String
- 转发规则的描述,默认值为空字符串。规范如下:必须以字母、数字或中文开头,可包含字母、数字、中文及以下特殊字符:英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、中划线(-)、中文逗号(,)、中文句号(。)。长度限制为0 ~ 255个字符。
- domain String
- 转发规则的域名。
- redirect
Config RuleRedirect Config - 重定向相关配置信息。
- server
Group StringId - 转发规则关联的后端服务器组的ID。
-
List<Rule
Tag> - url String
- 转发规则的URL。
- listener
Id string - 监听器ID。
- action
Type string - 转发规则的转发动作。取值如下:Forward:转发至。Redirect:重定向至。
- description string
- 转发规则的描述,默认值为空字符串。规范如下:必须以字母、数字或中文开头,可包含字母、数字、中文及以下特殊字符:英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、中划线(-)、中文逗号(,)、中文句号(。)。长度限制为0 ~ 255个字符。
- domain string
- 转发规则的域名。
- redirect
Config RuleRedirect Config - 重定向相关配置信息。
- server
Group stringId - 转发规则关联的后端服务器组的ID。
-
Rule
Tag[] - url string
- 转发规则的URL。
- listener_
id str - 监听器ID。
- action_
type str - 转发规则的转发动作。取值如下:Forward:转发至。Redirect:重定向至。
- description str
- 转发规则的描述,默认值为空字符串。规范如下:必须以字母、数字或中文开头,可包含字母、数字、中文及以下特殊字符:英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、中划线(-)、中文逗号(,)、中文句号(。)。长度限制为0 ~ 255个字符。
- domain str
- 转发规则的域名。
- redirect_
config RuleRedirect Config Args - 重定向相关配置信息。
- server_
group_ strid - 转发规则关联的后端服务器组的ID。
-
Sequence[Rule
Tag Args] - url str
- 转发规则的URL。
- listener
Id String - 监听器ID。
- action
Type String - 转发规则的转发动作。取值如下:Forward:转发至。Redirect:重定向至。
- description String
- 转发规则的描述,默认值为空字符串。规范如下:必须以字母、数字或中文开头,可包含字母、数字、中文及以下特殊字符:英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、中划线(-)、中文逗号(,)、中文句号(。)。长度限制为0 ~ 255个字符。
- domain String
- 转发规则的域名。
- redirect
Config Property Map - 重定向相关配置信息。
- server
Group StringId - 转发规则关联的后端服务器组的ID。
- List<Property Map>
- url String
- 转发规则的URL。
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,
action_type: Optional[str] = None,
description: Optional[str] = None,
domain: Optional[str] = None,
listener_id: Optional[str] = None,
redirect_config: Optional[RuleRedirectConfigArgs] = None,
rule_id: Optional[str] = None,
server_group_id: Optional[str] = None,
tags: Optional[Sequence[RuleTagArgs]] = 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: volcenginecc:clb: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.
- Action
Type string - 转发规则的转发动作。取值如下:Forward:转发至。Redirect:重定向至。
- Description string
- 转发规则的描述,默认值为空字符串。规范如下:必须以字母、数字或中文开头,可包含字母、数字、中文及以下特殊字符:英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、中划线(-)、中文逗号(,)、中文句号(。)。长度限制为0 ~ 255个字符。
- Domain string
- 转发规则的域名。
- Listener
Id string - 监听器ID。
- Redirect
Config Volcengine.Rule Redirect Config - 重定向相关配置信息。
- Rule
Id string - 转发规则ID。
- Server
Group stringId - 转发规则关联的后端服务器组的ID。
-
List<Volcengine.
Rule Tag> - Url string
- 转发规则的URL。
- Action
Type string - 转发规则的转发动作。取值如下:Forward:转发至。Redirect:重定向至。
- Description string
- 转发规则的描述,默认值为空字符串。规范如下:必须以字母、数字或中文开头,可包含字母、数字、中文及以下特殊字符:英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、中划线(-)、中文逗号(,)、中文句号(。)。长度限制为0 ~ 255个字符。
- Domain string
- 转发规则的域名。
- Listener
Id string - 监听器ID。
- Redirect
Config RuleRedirect Config Args - 重定向相关配置信息。
- Rule
Id string - 转发规则ID。
- Server
Group stringId - 转发规则关联的后端服务器组的ID。
-
[]Rule
Tag Args - Url string
- 转发规则的URL。
- action
Type String - 转发规则的转发动作。取值如下:Forward:转发至。Redirect:重定向至。
- description String
- 转发规则的描述,默认值为空字符串。规范如下:必须以字母、数字或中文开头,可包含字母、数字、中文及以下特殊字符:英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、中划线(-)、中文逗号(,)、中文句号(。)。长度限制为0 ~ 255个字符。
- domain String
- 转发规则的域名。
- listener
Id String - 监听器ID。
- redirect
Config RuleRedirect Config - 重定向相关配置信息。
- rule
Id String - 转发规则ID。
- server
Group StringId - 转发规则关联的后端服务器组的ID。
-
List<Rule
Tag> - url String
- 转发规则的URL。
- action
Type string - 转发规则的转发动作。取值如下:Forward:转发至。Redirect:重定向至。
- description string
- 转发规则的描述,默认值为空字符串。规范如下:必须以字母、数字或中文开头,可包含字母、数字、中文及以下特殊字符:英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、中划线(-)、中文逗号(,)、中文句号(。)。长度限制为0 ~ 255个字符。
- domain string
- 转发规则的域名。
- listener
Id string - 监听器ID。
- redirect
Config RuleRedirect Config - 重定向相关配置信息。
- rule
Id string - 转发规则ID。
- server
Group stringId - 转发规则关联的后端服务器组的ID。
-
Rule
Tag[] - url string
- 转发规则的URL。
- action_
type str - 转发规则的转发动作。取值如下:Forward:转发至。Redirect:重定向至。
- description str
- 转发规则的描述,默认值为空字符串。规范如下:必须以字母、数字或中文开头,可包含字母、数字、中文及以下特殊字符:英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、中划线(-)、中文逗号(,)、中文句号(。)。长度限制为0 ~ 255个字符。
- domain str
- 转发规则的域名。
- listener_
id str - 监听器ID。
- redirect_
config RuleRedirect Config Args - 重定向相关配置信息。
- rule_
id str - 转发规则ID。
- server_
group_ strid - 转发规则关联的后端服务器组的ID。
-
Sequence[Rule
Tag Args] - url str
- 转发规则的URL。
- action
Type String - 转发规则的转发动作。取值如下:Forward:转发至。Redirect:重定向至。
- description String
- 转发规则的描述,默认值为空字符串。规范如下:必须以字母、数字或中文开头,可包含字母、数字、中文及以下特殊字符:英文逗号(,)、点号(.)、下划线(_)、空格( )、等号(=)、中划线(-)、中文逗号(,)、中文句号(。)。长度限制为0 ~ 255个字符。
- domain String
- 转发规则的域名。
- listener
Id String - 监听器ID。
- redirect
Config Property Map - 重定向相关配置信息。
- rule
Id String - 转发规则ID。
- server
Group StringId - 转发规则关联的后端服务器组的ID。
- List<Property Map>
- url String
- 转发规则的URL。
Supporting Types
RuleRedirectConfig, RuleRedirectConfigArgs
- Host string
- 转发规则重定向的域名,当前仅支持精确域名。规范如下:需至少包含一个‘.’,且不允许以‘.’开头或结尾。仅允许包含字母、数字、‘.’、‘-‘。长度限制为1 ~ 128个字符。符合域名规范的精确域名,例如:www.test.com。
- Path string
- 转发规则重定向的路径。规范如下:必须以正斜线“/”开头,字符‘/’不能连续出现。仅允许包含字母、数字、‘-’、‘_’、‘/’、‘.’、‘%’、‘?’、‘#’、‘&’、‘=’等字符。长度限制为1 ~ 128个字符。
- Port string
- 转发规则重定向的端口,取值范围为 1~65535。
- Protocol string
- 转发规则重定向的协议。取值如下:HTTP。HTTPS(默认值)。
- Status
Code string - 转发规则重定向的状态码。取值如下:301(默认):表示请求的资源已被永久移动到新的 URL,客户端应该使用新的 URL 进行后续请求。302:表示请求的资源被临时移动到新的 URL,但未来可能会再次更改,客户端应该使用新的 URL 进行后续请求。307:与 302 类似,但在重定向时要求客户端保持请求方法不变。例如,原来是 GET 请求,则重定向后仍然是 GET 请求。308:与 301 类似,但在重定向时要求客户端保持请求方法不变。
- Host string
- 转发规则重定向的域名,当前仅支持精确域名。规范如下:需至少包含一个‘.’,且不允许以‘.’开头或结尾。仅允许包含字母、数字、‘.’、‘-‘。长度限制为1 ~ 128个字符。符合域名规范的精确域名,例如:www.test.com。
- Path string
- 转发规则重定向的路径。规范如下:必须以正斜线“/”开头,字符‘/’不能连续出现。仅允许包含字母、数字、‘-’、‘_’、‘/’、‘.’、‘%’、‘?’、‘#’、‘&’、‘=’等字符。长度限制为1 ~ 128个字符。
- Port string
- 转发规则重定向的端口,取值范围为 1~65535。
- Protocol string
- 转发规则重定向的协议。取值如下:HTTP。HTTPS(默认值)。
- Status
Code string - 转发规则重定向的状态码。取值如下:301(默认):表示请求的资源已被永久移动到新的 URL,客户端应该使用新的 URL 进行后续请求。302:表示请求的资源被临时移动到新的 URL,但未来可能会再次更改,客户端应该使用新的 URL 进行后续请求。307:与 302 类似,但在重定向时要求客户端保持请求方法不变。例如,原来是 GET 请求,则重定向后仍然是 GET 请求。308:与 301 类似,但在重定向时要求客户端保持请求方法不变。
- host String
- 转发规则重定向的域名,当前仅支持精确域名。规范如下:需至少包含一个‘.’,且不允许以‘.’开头或结尾。仅允许包含字母、数字、‘.’、‘-‘。长度限制为1 ~ 128个字符。符合域名规范的精确域名,例如:www.test.com。
- path String
- 转发规则重定向的路径。规范如下:必须以正斜线“/”开头,字符‘/’不能连续出现。仅允许包含字母、数字、‘-’、‘_’、‘/’、‘.’、‘%’、‘?’、‘#’、‘&’、‘=’等字符。长度限制为1 ~ 128个字符。
- port String
- 转发规则重定向的端口,取值范围为 1~65535。
- protocol String
- 转发规则重定向的协议。取值如下:HTTP。HTTPS(默认值)。
- status
Code String - 转发规则重定向的状态码。取值如下:301(默认):表示请求的资源已被永久移动到新的 URL,客户端应该使用新的 URL 进行后续请求。302:表示请求的资源被临时移动到新的 URL,但未来可能会再次更改,客户端应该使用新的 URL 进行后续请求。307:与 302 类似,但在重定向时要求客户端保持请求方法不变。例如,原来是 GET 请求,则重定向后仍然是 GET 请求。308:与 301 类似,但在重定向时要求客户端保持请求方法不变。
- host string
- 转发规则重定向的域名,当前仅支持精确域名。规范如下:需至少包含一个‘.’,且不允许以‘.’开头或结尾。仅允许包含字母、数字、‘.’、‘-‘。长度限制为1 ~ 128个字符。符合域名规范的精确域名,例如:www.test.com。
- path string
- 转发规则重定向的路径。规范如下:必须以正斜线“/”开头,字符‘/’不能连续出现。仅允许包含字母、数字、‘-’、‘_’、‘/’、‘.’、‘%’、‘?’、‘#’、‘&’、‘=’等字符。长度限制为1 ~ 128个字符。
- port string
- 转发规则重定向的端口,取值范围为 1~65535。
- protocol string
- 转发规则重定向的协议。取值如下:HTTP。HTTPS(默认值)。
- status
Code string - 转发规则重定向的状态码。取值如下:301(默认):表示请求的资源已被永久移动到新的 URL,客户端应该使用新的 URL 进行后续请求。302:表示请求的资源被临时移动到新的 URL,但未来可能会再次更改,客户端应该使用新的 URL 进行后续请求。307:与 302 类似,但在重定向时要求客户端保持请求方法不变。例如,原来是 GET 请求,则重定向后仍然是 GET 请求。308:与 301 类似,但在重定向时要求客户端保持请求方法不变。
- host str
- 转发规则重定向的域名,当前仅支持精确域名。规范如下:需至少包含一个‘.’,且不允许以‘.’开头或结尾。仅允许包含字母、数字、‘.’、‘-‘。长度限制为1 ~ 128个字符。符合域名规范的精确域名,例如:www.test.com。
- path str
- 转发规则重定向的路径。规范如下:必须以正斜线“/”开头,字符‘/’不能连续出现。仅允许包含字母、数字、‘-’、‘_’、‘/’、‘.’、‘%’、‘?’、‘#’、‘&’、‘=’等字符。长度限制为1 ~ 128个字符。
- port str
- 转发规则重定向的端口,取值范围为 1~65535。
- protocol str
- 转发规则重定向的协议。取值如下:HTTP。HTTPS(默认值)。
- status_
code str - 转发规则重定向的状态码。取值如下:301(默认):表示请求的资源已被永久移动到新的 URL,客户端应该使用新的 URL 进行后续请求。302:表示请求的资源被临时移动到新的 URL,但未来可能会再次更改,客户端应该使用新的 URL 进行后续请求。307:与 302 类似,但在重定向时要求客户端保持请求方法不变。例如,原来是 GET 请求,则重定向后仍然是 GET 请求。308:与 301 类似,但在重定向时要求客户端保持请求方法不变。
- host String
- 转发规则重定向的域名,当前仅支持精确域名。规范如下:需至少包含一个‘.’,且不允许以‘.’开头或结尾。仅允许包含字母、数字、‘.’、‘-‘。长度限制为1 ~ 128个字符。符合域名规范的精确域名,例如:www.test.com。
- path String
- 转发规则重定向的路径。规范如下:必须以正斜线“/”开头,字符‘/’不能连续出现。仅允许包含字母、数字、‘-’、‘_’、‘/’、‘.’、‘%’、‘?’、‘#’、‘&’、‘=’等字符。长度限制为1 ~ 128个字符。
- port String
- 转发规则重定向的端口,取值范围为 1~65535。
- protocol String
- 转发规则重定向的协议。取值如下:HTTP。HTTPS(默认值)。
- status
Code String - 转发规则重定向的状态码。取值如下:301(默认):表示请求的资源已被永久移动到新的 URL,客户端应该使用新的 URL 进行后续请求。302:表示请求的资源被临时移动到新的 URL,但未来可能会再次更改,客户端应该使用新的 URL 进行后续请求。307:与 302 类似,但在重定向时要求客户端保持请求方法不变。例如,原来是 GET 请求,则重定向后仍然是 GET 请求。308:与 301 类似,但在重定向时要求客户端保持请求方法不变。
RuleTag, RuleTagArgs
Import
$ pulumi import volcenginecc:clb/rule:Rule example "listener_id|rule_id"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcenginecc volcengine/pulumi-volcenginecc
- License
- MPL-2.0
- Notes
- This Pulumi package is based on the
volcengineccTerraform Provider.
