Domain name for API request: antiddos.intl.tencentcloudapi.com.
This API is used to create a DDoS Defender protection instance.
A protection instance is the basic unit that carries protection policies and protected resources in DDoS Defender. After creation, you can configure protection policies in the instance and bind cloud resources that need protection.
Prerequisites: The current Tencent Cloud root account has subscribed to a DDoS Defender plan. For details, see Purchase Guide.
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: CreateProtection. |
| 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. |
| Name | Yes | String | Protection instance name. Input limit: The protection instance name can contain up to 60 characters and must be unique under the same root account. |
| ProtectionLevel | No | String | Protection level of the protection instance. Valid values:
Available protection levels vary by subscription plan, and the types of protected resources and protection capacity that can be connected also vary accordingly. For details, see DDoS Protection Capacity Description. |
| Tags.N | No | Array of TagInfo | Tag. It is used for permission control and cost allocation of protection instances. You need to first create the corresponding tag in the Tag Console before you can pass in the tag key and tag value here. |
| Parameter Name | Type | Description |
|---|---|---|
| ProtectionId | String | Protection instance ID. |
| 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 create a protection instance named protection_name with the advanced protection level and bind a business tag to it.
POST / HTTP/1.1
Host: antiddos.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateProtection
<Common request parameters>
{
"Name": "protection_name",
"ProtectionLevel": "advanced",
"Tags": [
{
"TagKey": "env",
"TagValue": "production"
}
]
}
{
"Response": {
"ProtectionId": "prot-0004c045b8",
"RequestId": "9kl50bew-89ga-44f4-91ce-78125d53vd2a"
}
}
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 |
|---|---|
| InternalError | Internal error. |
| InvalidParameter | Parameter error. |
| InvalidParameterValue | Parameter value error. |
| LimitExceeded | The quota limit is exceeded. |
| UnsupportedOperation | The operation is not supported. |
Esta página foi útil?
Você também pode entrar em contato com a Equipe de vendas ou Enviar um tíquete em caso de ajuda.
comentários