alicloud.alb.Rule
Explore with Pulumi AI
Provides a Application Load Balancer (ALB) Rule resource.
For information about Application Load Balancer (ALB) Rule and how to use it, see What is Rule.
NOTE: Available since v1.133.0.
NOTE: This version only supports forwarding rules in the request direction.
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,
priority: Optional[int] = None,
rule_actions: Optional[Sequence[RuleRuleActionArgs]] = None,
rule_conditions: Optional[Sequence[RuleRuleConditionArgs]] = None,
rule_name: Optional[str] = None,
direction: Optional[str] = None,
dry_run: Optional[bool] = None)
func NewRule(ctx *Context, name string, args RuleArgs, opts ...ResourceOption) (*Rule, error)
public Rule(string name, RuleArgs args, CustomResourceOptions? opts = null)
type: alicloud: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 AliCloud.Alb.Rule("ruleResource", new()
{
ListenerId = "string",
Priority = 0,
RuleActions = new[]
{
new AliCloud.Alb.Inputs.RuleRuleActionArgs
{
Order = 0,
Type = "string",
CorsConfig = new AliCloud.Alb.Inputs.RuleRuleActionCorsConfigArgs
{
AllowCredentials = "string",
AllowHeaders = new[]
{
"string",
},
AllowMethods = new[]
{
"string",
},
AllowOrigins = new[]
{
"string",
},
ExposeHeaders = new[]
{
"string",
},
MaxAge = 0,
},
FixedResponseConfig = new AliCloud.Alb.Inputs.RuleRuleActionFixedResponseConfigArgs
{
Content = "string",
ContentType = "string",
HttpCode = "string",
},
ForwardGroupConfig = new AliCloud.Alb.Inputs.RuleRuleActionForwardGroupConfigArgs
{
ServerGroupStickySession = new AliCloud.Alb.Inputs.RuleRuleActionForwardGroupConfigServerGroupStickySessionArgs
{
Enabled = false,
Timeout = 0,
},
ServerGroupTuples = new[]
{
new AliCloud.Alb.Inputs.RuleRuleActionForwardGroupConfigServerGroupTupleArgs
{
ServerGroupId = "string",
Weight = 0,
},
},
},
InsertHeaderConfig = new AliCloud.Alb.Inputs.RuleRuleActionInsertHeaderConfigArgs
{
Key = "string",
Value = "string",
ValueType = "string",
},
RedirectConfig = new AliCloud.Alb.Inputs.RuleRuleActionRedirectConfigArgs
{
Host = "string",
HttpCode = "string",
Path = "string",
Port = "string",
Protocol = "string",
Query = "string",
},
RemoveHeaderConfig = new AliCloud.Alb.Inputs.RuleRuleActionRemoveHeaderConfigArgs
{
Key = "string",
},
RewriteConfig = new AliCloud.Alb.Inputs.RuleRuleActionRewriteConfigArgs
{
Host = "string",
Path = "string",
Query = "string",
},
TrafficLimitConfig = new AliCloud.Alb.Inputs.RuleRuleActionTrafficLimitConfigArgs
{
PerIpQps = 0,
Qps = 0,
},
TrafficMirrorConfig = new AliCloud.Alb.Inputs.RuleRuleActionTrafficMirrorConfigArgs
{
MirrorGroupConfig = new AliCloud.Alb.Inputs.RuleRuleActionTrafficMirrorConfigMirrorGroupConfigArgs
{
ServerGroupTuples = new[]
{
new AliCloud.Alb.Inputs.RuleRuleActionTrafficMirrorConfigMirrorGroupConfigServerGroupTupleArgs
{
ServerGroupId = "string",
},
},
},
TargetType = "string",
},
},
},
RuleConditions = new[]
{
new AliCloud.Alb.Inputs.RuleRuleConditionArgs
{
Type = "string",
CookieConfig = new AliCloud.Alb.Inputs.RuleRuleConditionCookieConfigArgs
{
Values = new[]
{
new AliCloud.Alb.Inputs.RuleRuleConditionCookieConfigValueArgs
{
Key = "string",
Value = "string",
},
},
},
HeaderConfig = new AliCloud.Alb.Inputs.RuleRuleConditionHeaderConfigArgs
{
Key = "string",
Values = new[]
{
"string",
},
},
HostConfig = new AliCloud.Alb.Inputs.RuleRuleConditionHostConfigArgs
{
Values = new[]
{
"string",
},
},
MethodConfig = new AliCloud.Alb.Inputs.RuleRuleConditionMethodConfigArgs
{
Values = new[]
{
"string",
},
},
PathConfig = new AliCloud.Alb.Inputs.RuleRuleConditionPathConfigArgs
{
Values = new[]
{
"string",
},
},
QueryStringConfig = new AliCloud.Alb.Inputs.RuleRuleConditionQueryStringConfigArgs
{
Values = new[]
{
new AliCloud.Alb.Inputs.RuleRuleConditionQueryStringConfigValueArgs
{
Key = "string",
Value = "string",
},
},
},
ResponseHeaderConfig = new AliCloud.Alb.Inputs.RuleRuleConditionResponseHeaderConfigArgs
{
Key = "string",
Values = new[]
{
"string",
},
},
ResponseStatusCodeConfig = new AliCloud.Alb.Inputs.RuleRuleConditionResponseStatusCodeConfigArgs
{
Values = new[]
{
"string",
},
},
SourceIpConfig = new AliCloud.Alb.Inputs.RuleRuleConditionSourceIpConfigArgs
{
Values = new[]
{
"string",
},
},
},
},
RuleName = "string",
Direction = "string",
DryRun = false,
});
example, err := alb.NewRule(ctx, "ruleResource", &alb.RuleArgs{
ListenerId: pulumi.String("string"),
Priority: pulumi.Int(0),
RuleActions: alb.RuleRuleActionArray{
&alb.RuleRuleActionArgs{
Order: pulumi.Int(0),
Type: pulumi.String("string"),
CorsConfig: &alb.RuleRuleActionCorsConfigArgs{
AllowCredentials: pulumi.String("string"),
AllowHeaders: pulumi.StringArray{
pulumi.String("string"),
},
AllowMethods: pulumi.StringArray{
pulumi.String("string"),
},
AllowOrigins: pulumi.StringArray{
pulumi.String("string"),
},
ExposeHeaders: pulumi.StringArray{
pulumi.String("string"),
},
MaxAge: pulumi.Int(0),
},
FixedResponseConfig: &alb.RuleRuleActionFixedResponseConfigArgs{
Content: pulumi.String("string"),
ContentType: pulumi.String("string"),
HttpCode: pulumi.String("string"),
},
ForwardGroupConfig: &alb.RuleRuleActionForwardGroupConfigArgs{
ServerGroupStickySession: &alb.RuleRuleActionForwardGroupConfigServerGroupStickySessionArgs{
Enabled: pulumi.Bool(false),
Timeout: pulumi.Int(0),
},
ServerGroupTuples: alb.RuleRuleActionForwardGroupConfigServerGroupTupleArray{
&alb.RuleRuleActionForwardGroupConfigServerGroupTupleArgs{
ServerGroupId: pulumi.String("string"),
Weight: pulumi.Int(0),
},
},
},
InsertHeaderConfig: &alb.RuleRuleActionInsertHeaderConfigArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
ValueType: pulumi.String("string"),
},
RedirectConfig: &alb.RuleRuleActionRedirectConfigArgs{
Host: pulumi.String("string"),
HttpCode: pulumi.String("string"),
Path: pulumi.String("string"),
Port: pulumi.String("string"),
Protocol: pulumi.String("string"),
Query: pulumi.String("string"),
},
RemoveHeaderConfig: &alb.RuleRuleActionRemoveHeaderConfigArgs{
Key: pulumi.String("string"),
},
RewriteConfig: &alb.RuleRuleActionRewriteConfigArgs{
Host: pulumi.String("string"),
Path: pulumi.String("string"),
Query: pulumi.String("string"),
},
TrafficLimitConfig: &alb.RuleRuleActionTrafficLimitConfigArgs{
PerIpQps: pulumi.Int(0),
Qps: pulumi.Int(0),
},
TrafficMirrorConfig: &alb.RuleRuleActionTrafficMirrorConfigArgs{
MirrorGroupConfig: &alb.RuleRuleActionTrafficMirrorConfigMirrorGroupConfigArgs{
ServerGroupTuples: alb.RuleRuleActionTrafficMirrorConfigMirrorGroupConfigServerGroupTupleArray{
&alb.RuleRuleActionTrafficMirrorConfigMirrorGroupConfigServerGroupTupleArgs{
ServerGroupId: pulumi.String("string"),
},
},
},
TargetType: pulumi.String("string"),
},
},
},
RuleConditions: alb.RuleRuleConditionArray{
&alb.RuleRuleConditionArgs{
Type: pulumi.String("string"),
CookieConfig: &alb.RuleRuleConditionCookieConfigArgs{
Values: alb.RuleRuleConditionCookieConfigValueArray{
&alb.RuleRuleConditionCookieConfigValueArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
},
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"),
},
},
},
ResponseHeaderConfig: &alb.RuleRuleConditionResponseHeaderConfigArgs{
Key: pulumi.String("string"),
Values: pulumi.StringArray{
pulumi.String("string"),
},
},
ResponseStatusCodeConfig: &alb.RuleRuleConditionResponseStatusCodeConfigArgs{
Values: pulumi.StringArray{
pulumi.String("string"),
},
},
SourceIpConfig: &alb.RuleRuleConditionSourceIpConfigArgs{
Values: pulumi.StringArray{
pulumi.String("string"),
},
},
},
},
RuleName: pulumi.String("string"),
Direction: pulumi.String("string"),
DryRun: pulumi.Bool(false),
})
var ruleResource = new Rule("ruleResource", RuleArgs.builder()
.listenerId("string")
.priority(0)
.ruleActions(RuleRuleActionArgs.builder()
.order(0)
.type("string")
.corsConfig(RuleRuleActionCorsConfigArgs.builder()
.allowCredentials("string")
.allowHeaders("string")
.allowMethods("string")
.allowOrigins("string")
.exposeHeaders("string")
.maxAge(0)
.build())
.fixedResponseConfig(RuleRuleActionFixedResponseConfigArgs.builder()
.content("string")
.contentType("string")
.httpCode("string")
.build())
.forwardGroupConfig(RuleRuleActionForwardGroupConfigArgs.builder()
.serverGroupStickySession(RuleRuleActionForwardGroupConfigServerGroupStickySessionArgs.builder()
.enabled(false)
.timeout(0)
.build())
.serverGroupTuples(RuleRuleActionForwardGroupConfigServerGroupTupleArgs.builder()
.serverGroupId("string")
.weight(0)
.build())
.build())
.insertHeaderConfig(RuleRuleActionInsertHeaderConfigArgs.builder()
.key("string")
.value("string")
.valueType("string")
.build())
.redirectConfig(RuleRuleActionRedirectConfigArgs.builder()
.host("string")
.httpCode("string")
.path("string")
.port("string")
.protocol("string")
.query("string")
.build())
.removeHeaderConfig(RuleRuleActionRemoveHeaderConfigArgs.builder()
.key("string")
.build())
.rewriteConfig(RuleRuleActionRewriteConfigArgs.builder()
.host("string")
.path("string")
.query("string")
.build())
.trafficLimitConfig(RuleRuleActionTrafficLimitConfigArgs.builder()
.perIpQps(0)
.qps(0)
.build())
.trafficMirrorConfig(RuleRuleActionTrafficMirrorConfigArgs.builder()
.mirrorGroupConfig(RuleRuleActionTrafficMirrorConfigMirrorGroupConfigArgs.builder()
.serverGroupTuples(RuleRuleActionTrafficMirrorConfigMirrorGroupConfigServerGroupTupleArgs.builder()
.serverGroupId("string")
.build())
.build())
.targetType("string")
.build())
.build())
.ruleConditions(RuleRuleConditionArgs.builder()
.type("string")
.cookieConfig(RuleRuleConditionCookieConfigArgs.builder()
.values(RuleRuleConditionCookieConfigValueArgs.builder()
.key("string")
.value("string")
.build())
.build())
.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())
.responseHeaderConfig(RuleRuleConditionResponseHeaderConfigArgs.builder()
.key("string")
.values("string")
.build())
.responseStatusCodeConfig(RuleRuleConditionResponseStatusCodeConfigArgs.builder()
.values("string")
.build())
.sourceIpConfig(RuleRuleConditionSourceIpConfigArgs.builder()
.values("string")
.build())
.build())
.ruleName("string")
.direction("string")
.dryRun(false)
.build());
rule_resource = alicloud.alb.Rule("ruleResource",
listener_id="string",
priority=0,
rule_actions=[alicloud.alb.RuleRuleActionArgs(
order=0,
type="string",
cors_config=alicloud.alb.RuleRuleActionCorsConfigArgs(
allow_credentials="string",
allow_headers=["string"],
allow_methods=["string"],
allow_origins=["string"],
expose_headers=["string"],
max_age=0,
),
fixed_response_config=alicloud.alb.RuleRuleActionFixedResponseConfigArgs(
content="string",
content_type="string",
http_code="string",
),
forward_group_config=alicloud.alb.RuleRuleActionForwardGroupConfigArgs(
server_group_sticky_session=alicloud.alb.RuleRuleActionForwardGroupConfigServerGroupStickySessionArgs(
enabled=False,
timeout=0,
),
server_group_tuples=[alicloud.alb.RuleRuleActionForwardGroupConfigServerGroupTupleArgs(
server_group_id="string",
weight=0,
)],
),
insert_header_config=alicloud.alb.RuleRuleActionInsertHeaderConfigArgs(
key="string",
value="string",
value_type="string",
),
redirect_config=alicloud.alb.RuleRuleActionRedirectConfigArgs(
host="string",
http_code="string",
path="string",
port="string",
protocol="string",
query="string",
),
remove_header_config=alicloud.alb.RuleRuleActionRemoveHeaderConfigArgs(
key="string",
),
rewrite_config=alicloud.alb.RuleRuleActionRewriteConfigArgs(
host="string",
path="string",
query="string",
),
traffic_limit_config=alicloud.alb.RuleRuleActionTrafficLimitConfigArgs(
per_ip_qps=0,
qps=0,
),
traffic_mirror_config=alicloud.alb.RuleRuleActionTrafficMirrorConfigArgs(
mirror_group_config=alicloud.alb.RuleRuleActionTrafficMirrorConfigMirrorGroupConfigArgs(
server_group_tuples=[alicloud.alb.RuleRuleActionTrafficMirrorConfigMirrorGroupConfigServerGroupTupleArgs(
server_group_id="string",
)],
),
target_type="string",
),
)],
rule_conditions=[alicloud.alb.RuleRuleConditionArgs(
type="string",
cookie_config=alicloud.alb.RuleRuleConditionCookieConfigArgs(
values=[alicloud.alb.RuleRuleConditionCookieConfigValueArgs(
key="string",
value="string",
)],
),
header_config=alicloud.alb.RuleRuleConditionHeaderConfigArgs(
key="string",
values=["string"],
),
host_config=alicloud.alb.RuleRuleConditionHostConfigArgs(
values=["string"],
),
method_config=alicloud.alb.RuleRuleConditionMethodConfigArgs(
values=["string"],
),
path_config=alicloud.alb.RuleRuleConditionPathConfigArgs(
values=["string"],
),
query_string_config=alicloud.alb.RuleRuleConditionQueryStringConfigArgs(
values=[alicloud.alb.RuleRuleConditionQueryStringConfigValueArgs(
key="string",
value="string",
)],
),
response_header_config=alicloud.alb.RuleRuleConditionResponseHeaderConfigArgs(
key="string",
values=["string"],
),
response_status_code_config=alicloud.alb.RuleRuleConditionResponseStatusCodeConfigArgs(
values=["string"],
),
source_ip_config=alicloud.alb.RuleRuleConditionSourceIpConfigArgs(
values=["string"],
),
)],
rule_name="string",
direction="string",
dry_run=False)
const ruleResource = new alicloud.alb.Rule("ruleResource", {
listenerId: "string",
priority: 0,
ruleActions: [{
order: 0,
type: "string",
corsConfig: {
allowCredentials: "string",
allowHeaders: ["string"],
allowMethods: ["string"],
allowOrigins: ["string"],
exposeHeaders: ["string"],
maxAge: 0,
},
fixedResponseConfig: {
content: "string",
contentType: "string",
httpCode: "string",
},
forwardGroupConfig: {
serverGroupStickySession: {
enabled: false,
timeout: 0,
},
serverGroupTuples: [{
serverGroupId: "string",
weight: 0,
}],
},
insertHeaderConfig: {
key: "string",
value: "string",
valueType: "string",
},
redirectConfig: {
host: "string",
httpCode: "string",
path: "string",
port: "string",
protocol: "string",
query: "string",
},
removeHeaderConfig: {
key: "string",
},
rewriteConfig: {
host: "string",
path: "string",
query: "string",
},
trafficLimitConfig: {
perIpQps: 0,
qps: 0,
},
trafficMirrorConfig: {
mirrorGroupConfig: {
serverGroupTuples: [{
serverGroupId: "string",
}],
},
targetType: "string",
},
}],
ruleConditions: [{
type: "string",
cookieConfig: {
values: [{
key: "string",
value: "string",
}],
},
headerConfig: {
key: "string",
values: ["string"],
},
hostConfig: {
values: ["string"],
},
methodConfig: {
values: ["string"],
},
pathConfig: {
values: ["string"],
},
queryStringConfig: {
values: [{
key: "string",
value: "string",
}],
},
responseHeaderConfig: {
key: "string",
values: ["string"],
},
responseStatusCodeConfig: {
values: ["string"],
},
sourceIpConfig: {
values: ["string"],
},
}],
ruleName: "string",
direction: "string",
dryRun: false,
});
type: alicloud:alb:Rule
properties:
direction: string
dryRun: false
listenerId: string
priority: 0
ruleActions:
- corsConfig:
allowCredentials: string
allowHeaders:
- string
allowMethods:
- string
allowOrigins:
- string
exposeHeaders:
- string
maxAge: 0
fixedResponseConfig:
content: string
contentType: string
httpCode: string
forwardGroupConfig:
serverGroupStickySession:
enabled: false
timeout: 0
serverGroupTuples:
- serverGroupId: string
weight: 0
insertHeaderConfig:
key: string
value: string
valueType: string
order: 0
redirectConfig:
host: string
httpCode: string
path: string
port: string
protocol: string
query: string
removeHeaderConfig:
key: string
rewriteConfig:
host: string
path: string
query: string
trafficLimitConfig:
perIpQps: 0
qps: 0
trafficMirrorConfig:
mirrorGroupConfig:
serverGroupTuples:
- serverGroupId: string
targetType: string
type: string
ruleConditions:
- cookieConfig:
values:
- key: string
value: string
headerConfig:
key: string
values:
- string
hostConfig:
values:
- string
methodConfig:
values:
- string
pathConfig:
values:
- string
queryStringConfig:
values:
- key: string
value: string
responseHeaderConfig:
key: string
values:
- string
responseStatusCodeConfig:
values:
- string
sourceIpConfig:
values:
- string
type: string
ruleName: 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
The Rule resource accepts the following input properties:
- Listener
Id string - The ID of the listener to which the forwarding rule belongs.
- Priority int
- The priority of the rule. Valid values: 1 to 10000. A smaller value indicates a higher priority. Note: The priority of each rule within the same listener must be unique.
- Rule
Actions List<Pulumi.Ali Cloud. Alb. Inputs. Rule Rule Action> - The actions of the forwarding rules. See
rule_actions
below. - Rule
Conditions List<Pulumi.Ali Cloud. Alb. Inputs. Rule Rule Condition> - The conditions of the forwarding rule. See
rule_conditions
below. - Rule
Name string - The name of the forwarding rule. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.
- Direction string
- The direction to which the forwarding rule is applied. Default value:
Request
. Valid values:Request
: The forwarding rule is applied to the client requests received by ALB.Response
: The forwarding rule is applied to the responses returned by backend servers.
- Dry
Run bool - Specifies whether to precheck this request.
- Listener
Id string - The ID of the listener to which the forwarding rule belongs.
- Priority int
- The priority of the rule. Valid values: 1 to 10000. A smaller value indicates a higher priority. Note: The priority of each rule within the same listener must be unique.
- Rule
Actions []RuleRule Action Args - The actions of the forwarding rules. See
rule_actions
below. - Rule
Conditions []RuleRule Condition Args - The conditions of the forwarding rule. See
rule_conditions
below. - Rule
Name string - The name of the forwarding rule. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.
- Direction string
- The direction to which the forwarding rule is applied. Default value:
Request
. Valid values:Request
: The forwarding rule is applied to the client requests received by ALB.Response
: The forwarding rule is applied to the responses returned by backend servers.
- Dry
Run bool - Specifies whether to precheck this request.
- listener
Id String - The ID of the listener to which the forwarding rule belongs.
- priority Integer
- The priority of the rule. Valid values: 1 to 10000. A smaller value indicates a higher priority. Note: The priority of each rule within the same listener must be unique.
- rule
Actions List<RuleRule Action> - The actions of the forwarding rules. See
rule_actions
below. - rule
Conditions List<RuleRule Condition> - The conditions of the forwarding rule. See
rule_conditions
below. - rule
Name String - The name of the forwarding rule. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.
- direction String
- The direction to which the forwarding rule is applied. Default value:
Request
. Valid values:Request
: The forwarding rule is applied to the client requests received by ALB.Response
: The forwarding rule is applied to the responses returned by backend servers.
- dry
Run Boolean - Specifies whether to precheck this request.
- listener
Id string - The ID of the listener to which the forwarding rule belongs.
- priority number
- The priority of the rule. Valid values: 1 to 10000. A smaller value indicates a higher priority. Note: The priority of each rule within the same listener must be unique.
- rule
Actions RuleRule Action[] - The actions of the forwarding rules. See
rule_actions
below. - rule
Conditions RuleRule Condition[] - The conditions of the forwarding rule. See
rule_conditions
below. - rule
Name string - The name of the forwarding rule. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.
- direction string
- The direction to which the forwarding rule is applied. Default value:
Request
. Valid values:Request
: The forwarding rule is applied to the client requests received by ALB.Response
: The forwarding rule is applied to the responses returned by backend servers.
- dry
Run boolean - Specifies whether to precheck this request.
- listener_
id str - The ID of the listener to which the forwarding rule belongs.
- priority int
- The priority of the rule. Valid values: 1 to 10000. A smaller value indicates a higher priority. Note: The priority of each rule within the same listener must be unique.
- rule_
actions Sequence[RuleRule Action Args] - The actions of the forwarding rules. See
rule_actions
below. - rule_
conditions Sequence[RuleRule Condition Args] - The conditions of the forwarding rule. See
rule_conditions
below. - rule_
name str - The name of the forwarding rule. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.
- direction str
- The direction to which the forwarding rule is applied. Default value:
Request
. Valid values:Request
: The forwarding rule is applied to the client requests received by ALB.Response
: The forwarding rule is applied to the responses returned by backend servers.
- dry_
run bool - Specifies whether to precheck this request.
- listener
Id String - The ID of the listener to which the forwarding rule belongs.
- priority Number
- The priority of the rule. Valid values: 1 to 10000. A smaller value indicates a higher priority. Note: The priority of each rule within the same listener must be unique.
- rule
Actions List<Property Map> - The actions of the forwarding rules. See
rule_actions
below. - rule
Conditions List<Property Map> - The conditions of the forwarding rule. See
rule_conditions
below. - rule
Name String - The name of the forwarding rule. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.
- direction String
- The direction to which the forwarding rule is applied. Default value:
Request
. Valid values:Request
: The forwarding rule is applied to the client requests received by ALB.Response
: The forwarding rule is applied to the responses returned by backend servers.
- dry
Run Boolean - Specifies whether to precheck this request.
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,
direction: Optional[str] = None,
dry_run: Optional[bool] = None,
listener_id: Optional[str] = None,
priority: Optional[int] = None,
rule_actions: Optional[Sequence[RuleRuleActionArgs]] = None,
rule_conditions: Optional[Sequence[RuleRuleConditionArgs]] = None,
rule_name: Optional[str] = None,
status: 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.
- Direction string
- The direction to which the forwarding rule is applied. Default value:
Request
. Valid values:Request
: The forwarding rule is applied to the client requests received by ALB.Response
: The forwarding rule is applied to the responses returned by backend servers.
- Dry
Run bool - Specifies whether to precheck this request.
- Listener
Id string - The ID of the listener to which the forwarding rule belongs.
- Priority int
- The priority of the rule. Valid values: 1 to 10000. A smaller value indicates a higher priority. Note: The priority of each rule within the same listener must be unique.
- Rule
Actions List<Pulumi.Ali Cloud. Alb. Inputs. Rule Rule Action> - The actions of the forwarding rules. See
rule_actions
below. - Rule
Conditions List<Pulumi.Ali Cloud. Alb. Inputs. Rule Rule Condition> - The conditions of the forwarding rule. See
rule_conditions
below. - Rule
Name string - The name of the forwarding rule. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.
- Status string
- The status of the resource.
- Direction string
- The direction to which the forwarding rule is applied. Default value:
Request
. Valid values:Request
: The forwarding rule is applied to the client requests received by ALB.Response
: The forwarding rule is applied to the responses returned by backend servers.
- Dry
Run bool - Specifies whether to precheck this request.
- Listener
Id string - The ID of the listener to which the forwarding rule belongs.
- Priority int
- The priority of the rule. Valid values: 1 to 10000. A smaller value indicates a higher priority. Note: The priority of each rule within the same listener must be unique.
- Rule
Actions []RuleRule Action Args - The actions of the forwarding rules. See
rule_actions
below. - Rule
Conditions []RuleRule Condition Args - The conditions of the forwarding rule. See
rule_conditions
below. - Rule
Name string - The name of the forwarding rule. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.
- Status string
- The status of the resource.
- direction String
- The direction to which the forwarding rule is applied. Default value:
Request
. Valid values:Request
: The forwarding rule is applied to the client requests received by ALB.Response
: The forwarding rule is applied to the responses returned by backend servers.
- dry
Run Boolean - Specifies whether to precheck this request.
- listener
Id String - The ID of the listener to which the forwarding rule belongs.
- priority Integer
- The priority of the rule. Valid values: 1 to 10000. A smaller value indicates a higher priority. Note: The priority of each rule within the same listener must be unique.
- rule
Actions List<RuleRule Action> - The actions of the forwarding rules. See
rule_actions
below. - rule
Conditions List<RuleRule Condition> - The conditions of the forwarding rule. See
rule_conditions
below. - rule
Name String - The name of the forwarding rule. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.
- status String
- The status of the resource.
- direction string
- The direction to which the forwarding rule is applied. Default value:
Request
. Valid values:Request
: The forwarding rule is applied to the client requests received by ALB.Response
: The forwarding rule is applied to the responses returned by backend servers.
- dry
Run boolean - Specifies whether to precheck this request.
- listener
Id string - The ID of the listener to which the forwarding rule belongs.
- priority number
- The priority of the rule. Valid values: 1 to 10000. A smaller value indicates a higher priority. Note: The priority of each rule within the same listener must be unique.
- rule
Actions RuleRule Action[] - The actions of the forwarding rules. See
rule_actions
below. - rule
Conditions RuleRule Condition[] - The conditions of the forwarding rule. See
rule_conditions
below. - rule
Name string - The name of the forwarding rule. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.
- status string
- The status of the resource.
- direction str
- The direction to which the forwarding rule is applied. Default value:
Request
. Valid values:Request
: The forwarding rule is applied to the client requests received by ALB.Response
: The forwarding rule is applied to the responses returned by backend servers.
- dry_
run bool - Specifies whether to precheck this request.
- listener_
id str - The ID of the listener to which the forwarding rule belongs.
- priority int
- The priority of the rule. Valid values: 1 to 10000. A smaller value indicates a higher priority. Note: The priority of each rule within the same listener must be unique.
- rule_
actions Sequence[RuleRule Action Args] - The actions of the forwarding rules. See
rule_actions
below. - rule_
conditions Sequence[RuleRule Condition Args] - The conditions of the forwarding rule. See
rule_conditions
below. - rule_
name str - The name of the forwarding rule. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.
- status str
- The status of the resource.
- direction String
- The direction to which the forwarding rule is applied. Default value:
Request
. Valid values:Request
: The forwarding rule is applied to the client requests received by ALB.Response
: The forwarding rule is applied to the responses returned by backend servers.
- dry
Run Boolean - Specifies whether to precheck this request.
- listener
Id String - The ID of the listener to which the forwarding rule belongs.
- priority Number
- The priority of the rule. Valid values: 1 to 10000. A smaller value indicates a higher priority. Note: The priority of each rule within the same listener must be unique.
- rule
Actions List<Property Map> - The actions of the forwarding rules. See
rule_actions
below. - rule
Conditions List<Property Map> - The conditions of the forwarding rule. See
rule_conditions
below. - rule
Name String - The name of the forwarding rule. The name must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter.
- status String
- The status of the resource.
Supporting Types
RuleRuleAction, RuleRuleActionArgs
- Order int
- The order of the forwarding rule actions. Valid values:
1
to50000
. The actions are performed in ascending order. You cannot leave this parameter empty. Each value must be unique. - Type string
- The action type. Valid values:
ForwardGroup
,Redirect
,FixedResponse
,Rewrite
,InsertHeader
,RemoveHeader
,TrafficLimit
,TrafficMirror
andCors
. Note: The preceding actions can be classified into two types:FinalType
: A forwarding rule can contain only oneFinalType
action, which is executed last. This type of action can contain only oneForwardGroup
,Redirect
orFixedResponse
action.ExtType
: A forwarding rule can contain one or moreExtType
actions, which are executed beforeFinalType
actions and need to coexist with theFinalType
actions. This type of action can contain multipleInsertHeader
actions or oneRewrite
action. NOTE: TheTrafficLimit
andTrafficMirror
option is available since 1.162.0. NOTE: From version 1.205.0,type
can be set toCors
. - Cors
Config Pulumi.Ali Cloud. Alb. Inputs. Rule Rule Action Cors Config - Request forwarding based on CORS. See
cors_config
below. - Fixed
Response Pulumi.Config Ali Cloud. Alb. Inputs. Rule Rule Action Fixed Response Config - The configuration of the fixed response. See
fixed_response_config
below. - Forward
Group Pulumi.Config Ali Cloud. Alb. Inputs. Rule Rule Action Forward Group Config - The forward response action within ALB. See
forward_group_config
below. - Insert
Header Pulumi.Config Ali Cloud. Alb. Inputs. Rule Rule Action Insert Header Config - The configuration of the inserted header field. See
insert_header_config
below. - Redirect
Config Pulumi.Ali Cloud. Alb. Inputs. Rule Rule Action Redirect Config - The configuration of the external redirect action. See
redirect_config
below. - Remove
Header Pulumi.Config Ali Cloud. Alb. Inputs. Rule Rule Action Remove Header Config - The configuration of the inserted header field. See
remove_header_config
below. - Rewrite
Config Pulumi.Ali Cloud. Alb. Inputs. Rule Rule Action Rewrite Config - The redirect action within ALB. See
rewrite_config
below. - Traffic
Limit Pulumi.Config Ali Cloud. Alb. Inputs. Rule Rule Action Traffic Limit Config - The Flow speed limit. See
traffic_limit_config
below. - Traffic
Mirror Pulumi.Config Ali Cloud. Alb. Inputs. Rule Rule Action Traffic Mirror Config - The Traffic mirroring. See
traffic_mirror_config
below.
- Order int
- The order of the forwarding rule actions. Valid values:
1
to50000
. The actions are performed in ascending order. You cannot leave this parameter empty. Each value must be unique. - Type string
- The action type. Valid values:
ForwardGroup
,Redirect
,FixedResponse
,Rewrite
,InsertHeader
,RemoveHeader
,TrafficLimit
,TrafficMirror
andCors
. Note: The preceding actions can be classified into two types:FinalType
: A forwarding rule can contain only oneFinalType
action, which is executed last. This type of action can contain only oneForwardGroup
,Redirect
orFixedResponse
action.ExtType
: A forwarding rule can contain one or moreExtType
actions, which are executed beforeFinalType
actions and need to coexist with theFinalType
actions. This type of action can contain multipleInsertHeader
actions or oneRewrite
action. NOTE: TheTrafficLimit
andTrafficMirror
option is available since 1.162.0. NOTE: From version 1.205.0,type
can be set toCors
. - Cors
Config RuleRule Action Cors Config - Request forwarding based on CORS. See
cors_config
below. - Fixed
Response RuleConfig Rule Action Fixed Response Config - The configuration of the fixed response. See
fixed_response_config
below. - Forward
Group RuleConfig Rule Action Forward Group Config - The forward response action within ALB. See
forward_group_config
below. - Insert
Header RuleConfig Rule Action Insert Header Config - The configuration of the inserted header field. See
insert_header_config
below. - Redirect
Config RuleRule Action Redirect Config - The configuration of the external redirect action. See
redirect_config
below. - Remove
Header RuleConfig Rule Action Remove Header Config - The configuration of the inserted header field. See
remove_header_config
below. - Rewrite
Config RuleRule Action Rewrite Config - The redirect action within ALB. See
rewrite_config
below. - Traffic
Limit RuleConfig Rule Action Traffic Limit Config - The Flow speed limit. See
traffic_limit_config
below. - Traffic
Mirror RuleConfig Rule Action Traffic Mirror Config - The Traffic mirroring. See
traffic_mirror_config
below.
- order Integer
- The order of the forwarding rule actions. Valid values:
1
to50000
. The actions are performed in ascending order. You cannot leave this parameter empty. Each value must be unique. - type String
- The action type. Valid values:
ForwardGroup
,Redirect
,FixedResponse
,Rewrite
,InsertHeader
,RemoveHeader
,TrafficLimit
,TrafficMirror
andCors
. Note: The preceding actions can be classified into two types:FinalType
: A forwarding rule can contain only oneFinalType
action, which is executed last. This type of action can contain only oneForwardGroup
,Redirect
orFixedResponse
action.ExtType
: A forwarding rule can contain one or moreExtType
actions, which are executed beforeFinalType
actions and need to coexist with theFinalType
actions. This type of action can contain multipleInsertHeader
actions or oneRewrite
action. NOTE: TheTrafficLimit
andTrafficMirror
option is available since 1.162.0. NOTE: From version 1.205.0,type
can be set toCors
. - cors
Config RuleRule Action Cors Config - Request forwarding based on CORS. See
cors_config
below. - fixed
Response RuleConfig Rule Action Fixed Response Config - The configuration of the fixed response. See
fixed_response_config
below. - forward
Group RuleConfig Rule Action Forward Group Config - The forward response action within ALB. See
forward_group_config
below. - insert
Header RuleConfig Rule Action Insert Header Config - The configuration of the inserted header field. See
insert_header_config
below. - redirect
Config RuleRule Action Redirect Config - The configuration of the external redirect action. See
redirect_config
below. - remove
Header RuleConfig Rule Action Remove Header Config - The configuration of the inserted header field. See
remove_header_config
below. - rewrite
Config RuleRule Action Rewrite Config - The redirect action within ALB. See
rewrite_config
below. - traffic
Limit RuleConfig Rule Action Traffic Limit Config - The Flow speed limit. See
traffic_limit_config
below. - traffic
Mirror RuleConfig Rule Action Traffic Mirror Config - The Traffic mirroring. See
traffic_mirror_config
below.
- order number
- The order of the forwarding rule actions. Valid values:
1
to50000
. The actions are performed in ascending order. You cannot leave this parameter empty. Each value must be unique. - type string
- The action type. Valid values:
ForwardGroup
,Redirect
,FixedResponse
,Rewrite
,InsertHeader
,RemoveHeader
,TrafficLimit
,TrafficMirror
andCors
. Note: The preceding actions can be classified into two types:FinalType
: A forwarding rule can contain only oneFinalType
action, which is executed last. This type of action can contain only oneForwardGroup
,Redirect
orFixedResponse
action.ExtType
: A forwarding rule can contain one or moreExtType
actions, which are executed beforeFinalType
actions and need to coexist with theFinalType
actions. This type of action can contain multipleInsertHeader
actions or oneRewrite
action. NOTE: TheTrafficLimit
andTrafficMirror
option is available since 1.162.0. NOTE: From version 1.205.0,type
can be set toCors
. - cors
Config RuleRule Action Cors Config - Request forwarding based on CORS. See
cors_config
below. - fixed
Response RuleConfig Rule Action Fixed Response Config - The configuration of the fixed response. See
fixed_response_config
below. - forward
Group RuleConfig Rule Action Forward Group Config - The forward response action within ALB. See
forward_group_config
below. - insert
Header RuleConfig Rule Action Insert Header Config - The configuration of the inserted header field. See
insert_header_config
below. - redirect
Config RuleRule Action Redirect Config - The configuration of the external redirect action. See
redirect_config
below. - remove
Header RuleConfig Rule Action Remove Header Config - The configuration of the inserted header field. See
remove_header_config
below. - rewrite
Config RuleRule Action Rewrite Config - The redirect action within ALB. See
rewrite_config
below. - traffic
Limit RuleConfig Rule Action Traffic Limit Config - The Flow speed limit. See
traffic_limit_config
below. - traffic
Mirror RuleConfig Rule Action Traffic Mirror Config - The Traffic mirroring. See
traffic_mirror_config
below.
- order int
- The order of the forwarding rule actions. Valid values:
1
to50000
. The actions are performed in ascending order. You cannot leave this parameter empty. Each value must be unique. - type str
- The action type. Valid values:
ForwardGroup
,Redirect
,FixedResponse
,Rewrite
,InsertHeader
,RemoveHeader
,TrafficLimit
,TrafficMirror
andCors
. Note: The preceding actions can be classified into two types:FinalType
: A forwarding rule can contain only oneFinalType
action, which is executed last. This type of action can contain only oneForwardGroup
,Redirect
orFixedResponse
action.ExtType
: A forwarding rule can contain one or moreExtType
actions, which are executed beforeFinalType
actions and need to coexist with theFinalType
actions. This type of action can contain multipleInsertHeader
actions or oneRewrite
action. NOTE: TheTrafficLimit
andTrafficMirror
option is available since 1.162.0. NOTE: From version 1.205.0,type
can be set toCors
. - cors_
config RuleRule Action Cors Config - Request forwarding based on CORS. See
cors_config
below. - fixed_
response_ Ruleconfig Rule Action Fixed Response Config - The configuration of the fixed response. See
fixed_response_config
below. - forward_
group_ Ruleconfig Rule Action Forward Group Config - The forward response action within ALB. See
forward_group_config
below. - insert_
header_ Ruleconfig Rule Action Insert Header Config - The configuration of the inserted header field. See
insert_header_config
below. - redirect_
config RuleRule Action Redirect Config - The configuration of the external redirect action. See
redirect_config
below. - remove_
header_ Ruleconfig Rule Action Remove Header Config - The configuration of the inserted header field. See
remove_header_config
below. - rewrite_
config RuleRule Action Rewrite Config - The redirect action within ALB. See
rewrite_config
below. - traffic_
limit_ Ruleconfig Rule Action Traffic Limit Config - The Flow speed limit. See
traffic_limit_config
below. - traffic_
mirror_ Ruleconfig Rule Action Traffic Mirror Config - The Traffic mirroring. See
traffic_mirror_config
below.
- order Number
- The order of the forwarding rule actions. Valid values:
1
to50000
. The actions are performed in ascending order. You cannot leave this parameter empty. Each value must be unique. - type String
- The action type. Valid values:
ForwardGroup
,Redirect
,FixedResponse
,Rewrite
,InsertHeader
,RemoveHeader
,TrafficLimit
,TrafficMirror
andCors
. Note: The preceding actions can be classified into two types:FinalType
: A forwarding rule can contain only oneFinalType
action, which is executed last. This type of action can contain only oneForwardGroup
,Redirect
orFixedResponse
action.ExtType
: A forwarding rule can contain one or moreExtType
actions, which are executed beforeFinalType
actions and need to coexist with theFinalType
actions. This type of action can contain multipleInsertHeader
actions or oneRewrite
action. NOTE: TheTrafficLimit
andTrafficMirror
option is available since 1.162.0. NOTE: From version 1.205.0,type
can be set toCors
. - cors
Config Property Map - Request forwarding based on CORS. See
cors_config
below. - fixed
Response Property MapConfig - The configuration of the fixed response. See
fixed_response_config
below. - forward
Group Property MapConfig - The forward response action within ALB. See
forward_group_config
below. - insert
Header Property MapConfig - The configuration of the inserted header field. See
insert_header_config
below. - redirect
Config Property Map - The configuration of the external redirect action. See
redirect_config
below. - remove
Header Property MapConfig - The configuration of the inserted header field. See
remove_header_config
below. - rewrite
Config Property Map - The redirect action within ALB. See
rewrite_config
below. - traffic
Limit Property MapConfig - The Flow speed limit. See
traffic_limit_config
below. - traffic
Mirror Property MapConfig - The Traffic mirroring. See
traffic_mirror_config
below.
RuleRuleActionCorsConfig, RuleRuleActionCorsConfigArgs
- Allow
Credentials string - Allow
Headers List<string> - Allow
Methods List<string> - Allow
Origins List<string> - Expose
Headers List<string> - Max
Age int
- Allow
Credentials string - Allow
Headers []string - Allow
Methods []string - Allow
Origins []string - Expose
Headers []string - Max
Age int
- allow
Credentials String - allow
Headers List<String> - allow
Methods List<String> - allow
Origins List<String> - expose
Headers List<String> - max
Age Integer
- allow
Credentials string - allow
Headers string[] - allow
Methods string[] - allow
Origins string[] - expose
Headers string[] - max
Age number
- allow_
credentials str - allow_
headers Sequence[str] - allow_
methods Sequence[str] - allow_
origins Sequence[str] - expose_
headers Sequence[str] - max_
age int
- allow
Credentials String - allow
Headers List<String> - allow
Methods List<String> - allow
Origins List<String> - expose
Headers List<String> - max
Age Number
RuleRuleActionFixedResponseConfig, RuleRuleActionFixedResponseConfigArgs
- Content string
- Content
Type string - Http
Code string
- Content string
- Content
Type string - Http
Code string
- content String
- content
Type String - http
Code String
- content string
- content
Type string - http
Code string
- content str
- content_
type str - http_
code str
- content String
- content
Type String - http
Code String
RuleRuleActionForwardGroupConfig, RuleRuleActionForwardGroupConfigArgs
RuleRuleActionForwardGroupConfigServerGroupStickySession, RuleRuleActionForwardGroupConfigServerGroupStickySessionArgs
RuleRuleActionForwardGroupConfigServerGroupTuple, RuleRuleActionForwardGroupConfigServerGroupTupleArgs
- Server
Group stringId - Weight int
- Server
Group stringId - Weight int
- server
Group StringId - weight Integer
- server
Group stringId - weight number
- server_
group_ strid - weight int
- server
Group StringId - weight Number
RuleRuleActionInsertHeaderConfig, RuleRuleActionInsertHeaderConfigArgs
- key str
- value str
- value_
type str
RuleRuleActionRedirectConfig, RuleRuleActionRedirectConfigArgs
RuleRuleActionRemoveHeaderConfig, RuleRuleActionRemoveHeaderConfigArgs
- Key string
- Key string
- key String
- key string
- key str
- key String
RuleRuleActionRewriteConfig, RuleRuleActionRewriteConfigArgs
RuleRuleActionTrafficLimitConfig, RuleRuleActionTrafficLimitConfigArgs
- per_
ip_ intqps - qps int
RuleRuleActionTrafficMirrorConfig, RuleRuleActionTrafficMirrorConfigArgs
RuleRuleActionTrafficMirrorConfigMirrorGroupConfig, RuleRuleActionTrafficMirrorConfigMirrorGroupConfigArgs
RuleRuleActionTrafficMirrorConfigMirrorGroupConfigServerGroupTuple, RuleRuleActionTrafficMirrorConfigMirrorGroupConfigServerGroupTupleArgs
- Server
Group stringId
- Server
Group stringId
- server
Group StringId
- server
Group stringId
- server_
group_ strid
- server
Group StringId
RuleRuleCondition, RuleRuleConditionArgs
- Type string
- The type of the forwarding rule. Valid values:
Host
: Requests are forwarded based on hosts.Path
: Requests are forwarded based on the path.Header
: Requests are forwarded based on the HTTP header field.QueryString
: Requests are forwarded based on the query string.Method
: Request are forwarded based on the request method.Cookie
: Requests are forwarded based on the cookie.SourceIp
: Requests are forwarded based on the source ip. NOTE: TheSourceIp
option is available since 1.162.0.ResponseHeader
: Response header. NOTE: TheSourceIp
option is available since 1.213.1.ResponseStatusCode
: Response status code. NOTE: TheSourceIp
option is available since 1.213.1.
- Pulumi.
Ali Cloud. Alb. Inputs. Rule Rule Condition Cookie Config - The configuration of the cookie. See See
cookie_config
below. - Header
Config Pulumi.Ali Cloud. Alb. Inputs. Rule Rule Condition Header Config - The configuration of the header field. See
header_config
below. - Host
Config Pulumi.Ali Cloud. Alb. Inputs. Rule Rule Condition Host Config - The configuration of the host field. See
host_config
below. - Method
Config Pulumi.Ali Cloud. Alb. Inputs. Rule Rule Condition Method Config - The configuration of the request method. See
method_config
below. - Path
Config Pulumi.Ali Cloud. Alb. Inputs. Rule Rule Condition Path Config - The configuration of the path for the request to be forwarded. See
path_config
below. - Query
String Pulumi.Config Ali Cloud. Alb. Inputs. Rule Rule Condition Query String Config - The configuration of the query string. See
query_string_config
below. - Response
Header Pulumi.Config Ali Cloud. Alb. Inputs. Rule Rule Condition Response Header Config - The configuration of the header field. See
response_header_config
below. - Response
Status Pulumi.Code Config Ali Cloud. Alb. Inputs. Rule Rule Condition Response Status Code Config - The configuration of the header field. See
response_status_code_config
below. - Source
Ip Pulumi.Config Ali Cloud. Alb. Inputs. Rule Rule Condition Source Ip Config - The Based on source IP traffic matching. Required and valid when Type is SourceIP. See
source_ip_config
below.
- Type string
- The type of the forwarding rule. Valid values:
Host
: Requests are forwarded based on hosts.Path
: Requests are forwarded based on the path.Header
: Requests are forwarded based on the HTTP header field.QueryString
: Requests are forwarded based on the query string.Method
: Request are forwarded based on the request method.Cookie
: Requests are forwarded based on the cookie.SourceIp
: Requests are forwarded based on the source ip. NOTE: TheSourceIp
option is available since 1.162.0.ResponseHeader
: Response header. NOTE: TheSourceIp
option is available since 1.213.1.ResponseStatusCode
: Response status code. NOTE: TheSourceIp
option is available since 1.213.1.
- Rule
Rule Condition Cookie Config - The configuration of the cookie. See See
cookie_config
below. - Header
Config RuleRule Condition Header Config - The configuration of the header field. See
header_config
below. - Host
Config RuleRule Condition Host Config - The configuration of the host field. See
host_config
below. - Method
Config RuleRule Condition Method Config - The configuration of the request method. See
method_config
below. - Path
Config RuleRule Condition Path Config - The configuration of the path for the request to be forwarded. See
path_config
below. - Query
String RuleConfig Rule Condition Query String Config - The configuration of the query string. See
query_string_config
below. - Response
Header RuleConfig Rule Condition Response Header Config - The configuration of the header field. See
response_header_config
below. - Response
Status RuleCode Config Rule Condition Response Status Code Config - The configuration of the header field. See
response_status_code_config
below. - Source
Ip RuleConfig Rule Condition Source Ip Config - The Based on source IP traffic matching. Required and valid when Type is SourceIP. See
source_ip_config
below.
- type String
- The type of the forwarding rule. Valid values:
Host
: Requests are forwarded based on hosts.Path
: Requests are forwarded based on the path.Header
: Requests are forwarded based on the HTTP header field.QueryString
: Requests are forwarded based on the query string.Method
: Request are forwarded based on the request method.Cookie
: Requests are forwarded based on the cookie.SourceIp
: Requests are forwarded based on the source ip. NOTE: TheSourceIp
option is available since 1.162.0.ResponseHeader
: Response header. NOTE: TheSourceIp
option is available since 1.213.1.ResponseStatusCode
: Response status code. NOTE: TheSourceIp
option is available since 1.213.1.
- Rule
Rule Condition Cookie Config - The configuration of the cookie. See See
cookie_config
below. - header
Config RuleRule Condition Header Config - The configuration of the header field. See
header_config
below. - host
Config RuleRule Condition Host Config - The configuration of the host field. See
host_config
below. - method
Config RuleRule Condition Method Config - The configuration of the request method. See
method_config
below. - path
Config RuleRule Condition Path Config - The configuration of the path for the request to be forwarded. See
path_config
below. - query
String RuleConfig Rule Condition Query String Config - The configuration of the query string. See
query_string_config
below. - response
Header RuleConfig Rule Condition Response Header Config - The configuration of the header field. See
response_header_config
below. - response
Status RuleCode Config Rule Condition Response Status Code Config - The configuration of the header field. See
response_status_code_config
below. - source
Ip RuleConfig Rule Condition Source Ip Config - The Based on source IP traffic matching. Required and valid when Type is SourceIP. See
source_ip_config
below.
- type string
- The type of the forwarding rule. Valid values:
Host
: Requests are forwarded based on hosts.Path
: Requests are forwarded based on the path.Header
: Requests are forwarded based on the HTTP header field.QueryString
: Requests are forwarded based on the query string.Method
: Request are forwarded based on the request method.Cookie
: Requests are forwarded based on the cookie.SourceIp
: Requests are forwarded based on the source ip. NOTE: TheSourceIp
option is available since 1.162.0.ResponseHeader
: Response header. NOTE: TheSourceIp
option is available since 1.213.1.ResponseStatusCode
: Response status code. NOTE: TheSourceIp
option is available since 1.213.1.
- Rule
Rule Condition Cookie Config - The configuration of the cookie. See See
cookie_config
below. - header
Config RuleRule Condition Header Config - The configuration of the header field. See
header_config
below. - host
Config RuleRule Condition Host Config - The configuration of the host field. See
host_config
below. - method
Config RuleRule Condition Method Config - The configuration of the request method. See
method_config
below. - path
Config RuleRule Condition Path Config - The configuration of the path for the request to be forwarded. See
path_config
below. - query
String RuleConfig Rule Condition Query String Config - The configuration of the query string. See
query_string_config
below. - response
Header RuleConfig Rule Condition Response Header Config - The configuration of the header field. See
response_header_config
below. - response
Status RuleCode Config Rule Condition Response Status Code Config - The configuration of the header field. See
response_status_code_config
below. - source
Ip RuleConfig Rule Condition Source Ip Config - The Based on source IP traffic matching. Required and valid when Type is SourceIP. See
source_ip_config
below.
- type str
- The type of the forwarding rule. Valid values:
Host
: Requests are forwarded based on hosts.Path
: Requests are forwarded based on the path.Header
: Requests are forwarded based on the HTTP header field.QueryString
: Requests are forwarded based on the query string.Method
: Request are forwarded based on the request method.Cookie
: Requests are forwarded based on the cookie.SourceIp
: Requests are forwarded based on the source ip. NOTE: TheSourceIp
option is available since 1.162.0.ResponseHeader
: Response header. NOTE: TheSourceIp
option is available since 1.213.1.ResponseStatusCode
: Response status code. NOTE: TheSourceIp
option is available since 1.213.1.
- Rule
Rule Condition Cookie Config - The configuration of the cookie. See See
cookie_config
below. - header_
config RuleRule Condition Header Config - The configuration of the header field. See
header_config
below. - host_
config RuleRule Condition Host Config - The configuration of the host field. See
host_config
below. - method_
config RuleRule Condition Method Config - The configuration of the request method. See
method_config
below. - path_
config RuleRule Condition Path Config - The configuration of the path for the request to be forwarded. See
path_config
below. - query_
string_ Ruleconfig Rule Condition Query String Config - The configuration of the query string. See
query_string_config
below. - response_
header_ Ruleconfig Rule Condition Response Header Config - The configuration of the header field. See
response_header_config
below. - response_
status_ Rulecode_ config Rule Condition Response Status Code Config - The configuration of the header field. See
response_status_code_config
below. - source_
ip_ Ruleconfig Rule Condition Source Ip Config - The Based on source IP traffic matching. Required and valid when Type is SourceIP. See
source_ip_config
below.
- type String
- The type of the forwarding rule. Valid values:
Host
: Requests are forwarded based on hosts.Path
: Requests are forwarded based on the path.Header
: Requests are forwarded based on the HTTP header field.QueryString
: Requests are forwarded based on the query string.Method
: Request are forwarded based on the request method.Cookie
: Requests are forwarded based on the cookie.SourceIp
: Requests are forwarded based on the source ip. NOTE: TheSourceIp
option is available since 1.162.0.ResponseHeader
: Response header. NOTE: TheSourceIp
option is available since 1.213.1.ResponseStatusCode
: Response status code. NOTE: TheSourceIp
option is available since 1.213.1.
- Property Map
- The configuration of the cookie. See See
cookie_config
below. - header
Config Property Map - The configuration of the header field. See
header_config
below. - host
Config Property Map - The configuration of the host field. See
host_config
below. - method
Config Property Map - The configuration of the request method. See
method_config
below. - path
Config Property Map - The configuration of the path for the request to be forwarded. See
path_config
below. - query
String Property MapConfig - The configuration of the query string. See
query_string_config
below. - response
Header Property MapConfig - The configuration of the header field. See
response_header_config
below. - response
Status Property MapCode Config - The configuration of the header field. See
response_status_code_config
below. - source
Ip Property MapConfig - The Based on source IP traffic matching. Required and valid when Type is SourceIP. See
source_ip_config
below.
RuleRuleConditionCookieConfig, RuleRuleConditionCookieConfigArgs
RuleRuleConditionCookieConfigValue, RuleRuleConditionCookieConfigValueArgs
RuleRuleConditionHeaderConfig, RuleRuleConditionHeaderConfigArgs
RuleRuleConditionHostConfig, RuleRuleConditionHostConfigArgs
- Values List<string>
- Values []string
- values List<String>
- values string[]
- values Sequence[str]
- values List<String>
RuleRuleConditionMethodConfig, RuleRuleConditionMethodConfigArgs
- Values List<string>
- Values []string
- values List<String>
- values string[]
- values Sequence[str]
- values List<String>
RuleRuleConditionPathConfig, RuleRuleConditionPathConfigArgs
- Values List<string>
- Values []string
- values List<String>
- values string[]
- values Sequence[str]
- values List<String>
RuleRuleConditionQueryStringConfig, RuleRuleConditionQueryStringConfigArgs
RuleRuleConditionQueryStringConfigValue, RuleRuleConditionQueryStringConfigValueArgs
RuleRuleConditionResponseHeaderConfig, RuleRuleConditionResponseHeaderConfigArgs
RuleRuleConditionResponseStatusCodeConfig, RuleRuleConditionResponseStatusCodeConfigArgs
- Values List<string>
- Values []string
- values List<String>
- values string[]
- values Sequence[str]
- values List<String>
RuleRuleConditionSourceIpConfig, RuleRuleConditionSourceIpConfigArgs
- Values List<string>
- Values []string
- values List<String>
- values string[]
- values Sequence[str]
- values List<String>
Import
Application Load Balancer (ALB) Rule can be imported using the id, e.g.
$ pulumi import alicloud:alb/rule:Rule example <id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.