Membuat anggota dengan tipe resource account.
Deskripsi operasi
Anggota berfungsi sebagai wadah untuk resource sekaligus sebagai unit organisasi dalam ResourceDirectory. Anggota merepresentasikan proyek atau aplikasi, dan resource dari anggota yang berbeda terisolasi satu sama lain.
Topik ini memberikan contoh cara memanggil operasi API untuk membuat anggota di folder fd-r23M55****, dengan nama tampilan Dev dan awalan nama akun Alibaba Cloud alice.
Coba sekarang
Test
RAM authorization
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| DisplayName |
string |
Yes |
Nama tampilan anggota. Nama harus terdiri dari 2 hingga 50 karakter. Nama dapat berisi huruf, angka, garis bawah (_), titik (.), tanda hubung (-), dan spasi. Nama harus unik dalam resource directory. |
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 digunakan sebagai akun penagihannya sendiri. |
12323344**** |
| AccountNamePrefix |
string |
No |
Awalan untuk nama akun Alibaba Cloud anggota. Jika Anda mengosongkan parameter ini, sistem akan menghasilkan awalan secara acak. Awalan harus terdiri dari 2 hingga 37 karakter. Awalan dapat berisi huruf, angka, dan karakter khusus, tetapi tidak boleh mengandung karakter khusus yang berurutan. Awalan harus dimulai dan diakhiri dengan huruf atau angka. Karakter khusus yang valid meliputi garis bawah ( Nama lengkap akun Alibaba Cloud anggota dalam resource directory menggunakan format @.aliyunid.com, misalnya Setiap nama harus unik dalam resource directory. |
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 yang valid:
Catatan
Parameter ini hanya tersedia untuk reseller di situs internasional (alibabacloud.com). |
resell |
| DryRun |
boolean |
No |
Menentukan apakah hanya menjalankan dry run tanpa melakukan permintaan sebenarnya. Nilai yang valid:
|
false |
Untuk informasi selengkapnya tentang parameter permintaan umum, lihat Common parameters.
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
Hasil yang dikembalikan. |
||
| Account |
object |
Informasi anggota. |
|
| Status |
string |
Status anggota. Nilai CreateSuccess menunjukkan bahwa anggota berhasil dibuat. |
CreateSuccess |
| Type |
string |
Tipe anggota. Nilai ResourceAccount menunjukkan bahwa anggota adalah resource account. |
ResourceAccount |
| DisplayName |
string |
Nama tampilan anggota. |
Dev |
| FolderId |
string |
ID folder. |
fd-r23M55**** |
| ResourceDirectoryId |
string |
ID resource directory. |
rd-3G**** |
| JoinTime |
string |
Waktu anggota bergabung ke resource directory. Waktu ditampilkan dalam UTC. |
2020-12-31T03:37:39.456Z |
| AccountId |
string |
ID akun Alibaba Cloud anggota. |
112730938585**** |
| JoinMethod |
string |
Cara anggota bergabung ke resource directory. Nilai yang valid:
|
created |
| ModifyTime |
string |
Waktu anggota dimodifikasi. Waktu ditampilkan dalam UTC. |
2020-12-31T03:37:39.456Z |
| AccountName |
string |
Nama akun Alibaba Cloud anggota. |
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. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.