Updating a Supplementary Network Interface
Function
This API is used to update the basic information about a supplementary network interface, such as the associated security group and description.
Calling Method
For details, see Calling APIs.
URI
PUT /v3/{project_id}/vpc/sub-network-interfaces/{sub_network_interface_id}
| 
         Parameter  | 
       
         Mandatory  | 
       
         Type  | 
       
         Description  | 
      
|---|---|---|---|
| 
         project_id  | 
       
         Yes  | 
       
         String  | 
       
         Definition: ID of the project that a supplementary network interface belongs to. For details about how to obtain a project ID, see Obtaining a Project ID. Range: N/A  | 
      
| 
         sub_network_interface_id  | 
       
         Yes  | 
       
         String  | 
       
         Definition: ID of a supplementary network interface. Range: N/A  | 
      
Request Parameters
| 
         Parameter  | 
       
         Mandatory  | 
       
         Type  | 
       
         Description  | 
      
|---|---|---|---|
| 
         dry_run  | 
       
         No  | 
       
         Boolean  | 
       
         Definition: Whether to only check the request. Constraints: N/A Range: 
 Default Value: false  | 
      
| 
         sub_network_interface  | 
       
         Yes  | 
       
         Definition: Request body for updating a supplementary network interface. Constraints: N/A Range: N/A Default Value: N/A  | 
      
| 
         Parameter  | 
       
         Mandatory  | 
       
         Type  | 
       
         Description  | 
      
|---|---|---|---|
| 
         description  | 
       
         No  | 
       
         String  | 
       
         Definition: Description of a supplementary network interface. Constraints: The value can contain 0 to 255 characters and cannot contain angle brackets (< or >). Range: N/A Default Value: N/A  | 
      
| 
         security_groups  | 
       
         No  | 
       
         Array of strings  | 
       
         Definition: IDs of the security groups that a supplementary network interface is associated with. For example, "security_groups": ["a0608cbf-d047-4f54-8b28-cd7b59853fff"]. Constraints: N/A Range: N/A Default Value: N/A  | 
      
| 
         allowed_address_pairs  | 
       
         No  | 
       
         Array of AllowedAddressPair objects  | 
       
         Definition: IP/MAC address pair list of a supplementary network interface. For details, see the AllowedAddressPair object list. Constraints: 
 Range: N/A Default Value: N/A  | 
      
| 
         Parameter  | 
       
         Mandatory  | 
       
         Type  | 
       
         Description  | 
      
|---|---|---|---|
| 
         ip_address  | 
       
         No  | 
       
         String  | 
       
         Definition: IP address. Constraints: Configure a dedicated security group if a large CIDR block (subnet mask less than 24) is configured for parameter allowed_address_pairs. Range: Single IP address, for example, 192.168.21.25 A CIDR block, for example, 192.168.21.0/24 Default Value: N/A  | 
      
| 
         mac_address  | 
       
         No  | 
       
         String  | 
       
         Definition: MAC address. Constraints: N/A Range: N/A Default Value: N/A  | 
      
Response Parameters
Status code: 200
| 
         Parameter  | 
       
         Type  | 
       
         Description  | 
      
|---|---|---|
| 
         request_id  | 
       
         String  | 
       
         Definition: Request ID. Range: N/A  | 
      
| 
         sub_network_interface  | 
       
         SubNetworkInterface object  | 
       
         Definition: Response body for updating a supplementary network interface. Range: N/A  | 
      
| 
         Parameter  | 
       
         Type  | 
       
         Description  | 
      
|---|---|---|
| 
         id  | 
       
         String  | 
       
         Definition: ID of a supplementary network interface. After a supplementary network interface is created, a supplementary network interface ID is generated, which uniquely identifies the supplementary network interface. Range: The value is in UUID format with hyphens (-).  | 
      
| 
         virsubnet_id  | 
       
         String  | 
       
         Definition: ID of the virtual subnet that a supplementary network interface is located. Range: The value is in UUID format with hyphens (-).  | 
      
| 
         private_ip_address  | 
       
         String  | 
       
         Definition: Private IPv4 address of a supplementary network interface. Range: N/A  | 
      
| 
         ipv6_ip_address  | 
       
         String  | 
       
         Definition: Private IPv6 address of a supplementary network interface. Range: N/A  | 
      
| 
         mac_address  | 
       
         String  | 
       
         Definition: MAC address of a supplementary network interface. Range: The value is a valid MAC address assigned by the system randomly.  | 
      
| 
         parent_device_id  | 
       
         String  | 
       
         Definition: Device ID of the host network interface that a supplementary network interface is attached to. Range: The value is in UUID format with hyphens (-).  | 
      
| 
         parent_id  | 
       
         String  | 
       
         Definition: ID of the elastic network interface that a supplementary network interface is attached to. Range: The value is in UUID format with hyphens (-).  | 
      
| 
         description  | 
       
         String  | 
       
         Definition: Description of a supplementary network interface. Range: The value can contain 0 to 255 characters and cannot contain angle brackets (< or >).  | 
      
| 
         vpc_id  | 
       
         String  | 
       
         Definition: ID of the VPC that a supplementary network interface belongs to. Range: The value is in UUID format with hyphens (-).  | 
      
| 
         vlan_id  | 
       
         Integer  | 
       
         Definition: VLAN ID of a supplementary network interface. Range: 1 to 4094  | 
      
| 
         security_groups  | 
       
         Array of strings  | 
       
         Definition: IDs of the security groups that a supplementary network interface is associated with. For example, "security_groups": ["a0608cbf-d047-4f54-8b28-cd7b59853fff"]. Range: If this parameter is not specified in the request, the supplementary network interface is automatically associated with the default security group after being created.  | 
      
| 
         tags  | 
       
         Array of ResponseTag objects  | 
       
         Definition: Tags of a supplementary network interface, including tag keys and tag values, which can be used to classify and identify resources. For details, see the tag objects. Range: N/A  | 
      
| 
         project_id  | 
       
         String  | 
       
         Definition: ID of the project that a supplementary network interface belongs to. Range: N/A  | 
      
| 
         created_at  | 
       
         String  | 
       
         Definition: Time when a supplementary network interface was created. Range: The value is a UTC time in the format of yyyy-MM-ddTHH:mm:ssZ.  | 
      
| 
         allowed_address_pairs  | 
       
         Array of AllowedAddressPair objects  | 
       
         Definition: IP/MAC address pair list of a supplementary network interface. For details, see the AllowedAddressPair object list. Range: N/A  | 
      
| 
         state  | 
       
         String  | 
       
         Definition: Status of a supplementary network interface. Range: 
  | 
      
| 
         instance_id  | 
       
         String  | 
       
         Definition: ID of the cloud service instance that a supplementary network interface is attached to, for example, RDS instance ID. Range: N/A  | 
      
| 
         instance_type  | 
       
         String  | 
       
         Definition: Type of the cloud service instance that a supplementary network interface is attached to, for example, RDS. Range: N/A  | 
      
| 
         scope  | 
       
         String  | 
       
         Definition: Public network egress information of the site where a supplementary network interface works. Range: 
  | 
      
| 
         security_enabled  | 
       
         Boolean  | 
       
         Definition: Whether the security option is enabled for a supplementary network interface. If the option is not enabled, the security group does not take effect. Range: N/A  | 
      
| 
         Parameter  | 
       
         Type  | 
       
         Description  | 
      
|---|---|---|
| 
         key  | 
       
         String  | 
       
         Definition: Tag key. Range: 
  | 
      
| 
         value  | 
       
         String  | 
       
         Definition: Tag value. Range: 
  | 
      
| 
         Parameter  | 
       
         Type  | 
       
         Description  | 
      
|---|---|---|
| 
         ip_address  | 
       
         String  | 
       
         Definition: IP address. Constraints: Configure a dedicated security group if a large CIDR block (subnet mask less than 24) is configured for parameter allowed_address_pairs. Range: Single IP address, for example, 192.168.21.25 A CIDR block, for example, 192.168.21.0/24 Default Value: N/A  | 
      
| 
         mac_address  | 
       
         String  | 
       
         Definition: MAC address. Constraints: N/A Range: N/A Default Value: N/A  | 
      
Example Requests
Change the security group that is associated with the supplementary network interface whose ID is 2be868f2-f7c9-48db-abc0-eea0b9105b0d.
PUT https://{Endpoint}/v3/8c6fb137a48a428aaf9a0229dca4edb3/vpc/sub-network-interfaces/2be868f2-f7c9-48db-abc0-eea0b9105b0d
{
  "sub_network_interface" : {
    "security_groups" : [ "6727c950-9f01-47a2-a7aa-7d3686c4c95b" ],
    "allowed_address_pairs" : [ {
      "ip_address" : "1.1.1.1/0"
    } ]
  }
}
  Example Responses
Status code: 200
Normal response to the PUT operation. For more status codes, see Status Codes.
{
  "sub_network_interface" : {
    "id" : "2be868f2-f7c9-48db-abc0-eea0b9105b0d",
    "project_id" : "6b32266bded64091a138e9ec19cff361",
    "virsubnet_id" : "3c15c3b0-0df4-4115-9c18-e67a8a0d7702",
    "private_ip_address" : "192.168.0.160",
    "ipv6_ip_address" : null,
    "mac_address" : "fa:16:3e:26:7e:1e",
    "parent_device_id" : "285b2e45-2968-4f4c-8992-54e0d4c8da1d",
    "security_enabled" : false,
    "security_groups" : [ "6727c950-9f01-47a2-a7aa-7d3686c4c95b" ],
    "allowed_address_pairs" : [ {
      "ip_address" : "1.1.1.1/0",
      "mac_address" : "fa:16:3e:26:7e:1e"
    } ],
    "vpc_id" : "c10e1e02-9db2-4bd0-89ef-52536952627e",
    "instance_id" : "",
    "instance_type" : "",
    "description" : "aaa",
    "parent_id" : "00336617-4552-48c5-9856-f539f4e9aca2",
    "vlan_id" : 3413,
    "state" : null,
    "tags" : [ ],
    "scope" : "center",
    "created_at" : "2025-02-10T08:21:16Z"
  },
  "request_id" : "d346a69661d82c7b14bdc7ac0cd62cbd"
}
  Status Codes
| 
         Status Code  | 
       
         Description  | 
      
|---|---|
| 
         200  | 
       
         Normal response to the PUT operation. For more status codes, see Status Codes.  | 
      
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.