CreateCostCenterRule
Create a financial unit auto-allocation rule
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
bss:ModifyCostUnit |
create |
*All resources
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| CostCenterId |
integer |
No |
Financial unit ID |
485938 |
| FilterExpression |
object |
No |
Rule expression |
|
| ExpressionType |
string |
No |
Operation type Valid values:
|
NARY |
| OperatorType |
string |
No |
Relational expression Valid values:
|
AND |
| Operands |
array |
No |
Condition expression |
|
|
any |
No |
Condition expression See the example for the overall structure (supports multi-level nesting). The fields below are for field description only. |
{ "Operands": [ { "FilterValues": { "Code": "TAG-xxx", "Values": [ "xxxx" ], "SelectType": "IN" }, "ExpressionType": "TAG" }, { "FilterValues": { "Code": "INSTANCE_ID", "Values": [ "xxxxx" ], "SelectType": "LIKE" }, "ExpressionType": "DIMENSION" }, { "FilterValues": { "Code": "INSTANCE_NICK", "Values": [ "111" ], "SelectType": "LIKE" }, "ExpressionType": "DIMENSION" }, { "FilterValues": { "Code": "RESOURCE_GROUP", "Values": [ "xxxxx" ], "SelectType": "IN" }, "ExpressionType": "DIMENSION" }, { "FilterValues": { "Code": "ARTICLE", "Values": [ "xxxxx" ], "SelectType": "IN" }, "ExpressionType": "DIMENSION" }, { "FilterValues": { "Code": "PRODUCT", "Values": [ "xxxxx" ], "SelectType": "IN" }, "ExpressionType": "DIMENSION" }, { "FilterValues": { "Code": "OWNER", "Values": [ "xxxxx" ], "SelectType": "IN" }, "ExpressionType": "DIMENSION" } ] } |
|
| Operand |
any |
No |
Filter condition (deprecated) |
N/A |
| FilterValues |
object |
No |
Sub-condition filter |
|
| Code |
string |
No |
Condition filter key Valid values:
|
TAG-test-xxx-key |
| CodeName |
string |
No |
Condition filter key name (deprecated) |
N/A |
| Values |
array |
No |
Condition filter value list |
|
|
string |
No |
Condition filter value. Only one value can be entered for INSTANCE_NICK or INSTANCE_ID. |
["TAG-test-xxx"] |
|
| SelectType |
string |
No |
Association relationship between code and value Valid values:
|
IN |
| Nbid |
string |
No |
First-level marketplace ID. If left empty, the ID of the marketplace to which the current user belongs is used by default. |
2084210001 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
BssApiPlainResult |
||
| Data |
integer |
Financial unit allocation rule ID |
1111 |
| Metadata |
any |
Response structure metadata |
{} |
| RequestId |
string |
Request ID. |
79EE7556-0CFD-44EB-9CD6-B3B526E3A85F |
Examples
Success response
JSON format
{
"Data": 1111,
"Metadata": "{}",
"RequestId": "79EE7556-0CFD-44EB-9CD6-B3B526E3A85F"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | CostCenter.MasterAndSubHasNoRelation | Your account has no valid account relation yet. | |
| 400 | InvalidParameter | The specified request contains invalid parameters. | |
| 400 | CostCenter.RuleExpressionIllegal | The auto-allocation rule configuration is invalid. | |
| 400 | CostCenter.UnitNotExist | The financial unit does not exist or is invalid. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.