Create Constraint Template
Create a ConstraintTemplate
Request
URI
POST
https://{api_host}/telco/api/securityPolicy/constraintTemplates
COPY
Request Body
ConstraintTemplateRequest
of type(s)
application/json
Optional
Show optional properties
{
"name": "string",
"template": "string"
}
{
"name": "string",
"description": "string",
"template": "string",
"supportedVersions": "string",
"labels": {
"data": "string",
"type": "string"
}
}
string
name
Required
Constraint Template name. it must be unique
string
description
Optional
A human readable description for the constraint Template.
string
template
Required
The ConstraintTemplate in Yaml format.
string
supportedVersions
Optional
Yaml array of opa versions above constraint template is compatable with
object
labels
Optional
labels
Responses
201
The created ConstraintTemplate
Returns
ConstraintTemplateResponse
of type(s)
application/json
This response body class contains all of the following:
InlineConstraintTemplateResponse0 ,
InlineConstraintTemplateResponse1
"ConstraintTemplateResponse Object"
Response Headers
undefined
Location
undefined
500
Returns
InternalServerError
of type(s)
application/json
Operation doesn't return any data structure
Code Samples
COPY
curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"name:"string","template:"string"}' https://{api_host}/telco/api/securityPolicy/constraintTemplates