Skip to main content

Update an existing virtual network

PUT 

/v1/projects/:projectId/zones/:zoneName/virtualnetworks/:virtualNetworkId

In case of success, the response body contains the updated virtual network.

Request

Path Parameters

    projectId stringrequired

    Project Identifier

    zoneName stringrequired

    Zone name

    virtualNetworkId stringrequired

    Virtual network Identifier

Header Parameters

    X-API-KEY string

    Your SIU token if you use this API through Orange Developer.

    Authorization string

    Bearer access token authentication if you use this API through Orange Developer or Orange Developer Inside.

    X-Requester-Id string

    Your SIU Id if you use this API through Orange Developer Inside.

Bodyrequired

Virtual Network resource.

    namestringrequired

    Name of the Virtual Network. Must be unique within the project for a zone. Cannot be updated.

    Possible values: <= 40 characters, Value must match regular expression [A-Za-z0-9-]

    descriptionstring

    Description of the Virtual Network.

    tags object

    Tags associated with the virtual network resource.

    property name*string
    vpns object[]

    List of VPN attached to the VN. Impact if VPN are modified or removed.

    Possible values: <= 99

  • Array [
  • vpnNamestringrequired

    VPN name. This attribute can not be updated.

    vnRoleVPNRoleEnum (string)required

    VN role in the VPN.

    Possible values: [any-to-any, client, server]

  • ]
  • subnets object[]required

    List of subnets. It is not possible to remove a subnet from this list once an IP has been allocated from this subnet.

  • Array [
  • subnetstringrequired

    Subnet in CIDR format. Cannot be updated. IPv6 not available yet.

    enableDhcpboolean

    Enable DHCP on subnet. This attribute can not be updated.

    Default value: true
    allocateIpAddressFromStartboolean

    Subnet IP allocation rule for DHCP process:

    • true: from first address of subnet
    • false: from last address of subnet
    Default value: true
    dnsPrimarystring

    IP address of the primary DNS server (applicable to IPV4 subnets only).

    dnsSecondarystring

    IP address of the secondary DNS server (applicable to IPV4 subnets only).

    allocationPools object[]

    List of pools of IP addresses belonging to the subnet that can be used by DHCP allocation process. If not defined, the entire subnet is used. After addition of the subnet, it is only possible to add pools.

  • Array [
  • startstringrequired

    First IP address of the pool.

    endstringrequired

    Last IP address of the pool.

  • ]
  • hostRoutes object[]

    Host routes, configured for the subnet, that are sent to the VM by DHCP. Changes are not taken into account until a new DHCP request is sent. NB: this option is usually used in combination with IRT (Interface Route Table) or NRT (Network Route Table).

  • Array [
  • prefixstringrequired

    Prefix of the route in CIDR format. This attribute can not be updated.

    nextHopstringrequired

    Next hop IP address of the route. This attribute can not be updated.

  • ]
  • gatewayIpAddressstring

    IP address of the Contrail vRouter to be used for its "gateway" role. If not defined, Contrail uses the first usable address of the subnet (from start or from end depending on the value of the parameter allocateIpAddressFromStart). This attribute can not be updated. Ipv6 not available yet.

    serviceIpAddressstring

    IP address that the vRouter must use to configure its service interface on this VN. If not defined, Contrail uses the second usable address of the subnet (from start or from end depending on the value of the parameter allocateIpAddressFromStart). Ipv6 not available yet.

  • ]
  • hostRoutes object[]

    Host routes, configured for the subnet, that are sent to the VM by DHCP. Changes are not taken into account until a new DHCP request is sent. NB: this option is usually used in combination with IRT (Interface Route Table) or NRT (Network Route Table).

  • Array [
  • prefixstringrequired

    Prefix of the route in CIDR format. This attribute can not be updated.

    nextHopstringrequired

    Next hop IP address of the route. This attribute can not be updated.

  • ]
  • networkRoutesobject[]

    Network routes that are pushed on the vrouter. In a general case, this option is used in combination with host routes. NB: impact service if routes are removed.

    routingPolicyRefs object[]

    List of routing policies applied on the VN, identified either by their name or their resource id. NB: the order in the list is the order in which the routing policies will be applied

  • Array [
  • iduuid

    Identifier of the referred resource. If not provided, either name or hRef must be filled. This parameter can not be updated.

    namestring

    Name of the referred resource. If not provided, either hRef or identifier must be filled. This parameter can not be updated.

    Possible values: non-empty and <= 40 characters

    hRefuri

    hRef of the referred resource. If not provided, either name or identifier must be filled. This parameter can not be updated.

  • ]

Responses

Ok

Response Headers
    X-Job-Href

    Href of the asynchronous job that will process the request, in order to track its status.

    X-Retry-After

    The number of seconds to wait before checking the status of the job.

Schema
    iduuidrequired

    Resource identifier.

    hRefurirequired

    Hypertext reference of the resource.

curl -L -X PUT '/v1/projects/:projectId/zones/:zoneName/virtualnetworks/:virtualNetworkId' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"name": "string",
"description": "string",
"tags": {},
"vpns": [
{
"vpnName": "string",
"vnRole": "any-to-any"
}
],
"subnets": [
{
"subnet": "string",
"enableDhcp": true,
"allocateIpAddressFromStart": true,
"dnsPrimary": "string",
"dnsSecondary": "string",
"allocationPools": [
{
"start": "string",
"end": "string"
}
],
"hostRoutes": [
{
"prefix": "string",
"nextHop": "string"
}
],
"gatewayIpAddress": "string",
"serviceIpAddress": "string"
}
],
"hostRoutes": [
{
"prefix": "string",
"nextHop": "string"
}
],
"networkRoutes": [
{
"prefix": "string",
"nextHop": "string",
"communityTags": [
"string"
]
}
],
"routingPolicyRefs": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"hRef": "string"
}
]
}'
Request Collapse all
Base URL
/v1
Parameters
— pathrequired
— pathrequired
— pathrequired
— header
— header
— header
Body required
{
  "name": "string",
  "description": "string",
  "tags": {},
  "vpns": [
    {
      "vpnName": "string",
      "vnRole": "any-to-any"
    }
  ],
  "subnets": [
    {
      "subnet": "string",
      "enableDhcp": true,
      "allocateIpAddressFromStart": true,
      "dnsPrimary": "string",
      "dnsSecondary": "string",
      "allocationPools": [
        {
          "start": "string",
          "end": "string"
        }
      ],
      "hostRoutes": [
        {
          "prefix": "string",
          "nextHop": "string"
        }
      ],
      "gatewayIpAddress": "string",
      "serviceIpAddress": "string"
    }
  ],
  "hostRoutes": [
    {
      "prefix": "string",
      "nextHop": "string"
    }
  ],
  "networkRoutes": [
    {
      "prefix": "string",
      "nextHop": "string",
      "communityTags": [
        "string"
      ]
    }
  ],
  "routingPolicyRefs": [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "name": "string",
      "hRef": "string"
    }
  ]
}