Viewing docs for Volcengine v0.0.47
published on Friday, Mar 13, 2026 by Volcengine
published on Friday, Mar 13, 2026 by Volcengine
Viewing docs for Volcengine v0.0.47
published on Friday, Mar 13, 2026 by Volcengine
published on Friday, Mar 13, 2026 by Volcengine
Deprecated: volcengine.clb.Rules has been deprecated in favor of volcengine.clb.getRules
Use this data source to query detailed information of clb rules
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@pulumi/volcengine";
import * as volcengine from "@volcengine/pulumi";
const fooZones = volcengine.ecs.getZones({});
const fooVpc = new volcengine.vpc.Vpc("fooVpc", {
vpcName: "acc-test-vpc",
cidrBlock: "172.16.0.0/16",
});
const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", {
subnetName: "acc-test-subnet",
cidrBlock: "172.16.0.0/24",
zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id),
vpcId: fooVpc.id,
});
const fooClb = new volcengine.clb.Clb("fooClb", {
type: "public",
subnetId: fooSubnet.id,
loadBalancerSpec: "small_1",
description: "acc0Demo",
loadBalancerName: "acc-test-create",
eipBillingConfig: {
isp: "BGP",
eipBillingType: "PostPaidByBandwidth",
bandwidth: 1,
},
});
const fooServerGroup = new volcengine.clb.ServerGroup("fooServerGroup", {
loadBalancerId: fooClb.id,
serverGroupName: "acc-test-create",
description: "hello demo11",
});
const fooListener = new volcengine.clb.Listener("fooListener", {
loadBalancerId: fooClb.id,
listenerName: "acc-test-listener",
protocol: "HTTP",
port: 90,
serverGroupId: fooServerGroup.id,
healthCheck: {
enabled: "on",
interval: 10,
timeout: 3,
healthyThreshold: 5,
unHealthyThreshold: 2,
domain: "volcengine.com",
httpCode: "http_2xx",
method: "GET",
uri: "/",
},
enabled: "on",
});
const fooRule = new volcengine.clb.Rule("fooRule", {
listenerId: fooListener.id,
serverGroupId: fooServerGroup.id,
domain: "test-volc123.com",
url: "/yyyy",
});
const fooRules = volcengine.clb.getRulesOutput({
ids: [fooRule.id],
listenerId: fooListener.id,
});
import pulumi
import pulumi_volcengine as volcengine
foo_zones = volcengine.ecs.get_zones()
foo_vpc = volcengine.vpc.Vpc("fooVpc",
vpc_name="acc-test-vpc",
cidr_block="172.16.0.0/16")
foo_subnet = volcengine.vpc.Subnet("fooSubnet",
subnet_name="acc-test-subnet",
cidr_block="172.16.0.0/24",
zone_id=foo_zones.zones[0].id,
vpc_id=foo_vpc.id)
foo_clb = volcengine.clb.Clb("fooClb",
type="public",
subnet_id=foo_subnet.id,
load_balancer_spec="small_1",
description="acc0Demo",
load_balancer_name="acc-test-create",
eip_billing_config=volcengine.clb.ClbEipBillingConfigArgs(
isp="BGP",
eip_billing_type="PostPaidByBandwidth",
bandwidth=1,
))
foo_server_group = volcengine.clb.ServerGroup("fooServerGroup",
load_balancer_id=foo_clb.id,
server_group_name="acc-test-create",
description="hello demo11")
foo_listener = volcengine.clb.Listener("fooListener",
load_balancer_id=foo_clb.id,
listener_name="acc-test-listener",
protocol="HTTP",
port=90,
server_group_id=foo_server_group.id,
health_check=volcengine.clb.ListenerHealthCheckArgs(
enabled="on",
interval=10,
timeout=3,
healthy_threshold=5,
un_healthy_threshold=2,
domain="volcengine.com",
http_code="http_2xx",
method="GET",
uri="/",
),
enabled="on")
foo_rule = volcengine.clb.Rule("fooRule",
listener_id=foo_listener.id,
server_group_id=foo_server_group.id,
domain="test-volc123.com",
url="/yyyy")
foo_rules = volcengine.clb.get_rules_output(ids=[foo_rule.id],
listener_id=foo_listener.id)
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/clb"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/ecs"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vpc"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
fooZones, err := ecs.GetZones(ctx, nil, nil)
if err != nil {
return err
}
fooVpc, err := vpc.NewVpc(ctx, "fooVpc", &vpc.VpcArgs{
VpcName: pulumi.String("acc-test-vpc"),
CidrBlock: pulumi.String("172.16.0.0/16"),
})
if err != nil {
return err
}
fooSubnet, err := vpc.NewSubnet(ctx, "fooSubnet", &vpc.SubnetArgs{
SubnetName: pulumi.String("acc-test-subnet"),
CidrBlock: pulumi.String("172.16.0.0/24"),
ZoneId: pulumi.String(fooZones.Zones[0].Id),
VpcId: fooVpc.ID(),
})
if err != nil {
return err
}
fooClb, err := clb.NewClb(ctx, "fooClb", &clb.ClbArgs{
Type: pulumi.String("public"),
SubnetId: fooSubnet.ID(),
LoadBalancerSpec: pulumi.String("small_1"),
Description: pulumi.String("acc0Demo"),
LoadBalancerName: pulumi.String("acc-test-create"),
EipBillingConfig: &clb.ClbEipBillingConfigArgs{
Isp: pulumi.String("BGP"),
EipBillingType: pulumi.String("PostPaidByBandwidth"),
Bandwidth: pulumi.Int(1),
},
})
if err != nil {
return err
}
fooServerGroup, err := clb.NewServerGroup(ctx, "fooServerGroup", &clb.ServerGroupArgs{
LoadBalancerId: fooClb.ID(),
ServerGroupName: pulumi.String("acc-test-create"),
Description: pulumi.String("hello demo11"),
})
if err != nil {
return err
}
fooListener, err := clb.NewListener(ctx, "fooListener", &clb.ListenerArgs{
LoadBalancerId: fooClb.ID(),
ListenerName: pulumi.String("acc-test-listener"),
Protocol: pulumi.String("HTTP"),
Port: pulumi.Int(90),
ServerGroupId: fooServerGroup.ID(),
HealthCheck: &clb.ListenerHealthCheckArgs{
Enabled: pulumi.String("on"),
Interval: pulumi.Int(10),
Timeout: pulumi.Int(3),
HealthyThreshold: pulumi.Int(5),
UnHealthyThreshold: pulumi.Int(2),
Domain: pulumi.String("volcengine.com"),
HttpCode: pulumi.String("http_2xx"),
Method: pulumi.String("GET"),
Uri: pulumi.String("/"),
},
Enabled: pulumi.String("on"),
})
if err != nil {
return err
}
fooRule, err := clb.NewRule(ctx, "fooRule", &clb.RuleArgs{
ListenerId: fooListener.ID(),
ServerGroupId: fooServerGroup.ID(),
Domain: pulumi.String("test-volc123.com"),
Url: pulumi.String("/yyyy"),
})
if err != nil {
return err
}
_ = clb.GetRulesOutput(ctx, clb.GetRulesOutputArgs{
Ids: pulumi.StringArray{
fooRule.ID(),
},
ListenerId: fooListener.ID(),
}, nil)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var fooZones = Volcengine.Ecs.GetZones.Invoke();
var fooVpc = new Volcengine.Vpc.Vpc("fooVpc", new()
{
VpcName = "acc-test-vpc",
CidrBlock = "172.16.0.0/16",
});
var fooSubnet = new Volcengine.Vpc.Subnet("fooSubnet", new()
{
SubnetName = "acc-test-subnet",
CidrBlock = "172.16.0.0/24",
ZoneId = fooZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
VpcId = fooVpc.Id,
});
var fooClb = new Volcengine.Clb.Clb("fooClb", new()
{
Type = "public",
SubnetId = fooSubnet.Id,
LoadBalancerSpec = "small_1",
Description = "acc0Demo",
LoadBalancerName = "acc-test-create",
EipBillingConfig = new Volcengine.Clb.Inputs.ClbEipBillingConfigArgs
{
Isp = "BGP",
EipBillingType = "PostPaidByBandwidth",
Bandwidth = 1,
},
});
var fooServerGroup = new Volcengine.Clb.ServerGroup("fooServerGroup", new()
{
LoadBalancerId = fooClb.Id,
ServerGroupName = "acc-test-create",
Description = "hello demo11",
});
var fooListener = new Volcengine.Clb.Listener("fooListener", new()
{
LoadBalancerId = fooClb.Id,
ListenerName = "acc-test-listener",
Protocol = "HTTP",
Port = 90,
ServerGroupId = fooServerGroup.Id,
HealthCheck = new Volcengine.Clb.Inputs.ListenerHealthCheckArgs
{
Enabled = "on",
Interval = 10,
Timeout = 3,
HealthyThreshold = 5,
UnHealthyThreshold = 2,
Domain = "volcengine.com",
HttpCode = "http_2xx",
Method = "GET",
Uri = "/",
},
Enabled = "on",
});
var fooRule = new Volcengine.Clb.Rule("fooRule", new()
{
ListenerId = fooListener.Id,
ServerGroupId = fooServerGroup.Id,
Domain = "test-volc123.com",
Url = "/yyyy",
});
var fooRules = Volcengine.Clb.GetRules.Invoke(new()
{
Ids = new[]
{
fooRule.Id,
},
ListenerId = fooListener.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.ecs.EcsFunctions;
import com.pulumi.volcengine.ecs.inputs.GetZonesArgs;
import com.pulumi.volcengine.vpc.Vpc;
import com.pulumi.volcengine.vpc.VpcArgs;
import com.pulumi.volcengine.vpc.Subnet;
import com.pulumi.volcengine.vpc.SubnetArgs;
import com.pulumi.volcengine.clb.Clb;
import com.pulumi.volcengine.clb.ClbArgs;
import com.pulumi.volcengine.clb.inputs.ClbEipBillingConfigArgs;
import com.pulumi.volcengine.clb.ServerGroup;
import com.pulumi.volcengine.clb.ServerGroupArgs;
import com.pulumi.volcengine.clb.Listener;
import com.pulumi.volcengine.clb.ListenerArgs;
import com.pulumi.volcengine.clb.inputs.ListenerHealthCheckArgs;
import com.pulumi.volcengine.clb.Rule;
import com.pulumi.volcengine.clb.RuleArgs;
import com.pulumi.volcengine.clb.ClbFunctions;
import com.pulumi.volcengine.clb.inputs.GetRulesArgs;
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) {
final var fooZones = EcsFunctions.getZones();
var fooVpc = new Vpc("fooVpc", VpcArgs.builder()
.vpcName("acc-test-vpc")
.cidrBlock("172.16.0.0/16")
.build());
var fooSubnet = new Subnet("fooSubnet", SubnetArgs.builder()
.subnetName("acc-test-subnet")
.cidrBlock("172.16.0.0/24")
.zoneId(fooZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
.vpcId(fooVpc.id())
.build());
var fooClb = new Clb("fooClb", ClbArgs.builder()
.type("public")
.subnetId(fooSubnet.id())
.loadBalancerSpec("small_1")
.description("acc0Demo")
.loadBalancerName("acc-test-create")
.eipBillingConfig(ClbEipBillingConfigArgs.builder()
.isp("BGP")
.eipBillingType("PostPaidByBandwidth")
.bandwidth(1)
.build())
.build());
var fooServerGroup = new ServerGroup("fooServerGroup", ServerGroupArgs.builder()
.loadBalancerId(fooClb.id())
.serverGroupName("acc-test-create")
.description("hello demo11")
.build());
var fooListener = new Listener("fooListener", ListenerArgs.builder()
.loadBalancerId(fooClb.id())
.listenerName("acc-test-listener")
.protocol("HTTP")
.port(90)
.serverGroupId(fooServerGroup.id())
.healthCheck(ListenerHealthCheckArgs.builder()
.enabled("on")
.interval(10)
.timeout(3)
.healthyThreshold(5)
.unHealthyThreshold(2)
.domain("volcengine.com")
.httpCode("http_2xx")
.method("GET")
.uri("/")
.build())
.enabled("on")
.build());
var fooRule = new Rule("fooRule", RuleArgs.builder()
.listenerId(fooListener.id())
.serverGroupId(fooServerGroup.id())
.domain("test-volc123.com")
.url("/yyyy")
.build());
final var fooRules = ClbFunctions.getRules(GetRulesArgs.builder()
.ids(fooRule.id())
.listenerId(fooListener.id())
.build());
}
}
resources:
fooVpc:
type: volcengine:vpc:Vpc
properties:
vpcName: acc-test-vpc
cidrBlock: 172.16.0.0/16
fooSubnet:
type: volcengine:vpc:Subnet
properties:
subnetName: acc-test-subnet
cidrBlock: 172.16.0.0/24
zoneId: ${fooZones.zones[0].id}
vpcId: ${fooVpc.id}
fooClb:
type: volcengine:clb:Clb
properties:
type: public
subnetId: ${fooSubnet.id}
loadBalancerSpec: small_1
description: acc0Demo
loadBalancerName: acc-test-create
eipBillingConfig:
isp: BGP
eipBillingType: PostPaidByBandwidth
bandwidth: 1
fooServerGroup:
type: volcengine:clb:ServerGroup
properties:
loadBalancerId: ${fooClb.id}
serverGroupName: acc-test-create
description: hello demo11
fooListener:
type: volcengine:clb:Listener
properties:
loadBalancerId: ${fooClb.id}
listenerName: acc-test-listener
protocol: HTTP
port: 90
serverGroupId: ${fooServerGroup.id}
healthCheck:
enabled: on
interval: 10
timeout: 3
healthyThreshold: 5
unHealthyThreshold: 2
domain: volcengine.com
httpCode: http_2xx
method: GET
uri: /
enabled: on
fooRule:
type: volcengine:clb:Rule
properties:
listenerId: ${fooListener.id}
serverGroupId: ${fooServerGroup.id}
domain: test-volc123.com
url: /yyyy
variables:
fooZones:
fn::invoke:
Function: volcengine:ecs:getZones
Arguments: {}
fooRules:
fn::invoke:
Function: volcengine:clb:getRules
Arguments:
ids:
- ${fooRule.id}
listenerId: ${fooListener.id}
Using Rules
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function rules(args: RulesArgs, opts?: InvokeOptions): Promise<RulesResult>
function rulesOutput(args: RulesOutputArgs, opts?: InvokeOptions): Output<RulesResult>def rules(ids: Optional[Sequence[str]] = None,
listener_id: Optional[str] = None,
output_file: Optional[str] = None,
tags: Optional[Sequence[RulesTag]] = None,
opts: Optional[InvokeOptions] = None) -> RulesResult
def rules_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
listener_id: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
tags: Optional[pulumi.Input[Sequence[pulumi.Input[RulesTagArgs]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[RulesResult]func Rules(ctx *Context, args *RulesArgs, opts ...InvokeOption) (*RulesResult, error)
func RulesOutput(ctx *Context, args *RulesOutputArgs, opts ...InvokeOption) RulesResultOutputpublic static class Rules
{
public static Task<RulesResult> InvokeAsync(RulesArgs args, InvokeOptions? opts = null)
public static Output<RulesResult> Invoke(RulesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<RulesResult> rules(RulesArgs args, InvokeOptions options)
public static Output<RulesResult> rules(RulesArgs args, InvokeOptions options)
fn::invoke:
function: volcengine:clb:Rules
arguments:
# arguments dictionaryThe following arguments are supported:
- Listener
Id string - The Id of listener.
- Ids List<string>
- A list of Rule IDs.
- Output
File string - File name where to save data source results.
-
List<Rules
Tag> - Tags.
- Listener
Id string - The Id of listener.
- Ids []string
- A list of Rule IDs.
- Output
File string - File name where to save data source results.
-
[]Rules
Tag - Tags.
- listener
Id String - The Id of listener.
- ids List<String>
- A list of Rule IDs.
- output
File String - File name where to save data source results.
-
List<Rules
Tag> - Tags.
- listener
Id string - The Id of listener.
- ids string[]
- A list of Rule IDs.
- output
File string - File name where to save data source results.
-
Rules
Tag[] - Tags.
- listener_
id str - The Id of listener.
- ids Sequence[str]
- A list of Rule IDs.
- output_
file str - File name where to save data source results.
-
Sequence[Rules
Tag] - Tags.
- listener
Id String - The Id of listener.
- ids List<String>
- A list of Rule IDs.
- output
File String - File name where to save data source results.
- List<Property Map>
- Tags.
Rules Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Listener
Id string - Rules
List<Rules
Rule> - The collection of Rule query.
- Ids List<string>
- Output
File string -
List<Rules
Tag> - Tags.
- Id string
- The provider-assigned unique ID for this managed resource.
- Listener
Id string - Rules
[]Rules
Rule - The collection of Rule query.
- Ids []string
- Output
File string -
[]Rules
Tag - Tags.
- id String
- The provider-assigned unique ID for this managed resource.
- listener
Id String - rules
List<Rules
Rule> - The collection of Rule query.
- ids List<String>
- output
File String -
List<Rules
Tag> - Tags.
- id string
- The provider-assigned unique ID for this managed resource.
- listener
Id string - rules
Rules
Rule[] - The collection of Rule query.
- ids string[]
- output
File string -
Rules
Tag[] - Tags.
- id str
- The provider-assigned unique ID for this managed resource.
- listener_
id str - rules
Sequence[Rules
Rule] - The collection of Rule query.
- ids Sequence[str]
- output_
file str -
Sequence[Rules
Tag] - Tags.
- id String
- The provider-assigned unique ID for this managed resource.
- listener
Id String - rules List<Property Map>
- The collection of Rule query.
- ids List<String>
- output
File String - List<Property Map>
- Tags.
Supporting Types
RulesRule
- Action
Type string - The action type of Rule. values:
Forward,Redirect. - Description string
- The Description of Rule.
- Domain string
- The Domain of Rule.
- Id string
- The Id of Rule.
- Redirect
Configs List<RulesRule Redirect Config> - The redirect configuration. When
action_typeisRedirect, this parameter is returned. - Rule
Id string - The Id of Rule.
- Server
Group stringId - The Id of Server Group.
-
List<Rules
Rule Tag> - Tags.
- Url string
- The Url of Rule.
- Action
Type string - The action type of Rule. values:
Forward,Redirect. - Description string
- The Description of Rule.
- Domain string
- The Domain of Rule.
- Id string
- The Id of Rule.
- Redirect
Configs []RulesRule Redirect Config - The redirect configuration. When
action_typeisRedirect, this parameter is returned. - Rule
Id string - The Id of Rule.
- Server
Group stringId - The Id of Server Group.
-
[]Rules
Rule Tag - Tags.
- Url string
- The Url of Rule.
- action
Type String - The action type of Rule. values:
Forward,Redirect. - description String
- The Description of Rule.
- domain String
- The Domain of Rule.
- id String
- The Id of Rule.
- redirect
Configs List<RulesRule Redirect Config> - The redirect configuration. When
action_typeisRedirect, this parameter is returned. - rule
Id String - The Id of Rule.
- server
Group StringId - The Id of Server Group.
-
List<Rules
Rule Tag> - Tags.
- url String
- The Url of Rule.
- action
Type string - The action type of Rule. values:
Forward,Redirect. - description string
- The Description of Rule.
- domain string
- The Domain of Rule.
- id string
- The Id of Rule.
- redirect
Configs RulesRule Redirect Config[] - The redirect configuration. When
action_typeisRedirect, this parameter is returned. - rule
Id string - The Id of Rule.
- server
Group stringId - The Id of Server Group.
-
Rules
Rule Tag[] - Tags.
- url string
- The Url of Rule.
- action_
type str - The action type of Rule. values:
Forward,Redirect. - description str
- The Description of Rule.
- domain str
- The Domain of Rule.
- id str
- The Id of Rule.
- redirect_
configs Sequence[RulesRule Redirect Config] - The redirect configuration. When
action_typeisRedirect, this parameter is returned. - rule_
id str - The Id of Rule.
- server_
group_ strid - The Id of Server Group.
-
Sequence[Rules
Rule Tag] - Tags.
- url str
- The Url of Rule.
- action
Type String - The action type of Rule. values:
Forward,Redirect. - description String
- The Description of Rule.
- domain String
- The Domain of Rule.
- id String
- The Id of Rule.
- redirect
Configs List<Property Map> - The redirect configuration. When
action_typeisRedirect, this parameter is returned. - rule
Id String - The Id of Rule.
- server
Group StringId - The Id of Server Group.
- List<Property Map>
- Tags.
- url String
- The Url of Rule.
RulesRuleRedirectConfig
- Host string
- The redirect host.
- Path string
- The redirect path.
- Port string
- The redirect port.
- Protocol string
- The redirect protocol.
- Status
Code string - The redirect status code.
- Host string
- The redirect host.
- Path string
- The redirect path.
- Port string
- The redirect port.
- Protocol string
- The redirect protocol.
- Status
Code string - The redirect status code.
- host String
- The redirect host.
- path String
- The redirect path.
- port String
- The redirect port.
- protocol String
- The redirect protocol.
- status
Code String - The redirect status code.
- host string
- The redirect host.
- path string
- The redirect path.
- port string
- The redirect port.
- protocol string
- The redirect protocol.
- status
Code string - The redirect status code.
- host str
- The redirect host.
- path str
- The redirect path.
- port str
- The redirect port.
- protocol str
- The redirect protocol.
- status_
code str - The redirect status code.
- host String
- The redirect host.
- path String
- The redirect path.
- port String
- The redirect port.
- protocol String
- The redirect protocol.
- status
Code String - The redirect status code.
RulesRuleTag
RulesTag
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengineTerraform Provider.
Viewing docs for Volcengine v0.0.47
published on Friday, Mar 13, 2026 by Volcengine
published on Friday, Mar 13, 2026 by Volcengine
