QueryCostCenterShareRule
Query cost center sharing rules
Operation description
Queries the sharing rules of user cost centers.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
bss:DescribeCostUnit |
list |
*All Resources
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| OwnerAccountId |
integer |
No |
The owner account ID of the cost center. |
1529600453335198 |
| NextToken |
string |
No |
Reserved field. |
AAAAAV3MpHK1AP0pfERHZN5pu6nYCisJwqt18pP5E9yb47iu |
| MaxResults |
integer |
No |
Reserved field. |
20 |
| EcIdAccountIds |
array<object> |
No |
The list of enterprises and accounts. If empty, the current account is queried. |
|
|
object |
No |
The list information. |
||
| EcId |
string |
Yes |
The enterprise entity ID. |
1004064243473974 |
| AccountIds |
array |
No |
The list of accounts to access. If empty, all accounts under the current entity ID are selected. |
|
|
integer |
No |
The member account ID. |
1501603440974415 |
|
| Nbid |
string |
No |
The primary marketplace ID. If empty, the marketplace ID of the current user is used by default. |
2684201000001 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
BssApiTokenResult |
||
| NextToken |
string |
Reserved field. |
eyJwYWdlTnVtIjoyLCJwYWdlU2l6ZSI6NH0= |
| MaxResults |
integer |
Reserved field. |
20 |
| TotalCount |
integer |
The total number of records. |
20 |
| Data |
array<object> |
The returned data list. |
|
|
array<object> |
The object information. |
||
| OwnerAccountId |
integer |
The owner account ID of the cost center. |
1529600453335198 |
| ShareRuleId |
integer |
The sharing rule ID. |
1826 |
| ShareRuleName |
string |
The sharing rule name. |
test |
| ShareRuleType |
string |
The sharing rule type. Valid values:
|
AVERAGE |
| FromCostCenterShareRuleDetails |
array<object> |
The source cost center rule details. |
|
|
object |
The object information. |
||
| OwnerAccountId |
integer |
The owner account ID of the cost center. |
1529600453335198 |
| RootCostCenterId |
integer |
The root cost center ID. |
583050 |
| CostCenterId |
integer |
The cost center ID. |
637127 |
| ParentCostCenterId |
integer |
The parent cost center ID. |
637537 |
| PrevCostCenterId |
integer |
The previous cost center ID. |
583059 |
| CostCenterCode |
string |
The cost center code. |
970354711219# |
| CostCenterName |
string |
The cost center name. |
Cost Plan |
| GmtCreate |
string |
The creation time. |
2025-07-16 13:49:59 |
| GmtModified |
string |
The modification time. |
2025-07-16 13:49:59 |
| ToCostCenterShareRuleDetails |
array<object> |
The target cost center rule details. |
|
|
object |
The object information. |
||
| OwnerAccountId |
integer |
The owner account ID of the cost center. |
1529600453335198 |
| RootCostCenterId |
integer |
The root cost center ID. |
583050 |
| CostCenterId |
integer |
The cost center ID. |
637127 |
| ParentCostCenterId |
integer |
The parent cost center ID. |
637537 |
| PrevCostCenterId |
integer |
The previous cost center ID. |
583055 |
| CostCenterCode |
string |
The cost center code. |
970354711215# |
| CostCenterName |
string |
The cost center name. |
Cost Allocation |
| ShareRatio |
number |
The sharing ratio. |
0.2 |
| GmtCreate |
string |
The creation time. |
2025-07-16 13:49:59 |
| GmtModified |
string |
The modification time. |
2025-07-16 13:49:59 |
| GmtModified |
string |
2026-01-01 00:00:00 |
|
| Metadata |
any |
The response metadata. |
{} |
| RequestId |
string |
The request ID. |
79EE7556-0CFD-44EB-9CD6-B3B526E3A85F |
Examples
Success response
JSON format
{
"NextToken": "eyJwYWdlTnVtIjoyLCJwYWdlU2l6ZSI6NH0=",
"MaxResults": 20,
"TotalCount": 20,
"Data": [
{
"OwnerAccountId": 1529600453335198,
"ShareRuleId": 1826,
"ShareRuleName": "test",
"ShareRuleType": "AVERAGE",
"FromCostCenterShareRuleDetails": [
{
"OwnerAccountId": 1529600453335198,
"RootCostCenterId": 583050,
"CostCenterId": 637127,
"ParentCostCenterId": 637537,
"PrevCostCenterId": 583059,
"CostCenterCode": "970354711219#",
"CostCenterName": "Cost Plan",
"GmtCreate": "2025-07-16 13:49:59",
"GmtModified": "2025-07-16 13:49:59"
}
],
"ToCostCenterShareRuleDetails": [
{
"OwnerAccountId": 1529600453335198,
"RootCostCenterId": 583050,
"CostCenterId": 637127,
"ParentCostCenterId": 637537,
"PrevCostCenterId": 583055,
"CostCenterCode": "970354711215#",
"CostCenterName": "Cost Allocation",
"ShareRatio": 0.2,
"GmtCreate": "2025-07-16 13:49:59",
"GmtModified": "2025-07-16 13:49:59"
}
],
"GmtModified": "2026-01-01 00:00:00"
}
],
"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 | CostCenter.ResourceAuthFailed | The instance does not belong to the current user. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.