GetRules

This data source provides the rules associated with a server load balancer listener.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var sampleDs = Output.Create(AliCloud.Slb.GetRules.InvokeAsync(new AliCloud.Slb.GetRulesArgs
        {
            FrontendPort = 80,
            LoadBalancerId = alicloud_slb.Sample_slb.Id,
        }));
        this.FirstSlbRuleId = sampleDs.Apply(sampleDs => sampleDs.SlbRules[0].Id);
    }

    [Output("firstSlbRuleId")]
    public Output<string> FirstSlbRuleId { get; set; }
}

Coming soon!

import pulumi
import pulumi_alicloud as alicloud

sample_ds = alicloud.slb.get_rules(frontend_port=80,
    load_balancer_id=alicloud_slb["sample_slb"]["id"])
pulumi.export("firstSlbRuleId", sample_ds.slb_rules[0]["id"])
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const sampleDs = alicloud_slb_sample_slb.id.apply(id => alicloud.slb.getRules({
    frontendPort: 80,
    loadBalancerId: id,
}, { async: true }));

export const firstSlbRuleId = sampleDs.slbRules[0].id;

Using GetRules

function getRules(args: GetRulesArgs, opts?: InvokeOptions): Promise<GetRulesResult>
function  get_rules(frontend_port=None, ids=None, load_balancer_id=None, name_regex=None, output_file=None, opts=None)
func GetRules(ctx *Context, args *GetRulesArgs, opts ...InvokeOption) (*GetRulesResult, error)
public static class GetRules {
    public static Task<GetRulesResult> InvokeAsync(GetRulesArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

FrontendPort int

SLB listener port.

LoadBalancerId string

ID of the SLB with listener rules.

Ids List<string>

A list of rules IDs to filter results.

NameRegex string

A regex string to filter results by rule name.

OutputFile string
FrontendPort int

SLB listener port.

LoadBalancerId string

ID of the SLB with listener rules.

Ids []string

A list of rules IDs to filter results.

NameRegex string

A regex string to filter results by rule name.

OutputFile string
frontendPort number

SLB listener port.

loadBalancerId string

ID of the SLB with listener rules.

ids string[]

A list of rules IDs to filter results.

nameRegex string

A regex string to filter results by rule name.

outputFile string
frontend_port float

SLB listener port.

load_balancer_id str

ID of the SLB with listener rules.

ids List[str]

A list of rules IDs to filter results.

name_regex str

A regex string to filter results by rule name.

output_file str

GetRules Result

The following output properties are available:

FrontendPort int
Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>

A list of SLB listener rules IDs.

LoadBalancerId string
Names List<string>

A list of SLB listener rules names.

SlbRules List<Pulumi.AliCloud.Slb.Outputs.GetRulesSlbRule>

A list of SLB listener rules. Each element contains the following attributes:

NameRegex string
OutputFile string
FrontendPort int
Id string

The provider-assigned unique ID for this managed resource.

Ids []string

A list of SLB listener rules IDs.

LoadBalancerId string
Names []string

A list of SLB listener rules names.

SlbRules []GetRulesSlbRule

A list of SLB listener rules. Each element contains the following attributes:

NameRegex string
OutputFile string
frontendPort number
id string

The provider-assigned unique ID for this managed resource.

ids string[]

A list of SLB listener rules IDs.

loadBalancerId string
names string[]

A list of SLB listener rules names.

slbRules GetRulesSlbRule[]

A list of SLB listener rules. Each element contains the following attributes:

nameRegex string
outputFile string
frontend_port float
id str

The provider-assigned unique ID for this managed resource.

ids List[str]

A list of SLB listener rules IDs.

load_balancer_id str
names List[str]

A list of SLB listener rules names.

slb_rules List[GetRulesSlbRule]

A list of SLB listener rules. Each element contains the following attributes:

name_regex str
output_file str

Supporting Types

GetRulesSlbRule

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

Domain string

Domain name in the HTTP request where the rule applies (e.g. “*.aliyun.com”).

Id string

Rule ID.

Name string

Rule name.

ServerGroupId string

ID of the linked VServer group.

Url string

Path in the HTTP request where the rule applies (e.g. “/image”).

Domain string

Domain name in the HTTP request where the rule applies (e.g. “*.aliyun.com”).

Id string

Rule ID.

Name string

Rule name.

ServerGroupId string

ID of the linked VServer group.

Url string

Path in the HTTP request where the rule applies (e.g. “/image”).

domain string

Domain name in the HTTP request where the rule applies (e.g. “*.aliyun.com”).

id string

Rule ID.

name string

Rule name.

serverGroupId string

ID of the linked VServer group.

url string

Path in the HTTP request where the rule applies (e.g. “/image”).

domain str

Domain name in the HTTP request where the rule applies (e.g. “*.aliyun.com”).

id str

Rule ID.

name str

Rule name.

server_group_id str

ID of the linked VServer group.

url str

Path in the HTTP request where the rule applies (e.g. “/image”).

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.