Create a VRF
This endpoint is used to create new VRFs. An associated root scope will automatically be created with a query matching the VRF ID. This API is available to API keys with sensor_management
capability.
POST /openapi/v1/vrfs
Parameters:
Name |
Type |
Description |
---|---|---|
id |
int |
(optional) Unique identifier for the VRF. If unspecified, Secure Workload cluster will generate a unique ID for the newly created VRF. Best practice is to let Secure Workload generate these IDs instead of caller explicitly specifying unique IDs. |
tenant_id |
int |
(optional) ID of parent tenant. |
name |
string |
User specified name of the VRF. |
apply_monitoring_rules |
boolean |
(optional) Whether collection rules should be applied for the VRF. Defaults to ‘false’. |
The tenant_id
is optional. If not provided, the VRF will be added to the tenant with the same id as the VRF, autocreating if necessary. If the tenant_id
is provided, the tenant will not be automatically created, and an error will be returned if the tenant does not exist.
Response object: Returns the newly created VRF object.
Sample python code
req_payload = {
"tenant_id": <tenant_id>,
"name": "Test",
"apply_monitoring_rules": True
}
resp = restclient.post('/vrfs', json_body=json.dumps(req_payload))