Create a Policy Template
This endpoint is used to create a new policy template.
POST /openapi/v1/application_templates
The JSON request body contains the following keys
Attribute |
Type |
Description |
---|---|---|
name |
string |
Used as the name of the template during import. |
description |
string |
(optional) Template description displayed during the apply process |
parameters |
parameters object |
Template parameters, see below. |
absolute_policies |
array of policy objects |
(optional) Array of absolute policies. |
default_policies |
array of policy objects |
(required) Array of default policies, can be empty. |
Response object: Returns the created policy template object.
Sample python code
root_app_scope_id = '<root-app-scope-id>'
payload = {'root_app_scope_id': root_app_scope_id,
'name': "policy_name",
'default_policies': [
{
'action': 'ALLOW',
'priority': 100,
'l4_params': [
{
'proto': 17,
'port': [80, 90]
}
]
}
]
}
restclient.post('/application_templates',
json_body=json.dumps(payload))