Cria um membro do tipo conta de recursos chamando CreateResourceAccount.
Descrição da operação
Em um diretório de recursos, um membro atua como um contêiner de recursos e é uma unidade para agrupamento de recursos. Um membro normalmente representa um projeto ou aplicativo. Os recursos em cada membro são isolados fisicamente dos recursos em outros membros.
Este tópico fornece um exemplo de como criar um membro na pasta fd-r23M55****. O nome de exibição do membro é Dev e o prefixo do nome da conta é alice.
Experimente agora
Testar
Autorização RAM
Parâmetros da solicitação
|
Parâmetro |
Tipo |
Obrigatório |
Descrição |
Exemplo |
| DisplayName |
string |
Sim |
O nome de exibição do membro. Comprimento: 2 a 50 caracteres. Formato: Pode conter letras, dígitos, sublinhados (_), pontos (.), hifens (-) e espaços. O nome de exibição deve ser exclusivo no diretório de recursos. |
Dev |
| ParentFolderId |
string |
Não |
O ID da pasta pai. |
fd-r23M55**** |
| PayerAccountId |
string |
Não |
O ID da conta de faturamento. Se você deixar este parâmetro vazio, o membro recém-criado pagará pelo seu próprio consumo de recursos. |
12323344**** |
| AccountNamePrefix |
string |
Não |
O prefixo do nome da conta. Se você deixar este parâmetro vazio, o sistema gerará um prefixo aleatoriamente. Comprimento: 2 a 37 caracteres. Formato: Pode conter letras, dígitos e caracteres especiais O nome completo da conta está no formato O nome da conta deve ser exclusivo no diretório de recursos. |
alice |
| Tag |
array<object> |
Não |
As tags do membro. |
|
|
object |
Não |
As tags do membro. |
||
| Key |
string |
Não |
A chave da tag. |
k1 |
| Value |
string |
Não |
O valor da tag. |
v1 |
| ResellAccountType |
string |
Não |
O tipo de identidade do membro. Valores válidos:
Nota
Este parâmetro é suportado apenas para clientes revendedores do site da China (continente chinês). |
resell |
| DryRun |
boolean |
Não |
Especifica se deve ser realizado apenas um dry run para a solicitação. Valores válidos:
|
false |
Para obter mais informações sobre os parâmetros de solicitação comuns, consulte Parâmetros comuns.
Elementos de resposta
|
Elemento |
Tipo |
Descrição |
Exemplo |
|
object |
Os parâmetros de resposta. |
||
| Account |
object |
As informações do membro. |
|
| Status |
string |
O status de ingresso do membro. O valor CreateSuccess indica que o membro foi criado. |
CreateSuccess |
| Type |
string |
O tipo do membro. O valor ResourceAccount indica uma conta de recursos. |
ResourceAccount |
| DisplayName |
string |
O nome de exibição do membro. |
Dev |
| FolderId |
string |
O ID da pasta. |
fd-r23M55**** |
| ResourceDirectoryId |
string |
O ID do diretório de recursos. |
rd-3G**** |
| JoinTime |
string |
A hora em que o membro ingressou no diretório de recursos (UTC). |
2020-12-31T03:37:39.456Z |
| AccountId |
string |
O ID do membro. |
112730938585**** |
| JoinMethod |
string |
A maneira pela qual o membro ingressou no diretório de recursos. Valores válidos:
|
created |
| ModifyTime |
string |
A hora em que o membro foi modificado pela última vez (UTC). |
2020-12-31T03:37:39.456Z |
| AccountName |
string |
O nome da conta. |
alice@rd-3g****.aliyunid.com |
| RequestId |
string |
O ID da solicitação. |
B356A415-D860-43E5-865A-E2193D62BBD6 |
Exemplos
Resposta de sucesso
JSON formato
{
"Account": {
"Status": "CreateSuccess",
"Type": "ResourceAccount",
"DisplayName": "Dev",
"FolderId": "fd-r23M55****",
"ResourceDirectoryId": "rd-3G****",
"JoinTime": "2020-12-31T03:37:39.456Z",
"AccountId": "112730938585****",
"JoinMethod": "created",
"ModifyTime": "2020-12-31T03:37:39.456Z",
"AccountName": "alice@rd-3g****.aliyunid.com"
},
"RequestId": "B356A415-D860-43E5-865A-E2193D62BBD6"
}
Códigos de erro
|
Código de status HTTP |
Código de erro |
Mensagem de erro |
Descrição |
|---|---|---|---|
| 400 | MissingParameter.Account.DisplayName | You must specify DisplayName. | |
| 400 | InvalidParameter.Account.DisplayName | The DisplayName of account is invalid. | |
| 400 | InvalidParameter.Account.DisplayName.Length | The DisplayName of the account exceeds the length limit. | |
| 400 | InvalidParameter.ParentFolderId | The ParentFolderId is invalid. | |
| 400 | InvalidParameter.Account.AccountNamePrefix | The account name prefix is invalid. | |
| 400 | InvalidParameter.Account.AccountNamePrefix.Length | The account name prefix exceeds the length limit. | |
| 400 | NotSupport.Site.Action | Site does not allow current action. | |
| 404 | EntityNotExists.ResourceDirectory | The resource directory for the account is not enabled. We recommend that you first enable the resource directory for the account. | |
| 404 | EntityNotExists.Folder | The resource directory folder does not exist. | |
| 409 | LimitExceeded.Account | The maximum number of member accounts in a resource directory exceeds the limit. | |
| 409 | InvalidParameter.Account.DisplayName.AlreadyUsed | The displayname of account has been used. | |
| 409 | EntityAlreadyExists.ResourceDirectory.Account | The email address that the system generates when you create a member account already exists. Try again later. | |
| 409 | Invalid.PayRelation | Failed to create a member. The specified billing account is unavailable. Please change to another billing account and try again. | |
| 409 | NotSupport.PayerAccountInAnotherResourceDirectory | The specified settlement account does not exist in the resource directory. You must specify a valid settlement account. | |
| 409 | CreateAccountDisabled | The specified resource directory cannot create a new account. | |
| 409 | PaymentAccountEnterpriseVerifyError | The type of the payment account is not enterprise verified. | |
| 409 | PaymentAccountFinancialRelationshipVerifyError | The payment account must not be the beneficiary account from other financial relationships. | |
| 409 | PaymentAccountEnterpriseTypeError | The type of the payment account is not enterprise. | |
| 409 | PaymentAccountFinancialRelationshipsChangeFrequencyVerifyError | The financial relationship of payment account changes too frequently. Please try again later. | |
| 409 | MemberAccountVirtualCloudOperatorVerifyError | The type of the member account must not be virtual operator. | |
| 409 | MemberAccountResellerVerifyError | The type of the member account must not be reseller. | |
| 409 | PaymentAccountVirtualCloudOperatorVerifyError | The type of the payment account must not be virtual operator. | |
| 409 | PaymentAccountResellerVerifyError | The type of the payment account must not be reseller. | |
| 409 | PaymentAccountCreditIdentityTypeError | The identity of the payment account is not credit. | |
| 409 | InconsistentEnterpriseNameError | The enterprise name of the payment account and the member account must be consistent. | |
| 409 | PaymentAccountEnterpriseInvoiceError | No enterprise invoice header information is set for the payment account. | |
| 409 | UnknownFinancialError | An unknown financial error occurred. | |
| 409 | BusinessRestricted | Business is restricted. Please contact your customer service manager. | |
| 409 | FundAccountHasArrearsAmount | There are arrears in the current payment account. You cannot change the payment account. Please settle the arrears and try again. | |
| 409 | FundAccountOwnerPayedByOthers | If the payment has been made by another account, it is not allowed to be used as the main payment account. | |
| 409 | UserOwnFundAccountPayForOthers | If the account has been used as the main payment account, it is not allowed to set up payment by others. | |
| 409 | EcoRelationCheckFailed | Accounts associated with partners are not allowed to set up agency payment relationships. | |
| 409 | NotSupport.SettingResellAccountType | The current account does not support setting the resellAccountType for members. | |
| 409 | InvalidParameter.Email.AlreadyUsed | The email has been used. |
Consulte Códigos de Erro para uma lista completa.
Notas de versão
Consulte Notas de Versão para uma lista completa.