VPC türü bir ECS örneğinin VPC'sini, özel IP adresini, güvenlik grubunu veya vSwitch'ini değiştirir.
Operation description
Bu işlemi çağırdığınızda, ECS örneğinin Durduruldu (Stopped) durumunda olması gerekir.
-
Bir örneğin özel IP adresini veya vSwitch'ini değiştirirken aşağıdaki hususlara dikkat edin:
Yeni oluşturulan bir ECS örneği için bu işlemi çağırmadan önce örneğin yeniden başlatılması gerekir.
Başarılı bir değişiklikten sonra, bu işlemi tekrar çağırmadan önce ECS örneğinin yeniden başlatılması gerekir.
-
Bir örneğin VPC'sini değiştirirken aşağıdaki hususlara dikkat edin:
-
Örnek:
Örnek durumu: Örnek kilitli, serbest bırakılmayı bekleyen, süresi dolmuş, süre sonu geri dönüşümünde veya ödenmemiş borç geri dönüşümünde olamaz. Daha fazla bilgi için bkz. Örnek yaşam döngüsü.
Yük dengeleyici örnekleriyle ilişkilendirilmiş ECS örnekleri desteklenmez.
Örnek diğer bulut hizmetleri tarafından kullanılıyor olamaz. Örneğin, örnek geçiş aşamasında olamaz, VPC değişikliği sürecinde olamaz ve örnek üzerinde dağıtılan veritabanları Veri İletim Hizmeti (DTS) tarafından yönetiliyor olamaz.
-
Ağ:
Ağ arabirimi denetleyicisi (NIC) görünür modunda EIP veya çoklu EIP'den NIC görünür modu ile yapılandırılmış örnekler desteklenmez.
Yüksek kullanılabilirlik (HA) sanal IP adreslarına (HaVips) ekli örnekler desteklenmez.
vSwitch'leri özel yönlendirme tablolarıyla ilişkilendirilmiş örnekler desteklenmez.
Global Accelerator (GA) etkinleştirilmiş örnekler desteklenmez.
İkincil Esnek Ağ Arabirimlerine (ENI) ekli örnekler desteklenmez.
IPv6 adresleri ayrılmış örnekler desteklenmez.
Birincil NIC'sinde birden fazla IP adresi bulunan örnekler desteklenmez.
Belirtilen vSwitch, hedef VPC'ye ait olmalıdır.
vSwitch'in bölgesi değişiklikten önce ve sonra aynı kalmalıdır.
Birincil NIC için özel bir IP belirtirseniz, IP adresi vSwitch'in CIDR bloğu içinde ve kullanılabilir olmalıdır. Belirtmezseniz, rastgele bir IP adresi ayrılır. Hedef vSwitch'in yeterli sayıda kullanılabilir IP adresine sahip olduğundan emin olun.
Başka bir hesap tarafından paylaşılan bir VPC kullanıyorsanız, hedef güvenlik grubunun paylaşılan VPC'de VPC sahibinin hesabı tarafından değil, sizin hesabınız tarafından oluşturulduğundan emin olun.
-
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:ModifyInstanceVpcAttribute |
update |
*Instance
*VSwitch
|
|
None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
Örnek kimliği. Not
Bu işlemi çağırdığınızda, ECS örneğinin Durduruldu ( |
i-bp1iudwa5b1tqag1**** |
| VSwitchId |
string |
Yes |
vSwitch kimliği.
|
vsw-bp1s5fnvk4gn3tw12**** |
| PrivateIpAddress |
string |
No |
Yeni özel IP adresi. Not
Varsayılan değer: Bu parametre belirtilmezse, vSwitch'in CIDR bloğundan rastgele bir özel IP adresi atanır. |
172.17.**.** |
| VpcId |
string |
No |
Hedef VPC kimliği. |
vpc-bp1vwnn14rqpyiczj**** |
| SecurityGroupId |
array |
No |
VPC değiştirildikten sonra örneğin eklendiği güvenlik gruplarının kimlikleri. Bu parametre yalnızca
|
sg-o6w9l8bc8dgmkw87**** |
|
string |
No |
Güvenlik grubu kimliği. |
sg-o6w9l8bc8dgmkw87**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
İstek kimliği. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
Examples
Success response
JSON format
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}
Error codes
|
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". | |
| 400 | QuotaExceeded.PrivateIpAddress | There are not enough private IPs in the specified VSwitch. | |
| 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. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.