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

ibm.getIsLbListenerPolicy

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 LoadBalancerListenerPolicy. 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 example = ibm.getIsLbListenerPolicy({
        lb: ibm_is_lb.example.id,
        listener: ibm_is_lb_listener.example.listener_id,
        policyId: ibm_is_lb_listener_policy.example.policy_id,
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    example = ibm.get_is_lb_listener_policy(lb=ibm_is_lb["example"]["id"],
        listener=ibm_is_lb_listener["example"]["listener_id"],
        policy_id=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.LookupIsLbListenerPolicy(ctx, &ibm.LookupIsLbListenerPolicyArgs{
    			Lb:       ibm_is_lb.Example.Id,
    			Listener: ibm_is_lb_listener.Example.Listener_id,
    			PolicyId: 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.GetIsLbListenerPolicy.Invoke(new()
        {
            Lb = ibm_is_lb.Example.Id,
            Listener = ibm_is_lb_listener.Example.Listener_id,
            PolicyId = 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.GetIsLbListenerPolicyArgs;
    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.getIsLbListenerPolicy(GetIsLbListenerPolicyArgs.builder()
                .lb(ibm_is_lb.example().id())
                .listener(ibm_is_lb_listener.example().listener_id())
                .policyId(ibm_is_lb_listener_policy.example().policy_id())
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ibm:getIsLbListenerPolicy
          arguments:
            lb: ${ibm_is_lb.example.id}
            listener: ${ibm_is_lb_listener.example.listener_id}
            policyId: ${ibm_is_lb_listener_policy.example.policy_id}
    

    Using getIsLbListenerPolicy

    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 getIsLbListenerPolicy(args: GetIsLbListenerPolicyArgs, opts?: InvokeOptions): Promise<GetIsLbListenerPolicyResult>
    function getIsLbListenerPolicyOutput(args: GetIsLbListenerPolicyOutputArgs, opts?: InvokeOptions): Output<GetIsLbListenerPolicyResult>
    def get_is_lb_listener_policy(id: Optional[str] = None,
                                  lb: Optional[str] = None,
                                  listener: Optional[str] = None,
                                  policy_id: Optional[str] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetIsLbListenerPolicyResult
    def get_is_lb_listener_policy_output(id: Optional[pulumi.Input[str]] = None,
                                  lb: Optional[pulumi.Input[str]] = None,
                                  listener: Optional[pulumi.Input[str]] = None,
                                  policy_id: Optional[pulumi.Input[str]] = None,
                                  opts: Optional[InvokeOptions] = None) -> Output[GetIsLbListenerPolicyResult]
    func LookupIsLbListenerPolicy(ctx *Context, args *LookupIsLbListenerPolicyArgs, opts ...InvokeOption) (*LookupIsLbListenerPolicyResult, error)
    func LookupIsLbListenerPolicyOutput(ctx *Context, args *LookupIsLbListenerPolicyOutputArgs, opts ...InvokeOption) LookupIsLbListenerPolicyResultOutput

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

    public static class GetIsLbListenerPolicy 
    {
        public static Task<GetIsLbListenerPolicyResult> InvokeAsync(GetIsLbListenerPolicyArgs args, InvokeOptions? opts = null)
        public static Output<GetIsLbListenerPolicyResult> Invoke(GetIsLbListenerPolicyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetIsLbListenerPolicyResult> getIsLbListenerPolicy(GetIsLbListenerPolicyArgs args, InvokeOptions options)
    public static Output<GetIsLbListenerPolicyResult> getIsLbListenerPolicy(GetIsLbListenerPolicyArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getIsLbListenerPolicy:getIsLbListenerPolicy
      arguments:
        # arguments dictionary

    The following arguments are supported:

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

    getIsLbListenerPolicy Result

    The following output properties are available:

    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.
    Lb string
    Listener string
    (List) Nested scheme for listener:
    Name string
    (String) The user-defined name for this load balancer pool.
    PolicyId string
    Priority double
    (Integer) Priority of the policy. Lower value indicates higher priority.
    ProvisioningStatus string
    (String) The provisioning status of this policy.
    Rules List<GetIsLbListenerPolicyRule>
    (List) The rules for this policy. Nested scheme for rules:
    Targets List<GetIsLbListenerPolicyTarget>
    (List) -If action is forward_to_pool, the response is a LoadBalancerPoolReference-If action is forward_to_listener, specify a LoadBalancerListenerIdentity in this load balancer to forward to.- If actionisredirect, the response is a LoadBalancerListenerPolicyRedirectURL- If actionishttps_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.
    Lb string
    Listener string
    (List) Nested scheme for listener:
    Name string
    (String) The user-defined name for this load balancer pool.
    PolicyId string
    Priority float64
    (Integer) Priority of the policy. Lower value indicates higher priority.
    ProvisioningStatus string
    (String) The provisioning status of this policy.
    Rules []GetIsLbListenerPolicyRuleType
    (List) The rules for this policy. Nested scheme for rules:
    Targets []GetIsLbListenerPolicyTarget
    (List) -If action is forward_to_pool, the response is a LoadBalancerPoolReference-If action is forward_to_listener, specify a LoadBalancerListenerIdentity in this load balancer to forward to.- If actionisredirect, the response is a LoadBalancerListenerPolicyRedirectURL- If actionishttps_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.
    lb String
    listener String
    (List) Nested scheme for listener:
    name String
    (String) The user-defined name for this load balancer pool.
    policyId String
    priority Double
    (Integer) Priority of the policy. Lower value indicates higher priority.
    provisioningStatus String
    (String) The provisioning status of this policy.
    rules List<GetIsLbListenerPolicyRule>
    (List) The rules for this policy. Nested scheme for rules:
    targets List<GetIsLbListenerPolicyTarget>
    (List) -If action is forward_to_pool, the response is a LoadBalancerPoolReference-If action is forward_to_listener, specify a LoadBalancerListenerIdentity in this load balancer to forward to.- If actionisredirect, the response is a LoadBalancerListenerPolicyRedirectURL- If actionishttps_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.
    lb string
    listener string
    (List) Nested scheme for listener:
    name string
    (String) The user-defined name for this load balancer pool.
    policyId string
    priority number
    (Integer) Priority of the policy. Lower value indicates higher priority.
    provisioningStatus string
    (String) The provisioning status of this policy.
    rules GetIsLbListenerPolicyRule[]
    (List) The rules for this policy. Nested scheme for rules:
    targets GetIsLbListenerPolicyTarget[]
    (List) -If action is forward_to_pool, the response is a LoadBalancerPoolReference-If action is forward_to_listener, specify a LoadBalancerListenerIdentity in this load balancer to forward to.- If actionisredirect, the response is a LoadBalancerListenerPolicyRedirectURL- If actionishttps_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.
    lb str
    listener str
    (List) Nested scheme for listener:
    name str
    (String) The user-defined name for this load balancer pool.
    policy_id str
    priority float
    (Integer) Priority of the policy. Lower value indicates higher priority.
    provisioning_status str
    (String) The provisioning status of this policy.
    rules Sequence[GetIsLbListenerPolicyRule]
    (List) The rules for this policy. Nested scheme for rules:
    targets Sequence[GetIsLbListenerPolicyTarget]
    (List) -If action is forward_to_pool, the response is a LoadBalancerPoolReference-If action is forward_to_listener, specify a LoadBalancerListenerIdentity in this load balancer to forward to.- If actionisredirect, the response is a LoadBalancerListenerPolicyRedirectURL- If actionishttps_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.
    lb String
    listener String
    (List) Nested scheme for listener:
    name String
    (String) The user-defined name for this load balancer pool.
    policyId String
    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_to_pool, the response is a LoadBalancerPoolReference-If action is forward_to_listener, specify a LoadBalancerListenerIdentity in this load balancer to forward to.- If actionisredirect, the response is a LoadBalancerListenerPolicyRedirectURL- If actionishttps_redirect, the response is a LoadBalancerListenerHTTPSRedirect. Nested scheme for target`:

    Supporting Types

    GetIsLbListenerPolicyRule

    Deleteds List<GetIsLbListenerPolicyRuleDeleted>
    (List) If present, this property indicates the referenced resource has been deleted and provides some 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 []GetIsLbListenerPolicyRuleDeleted
    (List) If present, this property indicates the referenced resource has been deleted and provides some 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<GetIsLbListenerPolicyRuleDeleted>
    (List) If present, this property indicates the referenced resource has been deleted and provides some 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 GetIsLbListenerPolicyRuleDeleted[]
    (List) If present, this property indicates the referenced resource has been deleted and provides some 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[GetIsLbListenerPolicyRuleDeleted]
    (List) If present, this property indicates the referenced resource has been deleted and provides some 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 provides some 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.

    GetIsLbListenerPolicyRuleDeleted

    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.

    GetIsLbListenerPolicyTarget

    Deleteds List<GetIsLbListenerPolicyTargetDeleted>
    (List) If present, this property indicates the referenced resource has been deleted and provides some 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<GetIsLbListenerPolicyTargetListener>
    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 []GetIsLbListenerPolicyTargetDeleted
    (List) If present, this property indicates the referenced resource has been deleted and provides some 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 []GetIsLbListenerPolicyTargetListener
    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<GetIsLbListenerPolicyTargetDeleted>
    (List) If present, this property indicates the referenced resource has been deleted and provides some 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<GetIsLbListenerPolicyTargetListener>
    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 GetIsLbListenerPolicyTargetDeleted[]
    (List) If present, this property indicates the referenced resource has been deleted and provides some 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 GetIsLbListenerPolicyTargetListener[]
    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[GetIsLbListenerPolicyTargetDeleted]
    (List) If present, this property indicates the referenced resource has been deleted and provides some 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[GetIsLbListenerPolicyTargetListener]
    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 provides some 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.

    GetIsLbListenerPolicyTargetDeleted

    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.

    GetIsLbListenerPolicyTargetListener

    Deleteds List<GetIsLbListenerPolicyTargetListenerDeleted>
    (List) If present, this property indicates the referenced resource has been deleted and provides some 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 []GetIsLbListenerPolicyTargetListenerDeleted
    (List) If present, this property indicates the referenced resource has been deleted and provides some 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<GetIsLbListenerPolicyTargetListenerDeleted>
    (List) If present, this property indicates the referenced resource has been deleted and provides some 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 GetIsLbListenerPolicyTargetListenerDeleted[]
    (List) If present, this property indicates the referenced resource has been deleted and provides some 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[GetIsLbListenerPolicyTargetListenerDeleted]
    (List) If present, this property indicates the referenced resource has been deleted and provides some 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 provides some 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.

    GetIsLbListenerPolicyTargetListenerDeleted

    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