Domain name for API request: tdmq.intl.tencentcloudapi.com.
This API is used to create a TDMQ namespace.
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: CreateEnvironment. |
| Version | Yes | String | Common Params. The value used for this API: 2020-02-17. |
| Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. This API only supports: ap-bangkok, ap-beijing, ap-chengdu, ap-chongqing, ap-guangzhou, ap-hongkong, ap-jakarta, ap-nanjing, ap-seoul, ap-shanghai, ap-shanghai-fsi, ap-shenzhen-fsi, ap-singapore, ap-tokyo, eu-frankfurt, na-ashburn, na-siliconvalley. |
| EnvironmentId | Yes | String | Environment (namespace) name, which can contain up to 16 letters, digits, hyphens, and underscores. |
| MsgTTL | Yes | Integer | Retention period for unconsumed messages in seconds. Value range: 60s to 1,296,000s (or 15 days). |
| ClusterId | Yes | String | Pulsar cluster ID |
| Remark | No | String | Remarks (up to 128 characters). |
| RetentionPolicy | No | RetentionPolicy | Message retention policy |
| AutoSubscriptionCreation | No | Boolean | Whether to enable "Auto-Create Subscription" |
| Parameter Name | Type | Description |
|---|---|---|
| EnvironmentId | String | Environment (namespace) name. |
| MsgTTL | Integer | TTL for unconsumed messages in seconds. |
| Remark | String | Remarks (up to 128 characters). Note: this field may return null, indicating that no valid values can be obtained. |
| NamespaceId | String | Namespace 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 check whether auto subscription creation is enabled.
POST / HTTP/1.1
Host: tdmq.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateEnvironment
<Common request parameters>
{
"EnvironmentId": "devNamespace",
"MsgTTL": "100",
"AutoSubscriptionCreation": true,
"ClusterId": "pulsar-b843bz38z5mz"
}{
"Response": {
"EnvironmentId": "devNamespace",
"NamespaceId": "namespace-8893gp3428",
"MsgTTL": 100,
"Remark": "devRemark",
"RequestId": "0843ea4f-d6ba-463b-952c-75708a7e8901"
}
}
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.UnauthorizedOperation | CAM authentication failed. |
| FailedOperation | Operation failed. |
| FailedOperation.CloudService | Third-Party cloud service exception. try again later. |
| FailedOperation.CreateEnvironment | Failed to create the environment. |
| FailedOperation.CreateNamespace | Failed to create the namespace. |
| FailedOperation.OperateLater | Task in progress. please try again later. |
| FailedOperation.ReplicationDestCheckFailedError | Cross-Region replication validation failed. |
| FailedOperation.ReplicationSourceCheckFailedError | Cross-Region replication verification failed. |
| InternalError.SystemError | System error. |
| InvalidParameterValue.InvalidParams | The parameter value is out of the value range. |
| InvalidParameterValue.TTL | The message TTL value is invalid. |
| LimitExceeded.Environments | The number of environments under the instance exceeds the limit. |
| LimitExceeded.Namespaces | The number of namespaces under the instance exceeds the limit. |
| LimitExceeded.RetentionSize | The remaining quota has been exceeded. Please enter a valid value. |
| LimitExceeded.RetentionTime | The message retention period limit has been exceeded. Please enter a valid value. |
| MissingParameter.NeedMoreParams | A required parameter is missing. |
| OperationDenied.DefaultEnvironment | Operations on the default environment are not allowed. |
| ResourceInUse | The resource is in use. |
| ResourceInUse.Namespace | A namespace with the same name already exists. |
| ResourceNotFound.Cluster | The cluster does not exist. |
Feedback