1. Packages
  2. Bytepluscc Provider
  3. API Docs
  4. mongodb
  5. AllowList
Viewing docs for bytepluscc v0.0.21
published on Thursday, Apr 2, 2026 by Byteplus
bytepluscc logo
Viewing docs for bytepluscc v0.0.21
published on Thursday, Apr 2, 2026 by Byteplus

    After you create a MongoDB document database instance, you can set an allowlist for the instance to permit external devices to access it. This article describes how to set an allowlist in the console.

    Example Usage

    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    resources:
      mongoDBAllowListDemo:
        type: bytepluscc: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: bytepluscc: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 byteplusccAllowListResource = new Bytepluscc.Mongodb.AllowList("byteplusccAllowListResource", new()
    {
        AllowListName = "string",
        AllowListValue = new[]
        {
            "string",
        },
        AllowListCategory = "string",
        AllowListDesc = "string",
        AllowListType = "string",
        AssociatedInstances = new[]
        {
            new Bytepluscc.Mongodb.Inputs.AllowListAssociatedInstanceArgs
            {
                InstanceId = "string",
                InstanceName = "string",
                ProjectName = "string",
                Vpc = "string",
            },
        },
        ProjectName = "string",
    });
    
    example, err := mongodb.NewAllowList(ctx, "byteplusccAllowListResource", &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 byteplusccAllowListResource = new com.byteplus.bytepluscc.mongodb.AllowList("byteplusccAllowListResource", com.byteplus.bytepluscc.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());
    
    bytepluscc_allow_list_resource = bytepluscc.mongodb.AllowList("byteplusccAllowListResource",
        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 byteplusccAllowListResource = new bytepluscc.mongodb.AllowList("byteplusccAllowListResource", {
        allowListName: "string",
        allowLists: ["string"],
        allowListCategory: "string",
        allowListDesc: "string",
        allowListType: "string",
        associatedInstances: [{
            instanceId: "string",
            instanceName: "string",
            projectName: "string",
            vpc: "string",
        }],
        projectName: "string",
    });
    
    type: bytepluscc: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
    Allowlist name. The name must meet the following requirements: Cannot start with a digit or hyphen (-). Can only contain Chinese characters, letters, digits, underscores (_), and hyphens (-). Length must be 1–128 characters.
    AllowListValue List<string>
    Enter an IP address or a CIDR-format IP address range.
    AllowListCategory string
    Allowlist type. Valid values: Ordinary: ordinary allowlist; Default: default allowlist.
    AllowListDesc string
    Allowlist remarks. Maximum length: 200 characters.
    AllowListType string
    IP address type in the allowlist. Only IPv4 addresses are currently supported.
    AssociatedInstances List<Byteplus.AllowListAssociatedInstance>
    ProjectName string
    Project to which the current allowlist belongs.
    AllowListName string
    Allowlist name. The name must meet the following requirements: Cannot start with a digit or hyphen (-). Can only contain Chinese characters, letters, digits, underscores (_), and hyphens (-). Length must be 1–128 characters.
    AllowLists []string
    Enter an IP address or a CIDR-format IP address range.
    AllowListCategory string
    Allowlist type. Valid values: Ordinary: ordinary allowlist; Default: default allowlist.
    AllowListDesc string
    Allowlist remarks. Maximum length: 200 characters.
    AllowListType string
    IP address type in the allowlist. Only IPv4 addresses are currently supported.
    AssociatedInstances []AllowListAssociatedInstanceArgs
    ProjectName string
    Project to which the current allowlist belongs.
    allowListName String
    Allowlist name. The name must meet the following requirements: Cannot start with a digit or hyphen (-). Can only contain Chinese characters, letters, digits, underscores (_), and hyphens (-). Length must be 1–128 characters.
    allowLists List<String>
    Enter an IP address or a CIDR-format IP address range.
    allowListCategory String
    Allowlist type. Valid values: Ordinary: ordinary allowlist; Default: default allowlist.
    allowListDesc String
    Allowlist remarks. Maximum length: 200 characters.
    allowListType String
    IP address type in the allowlist. Only IPv4 addresses are currently supported.
    associatedInstances List<AllowListAssociatedInstance>
    projectName String
    Project to which the current allowlist belongs.
    allowListName string
    Allowlist name. The name must meet the following requirements: Cannot start with a digit or hyphen (-). Can only contain Chinese characters, letters, digits, underscores (_), and hyphens (-). Length must be 1–128 characters.
    allowLists string[]
    Enter an IP address or a CIDR-format IP address range.
    allowListCategory string
    Allowlist type. Valid values: Ordinary: ordinary allowlist; Default: default allowlist.
    allowListDesc string
    Allowlist remarks. Maximum length: 200 characters.
    allowListType string
    IP address type in the allowlist. Only IPv4 addresses are currently supported.
    associatedInstances AllowListAssociatedInstance[]
    projectName string
    Project to which the current allowlist belongs.
    allow_list_name str
    Allowlist name. The name must meet the following requirements: Cannot start with a digit or hyphen (-). Can only contain Chinese characters, letters, digits, underscores (_), and hyphens (-). Length must be 1–128 characters.
    allow_lists Sequence[str]
    Enter an IP address or a CIDR-format IP address range.
    allow_list_category str
    Allowlist type. Valid values: Ordinary: ordinary allowlist; Default: default allowlist.
    allow_list_desc str
    Allowlist remarks. Maximum length: 200 characters.
    allow_list_type str
    IP address type in the allowlist. Only IPv4 addresses are currently supported.
    associated_instances Sequence[AllowListAssociatedInstanceArgs]
    project_name str
    Project to which the current allowlist belongs.
    allowListName String
    Allowlist name. The name must meet the following requirements: Cannot start with a digit or hyphen (-). Can only contain Chinese characters, letters, digits, underscores (_), and hyphens (-). Length must be 1–128 characters.
    allowLists List<String>
    Enter an IP address or a CIDR-format IP address range.
    allowListCategory String
    Allowlist type. Valid values: Ordinary: ordinary allowlist; Default: default allowlist.
    allowListDesc String
    Allowlist remarks. Maximum length: 200 characters.
    allowListType String
    IP address type in the allowlist. Only IPv4 addresses are currently supported.
    associatedInstances List<Property Map>
    projectName String
    Project to which the current allowlist belongs.

    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
    Total number of IP addresses (or address ranges) in the allowlist.
    AssociatedInstanceNum int
    Total number of instances bound to the current allowlist.
    Id string
    The provider-assigned unique ID for this managed resource.
    AllowListId string
    Allowlist ID.
    AllowListIpNum int
    Total number of IP addresses (or address ranges) in the allowlist.
    AssociatedInstanceNum int
    Total number of instances bound to the current allowlist.
    Id string
    The provider-assigned unique ID for this managed resource.
    allowListId String
    Allowlist ID.
    allowListIpNum Integer
    Total number of IP addresses (or address ranges) in the allowlist.
    associatedInstanceNum Integer
    Total number of instances bound to the current allowlist.
    id String
    The provider-assigned unique ID for this managed resource.
    allowListId string
    Allowlist ID.
    allowListIpNum number
    Total number of IP addresses (or address ranges) in the allowlist.
    associatedInstanceNum number
    Total number of instances bound to the current allowlist.
    id string
    The provider-assigned unique ID for this managed resource.
    allow_list_id str
    Allowlist ID.
    allow_list_ip_num int
    Total number of IP addresses (or address ranges) in the allowlist.
    associated_instance_num int
    Total number of instances bound to the current allowlist.
    id str
    The provider-assigned unique ID for this managed resource.
    allowListId String
    Allowlist ID.
    allowListIpNum Number
    Total number of IP addresses (or address ranges) in the allowlist.
    associatedInstanceNum Number
    Total number of instances bound to the current 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_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: bytepluscc: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
    Allowlist type. Valid values: Ordinary: ordinary allowlist; Default: default allowlist.
    AllowListDesc string
    Allowlist remarks. Maximum length: 200 characters.
    AllowListId string
    Allowlist ID.
    AllowListIpNum int
    Total number of IP addresses (or address ranges) in the allowlist.
    AllowListName string
    Allowlist name. The name must meet the following requirements: Cannot start with a digit or hyphen (-). Can only contain Chinese characters, letters, digits, underscores (_), and hyphens (-). Length must be 1–128 characters.
    AllowListType string
    IP address type in the allowlist. Only IPv4 addresses are currently supported.
    AllowListValue List<string>
    Enter an IP address or a CIDR-format IP address range.
    AssociatedInstanceNum int
    Total number of instances bound to the current allowlist.
    AssociatedInstances List<Byteplus.AllowListAssociatedInstance>
    ProjectName string
    Project to which the current allowlist belongs.
    AllowListCategory string
    Allowlist type. Valid values: Ordinary: ordinary allowlist; Default: default allowlist.
    AllowListDesc string
    Allowlist remarks. Maximum length: 200 characters.
    AllowListId string
    Allowlist ID.
    AllowListIpNum int
    Total number of IP addresses (or address ranges) in the allowlist.
    AllowListName string
    Allowlist name. The name must meet the following requirements: Cannot start with a digit or hyphen (-). Can only contain Chinese characters, letters, digits, underscores (_), and hyphens (-). Length must be 1–128 characters.
    AllowListType string
    IP address type in the allowlist. Only IPv4 addresses are currently supported.
    AllowLists []string
    Enter an IP address or a CIDR-format IP address range.
    AssociatedInstanceNum int
    Total number of instances bound to the current allowlist.
    AssociatedInstances []AllowListAssociatedInstanceArgs
    ProjectName string
    Project to which the current allowlist belongs.
    allowListCategory String
    Allowlist type. Valid values: Ordinary: ordinary allowlist; Default: default allowlist.
    allowListDesc String
    Allowlist remarks. Maximum length: 200 characters.
    allowListId String
    Allowlist ID.
    allowListIpNum Integer
    Total number of IP addresses (or address ranges) in the allowlist.
    allowListName String
    Allowlist name. The name must meet the following requirements: Cannot start with a digit or hyphen (-). Can only contain Chinese characters, letters, digits, underscores (_), and hyphens (-). Length must be 1–128 characters.
    allowListType String
    IP address type in the allowlist. Only IPv4 addresses are currently supported.
    allowLists List<String>
    Enter an IP address or a CIDR-format IP address range.
    associatedInstanceNum Integer
    Total number of instances bound to the current allowlist.
    associatedInstances List<AllowListAssociatedInstance>
    projectName String
    Project to which the current allowlist belongs.
    allowListCategory string
    Allowlist type. Valid values: Ordinary: ordinary allowlist; Default: default allowlist.
    allowListDesc string
    Allowlist remarks. Maximum length: 200 characters.
    allowListId string
    Allowlist ID.
    allowListIpNum number
    Total number of IP addresses (or address ranges) in the allowlist.
    allowListName string
    Allowlist name. The name must meet the following requirements: Cannot start with a digit or hyphen (-). Can only contain Chinese characters, letters, digits, underscores (_), and hyphens (-). Length must be 1–128 characters.
    allowListType string
    IP address type in the allowlist. Only IPv4 addresses are currently supported.
    allowLists string[]
    Enter an IP address or a CIDR-format IP address range.
    associatedInstanceNum number
    Total number of instances bound to the current allowlist.
    associatedInstances AllowListAssociatedInstance[]
    projectName string
    Project to which the current allowlist belongs.
    allow_list_category str
    Allowlist type. Valid values: Ordinary: ordinary allowlist; Default: default allowlist.
    allow_list_desc str
    Allowlist remarks. Maximum length: 200 characters.
    allow_list_id str
    Allowlist ID.
    allow_list_ip_num int
    Total number of IP addresses (or address ranges) in the allowlist.
    allow_list_name str
    Allowlist name. The name must meet the following requirements: Cannot start with a digit or hyphen (-). Can only contain Chinese characters, letters, digits, underscores (_), and hyphens (-). Length must be 1–128 characters.
    allow_list_type str
    IP address type in the allowlist. Only IPv4 addresses are currently supported.
    allow_lists Sequence[str]
    Enter an IP address or a CIDR-format IP address range.
    associated_instance_num int
    Total number of instances bound to the current allowlist.
    associated_instances Sequence[AllowListAssociatedInstanceArgs]
    project_name str
    Project to which the current allowlist belongs.
    allowListCategory String
    Allowlist type. Valid values: Ordinary: ordinary allowlist; Default: default allowlist.
    allowListDesc String
    Allowlist remarks. Maximum length: 200 characters.
    allowListId String
    Allowlist ID.
    allowListIpNum Number
    Total number of IP addresses (or address ranges) in the allowlist.
    allowListName String
    Allowlist name. The name must meet the following requirements: Cannot start with a digit or hyphen (-). Can only contain Chinese characters, letters, digits, underscores (_), and hyphens (-). Length must be 1–128 characters.
    allowListType String
    IP address type in the allowlist. Only IPv4 addresses are currently supported.
    allowLists List<String>
    Enter an IP address or a CIDR-format IP address range.
    associatedInstanceNum Number
    Total number of instances bound to the current allowlist.
    associatedInstances List<Property Map>
    projectName String
    Project to which the current allowlist belongs.

    Supporting Types

    AllowListAssociatedInstance, AllowListAssociatedInstanceArgs

    InstanceId string
    Instance ID bound to the current allowlist.
    InstanceName string
    Instance name bound to the current allowlist.
    ProjectName string
    Project name of the instance.
    Vpc string
    Private network ID of the instance.
    InstanceId string
    Instance ID bound to the current allowlist.
    InstanceName string
    Instance name bound to the current allowlist.
    ProjectName string
    Project name of the instance.
    Vpc string
    Private network ID of the instance.
    instanceId String
    Instance ID bound to the current allowlist.
    instanceName String
    Instance name bound to the current allowlist.
    projectName String
    Project name of the instance.
    vpc String
    Private network ID of the instance.
    instanceId string
    Instance ID bound to the current allowlist.
    instanceName string
    Instance name bound to the current allowlist.
    projectName string
    Project name of the instance.
    vpc string
    Private network ID of the instance.
    instance_id str
    Instance ID bound to the current allowlist.
    instance_name str
    Instance name bound to the current allowlist.
    project_name str
    Project name of the instance.
    vpc str
    Private network ID of the instance.
    instanceId String
    Instance ID bound to the current allowlist.
    instanceName String
    Instance name bound to the current allowlist.
    projectName String
    Project name of the instance.
    vpc String
    Private network ID of the instance.

    Import

    $ pulumi import bytepluscc:mongodb/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.21
    published on Thursday, Apr 2, 2026 by Byteplus
      Try Pulumi Cloud free. Your team will thank you.