接口请求域名: teo.intl.tencentcloudapi.com 。
修改安全 IP 组。
默认接口请求频率限制:20次/秒。
以下请求参数列表仅列出了接口请求参数和部分公共参数,完整公共参数列表见 公共请求参数。
| 参数名称 | 必选 | 类型 | 描述 |
|---|---|---|---|
| Action | 是 | String | 公共参数,本接口取值:ModifySecurityIPGroup。 |
| Version | 是 | String | 公共参数,本接口取值:2022-09-01。 |
| Region | 否 | String | 公共参数,此参数为可选参数。 |
| ZoneId | 是 | String | 站点 Id。 |
| IPGroup | 是 | IPGroup | IP 组配置。 |
| Mode | 是 | String | 操作类型,取值有: |
| 参数名称 | 类型 | 描述 |
|---|---|---|
| RequestId | String | 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 |
若向已存在的 IP 组中追加以下 IP 或网段:1.1.1.1、2.2.2.0/24。
POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifySecurityIPGroup
<公共请求参数>
{
"IPGroup": {
"GroupId": 67,
"Name": "test3",
"Content": [
"1.1.1.1",
"2.2.2.0/24"
]
},
"Mode": "append",
"ZoneId": "zone-hduqwh"
}
{
"Response": {
"RequestId": "728cb059-8595-44c7-b6c6-b4a539ae823f"
}
}
需要向已存在安全 IP 组中追加以下 IP 或网段:1.1.1.1、2.2.2.0/24、3.3.3.3 和 4.4.4.4,并为 1.1.1.1、2.2.2.0/24 和 4.4.4.4 分别配置过期时间。
POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifySecurityIPGroup
<公共请求参数>
{
"IPGroup": {
"GroupId": 67,
"Name": "test3",
"Content": [
"1.1.1.1",
"2.2.2.0/24",
"3.3.3.3",
"4.4.4.4"
],
"IPExpireInfo": [
{
"ExpireTime": "2022-01-01T00:00:00+08:00",
"IPList": [
"1.1.1.1",
"4.4.4.4"
]
},
{
"ExpireTime": "2022-01-02T00:00:00+08:00",
"IPList": [
"2.2.2.0/24"
]
}
]
},
"Mode": "append",
"ZoneId": "zone-hduqwh"
}
{
"Response": {
"RequestId": "728cb059-8595-44c7-b6c6-b4a539ae823f"
}
}
IP 组中的 1.1.1.1 已配置过期时间,现在需要更改该 IP 的定时过期时间。
POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifySecurityIPGroup
<公共请求参数>
{
"IPGroup": {
"GroupId": 67,
"Name": "test3",
"Content": [],
"IPExpireInfo": [
{
"ExpireTime": "2022-01-01T00:00:00+08:00",
"IPList": [
"1.1.1.1"
]
}
]
},
"Mode": "append",
"ZoneId": "zone-hduqwh"
}
{
"Response": {
"RequestId": "728cb059-8595-44c7-b6c6-b4a539ae823f"
}
}
IP 组中存在 1.1.1.1,现在需要删除该 IP。
POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifySecurityIPGroup
<公共请求参数>
{
"IPGroup": {
"GroupId": 67,
"Name": "test3",
"Content": [
"1.1.1.1"
]
},
"Mode": "remove",
"ZoneId": "zone-hduqwh"
}
{
"Response": {
"RequestId": "5bdc699c-68df-4cb7-9d0a-1c174b0374ad"
}
}
IP 组中存在 1.1.1.1,并已为该 IP 配置过期时间,现在需要删除该 IP 的过期时间。
POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifySecurityIPGroup
<公共请求参数>
{
"IPGroup": {
"GroupId": 67,
"Name": "test3",
"Content": [],
"IPExpireInfo": [
{
"IPList": [
"1.1.1.1"
]
}
]
},
"Mode": "remove",
"ZoneId": "zone-hduqwh"
}
{
"Response": {
"RequestId": "728cb059-8595-44c7-b6c6-b4a539ae823f"
}
}
需要全量更新 IP 组内容,需更新的 IP 或网段为:1.1.1.1、2.2.2.0/24。
POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifySecurityIPGroup
<公共请求参数>
{
"IPGroup": {
"GroupId": 67,
"Name": "test3",
"Content": [
"1.1.1.1",
"2.2.2.0/24"
]
},
"Mode": "update",
"ZoneId": "zone-hduqwh"
}
{
"Response": {
"RequestId": "sh1u8a90-xxxx-49cd-swui-27cb34daa779"
}
}
需要全量更新 IP 组内容,新更新的 IP 或网段为:1.1.1.1、2.2.2.0/24、3.3.3.3,并为 1.1.1.1 配置过期时间。
POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifySecurityIPGroup
<公共请求参数>
{
"IPGroup": {
"GroupId": 67,
"Name": "test3",
"Content": [
"1.1.1.1",
"2.2.2.0/24",
"3.3.3.3"
],
"IPExpireInfo": [
{
"ExpireTime": "2022-01-01T00:00:00+08:00",
"IPList": [
"1.1.1.1"
]
}
]
},
"Mode": "update",
"ZoneId": "zone-hduqwh"
}
{
"Response": {
"RequestId": "728cb059-8595-44c7-b6c6-b4a539ae823f"
}
}
云 API 3.0 提供了配套的开发工具集(SDK),支持多种编程语言,能更方便的调用 API。
以下仅列出了接口业务逻辑相关的错误码,其他错误码详见 公共错误码。
| 错误码 | 描述 |
|---|---|
| InternalError.ProxyServer | 后端服务器发生未知错误。 |
| InvalidParameter.Security | 参数错误 |
| ResourceNotFound | 资源不存在。 |
| UnauthorizedOperation.CamUnauthorized | Cam 未授权。 |
| UnauthorizedOperation.Unknown | 后端服务器发生未知错误。 |
文档反馈