All Products
Search
Document Center

:UnassignPrivateIpAddresses

Last Updated:Jan 22, 2024

Unassigns secondary private IP addresses from an elastic network interface (ENI).

Usage notes

  • The ENI from which to unassign secondary private IP addresses must be in the Available (Available) or Bound (InUse) state.
  • If the ENI is a primary ENI, the Elastic Compute Service (ECS) instance to which the ENI is attached must be in the Running (Running) or Stopped (Stopped) state.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes UnassignPrivateIpAddresses

The operation that you want to perform. Set the value to UnassignPrivateIpAddresses.

RegionId String Yes cn-hangzhou

The region ID of the ENI. You can call the DescribeRegions operation to query the most recent region list.

NetworkInterfaceId String Yes eni-bp67acfmxazb4ph****

The ID of the ENI.

PrivateIpAddress.N String No 192.168.**.**

Secondary private IP address N to unassign. Valid values of N: 1 to 32.

Ipv4Prefix.N String No 192.168.**.**/28

IPv4 prefix N. Valid values of N: 1 to 10.

Response parameters

Parameter Type Example Description
RequestId String 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

The ID of the request.

Examples

Sample requests

https://ecs.aliyuncs.com/?Action=UnassignPrivateIpAddresses
&NetworkInterfaceId=eni-bp67acfmxazb4ph****
&PrivateIpAddress.1=192.168.**.**
&RegionId=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<UnassignPrivateIpAddressesResponse>
    <RequestId>04F0F334-1335-436C-A1D7-6C044FE70008</RequestId>
</UnassignPrivateIpAddressesResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "04F0F334-1335-436C-A1D7-6C044FE70008"
}

Error codes

HTTP status code Error code Error message Description
400 UnsupportedParameter %s A specified parameter is not supported.
400 InvalidParameter %s Invalid parameter value.
400 InvalidInstanceID.Malformed %s Invalid InstanceId format.
400 InvalidOperation.InvalidEcsState %s This operation cannot be performed on the instance in the current state.
400 InvalidOperation.InvalidEniState %s This operation cannot be performed on the ENI in the current state.
400 InvalidOperation.DetachPrimaryEniNotAllowed %s The ENI cannot be detached from the instance.
400 MissingParameter %s A required parameter is not specified.
400 Forbidden.RegionId %s The service is unavailable in the region for the moment.
400 InvalidAction %s The operation is invalid.
400 InvalidParameter.Conflict %s Invalid parameter value. Check whether parameter conflicts exist. %s is a variable. An error message is dynamically returned based on call conditions.
403 InvalidUserType.NotSupported %s Your account does not support this operation.
403 Abs.InvalidAccount.NotFound %s Your Alibaba Cloud account is not found, or your AccessKey pair has expired.
403 Forbidden.NotSupportRAM %s Resource Access Management (RAM) users do not have the permissions to perform this operation.
403 Forbidden.SubUser %s You have no access to the resource. Contact the owner of the Alibaba Cloud account.
403 MaxEniCountExceeded %s The maximum number of ENIs that can be managed is exceeded.
403 EniPerInstanceLimitExceeded %s The maximum number of ENIs that can be attached to the instance is exceeded.
403 InvalidOperation.AvailabilityZoneMismatch %s The operation is invalid.
403 InvalidOperation.VpcMismatch %s The operation is invalid. Check whether the VPC in the operation corresponds to other parameters.
403 SecurityGroupInstanceLimitExceed %s The maximum number of instances in the security group is reached.
403 InvalidSecurityGroupId.NotVpc %s Invalid security group ID. The network type of the specified security group is not VPC.
403 InvalidOperation.InvalidEniType %s This operation cannot be performed on this type of ENI.
403 InvalidVSwitchId.IpInvalid %s Invalid private IP address.
403 InvalidIp.IpUnassigned %s The specified IP address is not assigned.
403 Operation.Conflict %s This operation conflicts with another operation in progress. Try again later.
403 InvalidOperation.EniServiceManaged %s The operation is invalid.
403 InvalidIp.IpPrefixMaskInvalid The ip prefixes mask %s is illegal which must be between %s and %s. The IP prefix mask is invalid and is not within the valid range.
403 InvalidIp.IpPrefixMaskNotSame The ip prefixes %s are illegal which mask must be same. The IP prefix masks are not the same.
403 InvalidIp.IpPrefixNotStrict The ip prefix must be strict cidr format. The IP prefix is invalid and is not in the CIDR format.
403 InvalidIp.IpPrefixIllegal The ip prefixes %s is/are illegal. The IP prefix is invalid and is not in the CIDR format.
403 MissingParameter These parameters %s cannot be both empty. A required parameter is not specified. The required parameters cannot be empty.
404 InvalidEcsId.NotFound %s The instance ID is not found.
404 InvalidEniId.NotFound %s The ENI ID is not found.
404 InvalidVSwitchId.NotFound %s The specified vSwitch ID is not found.
404 InvalidSecurityGroupId.NotFound %s The specified security group ID is not found.
404 InvalidInstanceId.NotFound %s The InstanceId is not found.
500 InvalidOperation.RegionNotSupportIpPrefix The current region does not support ip prefix. IP prefixes cannot be assigned in the region.

For a list of error codes, see Service error codes.