Queries the list of resource instances that belong to a financial unit of a user. When UnitId is set to 0, the query returns unallocated primary and sub-resource instances.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
bss:QueryCostUnitResource |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| OwnerUid |
integer |
Yes |
The user ID of the financial unit owner. |
23453245 |
| UnitId |
integer |
Yes |
The ID of the financial unit. |
235325 |
| PageNum |
integer |
No |
The page number. |
1 |
| PageSize |
integer |
No |
The number of entries per page. |
20 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
string |
The status code. |
Success |
| Data |
object |
The returned data. |
|
| CostUnit |
object |
The financial unit information. |
|
| OwnerUid |
integer |
The user ID of the financial unit owner. |
321432 |
| ParentUnitId |
integer |
The ID of the parent financial unit. A value of -1 indicates the root financial unit. |
23421 |
| UnitId |
integer |
The ID of the financial unit. |
123412 |
| UnitName |
string |
The name of the financial unit. |
test |
| CostUnitStatisInfo |
object |
The statistics information of the financial unit. |
|
| ResourceCount |
integer |
The number of resource instances in the current financial unit. |
1 |
| ResourceGroupCount |
integer |
The number of resource groups in the current financial unit. |
1 |
| SubUnitCount |
integer |
The number of sub-units in the current financial unit. |
2 |
| TotalResourceCount |
integer |
The total number of resource instances in the current financial unit, including those in sub-financial units. |
3 |
| TotalResourceGroupCount |
integer |
The total number of resource groups in the current financial unit, including those in sub-financial units. |
2 |
| TotalUserCount |
integer |
The total number of linked accounts in the current financial unit, including those in sub-financial units. |
2 |
| UserCount |
integer |
The number of sub-units in the current financial unit. |
0 |
| PageNum |
integer |
The page number. |
1 |
| PageSize |
integer |
The number of entries per page. |
20 |
| ResourceInstanceDtoList |
array<object> |
The list of resource instances. |
|
|
object |
|||
| ApportionCode |
string |
The attached resource code. |
test |
| ApportionName |
string |
The attached resource name. |
test |
| CommodityCode |
string |
The commodity code of the resource. |
rds |
| CommodityName |
string |
The commodity name of the resource. |
ApsaraDB |
| PipCode |
string |
The product code, which is the same as the product code in User Center bills. |
rds |
| RelatedResources |
string |
The resources related to the resource instance. |
oss |
| ResourceGroup |
string |
The resource group to which the resource belongs. |
Default resource group |
| ResourceId |
string |
The instance ID of the resource. |
OSSBAG-cn-v0h1s4hma018 |
| ResourceNick |
string |
The custom nickname of the resource. |
testResource |
| ResourceSource |
string |
The source of the resource. Valid values:
|
MANUAL_ALLOCATE |
| ResourceStatus |
string |
The status of the resource. |
Available |
| ResourceTag |
string |
The tag of the resource. |
testResource |
| ResourceType |
string |
The type of the resource. |
FPT_ossbag_absolute_Storage_bj |
| ResourceUserId |
integer |
The user ID of the resource owner. |
2424242134 |
| ResourceUserName |
string |
The username of the resource owner. |
test@test.aliyun.com |
| TotalCount |
integer |
The total number of records. |
12 |
| Message |
string |
The error message. |
Successful! |
| RequestId |
string |
The request ID. |
04332CB7-9A57-4461-97E0-02821D044414 |
| Success |
boolean |
Indicates whether the request was successful. |
true |
Examples
Success response
JSON format
{
"Code": "Success",
"Data": {
"CostUnit": {
"OwnerUid": 321432,
"ParentUnitId": 23421,
"UnitId": 123412,
"UnitName": "test"
},
"CostUnitStatisInfo": {
"ResourceCount": 1,
"ResourceGroupCount": 1,
"SubUnitCount": 2,
"TotalResourceCount": 3,
"TotalResourceGroupCount": 2,
"TotalUserCount": 2,
"UserCount": 0
},
"PageNum": 1,
"PageSize": 20,
"ResourceInstanceDtoList": [
{
"ApportionCode": "test",
"ApportionName": "test",
"CommodityCode": "rds",
"CommodityName": "ApsaraDB\n",
"PipCode": "rds",
"RelatedResources": "oss",
"ResourceGroup": "Default Resource Group\n",
"ResourceId": "OSSBAG-cn-v0h1s4hma018",
"ResourceNick": "testResource",
"ResourceSource": "MANUAL_ALLOCATE",
"ResourceStatus": "Available",
"ResourceTag": "testResource",
"ResourceType": "FPT_ossbag_absolute_Storage_bj",
"ResourceUserId": 2424242134,
"ResourceUserName": "test@test.aliyun.com"
}
],
"TotalCount": 12
},
"Message": "Successful!",
"RequestId": "04332CB7-9A57-4461-97E0-02821D044414",
"Success": true
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.