JSON payload to create a Nutanix Flow Network Security Rule a.k.a Security Policy. To use this code sample, please make sure all variable placeholders are replaced with values appropriate for your environment.
{
"spec": {
"name": "{{network_security_rule_name}}",
"description": "{{network_security_rule_description}}",
"resources": {
"is_policy_hitlog_enabled": {{true/false}},
"isolation_rule": {
"action": "{{MONITOR_or_APPLY}}",
"first_entity_filter": {
"params": {
"{{category_name}}": [
"{{category_value}}"
]
},
"kind_list": [
"{{entity_type_eg_vm}}"
],
"type": "{{CATEGORIES_MATCH_ALL or CATEGORIES_MATCH_ANY}}"
},
"second_entity_filter": {
"params": {
"{{category_name}}": [
"{{category_value}}"
]
},
"kind_list": [
"{[entity_type_eg_vm}}"
],
"type": "{{CATEGORIES_MATCH_ALL or CATEGORIES_MATCH_ANY}}"
}
}
}
},
"metadata": {
"kind": "network_security_rule"
}
}