1. Packages
  2. Volcenginecc Provider
  3. API Docs
  4. mongodb
  5. AllowList
Viewing docs for volcenginecc v0.0.28
published on Thursday, Mar 26, 2026 by Volcengine
volcenginecc logo
Viewing docs for volcenginecc v0.0.28
published on Thursday, Mar 26, 2026 by Volcengine

    文档数据库 MongoDB 版实例创建成功后,您可以为实例设置白名单,以允许外部设备访问该实例。本文介绍如何通过控制台设置白名单。

    Example Usage

    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    resources:
      mongoDBAllowListDemo:
        type: volcenginecc:mongodb:AllowList
        name: MongoDBAllowListDemo
        properties:
          allowListName: mongodb_allowlist-1
          allowListType: IPv4
          projectName: default
          allowListDesc: test
          allowListCategory: Ordinary
          allowLists:
            - 0.0.0.0/0
            - 127.0.0.1
            - 192.168.1.0/24
          associatedInstances:
            - instance_id: mongo-shard-d838exxxxx
            - instance_id: mongo-replica-63axxxxx
    

    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_name: Optional[str] = None,
                  allow_lists: Optional[Sequence[str]] = None,
                  allow_list_category: Optional[str] = None,
                  allow_list_desc: Optional[str] = None,
                  allow_list_type: Optional[str] = None,
                  associated_instances: Optional[Sequence[AllowListAssociatedInstanceArgs]] = None,
                  project_name: Optional[str] = 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:mongodb: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 volcengineccAllowListResource = new Volcenginecc.Mongodb.AllowList("volcengineccAllowListResource", new()
    {
        AllowListName = "string",
        AllowListValue = new[]
        {
            "string",
        },
        AllowListCategory = "string",
        AllowListDesc = "string",
        AllowListType = "string",
        AssociatedInstances = new[]
        {
            new Volcenginecc.Mongodb.Inputs.AllowListAssociatedInstanceArgs
            {
                InstanceId = "string",
                InstanceName = "string",
                ProjectName = "string",
                Vpc = "string",
            },
        },
        ProjectName = "string",
    });
    
    example, err := mongodb.NewAllowList(ctx, "volcengineccAllowListResource", &mongodb.AllowListArgs{
    	AllowListName: pulumi.String("string"),
    	AllowLists: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	AllowListCategory: pulumi.String("string"),
    	AllowListDesc:     pulumi.String("string"),
    	AllowListType:     pulumi.String("string"),
    	AssociatedInstances: mongodb.AllowListAssociatedInstanceArray{
    		&mongodb.AllowListAssociatedInstanceArgs{
    			InstanceId:   pulumi.String("string"),
    			InstanceName: pulumi.String("string"),
    			ProjectName:  pulumi.String("string"),
    			Vpc:          pulumi.String("string"),
    		},
    	},
    	ProjectName: pulumi.String("string"),
    })
    
    var volcengineccAllowListResource = new com.volcengine.volcenginecc.mongodb.AllowList("volcengineccAllowListResource", com.volcengine.volcenginecc.mongodb.AllowListArgs.builder()
        .allowListName("string")
        .allowLists("string")
        .allowListCategory("string")
        .allowListDesc("string")
        .allowListType("string")
        .associatedInstances(AllowListAssociatedInstanceArgs.builder()
            .instanceId("string")
            .instanceName("string")
            .projectName("string")
            .vpc("string")
            .build())
        .projectName("string")
        .build());
    
    volcenginecc_allow_list_resource = volcenginecc.mongodb.AllowList("volcengineccAllowListResource",
        allow_list_name="string",
        allow_lists=["string"],
        allow_list_category="string",
        allow_list_desc="string",
        allow_list_type="string",
        associated_instances=[{
            "instance_id": "string",
            "instance_name": "string",
            "project_name": "string",
            "vpc": "string",
        }],
        project_name="string")
    
    const volcengineccAllowListResource = new volcenginecc.mongodb.AllowList("volcengineccAllowListResource", {
        allowListName: "string",
        allowLists: ["string"],
        allowListCategory: "string",
        allowListDesc: "string",
        allowListType: "string",
        associatedInstances: [{
            instanceId: "string",
            instanceName: "string",
            projectName: "string",
            vpc: "string",
        }],
        projectName: "string",
    });
    
    type: volcenginecc:mongodb:AllowList
    properties:
        allowListCategory: string
        allowListDesc: string
        allowListName: string
        allowListType: string
        allowLists:
            - string
        associatedInstances:
            - instanceId: string
              instanceName: string
              projectName: string
              vpc: string
        projectName: 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 List<string>
    输入 IP 地址或 CIDR 格式的 IP 地址段。
    AllowListCategory string
    白名单类型。取值范围如下:Ordinary:普通白名单;Default:默认白名单。
    AllowListDesc string
    白名单的备注信息,长度不可超过 200 个字符。
    AllowListType string
    白名单内的 IP 地址类型。当前仅支持 IPv4 地址。
    AssociatedInstances List<Volcengine.AllowListAssociatedInstance>
    ProjectName string
    当前白名单所属的项目。
    AllowListName string
    白名单名称,名称需同时满足如下要求:不能以数字、中划线(-)开头。只能包含中文、字母、数字、下划线(_)和中划线(-)。长度需为 1~128 个字符。
    AllowLists []string
    输入 IP 地址或 CIDR 格式的 IP 地址段。
    AllowListCategory string
    白名单类型。取值范围如下:Ordinary:普通白名单;Default:默认白名单。
    AllowListDesc string
    白名单的备注信息,长度不可超过 200 个字符。
    AllowListType string
    白名单内的 IP 地址类型。当前仅支持 IPv4 地址。
    AssociatedInstances []AllowListAssociatedInstanceArgs
    ProjectName string
    当前白名单所属的项目。
    allowListName String
    白名单名称,名称需同时满足如下要求:不能以数字、中划线(-)开头。只能包含中文、字母、数字、下划线(_)和中划线(-)。长度需为 1~128 个字符。
    allowLists List<String>
    输入 IP 地址或 CIDR 格式的 IP 地址段。
    allowListCategory String
    白名单类型。取值范围如下:Ordinary:普通白名单;Default:默认白名单。
    allowListDesc String
    白名单的备注信息,长度不可超过 200 个字符。
    allowListType String
    白名单内的 IP 地址类型。当前仅支持 IPv4 地址。
    associatedInstances List<AllowListAssociatedInstance>
    projectName String
    当前白名单所属的项目。
    allowListName string
    白名单名称,名称需同时满足如下要求:不能以数字、中划线(-)开头。只能包含中文、字母、数字、下划线(_)和中划线(-)。长度需为 1~128 个字符。
    allowLists string[]
    输入 IP 地址或 CIDR 格式的 IP 地址段。
    allowListCategory string
    白名单类型。取值范围如下:Ordinary:普通白名单;Default:默认白名单。
    allowListDesc string
    白名单的备注信息,长度不可超过 200 个字符。
    allowListType string
    白名单内的 IP 地址类型。当前仅支持 IPv4 地址。
    associatedInstances AllowListAssociatedInstance[]
    projectName string
    当前白名单所属的项目。
    allow_list_name str
    白名单名称,名称需同时满足如下要求:不能以数字、中划线(-)开头。只能包含中文、字母、数字、下划线(_)和中划线(-)。长度需为 1~128 个字符。
    allow_lists Sequence[str]
    输入 IP 地址或 CIDR 格式的 IP 地址段。
    allow_list_category str
    白名单类型。取值范围如下:Ordinary:普通白名单;Default:默认白名单。
    allow_list_desc str
    白名单的备注信息,长度不可超过 200 个字符。
    allow_list_type str
    白名单内的 IP 地址类型。当前仅支持 IPv4 地址。
    associated_instances Sequence[AllowListAssociatedInstanceArgs]
    project_name str
    当前白名单所属的项目。
    allowListName String
    白名单名称,名称需同时满足如下要求:不能以数字、中划线(-)开头。只能包含中文、字母、数字、下划线(_)和中划线(-)。长度需为 1~128 个字符。
    allowLists List<String>
    输入 IP 地址或 CIDR 格式的 IP 地址段。
    allowListCategory String
    白名单类型。取值范围如下:Ordinary:普通白名单;Default:默认白名单。
    allowListDesc String
    白名单的备注信息,长度不可超过 200 个字符。
    allowListType String
    白名单内的 IP 地址类型。当前仅支持 IPv4 地址。
    associatedInstances List<Property Map>
    projectName String
    当前白名单所属的项目。

    Outputs

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

    AllowListId string
    白名单 ID。
    AllowListIpNum int
    白名单内的 IP 地址(或地址段)总数。
    AssociatedInstanceNum int
    已绑定当前白名单的实例总数。
    Id string
    The provider-assigned unique ID for this managed resource.
    AllowListId string
    白名单 ID。
    AllowListIpNum int
    白名单内的 IP 地址(或地址段)总数。
    AssociatedInstanceNum int
    已绑定当前白名单的实例总数。
    Id string
    The provider-assigned unique ID for this managed resource.
    allowListId String
    白名单 ID。
    allowListIpNum Integer
    白名单内的 IP 地址(或地址段)总数。
    associatedInstanceNum Integer
    已绑定当前白名单的实例总数。
    id String
    The provider-assigned unique ID for this managed resource.
    allowListId string
    白名单 ID。
    allowListIpNum number
    白名单内的 IP 地址(或地址段)总数。
    associatedInstanceNum number
    已绑定当前白名单的实例总数。
    id string
    The provider-assigned unique ID for this managed resource.
    allow_list_id str
    白名单 ID。
    allow_list_ip_num int
    白名单内的 IP 地址(或地址段)总数。
    associated_instance_num int
    已绑定当前白名单的实例总数。
    id str
    The provider-assigned unique ID for this managed resource.
    allowListId String
    白名单 ID。
    allowListIpNum Number
    白名单内的 IP 地址(或地址段)总数。
    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_category: 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,
            allow_list_type: Optional[str] = None,
            allow_lists: Optional[Sequence[str]] = None,
            associated_instance_num: Optional[int] = None,
            associated_instances: Optional[Sequence[AllowListAssociatedInstanceArgs]] = None,
            project_name: Optional[str] = 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:mongodb: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:
    AllowListCategory string
    白名单类型。取值范围如下:Ordinary:普通白名单;Default:默认白名单。
    AllowListDesc string
    白名单的备注信息,长度不可超过 200 个字符。
    AllowListId string
    白名单 ID。
    AllowListIpNum int
    白名单内的 IP 地址(或地址段)总数。
    AllowListName string
    白名单名称,名称需同时满足如下要求:不能以数字、中划线(-)开头。只能包含中文、字母、数字、下划线(_)和中划线(-)。长度需为 1~128 个字符。
    AllowListType string
    白名单内的 IP 地址类型。当前仅支持 IPv4 地址。
    AllowListValue List<string>
    输入 IP 地址或 CIDR 格式的 IP 地址段。
    AssociatedInstanceNum int
    已绑定当前白名单的实例总数。
    AssociatedInstances List<Volcengine.AllowListAssociatedInstance>
    ProjectName string
    当前白名单所属的项目。
    AllowListCategory string
    白名单类型。取值范围如下:Ordinary:普通白名单;Default:默认白名单。
    AllowListDesc string
    白名单的备注信息,长度不可超过 200 个字符。
    AllowListId string
    白名单 ID。
    AllowListIpNum int
    白名单内的 IP 地址(或地址段)总数。
    AllowListName string
    白名单名称,名称需同时满足如下要求:不能以数字、中划线(-)开头。只能包含中文、字母、数字、下划线(_)和中划线(-)。长度需为 1~128 个字符。
    AllowListType string
    白名单内的 IP 地址类型。当前仅支持 IPv4 地址。
    AllowLists []string
    输入 IP 地址或 CIDR 格式的 IP 地址段。
    AssociatedInstanceNum int
    已绑定当前白名单的实例总数。
    AssociatedInstances []AllowListAssociatedInstanceArgs
    ProjectName string
    当前白名单所属的项目。
    allowListCategory String
    白名单类型。取值范围如下:Ordinary:普通白名单;Default:默认白名单。
    allowListDesc String
    白名单的备注信息,长度不可超过 200 个字符。
    allowListId String
    白名单 ID。
    allowListIpNum Integer
    白名单内的 IP 地址(或地址段)总数。
    allowListName String
    白名单名称,名称需同时满足如下要求:不能以数字、中划线(-)开头。只能包含中文、字母、数字、下划线(_)和中划线(-)。长度需为 1~128 个字符。
    allowListType String
    白名单内的 IP 地址类型。当前仅支持 IPv4 地址。
    allowLists List<String>
    输入 IP 地址或 CIDR 格式的 IP 地址段。
    associatedInstanceNum Integer
    已绑定当前白名单的实例总数。
    associatedInstances List<AllowListAssociatedInstance>
    projectName String
    当前白名单所属的项目。
    allowListCategory string
    白名单类型。取值范围如下:Ordinary:普通白名单;Default:默认白名单。
    allowListDesc string
    白名单的备注信息,长度不可超过 200 个字符。
    allowListId string
    白名单 ID。
    allowListIpNum number
    白名单内的 IP 地址(或地址段)总数。
    allowListName string
    白名单名称,名称需同时满足如下要求:不能以数字、中划线(-)开头。只能包含中文、字母、数字、下划线(_)和中划线(-)。长度需为 1~128 个字符。
    allowListType string
    白名单内的 IP 地址类型。当前仅支持 IPv4 地址。
    allowLists string[]
    输入 IP 地址或 CIDR 格式的 IP 地址段。
    associatedInstanceNum number
    已绑定当前白名单的实例总数。
    associatedInstances AllowListAssociatedInstance[]
    projectName string
    当前白名单所属的项目。
    allow_list_category str
    白名单类型。取值范围如下:Ordinary:普通白名单;Default:默认白名单。
    allow_list_desc str
    白名单的备注信息,长度不可超过 200 个字符。
    allow_list_id str
    白名单 ID。
    allow_list_ip_num int
    白名单内的 IP 地址(或地址段)总数。
    allow_list_name str
    白名单名称,名称需同时满足如下要求:不能以数字、中划线(-)开头。只能包含中文、字母、数字、下划线(_)和中划线(-)。长度需为 1~128 个字符。
    allow_list_type str
    白名单内的 IP 地址类型。当前仅支持 IPv4 地址。
    allow_lists Sequence[str]
    输入 IP 地址或 CIDR 格式的 IP 地址段。
    associated_instance_num int
    已绑定当前白名单的实例总数。
    associated_instances Sequence[AllowListAssociatedInstanceArgs]
    project_name str
    当前白名单所属的项目。
    allowListCategory String
    白名单类型。取值范围如下:Ordinary:普通白名单;Default:默认白名单。
    allowListDesc String
    白名单的备注信息,长度不可超过 200 个字符。
    allowListId String
    白名单 ID。
    allowListIpNum Number
    白名单内的 IP 地址(或地址段)总数。
    allowListName String
    白名单名称,名称需同时满足如下要求:不能以数字、中划线(-)开头。只能包含中文、字母、数字、下划线(_)和中划线(-)。长度需为 1~128 个字符。
    allowListType String
    白名单内的 IP 地址类型。当前仅支持 IPv4 地址。
    allowLists List<String>
    输入 IP 地址或 CIDR 格式的 IP 地址段。
    associatedInstanceNum Number
    已绑定当前白名单的实例总数。
    associatedInstances List<Property Map>
    projectName String
    当前白名单所属的项目。

    Supporting Types

    AllowListAssociatedInstance, AllowListAssociatedInstanceArgs

    InstanceId string
    已绑定当前白名单的实例 ID。
    InstanceName string
    已绑定当前白名单的实例名称。
    ProjectName string
    实例所属的项目名称。
    Vpc string
    实例所属的私有网络 ID。
    InstanceId string
    已绑定当前白名单的实例 ID。
    InstanceName string
    已绑定当前白名单的实例名称。
    ProjectName string
    实例所属的项目名称。
    Vpc string
    实例所属的私有网络 ID。
    instanceId String
    已绑定当前白名单的实例 ID。
    instanceName String
    已绑定当前白名单的实例名称。
    projectName String
    实例所属的项目名称。
    vpc String
    实例所属的私有网络 ID。
    instanceId string
    已绑定当前白名单的实例 ID。
    instanceName string
    已绑定当前白名单的实例名称。
    projectName string
    实例所属的项目名称。
    vpc string
    实例所属的私有网络 ID。
    instance_id str
    已绑定当前白名单的实例 ID。
    instance_name str
    已绑定当前白名单的实例名称。
    project_name str
    实例所属的项目名称。
    vpc str
    实例所属的私有网络 ID。
    instanceId String
    已绑定当前白名单的实例 ID。
    instanceName String
    已绑定当前白名单的实例名称。
    projectName String
    实例所属的项目名称。
    vpc String
    实例所属的私有网络 ID。

    Import

    $ pulumi import volcenginecc:mongodb/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.28
    published on Thursday, Mar 26, 2026 by Volcengine
      Try Pulumi Cloud free. Your team will thank you.