Membuat Instans tumpukan untuk satu atau beberapa akun di wilayah yang ditentukan.
Deskripsi operasi
Prerequisites
Ensure that a stack group is created. For more information, see CreateStackGroup.
Scenarios
Create stacks across accounts
To create identical resources in multiple accounts, an administrator account can create a stack group, add multiple destination accounts, and deploy resources in a single region. This process creates multiple stacks in different accounts within the same region, improving deployment efficiency.
Create stacks across regions
To create identical resources in multiple regions, an administrator account can create a stack group, add a destination account, and deploy resources in multiple regions. This process creates multiple stacks in different regions within the same account, improving deployment efficiency.
Create stacks across accounts and regions
To create identical resources in multiple accounts across multiple regions, an administrator account can create a stack group, add multiple destination accounts, and deploy resources in multiple regions. This process creates multiple stacks in different accounts across different regions, improving deployment efficiency.
This topic provides an example of creating stacks in the China (Hangzhou) and China (Beijing) regions in the Alibaba Cloud accounts 151266687691**** and 141261387191****. The example uses a stack group named MyStackGroup that is created in the China (Hangzhou) region and uses self-managed permissions.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ros:CreateStackInstances |
create |
*StackInstance
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
ID wilayah Grup tumpukan. Anda dapat memanggil operasi DescribeRegions untuk mengkueri daftar wilayah Alibaba Cloud terbaru. |
cn-hangzhou |
| StackGroupName |
string |
Yes |
Nama Grup tumpukan. Nama harus unik dalam suatu wilayah. |
MyStackGroup |
| AccountIds |
array |
No |
ID akun tujuan tempat Anda ingin membuat stack menggunakan izin yang dikelola sendiri. Anda dapat menentukan hingga 50 ID akun. Catatan
Anda hanya dapat menentukan salah satu dari parameter |
["151266687691****","141261387191****"] |
|
string |
No |
The IDs of the destination accounts where you want to create stacks using self-managed permissions. You can specify up to 50 account IDs. Catatan
You can specify only one of the |
["151266687691****", "141261387191****"] |
|
| RegionIds |
array |
Yes |
ID wilayah tujuan. Anda dapat menentukan hingga 20 ID wilayah. |
["cn-hangzhou", "cn-beijing"] |
|
string |
No |
The IDs of the destination regions. You can specify up to 20 region IDs. |
["cn-hangzhou","cn-beijing"] |
|
| ClientToken |
string |
No |
Token klien yang digunakan untuk memastikan idempotensi permintaan. Klien menghasilkan token, yang harus unik secara global. |
123e4567-e89b-12d3-a456-42665544**** |
| OperationDescription |
string |
No |
Deskripsi operasi untuk membuat stack. Deskripsi harus memiliki panjang 1 hingga 256 karakter. |
Create stack instances in hangzhou and beijing |
| OperationPreferences |
object |
No |
Preferensi untuk operasi. Parameter berikut tersedia:
Pisahkan beberapa parameter dengan koma (,). Catatan
|
{"FailureToleranceCount": 1, "MaxConcurrentCount": 2} |
| TimeoutInMinutes |
integer |
No |
Periode batas waktu untuk membuat stack.
|
10 |
| DisableRollback |
boolean |
No |
Apakah akan menonaktifkan rollback ketika stack gagal dibuat. Nilai valid:
|
false |
| ParameterOverrides |
array<object> |
No |
Daftar parameter yang menimpa parameter templat. |
|
|
object |
No |
|||
| ParameterKey |
string |
Yes |
The name of the parameter to overwrite. If you do not specify this parameter, ROS uses the parameter name that was specified when the stack group was created. You can specify up to 200 parameters. Catatan
|
Amount |
| ParameterValue |
string |
Yes |
The value of the parameter to overwrite. If you do not specify this parameter, ROS uses the parameter value that was specified when the stack group was created. You can specify up to 200 parameters. Catatan
|
1 |
| DeploymentTargets |
object |
No |
Target penerapan untuk menerapkan stack dalam mode izin yang dikelola layanan. Catatan
Anda hanya dapat menentukan salah satu dari parameter |
{"RdFolderId": "fd-4PvlVLOL8v"} |
| RdFolderIds |
array |
Yes |
The IDs of the folders in the resource directory. You can specify up to 20 folder IDs. You can create stacks in all the member accounts in the specified folders. If you select the root folder, stacks are created in all the member accounts in the resource directory. Catatan
You can view the folder IDs on the Overview page in the Resource Management console. For more information, see View the basic information of a folder. |
|
|
string |
No |
The IDs of the folders in the resource directory. You can specify up to 20 folder IDs. You can create stacks in all the member accounts in the specified folders. If you select the root folder, stacks are created in all the member accounts in the resource directory. Catatan
You can view the folder IDs on the Overview page in the Resource Management console. For more information, see View the basic information of a folder. |
["fd-4PvlVLOL8v"] |
|
| AccountIds |
array |
No |
The IDs of the member accounts in the resource directory. You can specify up to 30 member account IDs. Catatan
You can view the member account IDs on the Overview page in the Resource Management console. For more information, see View the details of a member. |
|
|
string |
No |
The IDs of the member accounts in the resource directory. You can specify up to 30 member account IDs. Catatan
You can view the member account IDs on the Overview page in the Resource Management console. For more information, see View the details of a member. |
["151266687691****","141261387191****"] |
|
| DeploymentOptions |
array |
No |
Opsi penerapan untuk menerapkan stack dalam mode izin yang dikelola layanan. Anda dapat menentukan hingga satu opsi penerapan. |
|
|
string |
No |
Valid value:
|
Untuk informasi selengkapnya tentang parameter permintaan umum, lihat Parameter umum.
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The ID of the request. |
14A07460-EBE7-47CA-9757-12CC4761D47A |
| OperationId |
string |
The ID of the operation. |
6da106ca-1784-4a6f-a7e1-e723863d**** |
Contoh
Respons sukses
JSONformat
{
"RequestId": "14A07460-EBE7-47CA-9757-12CC4761D47A",
"OperationId": "6da106ca-1784-4a6f-a7e1-e723863d****"
}
Kode kesalahan
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.