Domain name for API request: tat.intl.tencentcloudapi.com.
This API is used to create a registration code.
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: CreateRegisterCode. |
| Version | Yes | String | Common Params. The value used for this API: 2020-10-28. |
| Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. |
| Description | No | String | Describes the registration code. maximum length is 128 characters. |
| InstanceNamePrefix | No | String | Prefix of the registered instance name. maximum length is 32 characters. |
| RegisterLimit | No | Integer | Number of instances allowed by the registration code. default value is 10, minimum value is 1, maximum value is 10000. |
| EffectiveTime | No | Integer | The validity time of the registration code is measured in hours. default value is 4. -If the input value is less than or equal to 99999, the time is deemed valid in hours. -If the input value is more than 99999, it is set to permanently valid. |
| IpAddressRange | No | String | Restrict the registration code to register only from the public outbound ip described by IpAddressRange. Empty by default, meaning no restrictions. The value should be in standard IPv4 or CIDRv4 format, such as 192.168.1.1 or 192.168.0.0/16. |
| Parameter Name | Type | Description |
|---|---|---|
| RegisterCodeId | String | Registration code ID. |
| RegisterCodeValue | String | Registration code value. |
| 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. |
Create a registration code with parameter.
POST / HTTP/1.1
Host: tat.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateRegisterCode
<Common request parameters>
{
"Description": "webserver",
"InstanceNamePrefix": "webserver",
"RegisterLimit": 10,
"EffectiveTime": 4,
"IpAddressRange": "192.168.10.1/10"
}
{
"Response": {
"RegisterCodeId": "9b5rb72b-418f-4a81-b32e-f8bc80eef678",
"RegisterCodeValue": "21e9b871e123427dbee18b0cf3e0d766f91d81a9902843b7b046d7b9ffb9d45a",
"RequestId": "3f5bf8de-a51a-4ac0-8d95-ad56702cab1f"
}
}
Create a registration code - no parameters.
POST / HTTP/1.1
Host: tat.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateRegisterCode
<Common request parameters>
{}
{
"Response": {
"RegisterCodeId": "9b5rb72b-418f-4a81-b32e-f8bc80eef678",
"RegisterCodeValue": "21e9b871e123427dbee18b0cf3e0d766f91d81a9902843b7b046d7b9ffb9d45a",
"RequestId": "2e8bf8de-a51a-4ac0-8d95-ad56702cab1f"
}
}
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 |
|---|---|
| InvalidParameter | Invalid parameter. |
| InvalidParameterValue.TooLarge | Parameter value is too large. |
| InvalidParameterValue.TooLong | Length limit exceeded. |
| InvalidParameterValue.TooSmall | Parameter value is too low. |
| ResourceNotFound.RoleNotFound | The role does not exist. |
| UnauthorizedOperation.AssumeRoleUnauthorized | Role play unauthorized. |
Feedback