ModifySecurityIPGroup
1. API Description
Domain name for API request: teo.intl.tencentcloudapi.com.
This API is used to modify a security IP group.
A maximum of 20 requests can be initiated per second for this API.
2. Input Parameters
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
Parameter Name | Required | Type | Description |
---|---|---|---|
Action | Yes | String | Common Params. The value used for this API: ModifySecurityIPGroup. |
Version | Yes | String | Common Params. The value used for this API: 2022-09-01. |
Region | No | String | Common Params. This parameter is not required. |
ZoneId | Yes | String | Site ID. |
IPGroup | Yes | IPGroup | IP group configuration. |
Mode | Yes | String | Operation type. valid values: append : add new IP addresses or set scheduled expiration time to IPGroup ;remove : delete specified IP addresses or their scheduled expiration time from IPGroup ;update : replace all Content of Content or ExpireInfo in IPGroup and modify the IPGroup name.append operation: Content parameter simultaneously. if the IP or range already has an expiration time, the new time will overwrite the original one.remove operation: update operation: Content , unexpired times of ips or ranges not in Content will be deleted;IPExpireInfo , the ips or ranges in IPExpireInfo must exist in Content or the IP group. |
3. Output Parameters
Parameter Name | Type | Description |
---|---|---|
RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
4. Example
Example1 Adding IPs or Ranges to an IP Group
To append the following IPs or ranges to an existing IP group: 1.1.1.1, 2.2.2.0/24.
Input Example
POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifySecurityIPGroup
<Common request parameters>
{
"IPGroup": {
"GroupId": 67,
"Name": "test3",
"Content": [
"1.1.1.1",
"2.2.2.0/24"
]
},
"Mode": "append",
"ZoneId": "zone-hduqwh"
}
Output Example
{
"Response": {
"RequestId": "728cb059-8595-44c7-b6c6-b4a539ae823f"
}
}
Example2 Adding IPs or Ranges to a Security IP Group and Configuring the Expiration Time
This example shows you how to add the following IPs or ranges to an already existing security IP group: 1.1.1.1, 2.2.2.0/24, 3.3.3.3 and 4.4.4.4, and configure expiration time for 1.1.1.1, 2.2.2.0/24 and 4.4.4.4.
Input Example
POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifySecurityIPGroup
<Common request parameters>
{
"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"
}
Output Example
{
"Response": {
"RequestId": "728cb059-8595-44c7-b6c6-b4a539ae823f"
}
}
Example3 Modify the Expiry Date of IPs or Ranges in an IP Group
The IP 1.1.1.1 in the IP group has a configured expiration time and now needs to change its scheduled expiration time.
Input Example
POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifySecurityIPGroup
<Common request parameters>
{
"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"
}
Output Example
{
"Response": {
"RequestId": "728cb059-8595-44c7-b6c6-b4a539ae823f"
}
}
Example4 Deleting IPs or Ranges From an IP Group
This example shows you how to delete the IP 1.1.1.1 that exists in the IP group.
Input Example
POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifySecurityIPGroup
<Common request parameters>
{
"IPGroup": {
"GroupId": 67,
"Name": "test3",
"Content": [
"1.1.1.1"
]
},
"Mode": "remove",
"ZoneId": "zone-hduqwh"
}
Output Example
{
"Response": {
"RequestId": "5bdc699c-68df-4cb7-9d0a-1c174b0374ad"
}
}
Example5 Deleting the Expiry Date of IPs or Ranges in an IP Group
The IP group contains 1.1.1.1 and is automatically configured with an expiry date. Now need to delete the expiry date of this IP.
Input Example
POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifySecurityIPGroup
<Common request parameters>
{
"IPGroup": {
"GroupId": 67,
"Name": "test3",
"Content": [],
"IPExpireInfo": [
{
"IPList": [
"1.1.1.1"
]
}
]
},
"Mode": "remove",
"ZoneId": "zone-hduqwh"
}
Output Example
{
"Response": {
"RequestId": "728cb059-8595-44c7-b6c6-b4a539ae823f"
}
}
Example6 Full Update of IPs or Ranges in a Security IP Group
A full update of the IP group content is required. The IP or ranges to update are: 1.1.1.1, 2.2.2.0/24.
Input Example
POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifySecurityIPGroup
<Common request parameters>
{
"IPGroup": {
"GroupId": 67,
"Name": "test3",
"Content": [
"1.1.1.1",
"2.2.2.0/24"
]
},
"Mode": "update",
"ZoneId": "zone-hduqwh"
}
Output Example
{
"Response": {
"RequestId": "sh1u8a90-xxxx-49cd-swui-27cb34daa779"
}
}
Example7 Full Update of IPs or Ranges and Expiry Date in a Security IP Group
A full update of the IP group content is required. The new IPs or ranges are: 1.1.1.1, 2.2.2.0/24, 3.3.3.3. Set an expiration time for 1.1.1.1.
Input Example
POST / HTTP/1.1
Host: teo.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifySecurityIPGroup
<Common request parameters>
{
"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"
}
Output Example
{
"Response": {
"RequestId": "728cb059-8595-44c7-b6c6-b4a539ae823f"
}
}
5. Developer Resources
SDK
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
- Tencent Cloud SDK 3.0 for Python
- Tencent Cloud SDK 3.0 for Java
- Tencent Cloud SDK 3.0 for PHP
- Tencent Cloud SDK 3.0 for Go
- Tencent Cloud SDK 3.0 for Node.js
- Tencent Cloud SDK 3.0 for .NET
- Tencent Cloud SDK 3.0 for C++
Command Line Interface
6. Error Code
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
Error Code | Description |
---|---|
InternalError.ProxyServer | An unknown error occurred in the backend server. |
InvalidParameter.Security | Invalid parameter. |
ResourceNotFound | The resource doesn’t exist. |
UnauthorizedOperation.CamUnauthorized | CAM is not authorized. |
UnauthorizedOperation.Unknown | An unknown error occurred in the backend server. |
- 1. API Description
- 2. Input Parameters
- 3. Output Parameters
- 4. Example
- Example1 Adding IPs or Ranges to an IP Group
- Example2 Adding IPs or Ranges to a Security IP Group and Configuring the Expiration Time
- Example3 Modify the Expiry Date of IPs or Ranges in an IP Group
- Example4 Deleting IPs or Ranges From an IP Group
- Example5 Deleting the Expiry Date of IPs or Ranges in an IP Group
- Example6 Full Update of IPs or Ranges in a Security IP Group
- Example7 Full Update of IPs or Ranges and Expiry Date in a Security IP Group
- 5. Developer Resources
- SDK
- Command Line Interface
- 6. Error Code