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

ibm.getIsLbListenerPolicies

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 LoadBalancerListenerPolicyCollection. For more information, about VPC load balance listener policy, see monitoring application Load Balancer for VPC metrics.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const isLbListenerPolicies = ibm.getIsLbListenerPolicies({
        lb: ibm_is_lb.example.id,
        listener: ibm_is_lb_listener.example.listener_id,
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    is_lb_listener_policies = ibm.get_is_lb_listener_policies(lb=ibm_is_lb["example"]["id"],
        listener=ibm_is_lb_listener["example"]["listener_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.GetIsLbListenerPolicies(ctx, &ibm.GetIsLbListenerPoliciesArgs{
    			Lb:       ibm_is_lb.Example.Id,
    			Listener: ibm_is_lb_listener.Example.Listener_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 isLbListenerPolicies = Ibm.GetIsLbListenerPolicies.Invoke(new()
        {
            Lb = ibm_is_lb.Example.Id,
            Listener = ibm_is_lb_listener.Example.Listener_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.GetIsLbListenerPoliciesArgs;
    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 isLbListenerPolicies = IbmFunctions.getIsLbListenerPolicies(GetIsLbListenerPoliciesArgs.builder()
                .lb(ibm_is_lb.example().id())
                .listener(ibm_is_lb_listener.example().listener_id())
                .build());
    
        }
    }
    
    variables:
      isLbListenerPolicies:
        fn::invoke:
          function: ibm:getIsLbListenerPolicies
          arguments:
            lb: ${ibm_is_lb.example.id}
            listener: ${ibm_is_lb_listener.example.listener_id}
    

    Using getIsLbListenerPolicies

    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 getIsLbListenerPolicies(args: GetIsLbListenerPoliciesArgs, opts?: InvokeOptions): Promise<GetIsLbListenerPoliciesResult>
    function getIsLbListenerPoliciesOutput(args: GetIsLbListenerPoliciesOutputArgs, opts?: InvokeOptions): Output<GetIsLbListenerPoliciesResult>
    def get_is_lb_listener_policies(id: Optional[str] = None,
                                    lb: Optional[str] = None,
                                    listener: Optional[str] = None,
                                    opts: Optional[InvokeOptions] = None) -> GetIsLbListenerPoliciesResult
    def get_is_lb_listener_policies_output(id: Optional[pulumi.Input[str]] = None,
                                    lb: Optional[pulumi.Input[str]] = None,
                                    listener: Optional[pulumi.Input[str]] = None,
                                    opts: Optional[InvokeOptions] = None) -> Output[GetIsLbListenerPoliciesResult]
    func GetIsLbListenerPolicies(ctx *Context, args *GetIsLbListenerPoliciesArgs, opts ...InvokeOption) (*GetIsLbListenerPoliciesResult, error)
    func GetIsLbListenerPoliciesOutput(ctx *Context, args *GetIsLbListenerPoliciesOutputArgs, opts ...InvokeOption) GetIsLbListenerPoliciesResultOutput

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

    public static class GetIsLbListenerPolicies 
    {
        public static Task<GetIsLbListenerPoliciesResult> InvokeAsync(GetIsLbListenerPoliciesArgs args, InvokeOptions? opts = null)
        public static Output<GetIsLbListenerPoliciesResult> Invoke(GetIsLbListenerPoliciesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetIsLbListenerPoliciesResult> getIsLbListenerPolicies(GetIsLbListenerPoliciesArgs args, InvokeOptions options)
    public static Output<GetIsLbListenerPoliciesResult> getIsLbListenerPolicies(GetIsLbListenerPoliciesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getIsLbListenerPolicies:getIsLbListenerPolicies
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Lb string
    The load balancer identifier.
    Listener string
    The listener identifier.
    Id string
    (String) The unique identifier for this load balancer listener.
    Lb string
    The load balancer identifier.
    Listener string
    The listener identifier.
    Id string
    (String) The unique identifier for this load balancer listener.
    lb String
    The load balancer identifier.
    listener String
    The listener identifier.
    id String
    (String) The unique identifier for this load balancer listener.
    lb string
    The load balancer identifier.
    listener string
    The listener identifier.
    id string
    (String) The unique identifier for this load balancer listener.
    lb str
    The load balancer identifier.
    listener str
    The listener identifier.
    id str
    (String) The unique identifier for this load balancer listener.
    lb String
    The load balancer identifier.
    listener String
    The listener identifier.
    id String
    (String) The unique identifier for this load balancer listener.

    getIsLbListenerPolicies Result

    The following output properties are available:

    Id string
    (String) The unique identifier for this load balancer listener.
    Lb string
    Listener string
    (List) Nested scheme for listener:
    Policies List<GetIsLbListenerPoliciesPolicy>
    (List) Collection of policies. Nested scheme for policies:
    Id string
    (String) The unique identifier for this load balancer listener.
    Lb string
    Listener string
    (List) Nested scheme for listener:
    Policies []GetIsLbListenerPoliciesPolicy
    (List) Collection of policies. Nested scheme for policies:
    id String
    (String) The unique identifier for this load balancer listener.
    lb String
    listener String
    (List) Nested scheme for listener:
    policies List<GetIsLbListenerPoliciesPolicy>
    (List) Collection of policies. Nested scheme for policies:
    id string
    (String) The unique identifier for this load balancer listener.
    lb string
    listener string
    (List) Nested scheme for listener:
    policies GetIsLbListenerPoliciesPolicy[]
    (List) Collection of policies. Nested scheme for policies:
    id str
    (String) The unique identifier for this load balancer listener.
    lb str
    listener str
    (List) Nested scheme for listener:
    policies Sequence[GetIsLbListenerPoliciesPolicy]
    (List) Collection of policies. Nested scheme for policies:
    id String
    (String) The unique identifier for this load balancer listener.
    lb String
    listener String
    (List) Nested scheme for listener:
    policies List<Property Map>
    (List) Collection of policies. Nested scheme for policies:

    Supporting Types

    GetIsLbListenerPoliciesPolicy

    Action string
    (String) The policy action.The enumerated values for this property are expected to expand in the future. When processing this property, check for and log unknown values. Optionally halt processing and surface the error, or bypass the policy on which the unexpected property value was encountered.
    CreatedAt string
    (String) The date and time that this policy was created.
    Href string
    (String) The listener's canonical URL.
    Id string
    (String) The unique identifier for this load balancer listener.
    Name string
    (String) The user-defined name for this load balancer pool.
    Priority double
    (Integer) Priority of the policy. Lower value indicates higher priority.
    ProvisioningStatus string
    (String) The provisioning status of this policy.
    Rules List<GetIsLbListenerPoliciesPolicyRule>
    (List) The rules for this policy. Nested scheme for rules:
    Targets List<GetIsLbListenerPoliciesPolicyTarget>
    (List) - If action is forward, the response is a LoadBalancerPoolReference- If action is redirect, the response is a LoadBalancerListenerPolicyRedirectURL- If action is https_redirect, the response is a LoadBalancerListenerHTTPSRedirect. Nested scheme for target:
    Action string
    (String) The policy action.The enumerated values for this property are expected to expand in the future. When processing this property, check for and log unknown values. Optionally halt processing and surface the error, or bypass the policy on which the unexpected property value was encountered.
    CreatedAt string
    (String) The date and time that this policy was created.
    Href string
    (String) The listener's canonical URL.
    Id string
    (String) The unique identifier for this load balancer listener.
    Name string
    (String) The user-defined name for this load balancer pool.
    Priority float64
    (Integer) Priority of the policy. Lower value indicates higher priority.
    ProvisioningStatus string
    (String) The provisioning status of this policy.
    Rules []GetIsLbListenerPoliciesPolicyRule
    (List) The rules for this policy. Nested scheme for rules:
    Targets []GetIsLbListenerPoliciesPolicyTarget
    (List) - If action is forward, the response is a LoadBalancerPoolReference- If action is redirect, the response is a LoadBalancerListenerPolicyRedirectURL- If action is https_redirect, the response is a LoadBalancerListenerHTTPSRedirect. Nested scheme for target:
    action String
    (String) The policy action.The enumerated values for this property are expected to expand in the future. When processing this property, check for and log unknown values. Optionally halt processing and surface the error, or bypass the policy on which the unexpected property value was encountered.
    createdAt String
    (String) The date and time that this policy was created.
    href String
    (String) The listener's canonical URL.
    id String
    (String) The unique identifier for this load balancer listener.
    name String
    (String) The user-defined name for this load balancer pool.
    priority Double
    (Integer) Priority of the policy. Lower value indicates higher priority.
    provisioningStatus String
    (String) The provisioning status of this policy.
    rules List<GetIsLbListenerPoliciesPolicyRule>
    (List) The rules for this policy. Nested scheme for rules:
    targets List<GetIsLbListenerPoliciesPolicyTarget>
    (List) - If action is forward, the response is a LoadBalancerPoolReference- If action is redirect, the response is a LoadBalancerListenerPolicyRedirectURL- If action is https_redirect, the response is a LoadBalancerListenerHTTPSRedirect. Nested scheme for target:
    action string
    (String) The policy action.The enumerated values for this property are expected to expand in the future. When processing this property, check for and log unknown values. Optionally halt processing and surface the error, or bypass the policy on which the unexpected property value was encountered.
    createdAt string
    (String) The date and time that this policy was created.
    href string
    (String) The listener's canonical URL.
    id string
    (String) The unique identifier for this load balancer listener.
    name string
    (String) The user-defined name for this load balancer pool.
    priority number
    (Integer) Priority of the policy. Lower value indicates higher priority.
    provisioningStatus string
    (String) The provisioning status of this policy.
    rules GetIsLbListenerPoliciesPolicyRule[]
    (List) The rules for this policy. Nested scheme for rules:
    targets GetIsLbListenerPoliciesPolicyTarget[]
    (List) - If action is forward, the response is a LoadBalancerPoolReference- If action is redirect, the response is a LoadBalancerListenerPolicyRedirectURL- If action is https_redirect, the response is a LoadBalancerListenerHTTPSRedirect. Nested scheme for target:
    action str
    (String) The policy action.The enumerated values for this property are expected to expand in the future. When processing this property, check for and log unknown values. Optionally halt processing and surface the error, or bypass the policy on which the unexpected property value was encountered.
    created_at str
    (String) The date and time that this policy was created.
    href str
    (String) The listener's canonical URL.
    id str
    (String) The unique identifier for this load balancer listener.
    name str
    (String) The user-defined name for this load balancer pool.
    priority float
    (Integer) Priority of the policy. Lower value indicates higher priority.
    provisioning_status str
    (String) The provisioning status of this policy.
    rules Sequence[GetIsLbListenerPoliciesPolicyRule]
    (List) The rules for this policy. Nested scheme for rules:
    targets Sequence[GetIsLbListenerPoliciesPolicyTarget]
    (List) - If action is forward, the response is a LoadBalancerPoolReference- If action is redirect, the response is a LoadBalancerListenerPolicyRedirectURL- If action is https_redirect, the response is a LoadBalancerListenerHTTPSRedirect. Nested scheme for target:
    action String
    (String) The policy action.The enumerated values for this property are expected to expand in the future. When processing this property, check for and log unknown values. Optionally halt processing and surface the error, or bypass the policy on which the unexpected property value was encountered.
    createdAt String
    (String) The date and time that this policy was created.
    href String
    (String) The listener's canonical URL.
    id String
    (String) The unique identifier for this load balancer listener.
    name String
    (String) The user-defined name for this load balancer pool.
    priority Number
    (Integer) Priority of the policy. Lower value indicates higher priority.
    provisioningStatus String
    (String) The provisioning status of this policy.
    rules List<Property Map>
    (List) The rules for this policy. Nested scheme for rules:
    targets List<Property Map>
    (List) - If action is forward, the response is a LoadBalancerPoolReference- If action is redirect, the response is a LoadBalancerListenerPolicyRedirectURL- If action is https_redirect, the response is a LoadBalancerListenerHTTPSRedirect. Nested scheme for target:

    GetIsLbListenerPoliciesPolicyRule

    Deleteds List<GetIsLbListenerPoliciesPolicyRuleDeleted>
    (List) If present, this property indicates the referenced resource has been deleted and providessome supplementary information. Nested scheme for deleted:
    Href string
    (String) The listener's canonical URL.
    Id string
    (String) The unique identifier for this load balancer listener.
    Deleteds []GetIsLbListenerPoliciesPolicyRuleDeleted
    (List) If present, this property indicates the referenced resource has been deleted and providessome supplementary information. Nested scheme for deleted:
    Href string
    (String) The listener's canonical URL.
    Id string
    (String) The unique identifier for this load balancer listener.
    deleteds List<GetIsLbListenerPoliciesPolicyRuleDeleted>
    (List) If present, this property indicates the referenced resource has been deleted and providessome supplementary information. Nested scheme for deleted:
    href String
    (String) The listener's canonical URL.
    id String
    (String) The unique identifier for this load balancer listener.
    deleteds GetIsLbListenerPoliciesPolicyRuleDeleted[]
    (List) If present, this property indicates the referenced resource has been deleted and providessome supplementary information. Nested scheme for deleted:
    href string
    (String) The listener's canonical URL.
    id string
    (String) The unique identifier for this load balancer listener.
    deleteds Sequence[GetIsLbListenerPoliciesPolicyRuleDeleted]
    (List) If present, this property indicates the referenced resource has been deleted and providessome supplementary information. Nested scheme for deleted:
    href str
    (String) The listener's canonical URL.
    id str
    (String) The unique identifier for this load balancer listener.
    deleteds List<Property Map>
    (List) If present, this property indicates the referenced resource has been deleted and providessome supplementary information. Nested scheme for deleted:
    href String
    (String) The listener's canonical URL.
    id String
    (String) The unique identifier for this load balancer listener.

    GetIsLbListenerPoliciesPolicyRuleDeleted

    MoreInfo string
    (String) Link to documentation about deleted resources.
    MoreInfo string
    (String) Link to documentation about deleted resources.
    moreInfo String
    (String) Link to documentation about deleted resources.
    moreInfo string
    (String) Link to documentation about deleted resources.
    more_info str
    (String) Link to documentation about deleted resources.
    moreInfo String
    (String) Link to documentation about deleted resources.

    GetIsLbListenerPoliciesPolicyTarget

    Deleteds List<GetIsLbListenerPoliciesPolicyTargetDeleted>
    (List) If present, this property indicates the referenced resource has been deleted and providessome supplementary information. Nested scheme for deleted:
    Href string
    (String) The listener's canonical URL.
    HttpStatusCode double
    (Integer) The HTTP status code for this redirect.
    Id string
    (String) The unique identifier for this load balancer listener.
    Listeners List<GetIsLbListenerPoliciesPolicyTargetListener>
    The listener identifier.
    Name string
    (String) The user-defined name for this load balancer pool.
    Uri string
    (String) The redirect relative target URI.
    Url string
    (String) The redirect target URL.
    Deleteds []GetIsLbListenerPoliciesPolicyTargetDeleted
    (List) If present, this property indicates the referenced resource has been deleted and providessome supplementary information. Nested scheme for deleted:
    Href string
    (String) The listener's canonical URL.
    HttpStatusCode float64
    (Integer) The HTTP status code for this redirect.
    Id string
    (String) The unique identifier for this load balancer listener.
    Listeners []GetIsLbListenerPoliciesPolicyTargetListener
    The listener identifier.
    Name string
    (String) The user-defined name for this load balancer pool.
    Uri string
    (String) The redirect relative target URI.
    Url string
    (String) The redirect target URL.
    deleteds List<GetIsLbListenerPoliciesPolicyTargetDeleted>
    (List) If present, this property indicates the referenced resource has been deleted and providessome supplementary information. Nested scheme for deleted:
    href String
    (String) The listener's canonical URL.
    httpStatusCode Double
    (Integer) The HTTP status code for this redirect.
    id String
    (String) The unique identifier for this load balancer listener.
    listeners List<GetIsLbListenerPoliciesPolicyTargetListener>
    The listener identifier.
    name String
    (String) The user-defined name for this load balancer pool.
    uri String
    (String) The redirect relative target URI.
    url String
    (String) The redirect target URL.
    deleteds GetIsLbListenerPoliciesPolicyTargetDeleted[]
    (List) If present, this property indicates the referenced resource has been deleted and providessome supplementary information. Nested scheme for deleted:
    href string
    (String) The listener's canonical URL.
    httpStatusCode number
    (Integer) The HTTP status code for this redirect.
    id string
    (String) The unique identifier for this load balancer listener.
    listeners GetIsLbListenerPoliciesPolicyTargetListener[]
    The listener identifier.
    name string
    (String) The user-defined name for this load balancer pool.
    uri string
    (String) The redirect relative target URI.
    url string
    (String) The redirect target URL.
    deleteds Sequence[GetIsLbListenerPoliciesPolicyTargetDeleted]
    (List) If present, this property indicates the referenced resource has been deleted and providessome supplementary information. Nested scheme for deleted:
    href str
    (String) The listener's canonical URL.
    http_status_code float
    (Integer) The HTTP status code for this redirect.
    id str
    (String) The unique identifier for this load balancer listener.
    listeners Sequence[GetIsLbListenerPoliciesPolicyTargetListener]
    The listener identifier.
    name str
    (String) The user-defined name for this load balancer pool.
    uri str
    (String) The redirect relative target URI.
    url str
    (String) The redirect target URL.
    deleteds List<Property Map>
    (List) If present, this property indicates the referenced resource has been deleted and providessome supplementary information. Nested scheme for deleted:
    href String
    (String) The listener's canonical URL.
    httpStatusCode Number
    (Integer) The HTTP status code for this redirect.
    id String
    (String) The unique identifier for this load balancer listener.
    listeners List<Property Map>
    The listener identifier.
    name String
    (String) The user-defined name for this load balancer pool.
    uri String
    (String) The redirect relative target URI.
    url String
    (String) The redirect target URL.

    GetIsLbListenerPoliciesPolicyTargetDeleted

    MoreInfo string
    (String) Link to documentation about deleted resources.
    MoreInfo string
    (String) Link to documentation about deleted resources.
    moreInfo String
    (String) Link to documentation about deleted resources.
    moreInfo string
    (String) Link to documentation about deleted resources.
    more_info str
    (String) Link to documentation about deleted resources.
    moreInfo String
    (String) Link to documentation about deleted resources.

    GetIsLbListenerPoliciesPolicyTargetListener

    Deleteds List<GetIsLbListenerPoliciesPolicyTargetListenerDeleted>
    (List) If present, this property indicates the referenced resource has been deleted and providessome supplementary information. Nested scheme for deleted:
    Href string
    (String) The listener's canonical URL.
    Id string
    (String) The unique identifier for this load balancer listener.
    Deleteds []GetIsLbListenerPoliciesPolicyTargetListenerDeleted
    (List) If present, this property indicates the referenced resource has been deleted and providessome supplementary information. Nested scheme for deleted:
    Href string
    (String) The listener's canonical URL.
    Id string
    (String) The unique identifier for this load balancer listener.
    deleteds List<GetIsLbListenerPoliciesPolicyTargetListenerDeleted>
    (List) If present, this property indicates the referenced resource has been deleted and providessome supplementary information. Nested scheme for deleted:
    href String
    (String) The listener's canonical URL.
    id String
    (String) The unique identifier for this load balancer listener.
    deleteds GetIsLbListenerPoliciesPolicyTargetListenerDeleted[]
    (List) If present, this property indicates the referenced resource has been deleted and providessome supplementary information. Nested scheme for deleted:
    href string
    (String) The listener's canonical URL.
    id string
    (String) The unique identifier for this load balancer listener.
    deleteds Sequence[GetIsLbListenerPoliciesPolicyTargetListenerDeleted]
    (List) If present, this property indicates the referenced resource has been deleted and providessome supplementary information. Nested scheme for deleted:
    href str
    (String) The listener's canonical URL.
    id str
    (String) The unique identifier for this load balancer listener.
    deleteds List<Property Map>
    (List) If present, this property indicates the referenced resource has been deleted and providessome supplementary information. Nested scheme for deleted:
    href String
    (String) The listener's canonical URL.
    id String
    (String) The unique identifier for this load balancer listener.

    GetIsLbListenerPoliciesPolicyTargetListenerDeleted

    MoreInfo string
    (String) Link to documentation about deleted resources.
    MoreInfo string
    (String) Link to documentation about deleted resources.
    moreInfo String
    (String) Link to documentation about deleted resources.
    moreInfo string
    (String) Link to documentation about deleted resources.
    more_info str
    (String) Link to documentation about deleted resources.
    moreInfo String
    (String) Link to documentation about deleted resources.

    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