1. Packages
  2. Ibm Provider
  3. API Docs
  4. getIsLbListenerPolicyRule
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.getIsLbListenerPolicyRule

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    Provides a read-only data source for LoadBalancerListenerPolicyRule. For more information, about load balancer listener policy and rules, see layer 7 load balancing policies and rules.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const example = ibm.getIsLbListenerPolicyRule({
        rule: ibm_is_lb_listener_policy_rule.example.rule,
        listener: ibm_is_lb_listener.example.listener_id,
        lb: ibm_is_lb.example.id,
        policy: ibm_is_lb_listener_policy.example.policy_id,
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    example = ibm.get_is_lb_listener_policy_rule(rule=ibm_is_lb_listener_policy_rule["example"]["rule"],
        listener=ibm_is_lb_listener["example"]["listener_id"],
        lb=ibm_is_lb["example"]["id"],
        policy=ibm_is_lb_listener_policy["example"]["policy_id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ibm.LookupIsLbListenerPolicyRule(ctx, &ibm.LookupIsLbListenerPolicyRuleArgs{
    			Rule:     ibm_is_lb_listener_policy_rule.Example.Rule,
    			Listener: ibm_is_lb_listener.Example.Listener_id,
    			Lb:       ibm_is_lb.Example.Id,
    			Policy:   ibm_is_lb_listener_policy.Example.Policy_id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Ibm.GetIsLbListenerPolicyRule.Invoke(new()
        {
            Rule = ibm_is_lb_listener_policy_rule.Example.Rule,
            Listener = ibm_is_lb_listener.Example.Listener_id,
            Lb = ibm_is_lb.Example.Id,
            Policy = ibm_is_lb_listener_policy.Example.Policy_id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.IbmFunctions;
    import com.pulumi.ibm.inputs.GetIsLbListenerPolicyRuleArgs;
    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 example = IbmFunctions.getIsLbListenerPolicyRule(GetIsLbListenerPolicyRuleArgs.builder()
                .rule(ibm_is_lb_listener_policy_rule.example().rule())
                .listener(ibm_is_lb_listener.example().listener_id())
                .lb(ibm_is_lb.example().id())
                .policy(ibm_is_lb_listener_policy.example().policy_id())
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ibm:getIsLbListenerPolicyRule
          arguments:
            rule: ${ibm_is_lb_listener_policy_rule.example.rule}
            listener: ${ibm_is_lb_listener.example.listener_id}
            lb: ${ibm_is_lb.example.id}
            policy: ${ibm_is_lb_listener_policy.example.policy_id}
    

    Using getIsLbListenerPolicyRule

    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 getIsLbListenerPolicyRule(args: GetIsLbListenerPolicyRuleArgs, opts?: InvokeOptions): Promise<GetIsLbListenerPolicyRuleResult>
    function getIsLbListenerPolicyRuleOutput(args: GetIsLbListenerPolicyRuleOutputArgs, opts?: InvokeOptions): Output<GetIsLbListenerPolicyRuleResult>
    def get_is_lb_listener_policy_rule(id: Optional[str] = None,
                                       lb: Optional[str] = None,
                                       listener: Optional[str] = None,
                                       policy: Optional[str] = None,
                                       rule: Optional[str] = None,
                                       opts: Optional[InvokeOptions] = None) -> GetIsLbListenerPolicyRuleResult
    def get_is_lb_listener_policy_rule_output(id: Optional[pulumi.Input[str]] = None,
                                       lb: Optional[pulumi.Input[str]] = None,
                                       listener: Optional[pulumi.Input[str]] = None,
                                       policy: Optional[pulumi.Input[str]] = None,
                                       rule: Optional[pulumi.Input[str]] = None,
                                       opts: Optional[InvokeOptions] = None) -> Output[GetIsLbListenerPolicyRuleResult]
    func LookupIsLbListenerPolicyRule(ctx *Context, args *LookupIsLbListenerPolicyRuleArgs, opts ...InvokeOption) (*LookupIsLbListenerPolicyRuleResult, error)
    func LookupIsLbListenerPolicyRuleOutput(ctx *Context, args *LookupIsLbListenerPolicyRuleOutputArgs, opts ...InvokeOption) LookupIsLbListenerPolicyRuleResultOutput

    > Note: This function is named LookupIsLbListenerPolicyRule in the Go SDK.

    public static class GetIsLbListenerPolicyRule 
    {
        public static Task<GetIsLbListenerPolicyRuleResult> InvokeAsync(GetIsLbListenerPolicyRuleArgs args, InvokeOptions? opts = null)
        public static Output<GetIsLbListenerPolicyRuleResult> Invoke(GetIsLbListenerPolicyRuleInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetIsLbListenerPolicyRuleResult> getIsLbListenerPolicyRule(GetIsLbListenerPolicyRuleArgs args, InvokeOptions options)
    public static Output<GetIsLbListenerPolicyRuleResult> getIsLbListenerPolicyRule(GetIsLbListenerPolicyRuleArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getIsLbListenerPolicyRule:getIsLbListenerPolicyRule
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Lb string
    The load balancer identifier.
    Listener string
    The listener identifier.
    Policy string
    The policy identifier.
    Rule string
    The rule identifier.
    Id string
    The unique identifier of the LoadBalancerListenerPolicyRule.
    Lb string
    The load balancer identifier.
    Listener string
    The listener identifier.
    Policy string
    The policy identifier.
    Rule string
    The rule identifier.
    Id string
    The unique identifier of the LoadBalancerListenerPolicyRule.
    lb String
    The load balancer identifier.
    listener String
    The listener identifier.
    policy String
    The policy identifier.
    rule String
    The rule identifier.
    id String
    The unique identifier of the LoadBalancerListenerPolicyRule.
    lb string
    The load balancer identifier.
    listener string
    The listener identifier.
    policy string
    The policy identifier.
    rule string
    The rule identifier.
    id string
    The unique identifier of the LoadBalancerListenerPolicyRule.
    lb str
    The load balancer identifier.
    listener str
    The listener identifier.
    policy str
    The policy identifier.
    rule str
    The rule identifier.
    id str
    The unique identifier of the LoadBalancerListenerPolicyRule.
    lb String
    The load balancer identifier.
    listener String
    The listener identifier.
    policy String
    The policy identifier.
    rule String
    The rule identifier.
    id String
    The unique identifier of the LoadBalancerListenerPolicyRule.

    getIsLbListenerPolicyRule Result

    The following output properties are available:

    Condition string
    (String) The condition of the rule.
    CreatedAt string
    (String) The date and time that this rule was created.
    Field string
    (String) The field. This is applicable to header, query,body and sni_hostname rule types.If the rule type is header, this property is required.If the rule type is query, this is optional. If specified and the rule condition is notmatches_regex, the value must be percent-encoded.If the rule type is body, this is optional.
    Href string
    (String) The rule's canonical URL.
    Id string
    The unique identifier of the LoadBalancerListenerPolicyRule.
    Lb string
    Listener string
    Policy string
    ProvisioningStatus string
    (String) The provisioning status of this rule.
    Rule string
    Type string
    (String) The type of the rule.Body rules are applied to form-encoded request bodies using the UTF-8 character set.
    Value string
    (String) Value to be matched for rule condition.If the rule type is query and the rule condition is not matches_regex, the value must be percent-encoded.
    Condition string
    (String) The condition of the rule.
    CreatedAt string
    (String) The date and time that this rule was created.
    Field string
    (String) The field. This is applicable to header, query,body and sni_hostname rule types.If the rule type is header, this property is required.If the rule type is query, this is optional. If specified and the rule condition is notmatches_regex, the value must be percent-encoded.If the rule type is body, this is optional.
    Href string
    (String) The rule's canonical URL.
    Id string
    The unique identifier of the LoadBalancerListenerPolicyRule.
    Lb string
    Listener string
    Policy string
    ProvisioningStatus string
    (String) The provisioning status of this rule.
    Rule string
    Type string
    (String) The type of the rule.Body rules are applied to form-encoded request bodies using the UTF-8 character set.
    Value string
    (String) Value to be matched for rule condition.If the rule type is query and the rule condition is not matches_regex, the value must be percent-encoded.
    condition String
    (String) The condition of the rule.
    createdAt String
    (String) The date and time that this rule was created.
    field String
    (String) The field. This is applicable to header, query,body and sni_hostname rule types.If the rule type is header, this property is required.If the rule type is query, this is optional. If specified and the rule condition is notmatches_regex, the value must be percent-encoded.If the rule type is body, this is optional.
    href String
    (String) The rule's canonical URL.
    id String
    The unique identifier of the LoadBalancerListenerPolicyRule.
    lb String
    listener String
    policy String
    provisioningStatus String
    (String) The provisioning status of this rule.
    rule String
    type String
    (String) The type of the rule.Body rules are applied to form-encoded request bodies using the UTF-8 character set.
    value String
    (String) Value to be matched for rule condition.If the rule type is query and the rule condition is not matches_regex, the value must be percent-encoded.
    condition string
    (String) The condition of the rule.
    createdAt string
    (String) The date and time that this rule was created.
    field string
    (String) The field. This is applicable to header, query,body and sni_hostname rule types.If the rule type is header, this property is required.If the rule type is query, this is optional. If specified and the rule condition is notmatches_regex, the value must be percent-encoded.If the rule type is body, this is optional.
    href string
    (String) The rule's canonical URL.
    id string
    The unique identifier of the LoadBalancerListenerPolicyRule.
    lb string
    listener string
    policy string
    provisioningStatus string
    (String) The provisioning status of this rule.
    rule string
    type string
    (String) The type of the rule.Body rules are applied to form-encoded request bodies using the UTF-8 character set.
    value string
    (String) Value to be matched for rule condition.If the rule type is query and the rule condition is not matches_regex, the value must be percent-encoded.
    condition str
    (String) The condition of the rule.
    created_at str
    (String) The date and time that this rule was created.
    field str
    (String) The field. This is applicable to header, query,body and sni_hostname rule types.If the rule type is header, this property is required.If the rule type is query, this is optional. If specified and the rule condition is notmatches_regex, the value must be percent-encoded.If the rule type is body, this is optional.
    href str
    (String) The rule's canonical URL.
    id str
    The unique identifier of the LoadBalancerListenerPolicyRule.
    lb str
    listener str
    policy str
    provisioning_status str
    (String) The provisioning status of this rule.
    rule str
    type str
    (String) The type of the rule.Body rules are applied to form-encoded request bodies using the UTF-8 character set.
    value str
    (String) Value to be matched for rule condition.If the rule type is query and the rule condition is not matches_regex, the value must be percent-encoded.
    condition String
    (String) The condition of the rule.
    createdAt String
    (String) The date and time that this rule was created.
    field String
    (String) The field. This is applicable to header, query,body and sni_hostname rule types.If the rule type is header, this property is required.If the rule type is query, this is optional. If specified and the rule condition is notmatches_regex, the value must be percent-encoded.If the rule type is body, this is optional.
    href String
    (String) The rule's canonical URL.
    id String
    The unique identifier of the LoadBalancerListenerPolicyRule.
    lb String
    listener String
    policy String
    provisioningStatus String
    (String) The provisioning status of this rule.
    rule String
    type String
    (String) The type of the rule.Body rules are applied to form-encoded request bodies using the UTF-8 character set.
    value String
    (String) Value to be matched for rule condition.If the rule type is query and the rule condition is not matches_regex, the value must be percent-encoded.

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud