调用CreateGlobalSecurityIPGroup创建全局IP白名单模板。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String CreateGlobalSecurityIPGroup

系统规定参数。取值:CreateGlobalSecurityIPGroup

ResourceGroupId String rg-************

资源组ID。

RegionId String cn-hangzhou

地域ID。

GlobalIgName String test_123

IP白名单模板名称。IP白名单模板名称需满足如下要求:

  • 由小写字母、数字、下划线(_)组成。
  • 由字母开头、字母或数字结尾。
  • 长度为2~120个字符。
GIpList String 192.168.0.1

白名单模板内的IP地址。

说明 多个IP地址需要用英文逗号隔开,所有IP白名单累积支持添加1000个IP地址或地址段。

返回数据

名称 类型 示例值 描述
RequestId String 9B7BFB11-C077-4FE3-B051-F69CEB******

请求ID。

GlobalSecurityIPGroup Array of GlobalSecurityIPGroup

全局IP白名单模板信息。

GlobalSecurityGroupId String g-zsldxfiwjmti0kcm****

IP白名单模板ID。

GlobalIgName String test_123

IP白名单模板名称。IP白名单模板名称需满足如下要求:

  • 由小写字母、数字、下划线(_)组成。
  • 由字母开头、字母或数字结尾。
  • 长度为2~120个字符。
GIpList String 192.168.0.1

白名单模板内的IP地址。

说明 多个IP地址需要用英文逗号隔开,所有IP白名单累积支持添加1000个IP地址或地址段。
RegionId String cn-hangzhou

地域ID。

示例

请求示例

http(s)://polardb.aliyuncs.com/?Action=CreateGlobalSecurityIPGroup
&ResourceGroupId=rg-************
&RegionId=cn-hangzhou
&GlobalIgName=test_123
&GIpList=192.168.0.1
&公共请求参数

正常返回示例

XML格式

HTTP/1.1 200 OK
Content-Type:application/xml

<CreateGlobalSecurityIPGroupResponse>
    <RequestId>9B7BFB11-C077-4FE3-B051-F69CEB******</RequestId>
    <GlobalSecurityIPGroup>
        <GlobalSecurityGroupId>g-zsldxfiwjmti0kcm****</GlobalSecurityGroupId>
        <GlobalIgName>test_123</GlobalIgName>
        <GIpList>192.168.0.1</GIpList>
        <RegionId>cn-hangzhou</RegionId>
    </GlobalSecurityIPGroup>
</CreateGlobalSecurityIPGroupResponse>

JSON格式

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "9B7BFB11-C077-4FE3-B051-F69CEB******",
  "GlobalSecurityIPGroup" : [ {
    "GlobalSecurityGroupId" : "g-zsldxfiwjmti0kcm****",
    "GlobalIgName" : "test_123",
    "GIpList" : "192.168.0.1",
    "RegionId" : "cn-hangzhou"
  } ]
}

错误码

HttpCode 错误码 错误信息 描述
400 RequiredParam.NotFound Required input param is not found. 所需的输入参数不存在。
400 InvalidSecurityIPList.QuotaExceeded Specified security IP list is not valid: Exceeding the allowed amount of IP address in the list. 安全组IP列表超出了允许的最大限制数
400 InvalidSecurityIPList.Format Specified security IP list format is not valid. 指定的白名单IP地址格式错误。
400 InvalidSecurityIPList.Duplicate Specified security IP list is not valid: Duplicate IP address in the list 指定的安全IP列表无效:列表中有重复的IP地址
404 InvalidUser.NotFound Specified user does not exist. 指定的用户不存在。

访问错误中心查看更多错误码。