AllocateCostCenterResource - 资源分配到财务单元
资源实例(实例型和分拆型)从源财务单元分配到目标财务单元。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
bss:AllocateCostUnitResource |
update |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| FromOwnerAccountId |
integer |
否 |
源财务单元的属主用户 ID |
1529600453335198 |
| FromCostCenterId |
integer |
否 |
源财务单元 ID(必传)。
|
637180 |
| ToCostCenterId |
integer |
否 |
目标财务单元 ID,取值:
|
638288 |
| ResourceInstanceList |
array<object> |
是 |
资源实例列表。 |
|
|
object |
否 |
资源实例列表。 |
||
| ApportionCode |
string |
否 |
分拆型实例的分拆型,只有分拆型产品实例才需要传这个参数。
|
qwer1-cn-beijing |
| ApportionName |
string |
否 |
资源分拆名。 |
split-item-test1 |
| CommodityCode |
string |
否 |
账单实例的商品 code(必传)。 |
oss |
| CommodityName |
string |
否 |
资源的商品名 |
RESOURCE_UDR |
| InstanceId |
string |
否 |
出账粒度 ID(必传) |
cn-hangzhou;standard |
| PipCode |
string |
否 |
产品 Code,与费用中心账单产品 Code 一致。 |
ecs |
| RelatedResources |
string |
否 |
资源实例相关的资源。 |
related-resource |
| ResourceGroup |
string |
否 |
资源组。 |
xihe_mpp |
| ResourceId |
string |
否 |
资源 ID |
cn-hangzhou;standard:app |
| ResourceNick |
string |
否 |
资源的自定义昵称。 |
ecs-test-1 |
| ResourceSource |
string |
否 |
资源来源。取值:
|
AUTO_ALLOCATE |
| ResourceStatus |
string |
否 |
资源状态。 |
0 |
| ResourceTag |
string |
否 |
资源的 Tag 标签 |
tag-test1 |
| ResourceType |
string |
否 |
资源类型。 |
SCU |
| ResourceUserId |
integer |
否 |
账单实例的属主用户 ID(必传)。 |
273394581313325532 |
| ResourceUserName |
string |
否 |
资源归属用户名称 |
test |
| Nbid |
string |
否 |
一级售卖场 ID,如果为空,默认使用当前用户所属的场 ID 填充 |
2684201000001 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
BssApiPlainResult |
||
| CostCenterId |
integer |
财务单元 ID |
640403 |
| IsSuccess |
boolean |
是否成功 |
true |
| Metadata |
any |
返回结构元数据 |
{} |
| OwnerAccountId |
integer |
财务单元的属主用户 |
1529600453335198 |
| RequestId |
string |
请求 ID |
UUID |
示例
正常返回示例
JSON格式
{
"CostCenterId": 640403,
"IsSuccess": true,
"Metadata": "{}",
"OwnerAccountId": 1529600453335198,
"RequestId": "UUID"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 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. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。