Mengubah VPC, alamat IP privat, grup keamanan, atau vSwitch dari Instans ECS tipe VPC.
Deskripsi operasi
Saat memanggil operasi ini, Instans ECS harus berada dalam status Stopped.
-
Saat mengubah alamat IP privat atau vSwitch instans, perhatikan hal-hal berikut:
Instans ECS yang baru dibuat harus direstart sebelum Anda dapat memanggil operasi ini.
Setelah modifikasi berhasil, Instans ECS harus direstart sebelum Anda dapat memanggil operasi ini lagi.
-
Saat mengubah VPC instans, perhatikan hal-hal berikut:
-
Instans:
Status Instans: Instans tidak boleh dalam keadaan terkunci, menunggu rilis, kedaluwarsa, dalam daur ulang kedaluwarsa, atau dalam daur ulang pembayaran tertunda. Untuk informasi lebih lanjut, lihat Masa pakai Instans.
Instans ECS yang dikaitkan dengan Instans load balancing tidak didukung.
Instans tidak boleh sedang digunakan oleh layanan cloud lain. Misalnya, Instans tidak boleh dalam proses migrasi, tidak boleh sedang mengalami perubahan VPC, dan database yang diterapkan pada Instans tidak boleh dikelola oleh Data Transmission Service (DTS).
-
Jaringan:
Instans yang dikonfigurasi dengan EIP dalam pola terlihat antarmuka jaringan (NIC) atau pola multi-EIP ke NIC terlihat tidak didukung.
Instans yang dilampirkan ke alamat IP virtual ketersediaan tinggi (HaVip) tidak didukung.
Instans yang vSwitch-nya dikaitkan dengan tabel entri rute kustom tidak didukung.
Instans dengan Akselerator Global (GA) yang diaktifkan tidak didukung.
Instans yang dilampirkan ke Elastic Network Interfaces (ENI) sekunder tidak didukung.
Instans yang telah dialokasikan alamat IPv6 tidak didukung.
Instans yang antarmuka jaringan (NIC) utamanya memiliki beberapa alamat IP tidak didukung.
vSwitch yang ditentukan harus milik VPC tujuan.
Zona vSwitch harus tetap sama sebelum dan setelah modifikasi.
Jika Anda menentukan alamat IP privat untuk NIC utama, alamat IP tersebut harus berada dalam Blok CIDR vSwitch dan tersedia. Jika tidak ditentukan, alamat IP akan dialokasikan secara acak. Pastikan vSwitch tujuan memiliki alamat IP tersedia yang cukup.
Jika Anda menggunakan VPC bersama dari akun lain, pastikan grup keamanan tujuan dibuat oleh akun Anda di VPC bersama tersebut, bukan oleh akun pemilik VPC.
-
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:ModifyInstanceVpcAttribute |
update |
*Instance
*VSwitch
|
|
None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
ID Instans. Catatan
Saat memanggil operasi ini, Instans ECS harus berada dalam status Stopped. Untuk batasan lain pada Instans, baca dengan saksama bagian deskripsi operasi. |
i-bp1iudwa5b1tqag1**** |
| VSwitchId |
string |
Yes |
ID vSwitch.
|
vsw-bp1s5fnvk4gn3tw12**** |
| PrivateIpAddress |
string |
No |
Alamat IP privat baru. Catatan
Parameter Nilai default: Jika parameter ini tidak ditentukan, alamat IP privat akan ditetapkan secara acak dari Blok CIDR vSwitch. |
172.17.**.** |
| VpcId |
string |
No |
ID VPC tujuan. |
vpc-bp1vwnn14rqpyiczj**** |
| SecurityGroupId |
array |
No |
ID grup keamanan tempat Instans ditambahkan setelah VPC diubah. Parameter ini hanya diperlukan saat parameter
|
sg-o6w9l8bc8dgmkw87**** |
|
string |
No |
ID grup keamanan. |
sg-o6w9l8bc8dgmkw87**** |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
ID permintaan. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
Contoh
Respons sukses
JSONformat
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}
Respons error
JSONformat
{
"RequestId": "E69EF3CC-94CD-42E7-8926-F133B86387C0",
"HostId": "ecs.aliyuncs.com",
"Code": "InvalidPrivateIp.Changing",
"Message": "Specified private IP address is not in the CIDR block of virtual switch."
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidTarget.TrafficMirrorSession | Instance is target of traffic mirror session. | |
| 400 | InvalidSource.TrafficMirrorSession | Instance is source of traffic mirror session. | |
| 400 | InvalidPrivateIpAddress.Malformed | Specified private IP address is malformed. | |
| 400 | InvalidPrivateIpAddress.Duplicated | Specified private IP address is duplicated. | |
| 400 | IncorrectVSwitchStatus | The current status of virtual switch does not support this operation. | |
| 400 | IncorrectInstanceStatus | The current status of instance does not support this operation. | |
| 400 | OperationDenied | Specified operation is denied as your instance is not in VPC. | |
| 400 | InvalidVSwitchId.Mismatch | Specified instance and virtual switch are not in the same zone. | |
| 400 | InvalidPrivateIpAddress.Mismatch | Specified private IP address is not in the CIDR block of virtual switch. | |
| 400 | InvalidPrivateIp.Changing | Previous action is not finished yet. | |
| 400 | PrimaryEniHasSubIp | Primary network interface of the specified instance has more than one private ip. | |
| 400 | VSwitchIdNotMatch | The subnet of private ip is different to the instance, please unbind ha vip. | |
| 400 | InvalidOperation.EniCountExceeded | The number of ENIs in an enterprise security group has reached the maximum limit. | |
| 400 | InvalidParameter.SecurityGroupId | Security group ids are invalid. | |
| 400 | InvalidVSwitch.IllegalStatus | The operation is not allowed in the current VSwitch state. Expecting state includes "Created", but current state is "%s". | |
| 401 | InvalidOperation.SecurityGroupNotAuthorized | The specified security group is not authorized to operate. | |
| 500 | InternalError | The request processing has failed due to some unknown error. | |
| 403 | OperationDenied | The Specified operation is denied as your instance is locked for security reasons. | |
| 403 | InvalidIp.Ipv6Assigned | The specified instance has been assigned IPv6 address. | |
| 403 | SecurityGroupInstanceLimitExceed | %s | |
| 403 | InvalidInstance.HasTransitionRecord | The operation is denied because the specified instance has a migration plan. | |
| 403 | InvalidInstanceStatus.NotNormal | The Specified operation is denied due to instance status. | |
| 403 | InvalidVpcId.SharedVpc | The Specified operation is denied as your targe vpc is SharedVpc. | |
| 403 | InvalidOperation.NotAllowed | The operation is denied because the specified VPC has advanced features enabled. | |
| 403 | InvalidParameter.ToSecurityGroupId | %s | |
| 403 | InvalidOperation.ResourceManagedByCloudProduct | %s | |
| 403 | InvalidOperation.VswAndEcsAvailabilityZoneMismatch | Specified instance and virtual switch are not in the same zone. | |
| 403 | InvalidOperation.CloudBoxEcsNotSupport | Cloud box ecs instance does not support modifying VPC. | |
| 403 | AclLimitExceed | %s | |
| 404 | InvalidInstanceId.NotFound | The specified InstanceId does not exist. | |
| 404 | InvalidVSwitchId.NotFound | Specified virtual switch does not exist. | |
| 404 | NoSuchResource | The specified resource is not found. | |
| 404 | InvalidParameter.InvalidInstanceId | The specified InstanceId does not exist. | |
| 404 | InvalidParameter.VSwitchId | The specified virtual vswitch does not exist. | |
| 404 | InvalidRegion.ValueNotSupported | The specified Region does not exist. | |
| 404 | InvalidInstance.AttachedEni | The Specified operation is denied due to elastic network interface. | |
| 404 | InvalidIp.MultiPrimaryIp | The Specified operation is denied due to multi private ip. | |
| 404 | InvalidIp.Ipv6 | The Specified operation is denied due to ipv6. | |
| 404 | InvalidVSwitch.NotBelongToVpc | %s | |
| 404 | InvalidParameter.EniNo | %s | |
| 404 | InvalidSecurityGroupId.NotFound | %s | |
| 404 | InvalidParameter.SecurityGroupIdRepeated | %s | |
| 404 | InvalidSecurityGroupType.NotSupportClassic | The specified SecurityGroupIds have classic group type. | |
| 404 | InvalidSecurityGroupVpc.NotBelongToOneVpc | The specified SecurityGroupIds are belong to different vpc. | |
| 404 | EnterpriseGroupLimited.MutliGroupType | The specified instance can not join multi SecurityGroup types. | |
| 404 | InvalidParameter.AlreadyInTargetVpc | The specified instance is already in the destination VPC. | |
| 404 | InvalidParameter.SecurityGroupId | The specified SecurityGroupId.N is invalid or does not exist. | |
| 404 | JoinedGroupLimitExceed | The specified instance has exceed quota of SecurityGroup. | |
| 404 | InvalidParameter.MustBeEmpty | The specified parameter SecurityGroupId.N and VpcId need be empty. | |
| 404 | InvalidParameter.NotEnoughIpInVSwitch | The specified virtual switch has not enough available ip. | |
| 404 | InvalidDependence.MutliDirectlyEip | The Specified operation is denied due to multi directly Eips. | |
| 404 | InvalidDependence.HaVip | The Specified operation is denied due to HaVip. | |
| 404 | InvalidDependence.NextHopOfCustomRouter | The Specified operation is denied due to next hop of Custom Router. | |
| 404 | InvalidDependence.BeenUsedAsAppServer | The Specified operation is denied due to AppServer. | |
| 404 | InvalidDependence.GrantAccess | The Specified operation is denied due to grant access. | |
| 404 | InvalidDependence.BindGA | The Specified operation is denied due to GA. | |
| 404 | InvalidDependence.SLB | The Specified operation is denied as your instance with alb or clb. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.