1. Packages
  2. Packages
  3. Volcenginecc Provider
  4. API Docs
  5. kafka
  6. AllowList
Viewing docs for volcenginecc v0.0.32
published on Thursday, Apr 23, 2026 by Volcengine
volcenginecc logo
Viewing docs for volcenginecc v0.0.32
published on Thursday, Apr 23, 2026 by Volcengine

    When creating a Kafka instance, you can bind an allowlist as needed. After binding the allowlist to the Kafka instance, only IP addresses and address ranges specified in the allowlist can access the Kafka message queue instance. For security, we recommend creating an allowlist and adding the client IP address or IP address range to the Kafka instance’s allowlist. Regularly maintain and manage the allowlist to enhance the security of Kafka instance access

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcenginecc from "@pulumi/volcenginecc";
    
    const kafkaAllowListDemo = new volcenginecc.index.KafkaAllowlist("KafkaAllowListDemo", {
        allowList: "127.0.0.2",
        allowListDesc: "test",
        allowListName: "ccapi-text",
        associatedInstances: [
            {
                instanceId: "kafka-cnng9x9s***",
            },
            {
                instanceId: "kafka-cnnghf99**",
            },
        ],
        applyInstanceNum: 2,
    });
    
    import pulumi
    import pulumi_volcenginecc as volcenginecc
    
    kafka_allow_list_demo = volcenginecc.index.KafkaAllowlist("KafkaAllowListDemo",
        allow_list=127.0.0.2,
        allow_list_desc=test,
        allow_list_name=ccapi-text,
        associated_instances=[
            {
                instanceId: kafka-cnng9x9s***,
            },
            {
                instanceId: kafka-cnnghf99**,
            },
        ],
        apply_instance_num=2)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcenginecc/sdk/go/volcenginecc"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := volcenginecc.NewKafkaAllowlist(ctx, "KafkaAllowListDemo", &volcenginecc.KafkaAllowlistArgs{
    			AllowList:     "127.0.0.2",
    			AllowListDesc: "test",
    			AllowListName: "ccapi-text",
    			AssociatedInstances: []map[string]interface{}{
    				map[string]interface{}{
    					"instanceId": "kafka-cnng9x9s***",
    				},
    				map[string]interface{}{
    					"instanceId": "kafka-cnnghf99**",
    				},
    			},
    			ApplyInstanceNum: 2,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcenginecc = Pulumi.Volcenginecc;
    
    return await Deployment.RunAsync(() => 
    {
        var kafkaAllowListDemo = new Volcenginecc.Index.KafkaAllowlist("KafkaAllowListDemo", new()
        {
            AllowList = "127.0.0.2",
            AllowListDesc = "test",
            AllowListName = "ccapi-text",
            AssociatedInstances = new[]
            {
                
                {
                    { "instanceId", "kafka-cnng9x9s***" },
                },
                
                {
                    { "instanceId", "kafka-cnnghf99**" },
                },
            },
            ApplyInstanceNum = 2,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcenginecc.kafkaAllowlist;
    import com.pulumi.volcenginecc.kafkaAllowlistArgs;
    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 kafkaAllowListDemo = new KafkaAllowlist("kafkaAllowListDemo", KafkaAllowlistArgs.builder()
                .allowList("127.0.0.2")
                .allowListDesc("test")
                .allowListName("ccapi-text")
                .associatedInstances(List.of(            
                    Map.of("instanceId", "kafka-cnng9x9s***"),
                    Map.of("instanceId", "kafka-cnnghf99**")))
                .applyInstanceNum(2)
                .build());
    
        }
    }
    
    resources:
      kafkaAllowListDemo:
        type: volcenginecc:kafkaAllowlist
        name: KafkaAllowListDemo
        properties:
          allowList: 127.0.0.2
          allowListDesc: test
          allowListName: ccapi-text
          associatedInstances:
            - instanceId: kafka-cnng9x9s***
            - instanceId: kafka-cnnghf99**
          applyInstanceNum: 2
    

    Create AllowList Resource

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

    Constructor syntax

    new AllowList(name: string, args: AllowListArgs, opts?: CustomResourceOptions);
    @overload
    def AllowList(resource_name: str,
                  args: AllowListArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def AllowList(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  allow_list: Optional[str] = None,
                  allow_list_name: Optional[str] = None,
                  allow_list_desc: Optional[str] = None,
                  apply_instance_num: Optional[int] = None,
                  associated_instances: Optional[Sequence[AllowListAssociatedInstanceArgs]] = None)
    func NewAllowList(ctx *Context, name string, args AllowListArgs, opts ...ResourceOption) (*AllowList, error)
    public AllowList(string name, AllowListArgs args, CustomResourceOptions? opts = null)
    public AllowList(String name, AllowListArgs args)
    public AllowList(String name, AllowListArgs args, CustomResourceOptions options)
    
    type: volcenginecc:kafka:AllowList
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

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

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

    AllowListName string
    Allowlist rule name. Length: 1–128 characters. Can only contain Chinese characters, letters, numbers, underscores, and hyphens (-). Cannot start with a number or hyphen (-). The allowlist name must be unique within the current region
    AllowListValue string
    Allowlist rule list. Supports specifying IP addresses or IP ranges. Separate multiple IP addresses or ranges with commas (,). Each allowlist can contain up to 300 IP addresses or ranges
    AllowListDesc string
    Allowlist description. Maximum length: 200 characters
    ApplyInstanceNum int
    Number of instances already bound to this allowlist. If the AllowList parameter is specified, this field is required to indicate the expected number of instances affected after rule modification. If the expected number does not match the actual number, the request fails
    AssociatedInstances List<Volcengine.AllowListAssociatedInstance>
    AllowList string
    Allowlist rule list. Supports specifying IP addresses or IP ranges. Separate multiple IP addresses or ranges with commas (,). Each allowlist can contain up to 300 IP addresses or ranges
    AllowListName string
    Allowlist rule name. Length: 1–128 characters. Can only contain Chinese characters, letters, numbers, underscores, and hyphens (-). Cannot start with a number or hyphen (-). The allowlist name must be unique within the current region
    AllowListDesc string
    Allowlist description. Maximum length: 200 characters
    ApplyInstanceNum int
    Number of instances already bound to this allowlist. If the AllowList parameter is specified, this field is required to indicate the expected number of instances affected after rule modification. If the expected number does not match the actual number, the request fails
    AssociatedInstances []AllowListAssociatedInstanceArgs
    allowList String
    Allowlist rule list. Supports specifying IP addresses or IP ranges. Separate multiple IP addresses or ranges with commas (,). Each allowlist can contain up to 300 IP addresses or ranges
    allowListName String
    Allowlist rule name. Length: 1–128 characters. Can only contain Chinese characters, letters, numbers, underscores, and hyphens (-). Cannot start with a number or hyphen (-). The allowlist name must be unique within the current region
    allowListDesc String
    Allowlist description. Maximum length: 200 characters
    applyInstanceNum Integer
    Number of instances already bound to this allowlist. If the AllowList parameter is specified, this field is required to indicate the expected number of instances affected after rule modification. If the expected number does not match the actual number, the request fails
    associatedInstances List<AllowListAssociatedInstance>
    allowList string
    Allowlist rule list. Supports specifying IP addresses or IP ranges. Separate multiple IP addresses or ranges with commas (,). Each allowlist can contain up to 300 IP addresses or ranges
    allowListName string
    Allowlist rule name. Length: 1–128 characters. Can only contain Chinese characters, letters, numbers, underscores, and hyphens (-). Cannot start with a number or hyphen (-). The allowlist name must be unique within the current region
    allowListDesc string
    Allowlist description. Maximum length: 200 characters
    applyInstanceNum number
    Number of instances already bound to this allowlist. If the AllowList parameter is specified, this field is required to indicate the expected number of instances affected after rule modification. If the expected number does not match the actual number, the request fails
    associatedInstances AllowListAssociatedInstance[]
    allow_list str
    Allowlist rule list. Supports specifying IP addresses or IP ranges. Separate multiple IP addresses or ranges with commas (,). Each allowlist can contain up to 300 IP addresses or ranges
    allow_list_name str
    Allowlist rule name. Length: 1–128 characters. Can only contain Chinese characters, letters, numbers, underscores, and hyphens (-). Cannot start with a number or hyphen (-). The allowlist name must be unique within the current region
    allow_list_desc str
    Allowlist description. Maximum length: 200 characters
    apply_instance_num int
    Number of instances already bound to this allowlist. If the AllowList parameter is specified, this field is required to indicate the expected number of instances affected after rule modification. If the expected number does not match the actual number, the request fails
    associated_instances Sequence[AllowListAssociatedInstanceArgs]
    allowList String
    Allowlist rule list. Supports specifying IP addresses or IP ranges. Separate multiple IP addresses or ranges with commas (,). Each allowlist can contain up to 300 IP addresses or ranges
    allowListName String
    Allowlist rule name. Length: 1–128 characters. Can only contain Chinese characters, letters, numbers, underscores, and hyphens (-). Cannot start with a number or hyphen (-). The allowlist name must be unique within the current region
    allowListDesc String
    Allowlist description. Maximum length: 200 characters
    applyInstanceNum Number
    Number of instances already bound to this allowlist. If the AllowList parameter is specified, this field is required to indicate the expected number of instances affected after rule modification. If the expected number does not match the actual number, the request fails
    associatedInstances List<Property Map>

    Outputs

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

    AllowListId string
    Allowlist ID
    AllowListIpNum int
    Number of rules specified in the allowlist
    AssociatedInstanceNum int
    Number of instances bound to the allowlist
    Id string
    The provider-assigned unique ID for this managed resource.
    AllowListId string
    Allowlist ID
    AllowListIpNum int
    Number of rules specified in the allowlist
    AssociatedInstanceNum int
    Number of instances bound to the allowlist
    Id string
    The provider-assigned unique ID for this managed resource.
    allowListId String
    Allowlist ID
    allowListIpNum Integer
    Number of rules specified in the allowlist
    associatedInstanceNum Integer
    Number of instances bound to the allowlist
    id String
    The provider-assigned unique ID for this managed resource.
    allowListId string
    Allowlist ID
    allowListIpNum number
    Number of rules specified in the allowlist
    associatedInstanceNum number
    Number of instances bound to the allowlist
    id string
    The provider-assigned unique ID for this managed resource.
    allow_list_id str
    Allowlist ID
    allow_list_ip_num int
    Number of rules specified in the allowlist
    associated_instance_num int
    Number of instances bound to the allowlist
    id str
    The provider-assigned unique ID for this managed resource.
    allowListId String
    Allowlist ID
    allowListIpNum Number
    Number of rules specified in the allowlist
    associatedInstanceNum Number
    Number of instances bound to the allowlist
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing AllowList Resource

    Get an existing AllowList 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?: AllowListState, opts?: CustomResourceOptions): AllowList
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            allow_list: Optional[str] = None,
            allow_list_desc: Optional[str] = None,
            allow_list_id: Optional[str] = None,
            allow_list_ip_num: Optional[int] = None,
            allow_list_name: Optional[str] = None,
            apply_instance_num: Optional[int] = None,
            associated_instance_num: Optional[int] = None,
            associated_instances: Optional[Sequence[AllowListAssociatedInstanceArgs]] = None) -> AllowList
    func GetAllowList(ctx *Context, name string, id IDInput, state *AllowListState, opts ...ResourceOption) (*AllowList, error)
    public static AllowList Get(string name, Input<string> id, AllowListState? state, CustomResourceOptions? opts = null)
    public static AllowList get(String name, Output<String> id, AllowListState state, CustomResourceOptions options)
    resources:  _:    type: volcenginecc:kafka:AllowList    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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:
    AllowListDesc string
    Allowlist description. Maximum length: 200 characters
    AllowListId string
    Allowlist ID
    AllowListIpNum int
    Number of rules specified in the allowlist
    AllowListName string
    Allowlist rule name. Length: 1–128 characters. Can only contain Chinese characters, letters, numbers, underscores, and hyphens (-). Cannot start with a number or hyphen (-). The allowlist name must be unique within the current region
    AllowListValue string
    Allowlist rule list. Supports specifying IP addresses or IP ranges. Separate multiple IP addresses or ranges with commas (,). Each allowlist can contain up to 300 IP addresses or ranges
    ApplyInstanceNum int
    Number of instances already bound to this allowlist. If the AllowList parameter is specified, this field is required to indicate the expected number of instances affected after rule modification. If the expected number does not match the actual number, the request fails
    AssociatedInstanceNum int
    Number of instances bound to the allowlist
    AssociatedInstances List<Volcengine.AllowListAssociatedInstance>
    AllowList string
    Allowlist rule list. Supports specifying IP addresses or IP ranges. Separate multiple IP addresses or ranges with commas (,). Each allowlist can contain up to 300 IP addresses or ranges
    AllowListDesc string
    Allowlist description. Maximum length: 200 characters
    AllowListId string
    Allowlist ID
    AllowListIpNum int
    Number of rules specified in the allowlist
    AllowListName string
    Allowlist rule name. Length: 1–128 characters. Can only contain Chinese characters, letters, numbers, underscores, and hyphens (-). Cannot start with a number or hyphen (-). The allowlist name must be unique within the current region
    ApplyInstanceNum int
    Number of instances already bound to this allowlist. If the AllowList parameter is specified, this field is required to indicate the expected number of instances affected after rule modification. If the expected number does not match the actual number, the request fails
    AssociatedInstanceNum int
    Number of instances bound to the allowlist
    AssociatedInstances []AllowListAssociatedInstanceArgs
    allowList String
    Allowlist rule list. Supports specifying IP addresses or IP ranges. Separate multiple IP addresses or ranges with commas (,). Each allowlist can contain up to 300 IP addresses or ranges
    allowListDesc String
    Allowlist description. Maximum length: 200 characters
    allowListId String
    Allowlist ID
    allowListIpNum Integer
    Number of rules specified in the allowlist
    allowListName String
    Allowlist rule name. Length: 1–128 characters. Can only contain Chinese characters, letters, numbers, underscores, and hyphens (-). Cannot start with a number or hyphen (-). The allowlist name must be unique within the current region
    applyInstanceNum Integer
    Number of instances already bound to this allowlist. If the AllowList parameter is specified, this field is required to indicate the expected number of instances affected after rule modification. If the expected number does not match the actual number, the request fails
    associatedInstanceNum Integer
    Number of instances bound to the allowlist
    associatedInstances List<AllowListAssociatedInstance>
    allowList string
    Allowlist rule list. Supports specifying IP addresses or IP ranges. Separate multiple IP addresses or ranges with commas (,). Each allowlist can contain up to 300 IP addresses or ranges
    allowListDesc string
    Allowlist description. Maximum length: 200 characters
    allowListId string
    Allowlist ID
    allowListIpNum number
    Number of rules specified in the allowlist
    allowListName string
    Allowlist rule name. Length: 1–128 characters. Can only contain Chinese characters, letters, numbers, underscores, and hyphens (-). Cannot start with a number or hyphen (-). The allowlist name must be unique within the current region
    applyInstanceNum number
    Number of instances already bound to this allowlist. If the AllowList parameter is specified, this field is required to indicate the expected number of instances affected after rule modification. If the expected number does not match the actual number, the request fails
    associatedInstanceNum number
    Number of instances bound to the allowlist
    associatedInstances AllowListAssociatedInstance[]
    allow_list str
    Allowlist rule list. Supports specifying IP addresses or IP ranges. Separate multiple IP addresses or ranges with commas (,). Each allowlist can contain up to 300 IP addresses or ranges
    allow_list_desc str
    Allowlist description. Maximum length: 200 characters
    allow_list_id str
    Allowlist ID
    allow_list_ip_num int
    Number of rules specified in the allowlist
    allow_list_name str
    Allowlist rule name. Length: 1–128 characters. Can only contain Chinese characters, letters, numbers, underscores, and hyphens (-). Cannot start with a number or hyphen (-). The allowlist name must be unique within the current region
    apply_instance_num int
    Number of instances already bound to this allowlist. If the AllowList parameter is specified, this field is required to indicate the expected number of instances affected after rule modification. If the expected number does not match the actual number, the request fails
    associated_instance_num int
    Number of instances bound to the allowlist
    associated_instances Sequence[AllowListAssociatedInstanceArgs]
    allowList String
    Allowlist rule list. Supports specifying IP addresses or IP ranges. Separate multiple IP addresses or ranges with commas (,). Each allowlist can contain up to 300 IP addresses or ranges
    allowListDesc String
    Allowlist description. Maximum length: 200 characters
    allowListId String
    Allowlist ID
    allowListIpNum Number
    Number of rules specified in the allowlist
    allowListName String
    Allowlist rule name. Length: 1–128 characters. Can only contain Chinese characters, letters, numbers, underscores, and hyphens (-). Cannot start with a number or hyphen (-). The allowlist name must be unique within the current region
    applyInstanceNum Number
    Number of instances already bound to this allowlist. If the AllowList parameter is specified, this field is required to indicate the expected number of instances affected after rule modification. If the expected number does not match the actual number, the request fails
    associatedInstanceNum Number
    Number of instances bound to the allowlist
    associatedInstances List<Property Map>

    Supporting Types

    AllowListAssociatedInstance, AllowListAssociatedInstanceArgs

    InstanceId string
    ID of the instance bound to the allowlist
    InstanceId string
    ID of the instance bound to the allowlist
    instanceId String
    ID of the instance bound to the allowlist
    instanceId string
    ID of the instance bound to the allowlist
    instance_id str
    ID of the instance bound to the allowlist
    instanceId String
    ID of the instance bound to the allowlist

    Import

    $ pulumi import volcenginecc:kafka/allowList:AllowList example "allow_list_id"
    

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

    Package Details

    Repository
    volcenginecc volcengine/pulumi-volcenginecc
    License
    MPL-2.0
    Notes
    This Pulumi package is based on the volcenginecc Terraform Provider.
    volcenginecc logo
    Viewing docs for volcenginecc v0.0.32
    published on Thursday, Apr 23, 2026 by Volcengine
      Try Pulumi Cloud free. Your team will thank you.