You can use the vRealize Automation REST API to create a external network profile using external IPAM.

Input

Use the supported input parameters to control the command output.

Input

Description

URL

https://$host/iaas-proxy-provider/api/network/profiles

Method

Post

$host

Specifies the host name and fully qualified domain name or IP address of the vRealize Automation identity server.

$token

Specifies a valid HTTP bearer token with necessary credentials.

HTTP Body

The HTTP body specifies the information for creating an external IPAM profile.

  • profileType

    Specify EXTERNAL for this paramter.

  • id

    Specifies null.

  • name

    Specifies the name of the profile.

  • IPAMEndpointId

    Specifies the endpoint ID for an external IPAM provider.

  • addressSpaceExternalId

    Must specify the value that is chosen in the vRealize Automation UI for Address Space.

  • description

    Optionally, can specify a description for the profile. If you do not provide a description, code "null" for this parameter.

  • definedRanges

    Specifies parameters that set up defined address ranges:

    • externalId

    • name

    • description

    • state

      Specify "UNALLOCATED" for this value.

    • beginIPv4Address

      Specify "null" for this parameter.

    • endIPv4Address

      Specify "null" for this parameter.

Output

The command output contains property names and values based on the command input parameters.

Property

Description

status

The http response should contain a Location attribute that is formatted as https://$host/iaas-proxy-provider/api/keyPairs/$keypairID.

Header.Location

The HTTP response should contain a Location attribute that is formatted as https://$host/iaas-proxy-provider/api/network/profiles/$networkProfileID.

$networkProfileID

Specifies the unique identifier of the new network profile.

curl Command

The following example command creates an external IPAM profile.

curl --insecure -H "Accept:application/json" 
-H "Authorization: Bearer $token" 
https://$host/iaas-proxy-provider/api/$networkProfileID -d “

{
    "profileType" : "EXTERNAL",
	"id" : null,
	"@type" : "ExternalNetworkProfile",
	"name" : "External IPAM",
	"IPAMEndpointId" : "c20f305c-07a5-4ba7-88ac-35da7b9713e0",
	"addressSpaceExternalId" : "address-space-4",
	"description" : null,
	"definedRanges" : [{
			"externalId" : "network-1",
			"name" : "192.168.1.0/24",
			"description" : "Created by vRO package stub workflow",
			"state" : "UNALLOCATED",
			"beginIPv4Address" : null,
			"endIPv4Address" : null
		}
	]
}

JSON Output

The output contains an empty HTTP response body and the location and network profile ID in the header statement.

Location:
https://vcac148-084-241.eng.mycompany.com/iaas-proxy-provider/api/network/profiles/263b80f5-d34f-47f2-b0b1-5a3db991c2e9

Copy the location URL into a text editor for future use.