Domain name for API request: billing.intl.tencentcloudapi.com.
Create a sharing rule.
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: CreateAllocationRule. |
| Version | Yes | String | Common Params. The value used for this API: 2018-07-09. |
| Region | No | String | Common Params. This parameter is not required. |
| RuleList | Yes | AllocationRulesSummary | List of sharing rules. |
| Month | No | String | Month, the current month by default if not provided. |
| Parameter Name | Type | Description |
|---|---|---|
| Id | Integer | Add new sharing rule 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. |
POST / HTTP/1.1
Host: billing.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateAllocationRule
<Common request parameters>
{
"RuleList": {
"Name": "Test 1",
"Type": "2",
"RatioDetail": [
{
"Ratio": "25",
"NodeId": "6"
},
{
"Ratio": "25",
"NodeId": "7"
},
{
"Ratio": "25",
"NodeId": "8"
},
{
"Ratio": "25",
"NodeId": "9"
}
],
"RuleDetail": {
"Connectors": "and",
"Children": [
{
"RuleKey": "ownerUin",
"Operator": "in",
"RuleValue": [
"700000384179"
]
},
{
"RuleKey": "businessCode",
"Operator": "in",
"RuleValue": [
"p_cbs"
]
},
{
"Connectors": "or",
"Children": [
{
"RuleKey": "itemCode",
"Operator": "in",
"RuleValue": [
"sv_cbs_memspace_premium",
"sv_cdn_cn_flux_package",
"sv_ci_pkg_co_re_10"
]
}
]
},
{
"RuleKey": "projectId",
"Operator": "in",
"RuleValue": [
"0"
]
}
]
}
}
}{
"Response": {
"Id": 33,
"RequestId": "aab8393d-ceba-44e2-819f-6d4fd0ebf987"
}
}
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 |
|---|---|
| FailedOperation.NumLimitError | The quantity exceeds the maximum limit. |
| InternalError | Internal error. |
| InternalError.DbOperatError | Database operation failed. |
| InternalError.GatewayError | Gateway error. |
| InvalidParameter | Invalid parameter. |
| OperationDenied | Operation denied. |
Feedback