1. Packages
  2. Opentelekomcloud Provider
  3. API Docs
  4. LbWhitelistV2
opentelekomcloud 1.36.35 published on Monday, Apr 14, 2025 by opentelekomcloud

opentelekomcloud.LbWhitelistV2

Explore with Pulumi AI

Up-to-date reference of API arguments for ELB whitelist you can get at documentation portal

Manages an Enhanced LB whitelist resource within OpenTelekomCloud.

Example Usage

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

const whitelist1 = new opentelekomcloud.LbWhitelistV2("whitelist1", {
    enableWhitelist: true,
    listenerId: "d9415786-5f1a-428b-b35f-2f1523e146d2",
    whitelist: "192.168.11.1,192.168.0.1/24,192.168.201.18/8",
});
Copy
import pulumi
import pulumi_opentelekomcloud as opentelekomcloud

whitelist1 = opentelekomcloud.LbWhitelistV2("whitelist1",
    enable_whitelist=True,
    listener_id="d9415786-5f1a-428b-b35f-2f1523e146d2",
    whitelist="192.168.11.1,192.168.0.1/24,192.168.201.18/8")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := opentelekomcloud.NewLbWhitelistV2(ctx, "whitelist1", &opentelekomcloud.LbWhitelistV2Args{
			EnableWhitelist: pulumi.Bool(true),
			ListenerId:      pulumi.String("d9415786-5f1a-428b-b35f-2f1523e146d2"),
			Whitelist:       pulumi.String("192.168.11.1,192.168.0.1/24,192.168.201.18/8"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Opentelekomcloud = Pulumi.Opentelekomcloud;

return await Deployment.RunAsync(() => 
{
    var whitelist1 = new Opentelekomcloud.LbWhitelistV2("whitelist1", new()
    {
        EnableWhitelist = true,
        ListenerId = "d9415786-5f1a-428b-b35f-2f1523e146d2",
        Whitelist = "192.168.11.1,192.168.0.1/24,192.168.201.18/8",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.opentelekomcloud.LbWhitelistV2;
import com.pulumi.opentelekomcloud.LbWhitelistV2Args;
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 whitelist1 = new LbWhitelistV2("whitelist1", LbWhitelistV2Args.builder()
            .enableWhitelist(true)
            .listenerId("d9415786-5f1a-428b-b35f-2f1523e146d2")
            .whitelist("192.168.11.1,192.168.0.1/24,192.168.201.18/8")
            .build());

    }
}
Copy
resources:
  whitelist1:
    type: opentelekomcloud:LbWhitelistV2
    properties:
      enableWhitelist: true
      listenerId: d9415786-5f1a-428b-b35f-2f1523e146d2
      whitelist: 192.168.11.1,192.168.0.1/24,192.168.201.18/8
Copy

Create LbWhitelistV2 Resource

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

Constructor syntax

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

@overload
def LbWhitelistV2(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  listener_id: Optional[str] = None,
                  enable_whitelist: Optional[bool] = None,
                  lb_whitelist_v2_id: Optional[str] = None,
                  tenant_id: Optional[str] = None,
                  whitelist: Optional[str] = None)
func NewLbWhitelistV2(ctx *Context, name string, args LbWhitelistV2Args, opts ...ResourceOption) (*LbWhitelistV2, error)
public LbWhitelistV2(string name, LbWhitelistV2Args args, CustomResourceOptions? opts = null)
public LbWhitelistV2(String name, LbWhitelistV2Args args)
public LbWhitelistV2(String name, LbWhitelistV2Args args, CustomResourceOptions options)
type: opentelekomcloud:LbWhitelistV2
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. LbWhitelistV2Args
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. LbWhitelistV2Args
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. LbWhitelistV2Args
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. LbWhitelistV2Args
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. LbWhitelistV2Args
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 lbWhitelistV2Resource = new Opentelekomcloud.LbWhitelistV2("lbWhitelistV2Resource", new()
{
    ListenerId = "string",
    EnableWhitelist = false,
    LbWhitelistV2Id = "string",
    TenantId = "string",
    Whitelist = "string",
});
Copy
example, err := opentelekomcloud.NewLbWhitelistV2(ctx, "lbWhitelistV2Resource", &opentelekomcloud.LbWhitelistV2Args{
ListenerId: pulumi.String("string"),
EnableWhitelist: pulumi.Bool(false),
LbWhitelistV2Id: pulumi.String("string"),
TenantId: pulumi.String("string"),
Whitelist: pulumi.String("string"),
})
Copy
var lbWhitelistV2Resource = new LbWhitelistV2("lbWhitelistV2Resource", LbWhitelistV2Args.builder()
    .listenerId("string")
    .enableWhitelist(false)
    .lbWhitelistV2Id("string")
    .tenantId("string")
    .whitelist("string")
    .build());
Copy
lb_whitelist_v2_resource = opentelekomcloud.LbWhitelistV2("lbWhitelistV2Resource",
    listener_id="string",
    enable_whitelist=False,
    lb_whitelist_v2_id="string",
    tenant_id="string",
    whitelist="string")
Copy
const lbWhitelistV2Resource = new opentelekomcloud.LbWhitelistV2("lbWhitelistV2Resource", {
    listenerId: "string",
    enableWhitelist: false,
    lbWhitelistV2Id: "string",
    tenantId: "string",
    whitelist: "string",
});
Copy
type: opentelekomcloud:LbWhitelistV2
properties:
    enableWhitelist: false
    lbWhitelistV2Id: string
    listenerId: string
    tenantId: string
    whitelist: string
Copy

LbWhitelistV2 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 LbWhitelistV2 resource accepts the following input properties:

ListenerId This property is required. string
The Listener ID that the whitelist will be associated with. Changing this creates a new whitelist.
EnableWhitelist bool
Specify whether to enable access control.
LbWhitelistV2Id string
The unique ID for the whitelist.
TenantId string
Required for admins. The UUID of the tenant who owns the whitelist. Only administrative users can specify a tenant UUID other than their own. Changing this creates a new whitelist.
Whitelist string
Specifies the IP addresses in the whitelist. Use commas(,) to separate the multiple IP addresses.
ListenerId This property is required. string
The Listener ID that the whitelist will be associated with. Changing this creates a new whitelist.
EnableWhitelist bool
Specify whether to enable access control.
LbWhitelistV2Id string
The unique ID for the whitelist.
TenantId string
Required for admins. The UUID of the tenant who owns the whitelist. Only administrative users can specify a tenant UUID other than their own. Changing this creates a new whitelist.
Whitelist string
Specifies the IP addresses in the whitelist. Use commas(,) to separate the multiple IP addresses.
listenerId This property is required. String
The Listener ID that the whitelist will be associated with. Changing this creates a new whitelist.
enableWhitelist Boolean
Specify whether to enable access control.
lbWhitelistV2Id String
The unique ID for the whitelist.
tenantId String
Required for admins. The UUID of the tenant who owns the whitelist. Only administrative users can specify a tenant UUID other than their own. Changing this creates a new whitelist.
whitelist String
Specifies the IP addresses in the whitelist. Use commas(,) to separate the multiple IP addresses.
listenerId This property is required. string
The Listener ID that the whitelist will be associated with. Changing this creates a new whitelist.
enableWhitelist boolean
Specify whether to enable access control.
lbWhitelistV2Id string
The unique ID for the whitelist.
tenantId string
Required for admins. The UUID of the tenant who owns the whitelist. Only administrative users can specify a tenant UUID other than their own. Changing this creates a new whitelist.
whitelist string
Specifies the IP addresses in the whitelist. Use commas(,) to separate the multiple IP addresses.
listener_id This property is required. str
The Listener ID that the whitelist will be associated with. Changing this creates a new whitelist.
enable_whitelist bool
Specify whether to enable access control.
lb_whitelist_v2_id str
The unique ID for the whitelist.
tenant_id str
Required for admins. The UUID of the tenant who owns the whitelist. Only administrative users can specify a tenant UUID other than their own. Changing this creates a new whitelist.
whitelist str
Specifies the IP addresses in the whitelist. Use commas(,) to separate the multiple IP addresses.
listenerId This property is required. String
The Listener ID that the whitelist will be associated with. Changing this creates a new whitelist.
enableWhitelist Boolean
Specify whether to enable access control.
lbWhitelistV2Id String
The unique ID for the whitelist.
tenantId String
Required for admins. The UUID of the tenant who owns the whitelist. Only administrative users can specify a tenant UUID other than their own. Changing this creates a new whitelist.
whitelist String
Specifies the IP addresses in the whitelist. Use commas(,) to separate the multiple IP addresses.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing LbWhitelistV2 Resource

Get an existing LbWhitelistV2 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?: LbWhitelistV2State, opts?: CustomResourceOptions): LbWhitelistV2
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        enable_whitelist: Optional[bool] = None,
        lb_whitelist_v2_id: Optional[str] = None,
        listener_id: Optional[str] = None,
        tenant_id: Optional[str] = None,
        whitelist: Optional[str] = None) -> LbWhitelistV2
func GetLbWhitelistV2(ctx *Context, name string, id IDInput, state *LbWhitelistV2State, opts ...ResourceOption) (*LbWhitelistV2, error)
public static LbWhitelistV2 Get(string name, Input<string> id, LbWhitelistV2State? state, CustomResourceOptions? opts = null)
public static LbWhitelistV2 get(String name, Output<String> id, LbWhitelistV2State state, CustomResourceOptions options)
resources:  _:    type: opentelekomcloud:LbWhitelistV2    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:
EnableWhitelist bool
Specify whether to enable access control.
LbWhitelistV2Id string
The unique ID for the whitelist.
ListenerId string
The Listener ID that the whitelist will be associated with. Changing this creates a new whitelist.
TenantId string
Required for admins. The UUID of the tenant who owns the whitelist. Only administrative users can specify a tenant UUID other than their own. Changing this creates a new whitelist.
Whitelist string
Specifies the IP addresses in the whitelist. Use commas(,) to separate the multiple IP addresses.
EnableWhitelist bool
Specify whether to enable access control.
LbWhitelistV2Id string
The unique ID for the whitelist.
ListenerId string
The Listener ID that the whitelist will be associated with. Changing this creates a new whitelist.
TenantId string
Required for admins. The UUID of the tenant who owns the whitelist. Only administrative users can specify a tenant UUID other than their own. Changing this creates a new whitelist.
Whitelist string
Specifies the IP addresses in the whitelist. Use commas(,) to separate the multiple IP addresses.
enableWhitelist Boolean
Specify whether to enable access control.
lbWhitelistV2Id String
The unique ID for the whitelist.
listenerId String
The Listener ID that the whitelist will be associated with. Changing this creates a new whitelist.
tenantId String
Required for admins. The UUID of the tenant who owns the whitelist. Only administrative users can specify a tenant UUID other than their own. Changing this creates a new whitelist.
whitelist String
Specifies the IP addresses in the whitelist. Use commas(,) to separate the multiple IP addresses.
enableWhitelist boolean
Specify whether to enable access control.
lbWhitelistV2Id string
The unique ID for the whitelist.
listenerId string
The Listener ID that the whitelist will be associated with. Changing this creates a new whitelist.
tenantId string
Required for admins. The UUID of the tenant who owns the whitelist. Only administrative users can specify a tenant UUID other than their own. Changing this creates a new whitelist.
whitelist string
Specifies the IP addresses in the whitelist. Use commas(,) to separate the multiple IP addresses.
enable_whitelist bool
Specify whether to enable access control.
lb_whitelist_v2_id str
The unique ID for the whitelist.
listener_id str
The Listener ID that the whitelist will be associated with. Changing this creates a new whitelist.
tenant_id str
Required for admins. The UUID of the tenant who owns the whitelist. Only administrative users can specify a tenant UUID other than their own. Changing this creates a new whitelist.
whitelist str
Specifies the IP addresses in the whitelist. Use commas(,) to separate the multiple IP addresses.
enableWhitelist Boolean
Specify whether to enable access control.
lbWhitelistV2Id String
The unique ID for the whitelist.
listenerId String
The Listener ID that the whitelist will be associated with. Changing this creates a new whitelist.
tenantId String
Required for admins. The UUID of the tenant who owns the whitelist. Only administrative users can specify a tenant UUID other than their own. Changing this creates a new whitelist.
whitelist String
Specifies the IP addresses in the whitelist. Use commas(,) to separate the multiple IP addresses.

Import

Load Balancer Whitelist can be imported using the Whitelist ID, e.g.:

$ pulumi import opentelekomcloud:index/lbWhitelistV2:LbWhitelistV2 this 8a7a79c2-cf17-4e65-b2ae-ddc8bfcf6c74
Copy

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

Package Details

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