Domain name for API request: antiddos.intl.tencentcloudapi.com.
This API is used to modify the protected resources of a protection instance.
This API is used to add, replace, or remove protected resources (that is, cloud resources bound to the instance for protection) in a protection instance.
A maximum of 20 requests can be initiated per second for this API.
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: ModifyProtectionResource. |
| Version | Yes | String | Common Params. The value used for this API: 2025-09-03. |
| Region | No | String | Common Params. This parameter is not required for this API. |
| ProtectionId | Yes | String | ID of the protection instance. |
| Mode | Yes | String | Operation type. Valid values:
Default value: APPEND |
| Resources.N | No | Array of String | Protected resources, which must be in the six-segment resource format. The specific formats are as follows:
For valid values, see CAM-supported APIs |
| ConflictStrategy | No | String | Conflict policy. Valid values:
Default value: REJECT |
| 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. |
This example shows you how to bind two additional EIPs to the protection instance prot-0004c045b8 as protected resources.
POST / HTTP/1.1
Host: antiddos.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyProtectionResource
<Common request parameters>
{
"ProtectionId": "prot-0004c045b8",
"Mode": "APPEND",
"Resources": [
"qcs::cvm:ap-guangzhou:uin/164256472:eip/eip-1a2b3c4d",
"qcs::cvm:ap-guangzhou:uin/164256472:eip/eip-5e6f7g8h"
]
}
{
"Response": {
"RequestId": "9kl50bew-89ga-44f4-91ce-78125d53vd2a"
}
}
This example shows you how to update the protected resource of the protection instance prot-0004c045b8 to a CLB instance, with forced binding if the resource is already bound to another protection instance.
POST / HTTP/1.1
Host: antiddos.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyProtectionResource
<Common request parameters>
{
"ProtectionId": "prot-0004c045b8",
"Mode": "UPDATE",
"Resources": [
"qcs::clb:ap-guangzhou:uin/164256472:clb/lb-1a2b3c4d"
],
"ConflictStrategy": "FORCE"
}
{
"Response": {
"RequestId": "ea95fca6-715c-4995-9680-2b72b394a2cb"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| AuthFailure | CAM signature/authentication error. |
| InternalError | Internal error. |
| InvalidParameter | Parameter error. |
| InvalidParameterValue | Parameter value error. |
| LimitExceeded | The quota limit is exceeded. |
| OperationDenied | Operation denied. |
| OperationDenied.SecurityLackOfResources | The standalone DDoS protection resources are being replenished. If you need to subscribe urgently, contact us for support. |
| ResourceInUse | The resource is occupied. |
| ResourceNotFound | Resources do not exist. |
| UnauthorizedOperation | Unauthorized operation. |
| UnsupportedOperation | The operation is not supported. |
Apakah halaman ini membantu?
Anda juga dapat Menghubungi Penjualan atau Mengirimkan Tiket untuk meminta bantuan.
masukan