Membuat anggota bertipe akun sumber daya dengan memanggil CreateResourceAccount.
Deskripsi operasi
Dalam direktori sumber daya, anggota berfungsi sebagai kontainer resource dan merupakan unit untuk pengelompokan resource. Anggota biasanya mewakili sebuah proyek atau aplikasi. Resource di setiap anggota terisolasi secara fisik dari resource di anggota lain.
Topik ini memberikan contoh cara membuat anggota di folder fd-r23M55****. Nama tampilan anggota adalah Dev, dan awalan nama akun adalah alice.
Coba sekarang
Test
RAM authorization
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| DisplayName |
string |
Yes |
Nama tampilan anggota. Panjang: 2 hingga 50 karakter. Format: Dapat berisi huruf, digit, garis bawah (_), titik (.), tanda hubung (-), dan spasi. Nama tampilan harus unik dalam direktori sumber daya. |
Dev |
| ParentFolderId |
string |
No |
ID folder induk. |
fd-r23M55**** |
| PayerAccountId |
string |
No |
ID akun penagihan. Jika Anda mengosongkan parameter ini, anggota yang baru dibuat akan membayar konsumsi resource-nya sendiri. |
12323344**** |
| AccountNamePrefix |
string |
No |
Awalan nama akun. Jika Anda mengosongkan parameter ini, sistem akan menghasilkan awalan secara acak. Panjang: 2 hingga 37 karakter. Format: Dapat berisi huruf, digit, dan karakter khusus Nama akun lengkap memiliki format Nama akun harus unik dalam direktori sumber daya. |
alice |
| Tag |
array<object> |
No |
Tag anggota. |
|
|
object |
No |
Tag anggota. |
||
| Key |
string |
No |
Kunci tag. |
k1 |
| Value |
string |
No |
Nilai tag. |
v1 |
| ResellAccountType |
string |
No |
Tipe identitas anggota. Nilai valid:
Catatan
Parameter ini hanya didukung untuk pelanggan reseller situs Tiongkok (Tiongkok Daratan). |
resell |
| DryRun |
boolean |
No |
Apakah akan menjalankan dry run saja untuk permintaan. Nilai valid:
|
false |
Untuk informasi lebih lanjut tentang parameter permintaan umum, lihat Parameter umum.
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
Parameter tanggapan. |
||
| Account |
object |
Informasi anggota. |
|
| Status |
string |
Status bergabung anggota. Nilai CreateSuccess menunjukkan bahwa anggota telah dibuat. |
CreateSuccess |
| Type |
string |
Tipe anggota. Nilai ResourceAccount menunjukkan akun sumber daya. |
ResourceAccount |
| DisplayName |
string |
Nama tampilan anggota. |
Dev |
| FolderId |
string |
ID folder. |
fd-r23M55**** |
| ResourceDirectoryId |
string |
ID direktori sumber daya. |
rd-3G**** |
| JoinTime |
string |
Waktu ketika anggota bergabung dengan direktori sumber daya (UTC). |
2020-12-31T03:37:39.456Z |
| AccountId |
string |
ID anggota. |
112730938585**** |
| JoinMethod |
string |
Cara anggota bergabung dengan direktori sumber daya. Nilai valid:
|
created |
| ModifyTime |
string |
Waktu ketika anggota terakhir kali dimodifikasi (UTC). |
2020-12-31T03:37:39.456Z |
| AccountName |
string |
Nama akun. |
alice@rd-3g****.aliyunid.com |
| RequestId |
string |
ID permintaan. |
B356A415-D860-43E5-865A-E2193D62BBD6 |
Contoh
Respons sukses
JSONformat
{
"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"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 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. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.