Menghapus Instans ECS atau Elastic Network Interface (ENI) dari grup keamanan tertentu.
Deskripsi operasi
Operasi API ini tidak lagi direkomendasikan. Panggil ModifyInstanceAttribute untuk menambahkan Instans ECS ke atau menghapusnya dari grup keamanan. Panggil ModifyNetworkInterfaceAttribute untuk menambahkan Elastic Network Interface (ENI) ke atau menghapusnya dari grup keamanan.
Anda tidak dapat menghapus Instans dan Elastic Network Interface (ENI) dari grup keamanan secara bersamaan. Parameter InstanceId dan NetworkInterfaceId tidak dapat ditentukan secara bersamaan.
Sebelum Anda menghapus Instans dari grup keamanan, Instans harus berada dalam status Stopped atau Running.
Instans atau Elastic Network Interface (ENI) harus berada di setidaknya satu grup keamanan. Jika Instans atau ENI hanya berada di satu grup keamanan, permintaan penghapusan akan gagal.
Jika Instans atau pengontrol antarmuka jaringan (NIC) tidak berada di grup keamanan yang ditentukan, permintaan penghapusan akan gagal.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:LeaveSecurityGroup |
update |
*Instance
*SecurityGroup
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| SecurityGroupId |
string |
Yes |
ID grup keamanan. |
sg-bp67acfmxazb4p**** |
| InstanceId |
string |
No |
ID instans. Catatan
Jika Anda menentukan parameter ini, NetworkInterfaceId harus dikosongkan. |
i-bp67acfmxazb4p**** |
| NetworkInterfaceId |
string |
No |
ID Elastic Network Interface (ENI). Catatan
Jika Anda menentukan parameter ini, InstanceId harus dikosongkan. |
eni-bp13kd656hxambfe**** |
| RegionId |
string |
No |
ID wilayah. Anda dapat memanggil DescribeRegions untuk mengkueri daftar wilayah terbaru.
|
cn-hangzhou |
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": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidInstanceId.Malformed | The specified parameter "InstanceId" is not valid. | |
| 400 | MissingParameter.RegionId | The specified RegionId should not be null. | |
| 400 | InvalidOperation.InvalidEniState | %s | |
| 400 | InvalidSecurityGroupAssociation.NotFound | %s. | |
| 403 | InstanceLastSecurityGroup | The specified security group is the last security group for the instance. | |
| 403 | IncorrectInstanceStatus | The current status of the resource does not support this operation. | |
| 403 | InstanceLockedForSecurity | The specified operation is denied as your instance is locked for security reasons. | |
| 403 | InstanceNotInSecurityGroup | The instance not in the group. | |
| 403 | InvalidOperation.ResourceManagedByCloudProduct | %s | |
| 403 | InvalidOperation.AtLeastInOneGroup | %s | |
| 403 | InvalidOperation.EniServiceManaged | %s | |
| 403 | InvalidOperation.InvalidEniType | %s | |
| 403 | InvalidParam.Malformed | %s | |
| 403 | InvalidParam.EniIdAndInstanceId.Conflict | %s | |
| 404 | InvalidInstanceId.NotFound | The specified InstanceId does not exist. | |
| 404 | InvalidSecurityGroupId.NotFound | The specified SecurityGroupId does not exist. | |
| 404 | InvalidEniId.NotFound | %s | |
| 404 | InvalidVSwitchId.NotFound | The specified virtual switch %s does not exist. | |
| 504 | RequestTimeout | The request encounters an upstream server timeout. | |
| 409 | InvalidOperation.Conflict | Request was denied due to conflict with a previous request, please try again later. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.