1. Packages
  2. Ibm Provider
  3. API Docs
  4. IsLbListenerPolicyRule
ibm 1.77.1 published on Monday, Apr 14, 2025 by ibm-cloud

ibm.IsLbListenerPolicyRule

Explore with Pulumi AI

Create, update, or delete a VPC load balancer listener policy rule. For more information, about load balancer listener policy and rules, see layer 7 load balancing policies and rules.

Note: VPC infrastructure services are a regional specific based endpoint, by default targets to us-south. Please make sure to target right region in the provider block as shown in the provider.tf file, if VPC service is created in region other than us-south.

provider.tf

import * as pulumi from "@pulumi/pulumi";
Copy
import pulumi
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;

return await Deployment.RunAsync(() => 
{
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
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) {
    }
}
Copy
{}
Copy

Example Usage

Sample to create a load balancer listener policy rule, along with lb and lb listener.

import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";

const exampleIsLb = new ibm.IsLb("exampleIsLb", {subnets: [ibm_is_subnet.example.id]});
const exampleIsLbListener = new ibm.IsLbListener("exampleIsLbListener", {
    lb: exampleIsLb.isLbId,
    port: 9086,
    protocol: "http",
});
const exampleIsLbListenerPolicy = new ibm.IsLbListenerPolicy("exampleIsLbListenerPolicy", {
    lb: exampleIsLb.isLbId,
    listener: exampleIsLbListener.listenerId,
    action: "redirect",
    priority: 2,
    targetHttpStatusCode: 302,
    targetUrl: "https://www.redirect.com",
    rules: [{
        condition: "contains",
        type: "header",
        field: "1",
        value: "2",
    }],
});
const exampleIsLbListenerPolicyRule = new ibm.IsLbListenerPolicyRule("exampleIsLbListenerPolicyRule", {
    lb: exampleIsLb.isLbId,
    listener: exampleIsLbListener.listenerId,
    policy: exampleIsLbListenerPolicy.policyId,
    condition: "equals",
    type: "header",
    field: "MY-APP-HEADER",
    value: "New-value",
});
Copy
import pulumi
import pulumi_ibm as ibm

example_is_lb = ibm.IsLb("exampleIsLb", subnets=[ibm_is_subnet["example"]["id"]])
example_is_lb_listener = ibm.IsLbListener("exampleIsLbListener",
    lb=example_is_lb.is_lb_id,
    port=9086,
    protocol="http")
example_is_lb_listener_policy = ibm.IsLbListenerPolicy("exampleIsLbListenerPolicy",
    lb=example_is_lb.is_lb_id,
    listener=example_is_lb_listener.listener_id,
    action="redirect",
    priority=2,
    target_http_status_code=302,
    target_url="https://www.redirect.com",
    rules=[{
        "condition": "contains",
        "type": "header",
        "field": "1",
        "value": "2",
    }])
example_is_lb_listener_policy_rule = ibm.IsLbListenerPolicyRule("exampleIsLbListenerPolicyRule",
    lb=example_is_lb.is_lb_id,
    listener=example_is_lb_listener.listener_id,
    policy=example_is_lb_listener_policy.policy_id,
    condition="equals",
    type="header",
    field="MY-APP-HEADER",
    value="New-value")
Copy
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 {
		exampleIsLb, err := ibm.NewIsLb(ctx, "exampleIsLb", &ibm.IsLbArgs{
			Subnets: pulumi.StringArray{
				ibm_is_subnet.Example.Id,
			},
		})
		if err != nil {
			return err
		}
		exampleIsLbListener, err := ibm.NewIsLbListener(ctx, "exampleIsLbListener", &ibm.IsLbListenerArgs{
			Lb:       exampleIsLb.IsLbId,
			Port:     pulumi.Float64(9086),
			Protocol: pulumi.String("http"),
		})
		if err != nil {
			return err
		}
		exampleIsLbListenerPolicy, err := ibm.NewIsLbListenerPolicy(ctx, "exampleIsLbListenerPolicy", &ibm.IsLbListenerPolicyArgs{
			Lb:                   exampleIsLb.IsLbId,
			Listener:             exampleIsLbListener.ListenerId,
			Action:               pulumi.String("redirect"),
			Priority:             pulumi.Float64(2),
			TargetHttpStatusCode: pulumi.Float64(302),
			TargetUrl:            pulumi.String("https://www.redirect.com"),
			Rules: ibm.IsLbListenerPolicyRuleTypeArray{
				&ibm.IsLbListenerPolicyRuleTypeArgs{
					Condition: pulumi.String("contains"),
					Type:      pulumi.String("header"),
					Field:     pulumi.String("1"),
					Value:     pulumi.String("2"),
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = ibm.NewIsLbListenerPolicyRule(ctx, "exampleIsLbListenerPolicyRule", &ibm.IsLbListenerPolicyRuleArgs{
			Lb:        exampleIsLb.IsLbId,
			Listener:  exampleIsLbListener.ListenerId,
			Policy:    exampleIsLbListenerPolicy.PolicyId,
			Condition: pulumi.String("equals"),
			Type:      pulumi.String("header"),
			Field:     pulumi.String("MY-APP-HEADER"),
			Value:     pulumi.String("New-value"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;

return await Deployment.RunAsync(() => 
{
    var exampleIsLb = new Ibm.IsLb("exampleIsLb", new()
    {
        Subnets = new[]
        {
            ibm_is_subnet.Example.Id,
        },
    });

    var exampleIsLbListener = new Ibm.IsLbListener("exampleIsLbListener", new()
    {
        Lb = exampleIsLb.IsLbId,
        Port = 9086,
        Protocol = "http",
    });

    var exampleIsLbListenerPolicy = new Ibm.IsLbListenerPolicy("exampleIsLbListenerPolicy", new()
    {
        Lb = exampleIsLb.IsLbId,
        Listener = exampleIsLbListener.ListenerId,
        Action = "redirect",
        Priority = 2,
        TargetHttpStatusCode = 302,
        TargetUrl = "https://www.redirect.com",
        Rules = new[]
        {
            new Ibm.Inputs.IsLbListenerPolicyRuleArgs
            {
                Condition = "contains",
                Type = "header",
                Field = "1",
                Value = "2",
            },
        },
    });

    var exampleIsLbListenerPolicyRule = new Ibm.IsLbListenerPolicyRule("exampleIsLbListenerPolicyRule", new()
    {
        Lb = exampleIsLb.IsLbId,
        Listener = exampleIsLbListener.ListenerId,
        Policy = exampleIsLbListenerPolicy.PolicyId,
        Condition = "equals",
        Type = "header",
        Field = "MY-APP-HEADER",
        Value = "New-value",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.IsLb;
import com.pulumi.ibm.IsLbArgs;
import com.pulumi.ibm.IsLbListener;
import com.pulumi.ibm.IsLbListenerArgs;
import com.pulumi.ibm.IsLbListenerPolicy;
import com.pulumi.ibm.IsLbListenerPolicyArgs;
import com.pulumi.ibm.inputs.IsLbListenerPolicyRuleArgs;
import com.pulumi.ibm.IsLbListenerPolicyRule;
import com.pulumi.ibm.IsLbListenerPolicyRuleArgs;
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) {
        var exampleIsLb = new IsLb("exampleIsLb", IsLbArgs.builder()
            .subnets(ibm_is_subnet.example().id())
            .build());

        var exampleIsLbListener = new IsLbListener("exampleIsLbListener", IsLbListenerArgs.builder()
            .lb(exampleIsLb.isLbId())
            .port("9086")
            .protocol("http")
            .build());

        var exampleIsLbListenerPolicy = new IsLbListenerPolicy("exampleIsLbListenerPolicy", IsLbListenerPolicyArgs.builder()
            .lb(exampleIsLb.isLbId())
            .listener(exampleIsLbListener.listenerId())
            .action("redirect")
            .priority(2)
            .targetHttpStatusCode(302)
            .targetUrl("https://www.redirect.com")
            .rules(IsLbListenerPolicyRuleArgs.builder()
                .condition("contains")
                .type("header")
                .field("1")
                .value("2")
                .build())
            .build());

        var exampleIsLbListenerPolicyRule = new IsLbListenerPolicyRule("exampleIsLbListenerPolicyRule", IsLbListenerPolicyRuleArgs.builder()
            .lb(exampleIsLb.isLbId())
            .listener(exampleIsLbListener.listenerId())
            .policy(exampleIsLbListenerPolicy.policyId())
            .condition("equals")
            .type("header")
            .field("MY-APP-HEADER")
            .value("New-value")
            .build());

    }
}
Copy
resources:
  exampleIsLb:
    type: ibm:IsLb
    properties:
      subnets:
        - ${ibm_is_subnet.example.id}
  exampleIsLbListener:
    type: ibm:IsLbListener
    properties:
      lb: ${exampleIsLb.isLbId}
      port: '9086'
      protocol: http
  exampleIsLbListenerPolicy:
    type: ibm:IsLbListenerPolicy
    properties:
      lb: ${exampleIsLb.isLbId}
      listener: ${exampleIsLbListener.listenerId}
      action: redirect
      priority: 2
      targetHttpStatusCode: 302
      targetUrl: https://www.redirect.com
      rules:
        - condition: contains
          type: header
          field: '1'
          value: '2'
  exampleIsLbListenerPolicyRule:
    type: ibm:IsLbListenerPolicyRule
    properties:
      lb: ${exampleIsLb.isLbId}
      listener: ${exampleIsLbListener.listenerId}
      policy: ${exampleIsLbListenerPolicy.policyId}
      condition: equals
      type: header
      field: MY-APP-HEADER
      value: New-value
Copy

Create IsLbListenerPolicyRule Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new IsLbListenerPolicyRule(name: string, args: IsLbListenerPolicyRuleArgs, opts?: CustomResourceOptions);
@overload
def IsLbListenerPolicyRule(resource_name: str,
                           args: IsLbListenerPolicyRuleInitArgs,
                           opts: Optional[ResourceOptions] = None)

@overload
def IsLbListenerPolicyRule(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           condition: Optional[str] = None,
                           lb: Optional[str] = None,
                           listener: Optional[str] = None,
                           policy: Optional[str] = None,
                           type: Optional[str] = None,
                           value: Optional[str] = None,
                           field: Optional[str] = None,
                           is_lb_listener_policy_rule_id: Optional[str] = None,
                           timeouts: Optional[IsLbListenerPolicyRuleTimeoutsArgs] = None)
func NewIsLbListenerPolicyRule(ctx *Context, name string, args IsLbListenerPolicyRuleArgs, opts ...ResourceOption) (*IsLbListenerPolicyRule, error)
public IsLbListenerPolicyRule(string name, IsLbListenerPolicyRuleArgs args, CustomResourceOptions? opts = null)
public IsLbListenerPolicyRule(String name, IsLbListenerPolicyRuleArgs args)
public IsLbListenerPolicyRule(String name, IsLbListenerPolicyRuleArgs args, CustomResourceOptions options)
type: ibm:IsLbListenerPolicyRule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. IsLbListenerPolicyRuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. IsLbListenerPolicyRuleInitArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. IsLbListenerPolicyRuleArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. IsLbListenerPolicyRuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. IsLbListenerPolicyRuleArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var isLbListenerPolicyRuleResource = new Ibm.IsLbListenerPolicyRule("isLbListenerPolicyRuleResource", new()
{
    Condition = "string",
    Lb = "string",
    Listener = "string",
    Policy = "string",
    Type = "string",
    Value = "string",
    Field = "string",
    IsLbListenerPolicyRuleId = "string",
    Timeouts = new Ibm.Inputs.IsLbListenerPolicyRuleTimeoutsArgs
    {
        Create = "string",
        Delete = "string",
        Update = "string",
    },
});
Copy
example, err := ibm.NewIsLbListenerPolicyRule(ctx, "isLbListenerPolicyRuleResource", &ibm.IsLbListenerPolicyRuleArgs{
Condition: pulumi.String("string"),
Lb: pulumi.String("string"),
Listener: pulumi.String("string"),
Policy: pulumi.String("string"),
Type: pulumi.String("string"),
Value: pulumi.String("string"),
Field: pulumi.String("string"),
IsLbListenerPolicyRuleId: pulumi.String("string"),
Timeouts: &.IsLbListenerPolicyRuleTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Update: pulumi.String("string"),
},
})
Copy
var isLbListenerPolicyRuleResource = new IsLbListenerPolicyRule("isLbListenerPolicyRuleResource", IsLbListenerPolicyRuleArgs.builder()
    .condition("string")
    .lb("string")
    .listener("string")
    .policy("string")
    .type("string")
    .value("string")
    .field("string")
    .isLbListenerPolicyRuleId("string")
    .timeouts(IsLbListenerPolicyRuleTimeoutsArgs.builder()
        .create("string")
        .delete("string")
        .update("string")
        .build())
    .build());
Copy
is_lb_listener_policy_rule_resource = ibm.IsLbListenerPolicyRule("isLbListenerPolicyRuleResource",
    condition="string",
    lb="string",
    listener="string",
    policy="string",
    type="string",
    value="string",
    field="string",
    is_lb_listener_policy_rule_id="string",
    timeouts={
        "create": "string",
        "delete": "string",
        "update": "string",
    })
Copy
const isLbListenerPolicyRuleResource = new ibm.IsLbListenerPolicyRule("isLbListenerPolicyRuleResource", {
    condition: "string",
    lb: "string",
    listener: "string",
    policy: "string",
    type: "string",
    value: "string",
    field: "string",
    isLbListenerPolicyRuleId: "string",
    timeouts: {
        create: "string",
        "delete": "string",
        update: "string",
    },
});
Copy
type: ibm:IsLbListenerPolicyRule
properties:
    condition: string
    field: string
    isLbListenerPolicyRuleId: string
    lb: string
    listener: string
    policy: string
    timeouts:
        create: string
        delete: string
        update: string
    type: string
    value: string
Copy

IsLbListenerPolicyRule Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The IsLbListenerPolicyRule resource accepts the following input properties:

Condition This property is required. string
The condition that you want to apply to your rule. Supported values are contains, equals, and matches_regex.
Lb This property is required. string
The ID of the load balancer for which you want to create a listener policy rule.
Listener This property is required. string
The ID of the load balancer listener for which you want to create a policy rule.
Policy This property is required. string
The ID of the load balancer listener policy for which you want to create a policy rule.
Type This property is required. string
The object where you want to apply the rule. Supported values are header, hostname, and path.
Value This property is required. string
The value that must match the rule condition. The value can be between 1 and 128 characters long. No.
Field string
If you set type to header, enter the HTTP header field where you want to apply the rule condition.
IsLbListenerPolicyRuleId string
(String) The ID of the load balancer listener policy rule. The ID is composed of <loadbalancer_ID>/<listener_ID>/<policy>ID>.
Timeouts IsLbListenerPolicyRuleTimeouts
Condition This property is required. string
The condition that you want to apply to your rule. Supported values are contains, equals, and matches_regex.
Lb This property is required. string
The ID of the load balancer for which you want to create a listener policy rule.
Listener This property is required. string
The ID of the load balancer listener for which you want to create a policy rule.
Policy This property is required. string
The ID of the load balancer listener policy for which you want to create a policy rule.
Type This property is required. string
The object where you want to apply the rule. Supported values are header, hostname, and path.
Value This property is required. string
The value that must match the rule condition. The value can be between 1 and 128 characters long. No.
Field string
If you set type to header, enter the HTTP header field where you want to apply the rule condition.
IsLbListenerPolicyRuleId string
(String) The ID of the load balancer listener policy rule. The ID is composed of <loadbalancer_ID>/<listener_ID>/<policy>ID>.
Timeouts IsLbListenerPolicyRuleTimeoutsArgs
condition This property is required. String
The condition that you want to apply to your rule. Supported values are contains, equals, and matches_regex.
lb This property is required. String
The ID of the load balancer for which you want to create a listener policy rule.
listener This property is required. String
The ID of the load balancer listener for which you want to create a policy rule.
policy This property is required. String
The ID of the load balancer listener policy for which you want to create a policy rule.
type This property is required. String
The object where you want to apply the rule. Supported values are header, hostname, and path.
value This property is required. String
The value that must match the rule condition. The value can be between 1 and 128 characters long. No.
field String
If you set type to header, enter the HTTP header field where you want to apply the rule condition.
isLbListenerPolicyRuleId String
(String) The ID of the load balancer listener policy rule. The ID is composed of <loadbalancer_ID>/<listener_ID>/<policy>ID>.
timeouts IsLbListenerPolicyRuleTimeouts
condition This property is required. string
The condition that you want to apply to your rule. Supported values are contains, equals, and matches_regex.
lb This property is required. string
The ID of the load balancer for which you want to create a listener policy rule.
listener This property is required. string
The ID of the load balancer listener for which you want to create a policy rule.
policy This property is required. string
The ID of the load balancer listener policy for which you want to create a policy rule.
type This property is required. string
The object where you want to apply the rule. Supported values are header, hostname, and path.
value This property is required. string
The value that must match the rule condition. The value can be between 1 and 128 characters long. No.
field string
If you set type to header, enter the HTTP header field where you want to apply the rule condition.
isLbListenerPolicyRuleId string
(String) The ID of the load balancer listener policy rule. The ID is composed of <loadbalancer_ID>/<listener_ID>/<policy>ID>.
timeouts IsLbListenerPolicyRuleTimeouts
condition This property is required. str
The condition that you want to apply to your rule. Supported values are contains, equals, and matches_regex.
lb This property is required. str
The ID of the load balancer for which you want to create a listener policy rule.
listener This property is required. str
The ID of the load balancer listener for which you want to create a policy rule.
policy This property is required. str
The ID of the load balancer listener policy for which you want to create a policy rule.
type This property is required. str
The object where you want to apply the rule. Supported values are header, hostname, and path.
value This property is required. str
The value that must match the rule condition. The value can be between 1 and 128 characters long. No.
field str
If you set type to header, enter the HTTP header field where you want to apply the rule condition.
is_lb_listener_policy_rule_id str
(String) The ID of the load balancer listener policy rule. The ID is composed of <loadbalancer_ID>/<listener_ID>/<policy>ID>.
timeouts IsLbListenerPolicyRuleTimeoutsArgs
condition This property is required. String
The condition that you want to apply to your rule. Supported values are contains, equals, and matches_regex.
lb This property is required. String
The ID of the load balancer for which you want to create a listener policy rule.
listener This property is required. String
The ID of the load balancer listener for which you want to create a policy rule.
policy This property is required. String
The ID of the load balancer listener policy for which you want to create a policy rule.
type This property is required. String
The object where you want to apply the rule. Supported values are header, hostname, and path.
value This property is required. String
The value that must match the rule condition. The value can be between 1 and 128 characters long. No.
field String
If you set type to header, enter the HTTP header field where you want to apply the rule condition.
isLbListenerPolicyRuleId String
(String) The ID of the load balancer listener policy rule. The ID is composed of <loadbalancer_ID>/<listener_ID>/<policy>ID>.
timeouts Property Map

Outputs

All input properties are implicitly available as output properties. Additionally, the IsLbListenerPolicyRule resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
ProvisioningStatus string
RelatedCrn string
The crn of the LB resource
Rule string
(String) The ID of the rule.
Id string
The provider-assigned unique ID for this managed resource.
ProvisioningStatus string
RelatedCrn string
The crn of the LB resource
Rule string
(String) The ID of the rule.
id String
The provider-assigned unique ID for this managed resource.
provisioningStatus String
relatedCrn String
The crn of the LB resource
rule String
(String) The ID of the rule.
id string
The provider-assigned unique ID for this managed resource.
provisioningStatus string
relatedCrn string
The crn of the LB resource
rule string
(String) The ID of the rule.
id str
The provider-assigned unique ID for this managed resource.
provisioning_status str
related_crn str
The crn of the LB resource
rule str
(String) The ID of the rule.
id String
The provider-assigned unique ID for this managed resource.
provisioningStatus String
relatedCrn String
The crn of the LB resource
rule String
(String) The ID of the rule.

Look up Existing IsLbListenerPolicyRule Resource

Get an existing IsLbListenerPolicyRule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: IsLbListenerPolicyRuleState, opts?: CustomResourceOptions): IsLbListenerPolicyRule
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        condition: Optional[str] = None,
        field: Optional[str] = None,
        is_lb_listener_policy_rule_id: Optional[str] = None,
        lb: Optional[str] = None,
        listener: Optional[str] = None,
        policy: Optional[str] = None,
        provisioning_status: Optional[str] = None,
        related_crn: Optional[str] = None,
        rule: Optional[str] = None,
        timeouts: Optional[IsLbListenerPolicyRuleTimeoutsArgs] = None,
        type: Optional[str] = None,
        value: Optional[str] = None) -> IsLbListenerPolicyRule
func GetIsLbListenerPolicyRule(ctx *Context, name string, id IDInput, state *IsLbListenerPolicyRuleState, opts ...ResourceOption) (*IsLbListenerPolicyRule, error)
public static IsLbListenerPolicyRule Get(string name, Input<string> id, IsLbListenerPolicyRuleState? state, CustomResourceOptions? opts = null)
public static IsLbListenerPolicyRule get(String name, Output<String> id, IsLbListenerPolicyRuleState state, CustomResourceOptions options)
resources:  _:    type: ibm:IsLbListenerPolicyRule    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Condition string
The condition that you want to apply to your rule. Supported values are contains, equals, and matches_regex.
Field string
If you set type to header, enter the HTTP header field where you want to apply the rule condition.
IsLbListenerPolicyRuleId string
(String) The ID of the load balancer listener policy rule. The ID is composed of <loadbalancer_ID>/<listener_ID>/<policy>ID>.
Lb string
The ID of the load balancer for which you want to create a listener policy rule.
Listener string
The ID of the load balancer listener for which you want to create a policy rule.
Policy string
The ID of the load balancer listener policy for which you want to create a policy rule.
ProvisioningStatus string
RelatedCrn string
The crn of the LB resource
Rule string
(String) The ID of the rule.
Timeouts IsLbListenerPolicyRuleTimeouts
Type string
The object where you want to apply the rule. Supported values are header, hostname, and path.
Value string
The value that must match the rule condition. The value can be between 1 and 128 characters long. No.
Condition string
The condition that you want to apply to your rule. Supported values are contains, equals, and matches_regex.
Field string
If you set type to header, enter the HTTP header field where you want to apply the rule condition.
IsLbListenerPolicyRuleId string
(String) The ID of the load balancer listener policy rule. The ID is composed of <loadbalancer_ID>/<listener_ID>/<policy>ID>.
Lb string
The ID of the load balancer for which you want to create a listener policy rule.
Listener string
The ID of the load balancer listener for which you want to create a policy rule.
Policy string
The ID of the load balancer listener policy for which you want to create a policy rule.
ProvisioningStatus string
RelatedCrn string
The crn of the LB resource
Rule string
(String) The ID of the rule.
Timeouts IsLbListenerPolicyRuleTimeoutsArgs
Type string
The object where you want to apply the rule. Supported values are header, hostname, and path.
Value string
The value that must match the rule condition. The value can be between 1 and 128 characters long. No.
condition String
The condition that you want to apply to your rule. Supported values are contains, equals, and matches_regex.
field String
If you set type to header, enter the HTTP header field where you want to apply the rule condition.
isLbListenerPolicyRuleId String
(String) The ID of the load balancer listener policy rule. The ID is composed of <loadbalancer_ID>/<listener_ID>/<policy>ID>.
lb String
The ID of the load balancer for which you want to create a listener policy rule.
listener String
The ID of the load balancer listener for which you want to create a policy rule.
policy String
The ID of the load balancer listener policy for which you want to create a policy rule.
provisioningStatus String
relatedCrn String
The crn of the LB resource
rule String
(String) The ID of the rule.
timeouts IsLbListenerPolicyRuleTimeouts
type String
The object where you want to apply the rule. Supported values are header, hostname, and path.
value String
The value that must match the rule condition. The value can be between 1 and 128 characters long. No.
condition string
The condition that you want to apply to your rule. Supported values are contains, equals, and matches_regex.
field string
If you set type to header, enter the HTTP header field where you want to apply the rule condition.
isLbListenerPolicyRuleId string
(String) The ID of the load balancer listener policy rule. The ID is composed of <loadbalancer_ID>/<listener_ID>/<policy>ID>.
lb string
The ID of the load balancer for which you want to create a listener policy rule.
listener string
The ID of the load balancer listener for which you want to create a policy rule.
policy string
The ID of the load balancer listener policy for which you want to create a policy rule.
provisioningStatus string
relatedCrn string
The crn of the LB resource
rule string
(String) The ID of the rule.
timeouts IsLbListenerPolicyRuleTimeouts
type string
The object where you want to apply the rule. Supported values are header, hostname, and path.
value string
The value that must match the rule condition. The value can be between 1 and 128 characters long. No.
condition str
The condition that you want to apply to your rule. Supported values are contains, equals, and matches_regex.
field str
If you set type to header, enter the HTTP header field where you want to apply the rule condition.
is_lb_listener_policy_rule_id str
(String) The ID of the load balancer listener policy rule. The ID is composed of <loadbalancer_ID>/<listener_ID>/<policy>ID>.
lb str
The ID of the load balancer for which you want to create a listener policy rule.
listener str
The ID of the load balancer listener for which you want to create a policy rule.
policy str
The ID of the load balancer listener policy for which you want to create a policy rule.
provisioning_status str
related_crn str
The crn of the LB resource
rule str
(String) The ID of the rule.
timeouts IsLbListenerPolicyRuleTimeoutsArgs
type str
The object where you want to apply the rule. Supported values are header, hostname, and path.
value str
The value that must match the rule condition. The value can be between 1 and 128 characters long. No.
condition String
The condition that you want to apply to your rule. Supported values are contains, equals, and matches_regex.
field String
If you set type to header, enter the HTTP header field where you want to apply the rule condition.
isLbListenerPolicyRuleId String
(String) The ID of the load balancer listener policy rule. The ID is composed of <loadbalancer_ID>/<listener_ID>/<policy>ID>.
lb String
The ID of the load balancer for which you want to create a listener policy rule.
listener String
The ID of the load balancer listener for which you want to create a policy rule.
policy String
The ID of the load balancer listener policy for which you want to create a policy rule.
provisioningStatus String
relatedCrn String
The crn of the LB resource
rule String
(String) The ID of the rule.
timeouts Property Map
type String
The object where you want to apply the rule. Supported values are header, hostname, and path.
value String
The value that must match the rule condition. The value can be between 1 and 128 characters long. No.

Supporting Types

IsLbListenerPolicyRuleTimeouts
, IsLbListenerPolicyRuleTimeoutsArgs

Create string
Delete string
Update string
Create string
Delete string
Update string
create String
delete String
update String
create string
delete string
update string
create str
delete str
update str
create String
delete String
update String

Import

The ibm_is_lb_listener_policy_rule resource can be imported by using lb_ID, listener_ID, policy_ID and rule_ID.

Syntax

$ pulumi import ibm:index/isLbListenerPolicyRule:IsLbListenerPolicyRule example <loadbalancer_ID>/<listener_ID>/<policy>ID>
Copy

Example

$ pulumi import ibm:index/isLbListenerPolicyRule:IsLbListenerPolicyRule example c1e3d5d3-8836-4328-b473-a90e0c9ba941/3ea13dc7-25b4-4c62-8cc7-0f7e092e7a8f/2161a3fb-123c-4a33-9a3d-b3154ef42009/356789523dc7-25b4-4c62-8cc7-0f7e092e7a8f
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
ibm ibm-cloud/terraform-provider-ibm
License
Notes
This Pulumi package is based on the ibm Terraform Provider.