全部产品
Search
文档中心

资源管理:CreateCloudAccount - 创建云账号类型的成员

更新时间:Apr 24, 2024

创建资源目录云账号类型的成员。

接口说明

资源目录中有资源账号和云账号两种不同类型的成员。

  • 资源账号(推荐):资源账号类型的成员只作为资源的容器并完全依赖于资源目录存在,是一种更为安全、创建更为简单的账号。创建资源账号类型的成员,请参见 CreateResourceAccount
说明 资源账号也可以升级为云账号,请参见 PromoteResourceAccount
  • 云账号:云账号具备阿里云账号的全部特征,包括允许 Root 登录访问。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。
  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:
    • 对于必选的资源类型,用背景高亮的方式表示。
    • 对于不支持资源级授权的操作,用全部资源表示。
  • 条件关键字:是指云产品自身定义的条件关键字。
  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作访问级别资源类型条件关键字关联操作
resourcemanager:CreateCloudAccountRead
  • Account
    acs:resourcemanager:*:{#accountId}:*

请求参数

名称类型必填描述示例值
DisplayNamestring

成员名称。

长度为 2~50 个字符或汉字,可包含汉字、英文字母、数字、下划线(_)、英文句点(.)和短划线(-)。

成员名称在资源目录内必须唯一。

admin-****
ParentFolderIdstring

父资源夹 ID。

fd-bVaRIG****
Emailstring

云账号登录邮箱。

someone@example.com
PayerAccountIdstring

结算账号 ID。取值为空表示采用当前账号结算。

12323344****

返回参数

名称类型描述示例值
object

返回参数。

Accountobject

成员信息。

Statusstring

成员加入状态。

  • CreateSuccess:创建成功。
  • CreateVerifying:创建确认中。
  • CreateFailed:创建失败。
  • CreateExpired:创建过期。
  • CreateCancelled:创建取消。
  • PromoteVerifying:升级确认中。
  • PromoteFailed:升级失败。
  • PromoteExpired:升级过期。
  • PromoteCancelled:升级取消。
  • PromoteSuccess:升级成功。
  • InviteSuccess:邀请成功。
  • Removed:已移出。
CreateVerifying
Typestring

成员类型。取值为 CloudAccount 表示云账号。

CloudAccount
DisplayNamestring

成员名称。

admin-****
FolderIdstring

资源夹 ID。

fd-bVaRIG****
ResourceDirectoryIdstring

资源目录 ID。

rd-k3****
RecordIdstring

账号记录 ID。

06950264-3f0d-4ca9-82dd-6ee7a3d3****
AccountIdstring

账号 ID。

12323344****
JoinMethodstring

成员加入方式。

  • invited:邀请。
  • created:创建。
created
ModifyTimestring

成员修改时间。

2015-01-23T12:33:18Z
AccountNamestring

账号名称。

someone@example.com
RequestIdstring

请求 ID。

9B34724D-54B0-4A51-B34D-4512372FE1BE

示例

正常返回示例

JSON格式

{
  "Account": {
    "Status": "CreateVerifying",
    "Type": "CloudAccount",
    "DisplayName": "admin-****",
    "FolderId": "fd-bVaRIG****",
    "ResourceDirectoryId": "rd-k3****",
    "RecordId": "06950264-3f0d-4ca9-82dd-6ee7a3d3****",
    "AccountId": "12323344****",
    "JoinMethod": "created",
    "ModifyTime": "2015-01-23T12:33:18Z",
    "AccountName": "someone@example.com"
  },
  "RequestId": "9B34724D-54B0-4A51-B34D-4512372FE1BE"
}

错误码

HTTP status code错误码错误信息描述
400MissingParameter.Account.DisplayNameYou must specify DisplayName.显示名缺失,请指定显示名。
400InvalidParameter.Account.DisplayNameThe DisplayName of account is invalid.显示名无效,请输入字符或汉字,可包含汉字、英文字母、数字、下划线(_)、半角句号(.)和短划线(-)。
400InvalidParameter.Account.DisplayName.LengthThe DisplayName of the account exceeds the length limit.显示名长度超出限制,长度为2~50个字符或汉字。
400InvalidParameter.ParentFolderIdThe ParentFolderId is invalid.父资源夹ID无效,资源夹ID应以“r-”开头+6位数字或英文字母或以“fd-”开头+10位数字或英文字母。
400MissingParameter.EmailYou must specify Email.邮箱缺失,请指定邮箱。
400InvalidParameter.EmailThe Email is invalid.邮箱格式错误。
404EntityNotExists.ResourceDirectoryThe resource directory for the account is not enabled. We recommend that you first enable the resource directory for the account.当前账号未启用资源目录,请先启用资源目录。
404EntityNotExists.FolderThe resource directory folder does not exist.资源夹不存在,请先创建资源夹。
409LimitExceeded.AccountThe maximum number of member accounts in a resource directory exceeds the limit.资源目录中的成员数量超出限制。
409InvalidParameter.Account.DisplayName.AlreadyUsedThe displayname of account has been used.显示名已被占用,请更换其他名称。
409EntityAlreadyExists.ResourceDirectory.AccountThe email address that the system generates when you create a member account already exists. Try again later.创建成员时系统生成的邮箱已被占用,请重试。
409InvalidParameter.Email.AlreadyUsedThe email has been used.邮箱已被占用,请更换其他邮箱。
409Invalid.PayRelationFailed to create a member. The specified billing account is unavailable. Please change to another billing account and try again.成员创建失败。您选择的结算账号不可用,请更换后重新尝试。
409NotSupport.PayerAccountInAnotherResourceDirectoryThe specified settlement account does not exist in the resource directory. You must specify a valid settlement account.-
409CreateAccountDisabledThis resource directory is denied to create account.-
409PaymentAccountEnterpriseVerifyErrorThe type of the payment account is not enterprise verified.结算账号不是企业实名类型。
409PaymentAccountFinancialRelationshipVerifyErrorThe payment account must not be the beneficiary account from other financial relationships.结算账号不能是其他财务关系的财务子账号。
409PaymentAccountEnterpriseTypeErrorThe type of the payment account is not enterprise.结算账号不是企业类型。
409PaymentAccountFinancialRelationshipsChangeFrequencyVerifyErrorThe financial relationship of payment account changes too frequently. Please try again later.结算账号的财务关系变更太频繁。请稍后重试。
409MemberAccountVirtualCloudOperatorVerifyErrorThe type of the member account must not be virtual operator.-
409MemberAccountResellerVerifyErrorThe type of the member account must not be reseller.-
409PaymentAccountVirtualCloudOperatorVerifyErrorThe type of the payment account must not be virtual operator.结算账号不能是虚拟运营商类型。
409PaymentAccountResellerVerifyErrorThe type of the payment account must not be reseller.结算账号不能是分销商类型。
409PaymentAccountCreditIdentityTypeErrorThe identity of the payment account is not credit.-
409InconsistentEnterpriseNameErrorThe enterprise name of the payment account and the member account must be consistent.-
409PaymentAccountEnterpriseInvoiceErrorNo enterprise invoice header information is set for the payment account.结算账号的企业发票抬头信息未设置。
409UnknownFinancialErrorAn unknown financial error occurred.未知的财资错误。

访问错误中心查看更多错误码。