虚拟私有云 VPC-更新子网:请求示例

时间:2024-10-12 09:48:13

请求示例

  • 更新id为4779ab1c-7c1a-44b1-a02e-93dfc361b32d的子网,名称更新为subnet02,更新dns和dhcp。
    PUT https://{Endpoint}/v1/{project_id}/vpcs/{vpc_id}/subnets/4779ab1c-7c1a-44b1-a02e-93dfc361b32d
    
    {
        "subnet": {
            "name": "subnet02",
            "ipv6_enable": true,
            "dhcp_enable": false,
            "primary_dns": "114.xx.xx.115",
            "secondary_dns": "114.xx.xx.116",
            "extra_dhcp_opts": [
                {
                    "opt_value": "10.100.0.33,10.100.0.34",
                    "opt_name": "ntp"
                },
                {
                    "opt_value": "24h",
                    "opt_name": "addresstime"
                }
            ]
        }
    }
    
support.huaweicloud.com/api-vpc/vpc_subnet01_0004.html