AllocateCostCenterResource
Allocates resource instances (instance-based and attached-resource-based) from a source cost center to a destination cost center.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
bss:AllocateCostUnitResource |
update |
*全部资源
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| FromOwnerAccountId |
integer |
No |
The ID of the owner of the source cost center. |
1529600453335198 |
| FromCostCenterId |
integer |
No |
The ID of the source cost center. This parameter is required.
|
637180 |
| ToCostCenterId |
integer |
No |
The ID of the destination cost center. Valid values:
|
638288 |
| ResourceInstanceList |
array<object> |
Yes |
The list of resource instances. |
|
|
object |
No |
The list of resource instances. |
||
| ResourceUserId |
integer |
No |
The ID of the owner of the billing instance. This parameter is required. |
273394581313325532 |
| InstanceId |
string |
No |
The billing granularity ID. This parameter is required. |
cn-hangzhou;standard |
| ResourceType |
string |
No |
The resource type. |
SCU |
| PipCode |
string |
No |
The product code, which is the same as the product code in User Center bills. |
ecs |
| ResourceNick |
string |
No |
The custom nickname of the resource. |
ecs-test-1 |
| ApportionCode |
string |
No |
The attached resource type of the attached-resource instance. This parameter is required only for attached-resource product instances.
|
qwer1-cn-beijing |
| ResourceTag |
string |
No |
The tag of the resource. |
tag-test1 |
| RelatedResources |
string |
No |
The resources related to the resource instance. |
related-resource |
| ApportionName |
string |
No |
The attached resource name. |
split-item-test1 |
| ResourceId |
string |
No |
The resource ID. |
cn-hangzhou;standard:app |
| ResourceSource |
string |
No |
The resource source. Valid values:
|
AUTO_ALLOCATE |
| CommodityCode |
string |
No |
The commodity code of the billing instance. This parameter is required. |
oss |
| ResourceStatus |
string |
No |
The resource status. |
0 |
| ResourceUserName |
string |
No |
The resource ownership username. |
test |
| CommodityName |
string |
No |
The commodity name of the resource. |
RESOURCE_UDR |
| ResourceGroup |
string |
No |
The resource group. |
xihe_mpp |
| Nbid |
string |
No |
The primary sales channel ID. If this parameter is left empty, the sales channel ID of the current user is used by default. |
2684201000001 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
BssApiPlainResult |
||
| Metadata |
any |
The metadata of the response struct. |
{} |
| RequestId |
string |
The request ID. |
UUID |
| OwnerAccountId |
integer |
The owner of the cost center. |
1529600453335198 |
| CostCenterId |
integer |
The cost center ID. |
640403 |
| IsSuccess |
boolean |
Indicates whether the operation was successful. |
true |
Examples
Success response
JSON format
{
"Metadata": "{}",
"RequestId": "UUID",
"OwnerAccountId": 1529600453335198,
"CostCenterId": 640403,
"IsSuccess": true
}
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. | |
| 400 | CostCenter.ResourceNotExist | The specified instance is not found in our records. | |
| 400 | CostCenter.AllocateResourceRepeat | The instance has already been assigned a financial unit. Use transfer allocation for adjustment. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.