published on Monday, Mar 9, 2026 by Byteplus
published on Monday, Mar 9, 2026 by Byteplus
白名单是数据库连接的安全防控手段,只有白名单内的 IP 地址才能访问数据库。PostgreSQL 实例在创建后,不会绑定任何白名单,默认禁止所有 IP 地址访问实例。因此无论是通过私网还是通过公网连接访问实例,都需要先为实例配置白名单,才能保证实例可连接。
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as bytepluscc from "@byteplus/pulumi-bytepluscc";
const rdsPostgresqlAllowListDemo = new bytepluscc.rdspostgresql.AllowList("RdsPostgresqlAllowListDemo", {
allowLists: [
"1.2.3.4/32",
"5.6.7.8/32",
],
allowListCategory: "Ordinary",
allowListDesc: "test",
allowListName: "ccapi-test-1",
allowListType: "IPv4",
});
import pulumi
import pulumi_bytepluscc as bytepluscc
rds_postgresql_allow_list_demo = bytepluscc.rdspostgresql.AllowList("RdsPostgresqlAllowListDemo",
allow_lists=[
"1.2.3.4/32",
"5.6.7.8/32",
],
allow_list_category="Ordinary",
allow_list_desc="test",
allow_list_name="ccapi-test-1",
allow_list_type="IPv4")
package main
import (
"github.com/byteplus-sdk/pulumi-bytepluscc/sdk/go/bytepluscc/rdspostgresql"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := rdspostgresql.NewAllowList(ctx, "RdsPostgresqlAllowListDemo", &rdspostgresql.AllowListArgs{
AllowLists: pulumi.StringArray{
pulumi.String("1.2.3.4/32"),
pulumi.String("5.6.7.8/32"),
},
AllowListCategory: pulumi.String("Ordinary"),
AllowListDesc: pulumi.String("test"),
AllowListName: pulumi.String("ccapi-test-1"),
AllowListType: pulumi.String("IPv4"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Bytepluscc = Byteplus.Pulumi.Bytepluscc;
return await Deployment.RunAsync(() =>
{
var rdsPostgresqlAllowListDemo = new Bytepluscc.Rdspostgresql.AllowList("RdsPostgresqlAllowListDemo", new()
{
AllowListValue = new[]
{
"1.2.3.4/32",
"5.6.7.8/32",
},
AllowListCategory = "Ordinary",
AllowListDesc = "test",
AllowListName = "ccapi-test-1",
AllowListType = "IPv4",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.byteplus.bytepluscc.rdspostgresql.AllowList;
import com.byteplus.bytepluscc.rdspostgresql.AllowListArgs;
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 rdsPostgresqlAllowListDemo = new AllowList("rdsPostgresqlAllowListDemo", AllowListArgs.builder()
.allowLists(
"1.2.3.4/32",
"5.6.7.8/32")
.allowListCategory("Ordinary")
.allowListDesc("test")
.allowListName("ccapi-test-1")
.allowListType("IPv4")
.build());
}
}
resources:
rdsPostgresqlAllowListDemo:
type: bytepluscc:rdspostgresql:AllowList
name: RdsPostgresqlAllowListDemo
properties:
allowLists:
- 1.2.3.4/32
- 5.6.7.8/32
allowListCategory: Ordinary
allowListDesc: test
allowListName: ccapi-test-1
allowListType: IPv4
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: Optional[AllowListArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def AllowList(resource_name: str,
opts: Optional[ResourceOptions] = None,
allow_list_category: Optional[str] = None,
allow_list_desc: Optional[str] = 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,
ip_address: Optional[str] = None,
modify_mode: Optional[str] = None,
security_group_bind_infos: Optional[Sequence[AllowListSecurityGroupBindInfoArgs]] = None,
update_security_group: Optional[bool] = None,
user_allow_list: Optional[str] = None)func NewAllowList(ctx *Context, name string, args *AllowListArgs, opts ...ResourceOption) (*AllowList, error)public AllowList(string name, AllowListArgs? args = null, CustomResourceOptions? opts = null)
public AllowList(String name, AllowListArgs args)
public AllowList(String name, AllowListArgs args, CustomResourceOptions options)
type: bytepluscc:rdspostgresql: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 exampleallowListResourceResourceFromRdspostgresqlallowList = new Bytepluscc.Rdspostgresql.AllowList("exampleallowListResourceResourceFromRdspostgresqlallowList", new()
{
AllowListCategory = "string",
AllowListDesc = "string",
AllowListName = "string",
AllowListType = "string",
AllowListValue = new[]
{
"string",
},
AssociatedInstanceNum = 0,
IpAddress = "string",
ModifyMode = "string",
SecurityGroupBindInfos = new[]
{
new Bytepluscc.Rdspostgresql.Inputs.AllowListSecurityGroupBindInfoArgs
{
BindMode = "string",
IpLists = new[]
{
"string",
},
SecurityGroupId = "string",
SecurityGroupName = "string",
},
},
UpdateSecurityGroup = false,
UserAllowList = "string",
});
example, err := rdspostgresql.NewAllowList(ctx, "exampleallowListResourceResourceFromRdspostgresqlallowList", &rdspostgresql.AllowListArgs{
AllowListCategory: pulumi.String("string"),
AllowListDesc: pulumi.String("string"),
AllowListName: pulumi.String("string"),
AllowListType: pulumi.String("string"),
AllowLists: pulumi.StringArray{
pulumi.String("string"),
},
AssociatedInstanceNum: pulumi.Int(0),
IpAddress: pulumi.String("string"),
ModifyMode: pulumi.String("string"),
SecurityGroupBindInfos: rdspostgresql.AllowListSecurityGroupBindInfoArray{
&rdspostgresql.AllowListSecurityGroupBindInfoArgs{
BindMode: pulumi.String("string"),
IpLists: pulumi.StringArray{
pulumi.String("string"),
},
SecurityGroupId: pulumi.String("string"),
SecurityGroupName: pulumi.String("string"),
},
},
UpdateSecurityGroup: pulumi.Bool(false),
UserAllowList: pulumi.String("string"),
})
var exampleallowListResourceResourceFromRdspostgresqlallowList = new com.byteplus.bytepluscc.rdspostgresql.AllowList("exampleallowListResourceResourceFromRdspostgresqlallowList", com.byteplus.bytepluscc.rdspostgresql.AllowListArgs.builder()
.allowListCategory("string")
.allowListDesc("string")
.allowListName("string")
.allowListType("string")
.allowLists("string")
.associatedInstanceNum(0)
.ipAddress("string")
.modifyMode("string")
.securityGroupBindInfos(AllowListSecurityGroupBindInfoArgs.builder()
.bindMode("string")
.ipLists("string")
.securityGroupId("string")
.securityGroupName("string")
.build())
.updateSecurityGroup(false)
.userAllowList("string")
.build());
exampleallow_list_resource_resource_from_rdspostgresqlallow_list = bytepluscc.rdspostgresql.AllowList("exampleallowListResourceResourceFromRdspostgresqlallowList",
allow_list_category="string",
allow_list_desc="string",
allow_list_name="string",
allow_list_type="string",
allow_lists=["string"],
associated_instance_num=0,
ip_address="string",
modify_mode="string",
security_group_bind_infos=[{
"bind_mode": "string",
"ip_lists": ["string"],
"security_group_id": "string",
"security_group_name": "string",
}],
update_security_group=False,
user_allow_list="string")
const exampleallowListResourceResourceFromRdspostgresqlallowList = new bytepluscc.rdspostgresql.AllowList("exampleallowListResourceResourceFromRdspostgresqlallowList", {
allowListCategory: "string",
allowListDesc: "string",
allowListName: "string",
allowListType: "string",
allowLists: ["string"],
associatedInstanceNum: 0,
ipAddress: "string",
modifyMode: "string",
securityGroupBindInfos: [{
bindMode: "string",
ipLists: ["string"],
securityGroupId: "string",
securityGroupName: "string",
}],
updateSecurityGroup: false,
userAllowList: "string",
});
type: bytepluscc:rdspostgresql:AllowList
properties:
allowListCategory: string
allowListDesc: string
allowListName: string
allowListType: string
allowLists:
- string
associatedInstanceNum: 0
ipAddress: string
modifyMode: string
securityGroupBindInfos:
- bindMode: string
ipLists:
- string
securityGroupId: string
securityGroupName: string
updateSecurityGroup: false
userAllowList: 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:
- Allow
List stringCategory - 白名单分类。取值:Ordinary:普通白名单。Default:默认白名单。说明该参数作为请求参数时无默认值,不传入时则查询所有类别的白名单。
- Allow
List stringDesc - 白名单的描述信息。长度在 200 字符以内。默认值为空字符串。
- Allow
List stringName - 白名单名称的命名规则如下:在当前地域内,白名单名称唯一。以中文、字母或下划线()开头。只能包含中文、字母、数字、下划线()和中划线(-)。长度为 1~128 个字符。
- Allow
List stringType - 白名单采用的网络协议类型。取值为 IPv4(默认值)。
- Allow
List List<string>Value - 白名单中包含的 IP 地址。支持以下两种格式:IP 地址格式。例如:10.23.12.24。CIDR 的 IP 地址段格式。例如:10.23.12.0/24(无类别域间路由,24 表示了地址中前缀的长度,范围为 1~32)。说明每个白名单最多可添加 300 个 IP 或 IP 地址段,当 IP 较多时,建议合并为 IP 段填入,例如10.23.12.0/24。禁止将 0.0.0.0/0 之外的形如 x.x.x.x/0 结尾的 IP 地址加入白名单。该字段不能与 UserAllowList 字段同时使用。
- Associated
Instance intNum - 该白名单绑定的实例数量。
- Ip
Address string - 按 IP 地址查询白名单。支持传入多个 IP 地址,多个 IP 地址使用英文逗号(,)分隔。说明如果白名单包含了多个 IP 地址的任意子集,该白名单就会被返回。
- Modify
Mode string - 修改白名单的方式。取值:Cover:覆盖,即使用 AllowList 字段的值覆盖原白名单。默认值。Append:追加,即在原白名单中增加 AllowList 字段包含的 IP 地址。Delete:删除,即在原白名单中删除 AllowList 字段包含的 IP 地址。至少需要保留一个 IP 地址。注意如需修改的白名单绑定有安全组,或需要在修改白名单时为白名单绑定安全组,则 ModifyMode 只能取值为 Cover。
- Security
Group List<Byteplus.Bind Infos Allow List Security Group Bind Info> - Update
Security boolGroup - 是否更新白名单所绑定的安全组。取值:true:更新。false:不更新。默认值。
- User
Allow stringList - 安全组之外的、需要加入白名单的 IP 地址。可输入 IP 地址或 CIDR 格式的 IP 地址段。说明该字段不能与 AllowList 字段同时使用。
- Allow
List stringCategory - 白名单分类。取值:Ordinary:普通白名单。Default:默认白名单。说明该参数作为请求参数时无默认值,不传入时则查询所有类别的白名单。
- Allow
List stringDesc - 白名单的描述信息。长度在 200 字符以内。默认值为空字符串。
- Allow
List stringName - 白名单名称的命名规则如下:在当前地域内,白名单名称唯一。以中文、字母或下划线()开头。只能包含中文、字母、数字、下划线()和中划线(-)。长度为 1~128 个字符。
- Allow
List stringType - 白名单采用的网络协议类型。取值为 IPv4(默认值)。
- Allow
Lists []string - 白名单中包含的 IP 地址。支持以下两种格式:IP 地址格式。例如:10.23.12.24。CIDR 的 IP 地址段格式。例如:10.23.12.0/24(无类别域间路由,24 表示了地址中前缀的长度,范围为 1~32)。说明每个白名单最多可添加 300 个 IP 或 IP 地址段,当 IP 较多时,建议合并为 IP 段填入,例如10.23.12.0/24。禁止将 0.0.0.0/0 之外的形如 x.x.x.x/0 结尾的 IP 地址加入白名单。该字段不能与 UserAllowList 字段同时使用。
- Associated
Instance intNum - 该白名单绑定的实例数量。
- Ip
Address string - 按 IP 地址查询白名单。支持传入多个 IP 地址,多个 IP 地址使用英文逗号(,)分隔。说明如果白名单包含了多个 IP 地址的任意子集,该白名单就会被返回。
- Modify
Mode string - 修改白名单的方式。取值:Cover:覆盖,即使用 AllowList 字段的值覆盖原白名单。默认值。Append:追加,即在原白名单中增加 AllowList 字段包含的 IP 地址。Delete:删除,即在原白名单中删除 AllowList 字段包含的 IP 地址。至少需要保留一个 IP 地址。注意如需修改的白名单绑定有安全组,或需要在修改白名单时为白名单绑定安全组,则 ModifyMode 只能取值为 Cover。
- Security
Group []AllowBind Infos List Security Group Bind Info Args - Update
Security boolGroup - 是否更新白名单所绑定的安全组。取值:true:更新。false:不更新。默认值。
- User
Allow stringList - 安全组之外的、需要加入白名单的 IP 地址。可输入 IP 地址或 CIDR 格式的 IP 地址段。说明该字段不能与 AllowList 字段同时使用。
- allow
List StringCategory - 白名单分类。取值:Ordinary:普通白名单。Default:默认白名单。说明该参数作为请求参数时无默认值,不传入时则查询所有类别的白名单。
- allow
List StringDesc - 白名单的描述信息。长度在 200 字符以内。默认值为空字符串。
- allow
List StringName - 白名单名称的命名规则如下:在当前地域内,白名单名称唯一。以中文、字母或下划线()开头。只能包含中文、字母、数字、下划线()和中划线(-)。长度为 1~128 个字符。
- allow
List StringType - 白名单采用的网络协议类型。取值为 IPv4(默认值)。
- allow
Lists List<String> - 白名单中包含的 IP 地址。支持以下两种格式:IP 地址格式。例如:10.23.12.24。CIDR 的 IP 地址段格式。例如:10.23.12.0/24(无类别域间路由,24 表示了地址中前缀的长度,范围为 1~32)。说明每个白名单最多可添加 300 个 IP 或 IP 地址段,当 IP 较多时,建议合并为 IP 段填入,例如10.23.12.0/24。禁止将 0.0.0.0/0 之外的形如 x.x.x.x/0 结尾的 IP 地址加入白名单。该字段不能与 UserAllowList 字段同时使用。
- associated
Instance IntegerNum - 该白名单绑定的实例数量。
- ip
Address String - 按 IP 地址查询白名单。支持传入多个 IP 地址,多个 IP 地址使用英文逗号(,)分隔。说明如果白名单包含了多个 IP 地址的任意子集,该白名单就会被返回。
- modify
Mode String - 修改白名单的方式。取值:Cover:覆盖,即使用 AllowList 字段的值覆盖原白名单。默认值。Append:追加,即在原白名单中增加 AllowList 字段包含的 IP 地址。Delete:删除,即在原白名单中删除 AllowList 字段包含的 IP 地址。至少需要保留一个 IP 地址。注意如需修改的白名单绑定有安全组,或需要在修改白名单时为白名单绑定安全组,则 ModifyMode 只能取值为 Cover。
- security
Group List<AllowBind Infos List Security Group Bind Info> - update
Security BooleanGroup - 是否更新白名单所绑定的安全组。取值:true:更新。false:不更新。默认值。
- user
Allow StringList - 安全组之外的、需要加入白名单的 IP 地址。可输入 IP 地址或 CIDR 格式的 IP 地址段。说明该字段不能与 AllowList 字段同时使用。
- allow
List stringCategory - 白名单分类。取值:Ordinary:普通白名单。Default:默认白名单。说明该参数作为请求参数时无默认值,不传入时则查询所有类别的白名单。
- allow
List stringDesc - 白名单的描述信息。长度在 200 字符以内。默认值为空字符串。
- allow
List stringName - 白名单名称的命名规则如下:在当前地域内,白名单名称唯一。以中文、字母或下划线()开头。只能包含中文、字母、数字、下划线()和中划线(-)。长度为 1~128 个字符。
- allow
List stringType - 白名单采用的网络协议类型。取值为 IPv4(默认值)。
- allow
Lists string[] - 白名单中包含的 IP 地址。支持以下两种格式:IP 地址格式。例如:10.23.12.24。CIDR 的 IP 地址段格式。例如:10.23.12.0/24(无类别域间路由,24 表示了地址中前缀的长度,范围为 1~32)。说明每个白名单最多可添加 300 个 IP 或 IP 地址段,当 IP 较多时,建议合并为 IP 段填入,例如10.23.12.0/24。禁止将 0.0.0.0/0 之外的形如 x.x.x.x/0 结尾的 IP 地址加入白名单。该字段不能与 UserAllowList 字段同时使用。
- associated
Instance numberNum - 该白名单绑定的实例数量。
- ip
Address string - 按 IP 地址查询白名单。支持传入多个 IP 地址,多个 IP 地址使用英文逗号(,)分隔。说明如果白名单包含了多个 IP 地址的任意子集,该白名单就会被返回。
- modify
Mode string - 修改白名单的方式。取值:Cover:覆盖,即使用 AllowList 字段的值覆盖原白名单。默认值。Append:追加,即在原白名单中增加 AllowList 字段包含的 IP 地址。Delete:删除,即在原白名单中删除 AllowList 字段包含的 IP 地址。至少需要保留一个 IP 地址。注意如需修改的白名单绑定有安全组,或需要在修改白名单时为白名单绑定安全组,则 ModifyMode 只能取值为 Cover。
- security
Group AllowBind Infos List Security Group Bind Info[] - update
Security booleanGroup - 是否更新白名单所绑定的安全组。取值:true:更新。false:不更新。默认值。
- user
Allow stringList - 安全组之外的、需要加入白名单的 IP 地址。可输入 IP 地址或 CIDR 格式的 IP 地址段。说明该字段不能与 AllowList 字段同时使用。
- allow_
list_ strcategory - 白名单分类。取值:Ordinary:普通白名单。Default:默认白名单。说明该参数作为请求参数时无默认值,不传入时则查询所有类别的白名单。
- allow_
list_ strdesc - 白名单的描述信息。长度在 200 字符以内。默认值为空字符串。
- allow_
list_ strname - 白名单名称的命名规则如下:在当前地域内,白名单名称唯一。以中文、字母或下划线()开头。只能包含中文、字母、数字、下划线()和中划线(-)。长度为 1~128 个字符。
- allow_
list_ strtype - 白名单采用的网络协议类型。取值为 IPv4(默认值)。
- allow_
lists Sequence[str] - 白名单中包含的 IP 地址。支持以下两种格式:IP 地址格式。例如:10.23.12.24。CIDR 的 IP 地址段格式。例如:10.23.12.0/24(无类别域间路由,24 表示了地址中前缀的长度,范围为 1~32)。说明每个白名单最多可添加 300 个 IP 或 IP 地址段,当 IP 较多时,建议合并为 IP 段填入,例如10.23.12.0/24。禁止将 0.0.0.0/0 之外的形如 x.x.x.x/0 结尾的 IP 地址加入白名单。该字段不能与 UserAllowList 字段同时使用。
- associated_
instance_ intnum - 该白名单绑定的实例数量。
- ip_
address str - 按 IP 地址查询白名单。支持传入多个 IP 地址,多个 IP 地址使用英文逗号(,)分隔。说明如果白名单包含了多个 IP 地址的任意子集,该白名单就会被返回。
- modify_
mode str - 修改白名单的方式。取值:Cover:覆盖,即使用 AllowList 字段的值覆盖原白名单。默认值。Append:追加,即在原白名单中增加 AllowList 字段包含的 IP 地址。Delete:删除,即在原白名单中删除 AllowList 字段包含的 IP 地址。至少需要保留一个 IP 地址。注意如需修改的白名单绑定有安全组,或需要在修改白名单时为白名单绑定安全组,则 ModifyMode 只能取值为 Cover。
- security_
group_ Sequence[Allowbind_ infos List Security Group Bind Info Args] - update_
security_ boolgroup - 是否更新白名单所绑定的安全组。取值:true:更新。false:不更新。默认值。
- user_
allow_ strlist - 安全组之外的、需要加入白名单的 IP 地址。可输入 IP 地址或 CIDR 格式的 IP 地址段。说明该字段不能与 AllowList 字段同时使用。
- allow
List StringCategory - 白名单分类。取值:Ordinary:普通白名单。Default:默认白名单。说明该参数作为请求参数时无默认值,不传入时则查询所有类别的白名单。
- allow
List StringDesc - 白名单的描述信息。长度在 200 字符以内。默认值为空字符串。
- allow
List StringName - 白名单名称的命名规则如下:在当前地域内,白名单名称唯一。以中文、字母或下划线()开头。只能包含中文、字母、数字、下划线()和中划线(-)。长度为 1~128 个字符。
- allow
List StringType - 白名单采用的网络协议类型。取值为 IPv4(默认值)。
- allow
Lists List<String> - 白名单中包含的 IP 地址。支持以下两种格式:IP 地址格式。例如:10.23.12.24。CIDR 的 IP 地址段格式。例如:10.23.12.0/24(无类别域间路由,24 表示了地址中前缀的长度,范围为 1~32)。说明每个白名单最多可添加 300 个 IP 或 IP 地址段,当 IP 较多时,建议合并为 IP 段填入,例如10.23.12.0/24。禁止将 0.0.0.0/0 之外的形如 x.x.x.x/0 结尾的 IP 地址加入白名单。该字段不能与 UserAllowList 字段同时使用。
- associated
Instance NumberNum - 该白名单绑定的实例数量。
- ip
Address String - 按 IP 地址查询白名单。支持传入多个 IP 地址,多个 IP 地址使用英文逗号(,)分隔。说明如果白名单包含了多个 IP 地址的任意子集,该白名单就会被返回。
- modify
Mode String - 修改白名单的方式。取值:Cover:覆盖,即使用 AllowList 字段的值覆盖原白名单。默认值。Append:追加,即在原白名单中增加 AllowList 字段包含的 IP 地址。Delete:删除,即在原白名单中删除 AllowList 字段包含的 IP 地址。至少需要保留一个 IP 地址。注意如需修改的白名单绑定有安全组,或需要在修改白名单时为白名单绑定安全组,则 ModifyMode 只能取值为 Cover。
- security
Group List<Property Map>Bind Infos - update
Security BooleanGroup - 是否更新白名单所绑定的安全组。取值:true:更新。false:不更新。默认值。
- user
Allow StringList - 安全组之外的、需要加入白名单的 IP 地址。可输入 IP 地址或 CIDR 格式的 IP 地址段。说明该字段不能与 AllowList 字段同时使用。
Outputs
All input properties are implicitly available as output properties. Additionally, the AllowList resource produces the following output properties:
- Allow
List stringId - 白名单 ID。
- Allow
List intIp Num - 白名单中 IP 地址或 IP 地址段的数量。
- Associated
Instances List<Byteplus.Allow List Associated Instance> - Id string
- The provider-assigned unique ID for this managed resource.
- Allow
List stringId - 白名单 ID。
- Allow
List intIp Num - 白名单中 IP 地址或 IP 地址段的数量。
- Associated
Instances []AllowList Associated Instance - Id string
- The provider-assigned unique ID for this managed resource.
- allow
List StringId - 白名单 ID。
- allow
List IntegerIp Num - 白名单中 IP 地址或 IP 地址段的数量。
- associated
Instances List<AllowList Associated Instance> - id String
- The provider-assigned unique ID for this managed resource.
- allow
List stringId - 白名单 ID。
- allow
List numberIp Num - 白名单中 IP 地址或 IP 地址段的数量。
- associated
Instances AllowList Associated Instance[] - id string
- The provider-assigned unique ID for this managed resource.
- allow_
list_ strid - 白名单 ID。
- allow_
list_ intip_ num - 白名单中 IP 地址或 IP 地址段的数量。
- associated_
instances Sequence[AllowList Associated Instance] - id str
- The provider-assigned unique ID for this managed resource.
- allow
List StringId - 白名单 ID。
- allow
List NumberIp Num - 白名单中 IP 地址或 IP 地址段的数量。
- associated
Instances List<Property Map> - 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,
ip_address: Optional[str] = None,
modify_mode: Optional[str] = None,
security_group_bind_infos: Optional[Sequence[AllowListSecurityGroupBindInfoArgs]] = None,
update_security_group: Optional[bool] = None,
user_allow_list: Optional[str] = None) -> AllowListfunc 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:rdspostgresql: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.
- Allow
List stringCategory - 白名单分类。取值:Ordinary:普通白名单。Default:默认白名单。说明该参数作为请求参数时无默认值,不传入时则查询所有类别的白名单。
- Allow
List stringDesc - 白名单的描述信息。长度在 200 字符以内。默认值为空字符串。
- Allow
List stringId - 白名单 ID。
- Allow
List intIp Num - 白名单中 IP 地址或 IP 地址段的数量。
- Allow
List stringName - 白名单名称的命名规则如下:在当前地域内,白名单名称唯一。以中文、字母或下划线()开头。只能包含中文、字母、数字、下划线()和中划线(-)。长度为 1~128 个字符。
- Allow
List stringType - 白名单采用的网络协议类型。取值为 IPv4(默认值)。
- Allow
List List<string>Value - 白名单中包含的 IP 地址。支持以下两种格式:IP 地址格式。例如:10.23.12.24。CIDR 的 IP 地址段格式。例如:10.23.12.0/24(无类别域间路由,24 表示了地址中前缀的长度,范围为 1~32)。说明每个白名单最多可添加 300 个 IP 或 IP 地址段,当 IP 较多时,建议合并为 IP 段填入,例如10.23.12.0/24。禁止将 0.0.0.0/0 之外的形如 x.x.x.x/0 结尾的 IP 地址加入白名单。该字段不能与 UserAllowList 字段同时使用。
- Associated
Instance intNum - 该白名单绑定的实例数量。
- Associated
Instances List<Byteplus.Allow List Associated Instance> - Ip
Address string - 按 IP 地址查询白名单。支持传入多个 IP 地址,多个 IP 地址使用英文逗号(,)分隔。说明如果白名单包含了多个 IP 地址的任意子集,该白名单就会被返回。
- Modify
Mode string - 修改白名单的方式。取值:Cover:覆盖,即使用 AllowList 字段的值覆盖原白名单。默认值。Append:追加,即在原白名单中增加 AllowList 字段包含的 IP 地址。Delete:删除,即在原白名单中删除 AllowList 字段包含的 IP 地址。至少需要保留一个 IP 地址。注意如需修改的白名单绑定有安全组,或需要在修改白名单时为白名单绑定安全组,则 ModifyMode 只能取值为 Cover。
- Security
Group List<Byteplus.Bind Infos Allow List Security Group Bind Info> - Update
Security boolGroup - 是否更新白名单所绑定的安全组。取值:true:更新。false:不更新。默认值。
- User
Allow stringList - 安全组之外的、需要加入白名单的 IP 地址。可输入 IP 地址或 CIDR 格式的 IP 地址段。说明该字段不能与 AllowList 字段同时使用。
- Allow
List stringCategory - 白名单分类。取值:Ordinary:普通白名单。Default:默认白名单。说明该参数作为请求参数时无默认值,不传入时则查询所有类别的白名单。
- Allow
List stringDesc - 白名单的描述信息。长度在 200 字符以内。默认值为空字符串。
- Allow
List stringId - 白名单 ID。
- Allow
List intIp Num - 白名单中 IP 地址或 IP 地址段的数量。
- Allow
List stringName - 白名单名称的命名规则如下:在当前地域内,白名单名称唯一。以中文、字母或下划线()开头。只能包含中文、字母、数字、下划线()和中划线(-)。长度为 1~128 个字符。
- Allow
List stringType - 白名单采用的网络协议类型。取值为 IPv4(默认值)。
- Allow
Lists []string - 白名单中包含的 IP 地址。支持以下两种格式:IP 地址格式。例如:10.23.12.24。CIDR 的 IP 地址段格式。例如:10.23.12.0/24(无类别域间路由,24 表示了地址中前缀的长度,范围为 1~32)。说明每个白名单最多可添加 300 个 IP 或 IP 地址段,当 IP 较多时,建议合并为 IP 段填入,例如10.23.12.0/24。禁止将 0.0.0.0/0 之外的形如 x.x.x.x/0 结尾的 IP 地址加入白名单。该字段不能与 UserAllowList 字段同时使用。
- Associated
Instance intNum - 该白名单绑定的实例数量。
- Associated
Instances []AllowList Associated Instance Args - Ip
Address string - 按 IP 地址查询白名单。支持传入多个 IP 地址,多个 IP 地址使用英文逗号(,)分隔。说明如果白名单包含了多个 IP 地址的任意子集,该白名单就会被返回。
- Modify
Mode string - 修改白名单的方式。取值:Cover:覆盖,即使用 AllowList 字段的值覆盖原白名单。默认值。Append:追加,即在原白名单中增加 AllowList 字段包含的 IP 地址。Delete:删除,即在原白名单中删除 AllowList 字段包含的 IP 地址。至少需要保留一个 IP 地址。注意如需修改的白名单绑定有安全组,或需要在修改白名单时为白名单绑定安全组,则 ModifyMode 只能取值为 Cover。
- Security
Group []AllowBind Infos List Security Group Bind Info Args - Update
Security boolGroup - 是否更新白名单所绑定的安全组。取值:true:更新。false:不更新。默认值。
- User
Allow stringList - 安全组之外的、需要加入白名单的 IP 地址。可输入 IP 地址或 CIDR 格式的 IP 地址段。说明该字段不能与 AllowList 字段同时使用。
- allow
List StringCategory - 白名单分类。取值:Ordinary:普通白名单。Default:默认白名单。说明该参数作为请求参数时无默认值,不传入时则查询所有类别的白名单。
- allow
List StringDesc - 白名单的描述信息。长度在 200 字符以内。默认值为空字符串。
- allow
List StringId - 白名单 ID。
- allow
List IntegerIp Num - 白名单中 IP 地址或 IP 地址段的数量。
- allow
List StringName - 白名单名称的命名规则如下:在当前地域内,白名单名称唯一。以中文、字母或下划线()开头。只能包含中文、字母、数字、下划线()和中划线(-)。长度为 1~128 个字符。
- allow
List StringType - 白名单采用的网络协议类型。取值为 IPv4(默认值)。
- allow
Lists List<String> - 白名单中包含的 IP 地址。支持以下两种格式:IP 地址格式。例如:10.23.12.24。CIDR 的 IP 地址段格式。例如:10.23.12.0/24(无类别域间路由,24 表示了地址中前缀的长度,范围为 1~32)。说明每个白名单最多可添加 300 个 IP 或 IP 地址段,当 IP 较多时,建议合并为 IP 段填入,例如10.23.12.0/24。禁止将 0.0.0.0/0 之外的形如 x.x.x.x/0 结尾的 IP 地址加入白名单。该字段不能与 UserAllowList 字段同时使用。
- associated
Instance IntegerNum - 该白名单绑定的实例数量。
- associated
Instances List<AllowList Associated Instance> - ip
Address String - 按 IP 地址查询白名单。支持传入多个 IP 地址,多个 IP 地址使用英文逗号(,)分隔。说明如果白名单包含了多个 IP 地址的任意子集,该白名单就会被返回。
- modify
Mode String - 修改白名单的方式。取值:Cover:覆盖,即使用 AllowList 字段的值覆盖原白名单。默认值。Append:追加,即在原白名单中增加 AllowList 字段包含的 IP 地址。Delete:删除,即在原白名单中删除 AllowList 字段包含的 IP 地址。至少需要保留一个 IP 地址。注意如需修改的白名单绑定有安全组,或需要在修改白名单时为白名单绑定安全组,则 ModifyMode 只能取值为 Cover。
- security
Group List<AllowBind Infos List Security Group Bind Info> - update
Security BooleanGroup - 是否更新白名单所绑定的安全组。取值:true:更新。false:不更新。默认值。
- user
Allow StringList - 安全组之外的、需要加入白名单的 IP 地址。可输入 IP 地址或 CIDR 格式的 IP 地址段。说明该字段不能与 AllowList 字段同时使用。
- allow
List stringCategory - 白名单分类。取值:Ordinary:普通白名单。Default:默认白名单。说明该参数作为请求参数时无默认值,不传入时则查询所有类别的白名单。
- allow
List stringDesc - 白名单的描述信息。长度在 200 字符以内。默认值为空字符串。
- allow
List stringId - 白名单 ID。
- allow
List numberIp Num - 白名单中 IP 地址或 IP 地址段的数量。
- allow
List stringName - 白名单名称的命名规则如下:在当前地域内,白名单名称唯一。以中文、字母或下划线()开头。只能包含中文、字母、数字、下划线()和中划线(-)。长度为 1~128 个字符。
- allow
List stringType - 白名单采用的网络协议类型。取值为 IPv4(默认值)。
- allow
Lists string[] - 白名单中包含的 IP 地址。支持以下两种格式:IP 地址格式。例如:10.23.12.24。CIDR 的 IP 地址段格式。例如:10.23.12.0/24(无类别域间路由,24 表示了地址中前缀的长度,范围为 1~32)。说明每个白名单最多可添加 300 个 IP 或 IP 地址段,当 IP 较多时,建议合并为 IP 段填入,例如10.23.12.0/24。禁止将 0.0.0.0/0 之外的形如 x.x.x.x/0 结尾的 IP 地址加入白名单。该字段不能与 UserAllowList 字段同时使用。
- associated
Instance numberNum - 该白名单绑定的实例数量。
- associated
Instances AllowList Associated Instance[] - ip
Address string - 按 IP 地址查询白名单。支持传入多个 IP 地址,多个 IP 地址使用英文逗号(,)分隔。说明如果白名单包含了多个 IP 地址的任意子集,该白名单就会被返回。
- modify
Mode string - 修改白名单的方式。取值:Cover:覆盖,即使用 AllowList 字段的值覆盖原白名单。默认值。Append:追加,即在原白名单中增加 AllowList 字段包含的 IP 地址。Delete:删除,即在原白名单中删除 AllowList 字段包含的 IP 地址。至少需要保留一个 IP 地址。注意如需修改的白名单绑定有安全组,或需要在修改白名单时为白名单绑定安全组,则 ModifyMode 只能取值为 Cover。
- security
Group AllowBind Infos List Security Group Bind Info[] - update
Security booleanGroup - 是否更新白名单所绑定的安全组。取值:true:更新。false:不更新。默认值。
- user
Allow stringList - 安全组之外的、需要加入白名单的 IP 地址。可输入 IP 地址或 CIDR 格式的 IP 地址段。说明该字段不能与 AllowList 字段同时使用。
- allow_
list_ strcategory - 白名单分类。取值:Ordinary:普通白名单。Default:默认白名单。说明该参数作为请求参数时无默认值,不传入时则查询所有类别的白名单。
- allow_
list_ strdesc - 白名单的描述信息。长度在 200 字符以内。默认值为空字符串。
- allow_
list_ strid - 白名单 ID。
- allow_
list_ intip_ num - 白名单中 IP 地址或 IP 地址段的数量。
- allow_
list_ strname - 白名单名称的命名规则如下:在当前地域内,白名单名称唯一。以中文、字母或下划线()开头。只能包含中文、字母、数字、下划线()和中划线(-)。长度为 1~128 个字符。
- allow_
list_ strtype - 白名单采用的网络协议类型。取值为 IPv4(默认值)。
- allow_
lists Sequence[str] - 白名单中包含的 IP 地址。支持以下两种格式:IP 地址格式。例如:10.23.12.24。CIDR 的 IP 地址段格式。例如:10.23.12.0/24(无类别域间路由,24 表示了地址中前缀的长度,范围为 1~32)。说明每个白名单最多可添加 300 个 IP 或 IP 地址段,当 IP 较多时,建议合并为 IP 段填入,例如10.23.12.0/24。禁止将 0.0.0.0/0 之外的形如 x.x.x.x/0 结尾的 IP 地址加入白名单。该字段不能与 UserAllowList 字段同时使用。
- associated_
instance_ intnum - 该白名单绑定的实例数量。
- associated_
instances Sequence[AllowList Associated Instance Args] - ip_
address str - 按 IP 地址查询白名单。支持传入多个 IP 地址,多个 IP 地址使用英文逗号(,)分隔。说明如果白名单包含了多个 IP 地址的任意子集,该白名单就会被返回。
- modify_
mode str - 修改白名单的方式。取值:Cover:覆盖,即使用 AllowList 字段的值覆盖原白名单。默认值。Append:追加,即在原白名单中增加 AllowList 字段包含的 IP 地址。Delete:删除,即在原白名单中删除 AllowList 字段包含的 IP 地址。至少需要保留一个 IP 地址。注意如需修改的白名单绑定有安全组,或需要在修改白名单时为白名单绑定安全组,则 ModifyMode 只能取值为 Cover。
- security_
group_ Sequence[Allowbind_ infos List Security Group Bind Info Args] - update_
security_ boolgroup - 是否更新白名单所绑定的安全组。取值:true:更新。false:不更新。默认值。
- user_
allow_ strlist - 安全组之外的、需要加入白名单的 IP 地址。可输入 IP 地址或 CIDR 格式的 IP 地址段。说明该字段不能与 AllowList 字段同时使用。
- allow
List StringCategory - 白名单分类。取值:Ordinary:普通白名单。Default:默认白名单。说明该参数作为请求参数时无默认值,不传入时则查询所有类别的白名单。
- allow
List StringDesc - 白名单的描述信息。长度在 200 字符以内。默认值为空字符串。
- allow
List StringId - 白名单 ID。
- allow
List NumberIp Num - 白名单中 IP 地址或 IP 地址段的数量。
- allow
List StringName - 白名单名称的命名规则如下:在当前地域内,白名单名称唯一。以中文、字母或下划线()开头。只能包含中文、字母、数字、下划线()和中划线(-)。长度为 1~128 个字符。
- allow
List StringType - 白名单采用的网络协议类型。取值为 IPv4(默认值)。
- allow
Lists List<String> - 白名单中包含的 IP 地址。支持以下两种格式:IP 地址格式。例如:10.23.12.24。CIDR 的 IP 地址段格式。例如:10.23.12.0/24(无类别域间路由,24 表示了地址中前缀的长度,范围为 1~32)。说明每个白名单最多可添加 300 个 IP 或 IP 地址段,当 IP 较多时,建议合并为 IP 段填入,例如10.23.12.0/24。禁止将 0.0.0.0/0 之外的形如 x.x.x.x/0 结尾的 IP 地址加入白名单。该字段不能与 UserAllowList 字段同时使用。
- associated
Instance NumberNum - 该白名单绑定的实例数量。
- associated
Instances List<Property Map> - ip
Address String - 按 IP 地址查询白名单。支持传入多个 IP 地址,多个 IP 地址使用英文逗号(,)分隔。说明如果白名单包含了多个 IP 地址的任意子集,该白名单就会被返回。
- modify
Mode String - 修改白名单的方式。取值:Cover:覆盖,即使用 AllowList 字段的值覆盖原白名单。默认值。Append:追加,即在原白名单中增加 AllowList 字段包含的 IP 地址。Delete:删除,即在原白名单中删除 AllowList 字段包含的 IP 地址。至少需要保留一个 IP 地址。注意如需修改的白名单绑定有安全组,或需要在修改白名单时为白名单绑定安全组,则 ModifyMode 只能取值为 Cover。
- security
Group List<Property Map>Bind Infos - update
Security BooleanGroup - 是否更新白名单所绑定的安全组。取值:true:更新。false:不更新。默认值。
- user
Allow StringList - 安全组之外的、需要加入白名单的 IP 地址。可输入 IP 地址或 CIDR 格式的 IP 地址段。说明该字段不能与 AllowList 字段同时使用。
Supporting Types
AllowListAssociatedInstance, AllowListAssociatedInstanceArgs
- Instance
Id string - 实例 ID。
- Instance
Name string - 实例名称。
- Vpc string
- 实例所属的 VPC ID。
- Instance
Id string - 实例 ID。
- Instance
Name string - 实例名称。
- Vpc string
- 实例所属的 VPC ID。
- instance
Id String - 实例 ID。
- instance
Name String - 实例名称。
- vpc String
- 实例所属的 VPC ID。
- instance
Id string - 实例 ID。
- instance
Name string - 实例名称。
- vpc string
- 实例所属的 VPC ID。
- instance_
id str - 实例 ID。
- instance_
name str - 实例名称。
- vpc str
- 实例所属的 VPC ID。
- instance
Id String - 实例 ID。
- instance
Name String - 实例名称。
- vpc String
- 实例所属的 VPC ID。
AllowListSecurityGroupBindInfo, AllowListSecurityGroupBindInfoArgs
- Bind
Mode string - 关联安全组的模式。取值:IngressDirectionIp:入方向 IP。AssociateEcsIp:关联 ECSIP。
- Ip
Lists List<string> - 安全组中的 IP 列表。
- Security
Group stringId - 安全组 ID。
- Security
Group stringName - 安全组名称。
- Bind
Mode string - 关联安全组的模式。取值:IngressDirectionIp:入方向 IP。AssociateEcsIp:关联 ECSIP。
- Ip
Lists []string - 安全组中的 IP 列表。
- Security
Group stringId - 安全组 ID。
- Security
Group stringName - 安全组名称。
- bind
Mode String - 关联安全组的模式。取值:IngressDirectionIp:入方向 IP。AssociateEcsIp:关联 ECSIP。
- ip
Lists List<String> - 安全组中的 IP 列表。
- security
Group StringId - 安全组 ID。
- security
Group StringName - 安全组名称。
- bind
Mode string - 关联安全组的模式。取值:IngressDirectionIp:入方向 IP。AssociateEcsIp:关联 ECSIP。
- ip
Lists string[] - 安全组中的 IP 列表。
- security
Group stringId - 安全组 ID。
- security
Group stringName - 安全组名称。
- bind_
mode str - 关联安全组的模式。取值:IngressDirectionIp:入方向 IP。AssociateEcsIp:关联 ECSIP。
- ip_
lists Sequence[str] - 安全组中的 IP 列表。
- security_
group_ strid - 安全组 ID。
- security_
group_ strname - 安全组名称。
- bind
Mode String - 关联安全组的模式。取值:IngressDirectionIp:入方向 IP。AssociateEcsIp:关联 ECSIP。
- ip
Lists List<String> - 安全组中的 IP 列表。
- security
Group StringId - 安全组 ID。
- security
Group StringName - 安全组名称。
Import
$ pulumi import bytepluscc:rdspostgresql/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
byteplusccTerraform Provider.
published on Monday, Mar 9, 2026 by Byteplus
