You need to enable JavaScript to run this app.
文档中心
云数据库 SQL Server 版

云数据库 SQL Server 版

复制全文
下载 pdf
白名单管理
CreateAllowList - 新建白名单
复制全文
下载 pdf
CreateAllowList - 新建白名单
调用 CreateAllowList 接口创建白名单。​
请求说明​
同步请求。​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
下方仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。​
Action string 必选 示例值:CreateAllowList​
要执行的操作,取值:CreateAllowList。​
​
Version string 必选 示例值:2022-01-01​
API的版本,取值:2022-01-01。​
​
AllowListName string 必选 示例值:Allowlist​
白名单名称。​
​
ProjectName string 可选 示例值:Default​
项目名称。​
​
AllowListDesc string 可选 示例值:Allowlist​
白名单描述。​
​
AllowListType string 可选 示例值:IPv4​
白名单内的 IP 地址类型。当前仅支持 IPv4 地址类型。​
​
AllowListCategory string 可选 示例值:Ordinary​
白名单分类。取值:​
  • Ordinary:普通白名单(默认值)。​
  • Default:默认白名单​
​
UserAllowList string 可选 示例值:11.****.****.1,10.****.****.0/24​
安全组之外的、需要加入白名单的 IP 地址。可输入 IP 地址或 CIDR 格式的 IP 地址段。​
说明​
如果该字段与 AllowList 同时指定,以 UserAllowList 为准。​
​
SecurityGroupBindInfos object[] 可选 示例值:[ { "BindMode": "IngressDirectionIp", "IpList": [ "10.1.1.2/32", "10.1.1.1/32" ], "SecurityGroupId": "sg-30up5lo07p7nk7r2qr******", "SecurityGroupName": "Default" } ]​
白名单关联的安全组的信息。​
​
AllowList string 可选 示例值:10.1.****.****​
IP 白名单,多个 IP 地址请以英文逗号(,)隔开,不可重复。支持如下两种格式:​
  • IP 地址形式,例如:10.23.12.24。​
  • CIDR 形式,例如:10.23.12.0/24(无类域间路由,24 表示了地址中前缀的长度,范围为 1~32)。​
说明​
  • AllowList 和 SecurityGroupBindInfos 参数不可同时为空。​
  • 如果设置 0.0.0.0/0,表示允许所有地址访问,且 0.0.0.0/0 字段的优先级高于其他网段。​
  • 设置 CIDR 192.168.1.0/24,表示允许该网段内的 IP 地址访问;设置 192.168.1.1,表示仅允许该 IP 地址访问。​
​
​
返回参数​
下方仅列出本接口特有的返回参数。更多信息请参见返回结构。​
AllowListId string 示例值:acl-ba7e0e2ab5f04a9f94dc397a9****​
白名单 ID。​
​
​
请求示例​
​
POST /?Action=CreateAllowList&Version=2022-01-01 HTTP/1.1​
Content-Type: application/json​
Host: rds-mssql.cn-beijing.volcengineapi.com​
X-Date: 20230131T101010Z​
Authorization: HMAC-SHA256 Credential=AKLTN2I0MmFiNzMxNWE5NDgzMzk4MmVjMTVkODlkZTZ****/20211202/cn-beijing/rds_mssql/request,SignedHeaders=x-date, Signature=71d31fc7bcf990142851c9833c5656391486cda0ae2e0b8ada733b7c6458****​
​
{​
"AllowListType": "IPv4",​
"AllowList": "0.0.0.0/0",​
"AllowListName": "test",​
"AllowListDesc": "test",​
"SecurityGroupBindInfos": [​
{​
"BindMode": "AssociateEcsIp",​
"IpList": [​
"172.31.0.4"​
],​
"SecurityGroupId": "sg-3ez4xt2d8vf2872200*******",​
"SecurityGroupName": "Default"​
},​
{​
"BindMode": "IngressDirectionIp",​
"IpList": [​
"192.168.0.0/16"​
],​
"SecurityGroupId": "sg-3f01ez24xury872200s*******",​
"SecurityGroupName": "sg-for-vpc-b8pzuqn05yio28j06*******"​
}​
],​
"AllowListCategory": "Default",​
"UserAllowList": "0.0.0.0/0"​
}​
​
返回示例​
​
{​
"ResponseMetadata": {​
"RequestId": "202511171643460822430692037E28AA",​
"Action": "CreateAllowList",​
"Version": "2022-01-01",​
"Service": "rds_mssql",​
"Region": "cn-beijing"​
},​
"Result": {​
"AllowListId": "acl-b5a1d7f114714315b69***********"​
}​
}​
​
错误码​
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。​
​
状态码​
错误码​
错误信息​
说明​
400​
InvalidParameter​
The specified parameter %s is not valid.​
参数 {parameter1} 值无效。​
404​
InvalidProject.NotFound​
The specified project does not exist.​
project不存在。​
​
​
最近更新时间:2026.03.03 17:30:01
这个页面对您有帮助吗?
有用
有用
无用
无用