Memperbarui sumber daya dalam stack.
Deskripsi operasi
The Parameters and UsePreviousParameters request parameters are related. If a parameter defined in the template is not specified in Parameters:
-
If
UsePreviousParametersis set tofalse, the parameter uses its default value from the template. If the parameter does not have a default value, you must specify it inParameters. -
If
UsePreviousParametersis set totrue, the parameter retains its value from the previous stack creation. If no value was specified at that time and the template provides a default, that default value is used.
This example shows how to update the template for a stack with the ID 4a6c9851-3b0f-4f5f-b4ca-a14bf691**** in the China (Beijing) region to {"ROSTemplateFormatVersion": "2015-09-01"}.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ros:UpdateStack |
update |
*stack
Template
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| StackId |
string |
Yes |
ID stack. |
4a6c9851-3b0f-4f5f-b4ca-a14bf691**** |
| ClientToken |
string |
No |
Token yang dihasilkan klien untuk memastikan idempotensi permintaan. Token harus unik secara global. |
123e4567-e89b-12d3-a456-42665544**** |
| StackPolicyDuringUpdateBody |
string |
No |
Penggantian sementara untuk badan kebijakan tumpukan. Badan kebijakan dapat memiliki panjang 1 hingga 16.384 byte.
|
{"Statement": [{"Effect": "Allow", "Action": "Update:*", "Principal": "*", "Resource": "*"}]} |
| TimeoutInMinutes |
integer |
No |
Periode pengatur waktu habis untuk pembaruan stack, dalam menit.
|
10 |
| TemplateBody |
string |
No |
Badan templat. Badan templat dapat memiliki panjang 1 hingga 524.288 byte. Jika badan templat berukuran Tingkat Tinggi, kami sarankan Anda menggunakan metode permintaan POST dan meneruskan parameter di badan permintaan untuk mencegah kegagalan permintaan akibat URL yang terlalu panjang. Catatan
Anda hanya dapat menentukan salah satu parameter |
{"ROSTemplateFormatVersion": "2015-09-01"} |
| StackPolicyURL |
string |
No |
URL file yang berisi kebijakan tumpukan. URL harus mengarah ke kebijakan yang berada di server web (HTTP atau HTTPS) atau di Bucket OSS Alibaba Cloud Object Storage Service (OSS), misalnya, Catatan
Anda hanya dapat menentukan salah satu parameter URL dapat memiliki panjang hingga 1.350 byte. |
oss://ros-stack-policy/demo |
| StackPolicyDuringUpdateURL |
string |
No |
URL file yang berisi penggantian kebijakan tumpukan sementara. URL harus mengarah ke kebijakan yang berada di server web (HTTP atau HTTPS) atau di Bucket OSS Alibaba Cloud, misalnya, Catatan
Jika Anda tidak menentukan wilayah OSS di URL, wilayah yang ditentukan oleh parameter RegionId akan digunakan. URL dapat memiliki panjang hingga 1.350 byte. Jika Anda ingin memperbarui sumber daya yang dilindungi, Anda harus menentukan penggantian kebijakan tumpukan sementara saat pembaruan. Jika Anda tidak menentukan kebijakan tumpukan, kebijakan saat ini yang terkait dengan stack akan digunakan. Parameter ini hanya berlaku ketika tipe set perubahan adalah
|
oss://ros-stack-policy/demo |
| StackPolicyBody |
string |
No |
Badan kebijakan tumpukan. Badan kebijakan dapat memiliki panjang 1 hingga 16.384 byte. Catatan
Anda hanya dapat menentukan salah satu parameter |
{"Statement": [{"Action": "Update:*", "Resource": "*", "Effect": "Allow", "Principal": "*"}]} |
| UsePreviousParameters |
boolean |
No |
Apakah akan menggunakan kembali nilai parameter yang tidak ditentukan dalam permintaan saat ini. Nilai valid:
|
true |
| RegionId |
string |
Yes |
ID wilayah tempat stack berada. Anda dapat memanggil operasi DescribeRegions untuk mengkueri daftar wilayah Alibaba Cloud terbaru. [_single.params.DisableRollback.desc](Parameter ini sudah tidak digunakan lagi dan tidak berpengaruh.). |
cn-beijing |
DisableRollback
deprecated
|
boolean |
No |
(This parameter is deprecated and has no effect.) |
|
| TemplateURL |
string |
No |
Lokasi file yang berisi badan templat. URL harus mengarah ke templat (1 hingga 524.288 byte) yang berada di server web HTTP atau HTTPS atau di Bucket OSS Alibaba Cloud. URL Bucket OSS dalam format seperti oss://ros/template/demo atau oss://ros/template/demo?RegionId=cn-hangzhou. Jika wilayah OSS tidak ditentukan, wilayah default ke yang ditentukan oleh parameter RegionId. Catatan
Anda harus menentukan tepat satu dari parameter TemplateBody, TemplateURL, atau TemplateId. |
oss://ros-template/demo |
| RamRoleName |
string |
No |
Nama Peran RAM. ROS mengambil peran ini untuk membuat stack dan menggunakan kredensial peran tersebut untuk melakukan panggilan API atas nama Anda. |
test-role |
| ReplacementOption |
string |
No |
Apakah akan menggunakan pembaruan penggantian. Ketika properti sumber daya tidak mendukung pembaruan modifikasi, Anda dapat menggunakan pembaruan penggantian untuk mengubah properti sumber daya. Pembaruan penggantian menghapus sumber daya lalu membuatnya kembali. ID fisik sumber daya baru akan berubah. Nilai valid:
Catatan
Pembaruan modifikasi memiliki prioritas lebih tinggi dibandingkan pembaruan penggantian. |
Disabled |
| TemplateId |
string |
No |
ID Templat. Parameter ini berlaku untuk templat bersama dan privat. Catatan
Anda hanya dapat menentukan salah satu parameter |
5ecd1e10-b0e9-4389-a565-e4c15efc**** |
| TemplateVersion |
string |
No |
Versi templat. Parameter ini hanya berlaku ketika Anda menentukan |
v1 |
| Parameters |
array<object> |
No |
Parameter templat. |
|
|
object |
No |
|||
| ParameterKey |
string |
Yes |
The name of the parameter. If you do not specify the name and value of a parameter, ROS uses the default value that is specified in the template. Catatan
|
Amount |
| ParameterValue |
string |
Yes |
The value of the parameter. You can specify a maximum of 200 parameters. Catatan
|
12 |
| Tags |
array<object> |
No |
Tag stack. |
|
|
object |
No |
|||
| Key |
string |
Yes |
The tag key of the stack. Catatan
|
usage |
| Value |
string |
No |
The tag value of the stack. Catatan
These tags are propagated to all taggable resources in the stack. For more information, see Tag propagation. |
test |
| Parallelism |
integer |
No |
Jumlah maksimum operasi serentak yang dapat dilakukan pada sumber daya. Secara default, parameter ini kosong. Anda dapat menentukan bilangan bulat yang lebih besar dari atau sama dengan 0. Catatan
|
1 |
| ResourceGroupId |
string |
No |
ID kelompok sumber daya. |
rg-acfmxazb4ph6aiy**** |
| DryRun |
boolean |
No |
Apakah akan menjalankan dry run saja untuk permintaan. Nilai valid:
Catatan
Jika Anda memperbarui stack tanpa membuat perubahan apa pun, operasi akan gagal dengan kesalahan NotSupported jika DryRun adalah false. Jika DryRun adalah true, tidak ada kesalahan yang dilaporkan. |
false |
| DryRunOptions |
array |
No |
Opsi dry run. Daftar dapat berisi maksimum satu item. Catatan
Parameter ini hanya berlaku ketika |
|
|
string |
No |
The dry run option. Valid values:
Catatan
This option is available only for ROS-type stacks.
|
ParameterAnalysis.ConsiderCondition |
|
| TaintResources |
array |
No |
标记为脏资源的列表。 |
|
|
string |
No |
|
my_vpc |
Untuk detail tentang parameter permintaan umum, lihat Parameter umum.
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
B288A0BE-D927-4888-B0F7-B35EF84B6E6F |
| StackId |
string |
The stack ID. |
4a6c9851-3b0f-4f5f-b4ca-a14bf691**** |
| DryRunResult |
object |
The dry run result. This parameter is returned only when |
|
| ParametersAllowedToBeModified |
array |
The parameters that can be modified. |
|
|
string |
A parameter that can be modified. If you update a stack without changing the template, modifying only the value of this parameter does not cause a validation error. |
param1 |
|
| ParametersConditionallyAllowedToBeModified |
array |
The parameters that can be modified under specific conditions. |
|
|
string |
A parameter that can be modified under specific conditions. If you update a stack without changing the template, whether modifying only this parameter's value causes a validation error depends on its new value. |
param2 |
|
| ParametersUncertainlyAllowedToBeModified |
array |
The parameters for which it is uncertain whether they can be modified. |
|
|
string |
A parameter for which it is uncertain whether it can be modified. If you update a stack without changing the template, whether modifying only this parameter's value causes a validation error is determined at runtime. |
param3 |
|
| ParametersNotAllowedToBeModified |
array |
The parameters that cannot be modified. |
|
|
string |
A parameter that cannot be modified. If you update a stack without changing the template, modifying only this parameter's value always causes a validation error. |
param4 |
|
| ParametersCauseInterruptionIfModified |
array |
A list of parameters that always cause a resource interruption if modified. Catatan
|
|
|
string |
A parameter that always causes a resource interruption if modified. If you update a stack without changing the template, modifying only this parameter's value always causes a resource interruption. |
param1 |
|
| ParametersConditionallyCauseInterruptionIfModified |
array |
A list of parameters that may cause a resource interruption if modified. Catatan
|
|
|
string |
A parameter that may cause a resource interruption if modified. If you update a stack without changing the template, whether modifying only this parameter's value causes a resource interruption depends on its new value and the resource's update behavior. |
param2 |
|
| ParametersUncertainlyCauseInterruptionIfModified |
array |
A list of parameters for which it is uncertain whether a modification will cause a resource interruption. Catatan
|
|
|
string |
A parameter for which it is uncertain whether a modification will cause a resource interruption. If you update a stack without changing the template, whether modifying only this parameter's value causes a resource interruption is determined at runtime. |
param3 |
|
| ParametersCauseReplacementIfModified |
array |
A list of parameters that always cause a resource replacement if modified. Catatan
|
|
|
string |
A parameter that always causes a resource replacement if modified. If you update a stack without changing the template, modifying only this parameter's value always causes a resource replacement. |
param5 |
|
| ParametersConditionallyCauseReplacementIfModified |
array |
A list of parameters that may cause a resource replacement if modified. Catatan
|
|
|
string |
A parameter that may cause a resource replacement if modified. If you update a stack without changing the template, whether modifying only this parameter's value causes a resource replacement depends on its new value. |
param6 |
|
| ParametersUncertainlyCauseReplacementIfModified |
array |
A list of parameters for which it is uncertain whether a modification will cause a resource replacement. Catatan
|
|
|
string |
A parameter for which it is uncertain whether a modification will cause a resource replacement. If you update a stack without changing the template, whether modifying only this parameter's value causes a resource replacement is determined at runtime. |
param7 |
Contoh
Respons sukses
JSONformat
{
"RequestId": "B288A0BE-D927-4888-B0F7-B35EF84B6E6F",
"StackId": "4a6c9851-3b0f-4f5f-b4ca-a14bf691****",
"DryRunResult": {
"ParametersAllowedToBeModified": [
"param1"
],
"ParametersConditionallyAllowedToBeModified": [
"param2"
],
"ParametersUncertainlyAllowedToBeModified": [
"param3"
],
"ParametersNotAllowedToBeModified": [
"param4"
],
"ParametersCauseInterruptionIfModified": [
"param1"
],
"ParametersConditionallyCauseInterruptionIfModified": [
"param2"
],
"ParametersUncertainlyCauseInterruptionIfModified": [
"param3"
],
"ParametersCauseReplacementIfModified": [
"param5"
],
"ParametersConditionallyCauseReplacementIfModified": [
"param6"
],
"ParametersUncertainlyCauseReplacementIfModified": [
"param7"
]
}
}
Kode kesalahan
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.