1. Packages
  2. Bytepluscc Provider
  3. API Docs
  4. kafka
  5. AllowList
Viewing docs for bytepluscc v0.0.16
published on Monday, Mar 9, 2026 by Byteplus
bytepluscc logo
Viewing docs for bytepluscc v0.0.16
published on Monday, Mar 9, 2026 by Byteplus

    创建 Kafka 实例时,可以按需为其绑定白名单,绑定白名单与 Kafka 实例之后,仅配置在白名单中的 IP 地址与地址段才能访问消息队列 Kafka版实例。安全起见,建议您创建白名单,并将客户端的 IP 地址或 IP 地址段添加到 Kafka 实例的白名单中。建议您定期维护和管理白名单,提高 Kafka 实例访问的安全性。

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as bytepluscc from "@pulumi/bytepluscc";
    
    const kafkaAllowListDemo = new bytepluscc.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_bytepluscc as bytepluscc
    
    kafka_allow_list_demo = bytepluscc.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/byteplus-sdk/pulumi-bytepluscc/sdk/go/bytepluscc"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := bytepluscc.NewKafkaAllowlist(ctx, "KafkaAllowListDemo", &bytepluscc.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 Bytepluscc = Pulumi.Bytepluscc;
    
    return await Deployment.RunAsync(() => 
    {
        var kafkaAllowListDemo = new Bytepluscc.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.bytepluscc.kafkaAllowlist;
    import com.pulumi.bytepluscc.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: bytepluscc: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: bytepluscc: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.

    Constructor example

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

    var allowListResource = new Bytepluscc.Kafka.AllowList("allowListResource", new()
    {
        AllowListValue = "string",
        AllowListName = "string",
        AllowListDesc = "string",
        ApplyInstanceNum = 0,
        AssociatedInstances = new[]
        {
            new Bytepluscc.Kafka.Inputs.AllowListAssociatedInstanceArgs
            {
                InstanceId = "string",
            },
        },
    });
    
    example, err := kafka.NewAllowList(ctx, "allowListResource", &kafka.AllowListArgs{
    	AllowList:        pulumi.String("string"),
    	AllowListName:    pulumi.String("string"),
    	AllowListDesc:    pulumi.String("string"),
    	ApplyInstanceNum: pulumi.Int(0),
    	AssociatedInstances: kafka.AllowListAssociatedInstanceArray{
    		&kafka.AllowListAssociatedInstanceArgs{
    			InstanceId: pulumi.String("string"),
    		},
    	},
    })
    
    var allowListResource = new com.byteplus.bytepluscc.kafka.AllowList("allowListResource", com.byteplus.bytepluscc.kafka.AllowListArgs.builder()
        .allowList("string")
        .allowListName("string")
        .allowListDesc("string")
        .applyInstanceNum(0)
        .associatedInstances(AllowListAssociatedInstanceArgs.builder()
            .instanceId("string")
            .build())
        .build());
    
    allow_list_resource = bytepluscc.kafka.AllowList("allowListResource",
        allow_list="string",
        allow_list_name="string",
        allow_list_desc="string",
        apply_instance_num=0,
        associated_instances=[{
            "instance_id": "string",
        }])
    
    const allowListResource = new bytepluscc.kafka.AllowList("allowListResource", {
        allowList: "string",
        allowListName: "string",
        allowListDesc: "string",
        applyInstanceNum: 0,
        associatedInstances: [{
            instanceId: "string",
        }],
    });
    
    type: bytepluscc:kafka:AllowList
    properties:
        allowList: string
        allowListDesc: string
        allowListName: string
        applyInstanceNum: 0
        associatedInstances:
            - instanceId: string
    

    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
    白名单规则名称。长度为 1~128 个字符。只能包含中文、字母、数字、下划线和连字符(-)。不能以数字或连字符(-)开头。白名单名称在当前地域下唯一。
    AllowListValue string
    白名单规则列表。支持指定为 IP 地址或者 IP 网段。多个 IP 地址或网段之间使用英文逗号(,)分隔。每个白名单最多可配置 300 个 IP 地址或网段。
    AllowListDesc string
    白名单描述。长度不超过200个字符。
    ApplyInstanceNum int
    此白名单已绑定的实例数量。若指定 AllowList 参数,则此字段必填,用于指定规则修改后预期将会影响到的实例个数。若预期影响个数与实际影响个数不符,则请求失败。
    AssociatedInstances List<Byteplus.AllowListAssociatedInstance>
    AllowList string
    白名单规则列表。支持指定为 IP 地址或者 IP 网段。多个 IP 地址或网段之间使用英文逗号(,)分隔。每个白名单最多可配置 300 个 IP 地址或网段。
    AllowListName string
    白名单规则名称。长度为 1~128 个字符。只能包含中文、字母、数字、下划线和连字符(-)。不能以数字或连字符(-)开头。白名单名称在当前地域下唯一。
    AllowListDesc string
    白名单描述。长度不超过200个字符。
    ApplyInstanceNum int
    此白名单已绑定的实例数量。若指定 AllowList 参数,则此字段必填,用于指定规则修改后预期将会影响到的实例个数。若预期影响个数与实际影响个数不符,则请求失败。
    AssociatedInstances []AllowListAssociatedInstanceArgs
    allowList String
    白名单规则列表。支持指定为 IP 地址或者 IP 网段。多个 IP 地址或网段之间使用英文逗号(,)分隔。每个白名单最多可配置 300 个 IP 地址或网段。
    allowListName String
    白名单规则名称。长度为 1~128 个字符。只能包含中文、字母、数字、下划线和连字符(-)。不能以数字或连字符(-)开头。白名单名称在当前地域下唯一。
    allowListDesc String
    白名单描述。长度不超过200个字符。
    applyInstanceNum Integer
    此白名单已绑定的实例数量。若指定 AllowList 参数,则此字段必填,用于指定规则修改后预期将会影响到的实例个数。若预期影响个数与实际影响个数不符,则请求失败。
    associatedInstances List<AllowListAssociatedInstance>
    allowList string
    白名单规则列表。支持指定为 IP 地址或者 IP 网段。多个 IP 地址或网段之间使用英文逗号(,)分隔。每个白名单最多可配置 300 个 IP 地址或网段。
    allowListName string
    白名单规则名称。长度为 1~128 个字符。只能包含中文、字母、数字、下划线和连字符(-)。不能以数字或连字符(-)开头。白名单名称在当前地域下唯一。
    allowListDesc string
    白名单描述。长度不超过200个字符。
    applyInstanceNum number
    此白名单已绑定的实例数量。若指定 AllowList 参数,则此字段必填,用于指定规则修改后预期将会影响到的实例个数。若预期影响个数与实际影响个数不符,则请求失败。
    associatedInstances AllowListAssociatedInstance[]
    allow_list str
    白名单规则列表。支持指定为 IP 地址或者 IP 网段。多个 IP 地址或网段之间使用英文逗号(,)分隔。每个白名单最多可配置 300 个 IP 地址或网段。
    allow_list_name str
    白名单规则名称。长度为 1~128 个字符。只能包含中文、字母、数字、下划线和连字符(-)。不能以数字或连字符(-)开头。白名单名称在当前地域下唯一。
    allow_list_desc str
    白名单描述。长度不超过200个字符。
    apply_instance_num int
    此白名单已绑定的实例数量。若指定 AllowList 参数,则此字段必填,用于指定规则修改后预期将会影响到的实例个数。若预期影响个数与实际影响个数不符,则请求失败。
    associated_instances Sequence[AllowListAssociatedInstanceArgs]
    allowList String
    白名单规则列表。支持指定为 IP 地址或者 IP 网段。多个 IP 地址或网段之间使用英文逗号(,)分隔。每个白名单最多可配置 300 个 IP 地址或网段。
    allowListName String
    白名单规则名称。长度为 1~128 个字符。只能包含中文、字母、数字、下划线和连字符(-)。不能以数字或连字符(-)开头。白名单名称在当前地域下唯一。
    allowListDesc String
    白名单描述。长度不超过200个字符。
    applyInstanceNum Number
    此白名单已绑定的实例数量。若指定 AllowList 参数,则此字段必填,用于指定规则修改后预期将会影响到的实例个数。若预期影响个数与实际影响个数不符,则请求失败。
    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
    白名单 ID。
    AllowListIpNum int
    白名单指定的规则个数。
    AssociatedInstanceNum int
    白名单绑定的实例个数。
    Id string
    The provider-assigned unique ID for this managed resource.
    AllowListId string
    白名单 ID。
    AllowListIpNum int
    白名单指定的规则个数。
    AssociatedInstanceNum int
    白名单绑定的实例个数。
    Id string
    The provider-assigned unique ID for this managed resource.
    allowListId String
    白名单 ID。
    allowListIpNum Integer
    白名单指定的规则个数。
    associatedInstanceNum Integer
    白名单绑定的实例个数。
    id String
    The provider-assigned unique ID for this managed resource.
    allowListId string
    白名单 ID。
    allowListIpNum number
    白名单指定的规则个数。
    associatedInstanceNum number
    白名单绑定的实例个数。
    id string
    The provider-assigned unique ID for this managed resource.
    allow_list_id str
    白名单 ID。
    allow_list_ip_num int
    白名单指定的规则个数。
    associated_instance_num int
    白名单绑定的实例个数。
    id str
    The provider-assigned unique ID for this managed resource.
    allowListId String
    白名单 ID。
    allowListIpNum Number
    白名单指定的规则个数。
    associatedInstanceNum Number
    白名单绑定的实例个数。
    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: bytepluscc: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
    白名单描述。长度不超过200个字符。
    AllowListId string
    白名单 ID。
    AllowListIpNum int
    白名单指定的规则个数。
    AllowListName string
    白名单规则名称。长度为 1~128 个字符。只能包含中文、字母、数字、下划线和连字符(-)。不能以数字或连字符(-)开头。白名单名称在当前地域下唯一。
    AllowListValue string
    白名单规则列表。支持指定为 IP 地址或者 IP 网段。多个 IP 地址或网段之间使用英文逗号(,)分隔。每个白名单最多可配置 300 个 IP 地址或网段。
    ApplyInstanceNum int
    此白名单已绑定的实例数量。若指定 AllowList 参数,则此字段必填,用于指定规则修改后预期将会影响到的实例个数。若预期影响个数与实际影响个数不符,则请求失败。
    AssociatedInstanceNum int
    白名单绑定的实例个数。
    AssociatedInstances List<Byteplus.AllowListAssociatedInstance>
    AllowList string
    白名单规则列表。支持指定为 IP 地址或者 IP 网段。多个 IP 地址或网段之间使用英文逗号(,)分隔。每个白名单最多可配置 300 个 IP 地址或网段。
    AllowListDesc string
    白名单描述。长度不超过200个字符。
    AllowListId string
    白名单 ID。
    AllowListIpNum int
    白名单指定的规则个数。
    AllowListName string
    白名单规则名称。长度为 1~128 个字符。只能包含中文、字母、数字、下划线和连字符(-)。不能以数字或连字符(-)开头。白名单名称在当前地域下唯一。
    ApplyInstanceNum int
    此白名单已绑定的实例数量。若指定 AllowList 参数,则此字段必填,用于指定规则修改后预期将会影响到的实例个数。若预期影响个数与实际影响个数不符,则请求失败。
    AssociatedInstanceNum int
    白名单绑定的实例个数。
    AssociatedInstances []AllowListAssociatedInstanceArgs
    allowList String
    白名单规则列表。支持指定为 IP 地址或者 IP 网段。多个 IP 地址或网段之间使用英文逗号(,)分隔。每个白名单最多可配置 300 个 IP 地址或网段。
    allowListDesc String
    白名单描述。长度不超过200个字符。
    allowListId String
    白名单 ID。
    allowListIpNum Integer
    白名单指定的规则个数。
    allowListName String
    白名单规则名称。长度为 1~128 个字符。只能包含中文、字母、数字、下划线和连字符(-)。不能以数字或连字符(-)开头。白名单名称在当前地域下唯一。
    applyInstanceNum Integer
    此白名单已绑定的实例数量。若指定 AllowList 参数,则此字段必填,用于指定规则修改后预期将会影响到的实例个数。若预期影响个数与实际影响个数不符,则请求失败。
    associatedInstanceNum Integer
    白名单绑定的实例个数。
    associatedInstances List<AllowListAssociatedInstance>
    allowList string
    白名单规则列表。支持指定为 IP 地址或者 IP 网段。多个 IP 地址或网段之间使用英文逗号(,)分隔。每个白名单最多可配置 300 个 IP 地址或网段。
    allowListDesc string
    白名单描述。长度不超过200个字符。
    allowListId string
    白名单 ID。
    allowListIpNum number
    白名单指定的规则个数。
    allowListName string
    白名单规则名称。长度为 1~128 个字符。只能包含中文、字母、数字、下划线和连字符(-)。不能以数字或连字符(-)开头。白名单名称在当前地域下唯一。
    applyInstanceNum number
    此白名单已绑定的实例数量。若指定 AllowList 参数,则此字段必填,用于指定规则修改后预期将会影响到的实例个数。若预期影响个数与实际影响个数不符,则请求失败。
    associatedInstanceNum number
    白名单绑定的实例个数。
    associatedInstances AllowListAssociatedInstance[]
    allow_list str
    白名单规则列表。支持指定为 IP 地址或者 IP 网段。多个 IP 地址或网段之间使用英文逗号(,)分隔。每个白名单最多可配置 300 个 IP 地址或网段。
    allow_list_desc str
    白名单描述。长度不超过200个字符。
    allow_list_id str
    白名单 ID。
    allow_list_ip_num int
    白名单指定的规则个数。
    allow_list_name str
    白名单规则名称。长度为 1~128 个字符。只能包含中文、字母、数字、下划线和连字符(-)。不能以数字或连字符(-)开头。白名单名称在当前地域下唯一。
    apply_instance_num int
    此白名单已绑定的实例数量。若指定 AllowList 参数,则此字段必填,用于指定规则修改后预期将会影响到的实例个数。若预期影响个数与实际影响个数不符,则请求失败。
    associated_instance_num int
    白名单绑定的实例个数。
    associated_instances Sequence[AllowListAssociatedInstanceArgs]
    allowList String
    白名单规则列表。支持指定为 IP 地址或者 IP 网段。多个 IP 地址或网段之间使用英文逗号(,)分隔。每个白名单最多可配置 300 个 IP 地址或网段。
    allowListDesc String
    白名单描述。长度不超过200个字符。
    allowListId String
    白名单 ID。
    allowListIpNum Number
    白名单指定的规则个数。
    allowListName String
    白名单规则名称。长度为 1~128 个字符。只能包含中文、字母、数字、下划线和连字符(-)。不能以数字或连字符(-)开头。白名单名称在当前地域下唯一。
    applyInstanceNum Number
    此白名单已绑定的实例数量。若指定 AllowList 参数,则此字段必填,用于指定规则修改后预期将会影响到的实例个数。若预期影响个数与实际影响个数不符,则请求失败。
    associatedInstanceNum Number
    白名单绑定的实例个数。
    associatedInstances List<Property Map>

    Supporting Types

    AllowListAssociatedInstance, AllowListAssociatedInstanceArgs

    InstanceId string
    白名单绑定的实例ID。
    InstanceId string
    白名单绑定的实例ID。
    instanceId String
    白名单绑定的实例ID。
    instanceId string
    白名单绑定的实例ID。
    instance_id str
    白名单绑定的实例ID。
    instanceId String
    白名单绑定的实例ID。

    Import

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

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

    Package Details

    Repository
    bytepluscc byteplus-sdk/pulumi-bytepluscc
    License
    MPL-2.0
    Notes
    This Pulumi package is based on the bytepluscc Terraform Provider.
    bytepluscc logo
    Viewing docs for bytepluscc v0.0.16
    published on Monday, Mar 9, 2026 by Byteplus
      Try Pulumi Cloud free. Your team will thank you.