Memperbarui alias.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
fc:UpdateAlias |
update |
*All Resource
|
None | None |
Sintaks permintaan
PUT /2021-04-06/services/{serviceName}/aliases/{aliasName} HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| serviceName |
string |
Yes |
Nama layanan. |
demo-service |
| aliasName |
string |
Yes |
Nama alias. |
alias_test |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
Konfigurasi alias. |
|
| additionalVersionWeight |
object |
No |
The canary release version to which the alias points, and the weight assigned to that version.
|
|
|
number |
No |
The traffic weight. Valid values: 0 to 1. |
1 |
|
| description |
string |
No |
The description of the alias. |
test_description |
| versionId |
string |
No |
The ID of the version to which the alias points. |
1 |
| resolvePolicy |
string |
No |
The canary release mode. Default value: off. Valid values:
|
Random |
| routePolicy | RoutePolicy |
No |
The canary release rule. Traffic that matches the canary release rule is routed to the canary release instance. |
|
| If-Match |
string |
No |
Jika ETag yang ditentukan di permintaan cocok dengan nilai ETag objek, objek akan dikembalikan bersama dengan tanggapan 200 OK. Jika tidak, tanggapan 412 Precondition Failed akan dikembalikan. Nilai ETag objek digunakan untuk memverifikasi integritas data objek. Parameter ini kosong secara default. |
e19d5cd5af0378da05f63f891c7467af |
| X-Fc-Account-Id |
string |
No |
ID akun Alibaba Cloud Anda. |
188077086902**** |
| X-Fc-Date |
string |
No |
Waktu saat fungsi dipanggil. Nilai harus dalam format EEE,d MMM yyyy HH:mm:ss GMT. |
Wed, 11 May 2022 09:00:00 GMT |
| X-Fc-Trace-Id |
string |
No |
ID jejak permintaan pemanggilan Function Compute. |
rid281s****** |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
The configuration of the alias. |
||
| additionalVersionWeight |
object |
The additional version to which the alias points, and the weight assigned to that version.
|
|
|
number |
The traffic weight. Valid values: 0 to 1. |
1 |
|
| aliasName |
string |
The name of the alias. |
test |
| createdTime |
string |
The time when the alias was created. |
2016-08-15T16:06:05.000+0000 |
| description |
string |
The description of the alias. |
test_description |
| lastModifiedTime |
string |
The time when the alias was last modified. |
2016-08-15T16:06:05.000+0000 |
| versionId |
string |
The ID of the version to which the alias points. |
1 |
| resolvePolicy |
string |
The canary release mode. Default value: off. Valid values:
|
Random |
| routePolicy | RoutePolicy |
The canary release rule. Traffic that matches the canary release rule is routed to the canary release instances. |
Contoh
Respons sukses
JSONformat
{
"additionalVersionWeight": {
"key": 1
},
"aliasName": "test",
"createdTime": "2016-08-15T16:06:05.000+0000",
"description": "test_description",
"lastModifiedTime": "2016-08-15T16:06:05.000+0000",
"versionId": "1",
"resolvePolicy": "Random",
"routePolicy": {
"condition": "AND",
"policyItems": [
{
"type": "Header",
"key": "x-test-uid",
"value": "11111",
"operator": "="
}
]
}
}
Kode kesalahan
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.