After creating a network profile with a VLAN transport zone, you can provision a VLAN private network.
Prerequisites
- Verify that all general prerequisites and prerequisites for the Automation Assembler Infrastructure as a Service (IaaS) service have been satisfied. See Prerequisites for API Use Case Examples.
- Verify that you have the project ID. See Create a Project to use in Automation Assembler.
- Verify that you know the VLAN IDs that you want to use. Comma separated values can be 0 - 4094.
Procedure
Example: Provision a VLAN Private Network
Provision a VLAN private network for a project ID
Assign variables.
$ url='https://appliance.domain.com'
$ api_version='2021-07-15'
Assign the project ID.
$ project_id='5944aacb-91de-4541-bb9e-ef2a5403f81b'
Provision the VLAN private network.
curl -X POST \ $url/iaas/api/networks?apiVersion=$api_version \ -H "Authorization: Bearer $access_token" \ -H 'Content-Type: application/json' \ -d '{ "name": "example-vlan-network", "description": "Example VLAN Network created using API", "projectId": "'$project_id'", "customProperties": { "networkType": "PRIVATE", "vlanIds": "1004, 1005" } }' | jq "."
The response includes a selfLink.
{ "progress": 0, "status": "INPROGRESS", "name": "Provisioning", "id": "dab1fe2f-4104-4fce-b534-e7ab5c172788", "selfLink": "/iaas/api/request-tracker/dab1fe2f-4104-4fce-b534-e7ab5c172788", "deploymentId": "8964a3f6-e829-40ad-b07c-0177abb7b4f4" }
Assign the selfLink variable.
selfLink_id='dab1fe2f-4104-4fce-b534-e7ab5c172788'
Use the selfLink variable to track the request.
curl -X GET -H 'Content-Type: application/json' -H "Authorization: Bearer $access_token" "$url/iaas/api/request-tracker/$selfLink_id | jq "."
When the request completes successfully, the response shows the network has been created.
{ "progress": 100, "message": "success", "status": "FINISHED", "resources": [ "/iaas/api/networks/3f3b4f87-3e0d-48e8-a484-a8f2890977df" ], "name": "example-vlan-network Allocation", "id": "1cca9d9c-1e93-40d6-8bab-fa92dd89566a", "selfLink": "/iaas/api/request-tracker/1cca9d9c-1e93-40d6-8bab-fa92dd89566a", "deploymentId": "8b8eef00-e159-4ba9-9e78-09089a3f5786" }