Create Constraint
Create constraint for a Constraint Template
Request
URI
POST
https://{api_host}/telco/api/securityPolicy/constraintTemplates/constraint/{id}
COPY
Path Parameters
string
id
Required
The id of the Constraint Template
Request Body
ConstraintRequest
of type(s)
application/json
Optional
"ConstraintRequest Object"
string
name
Required
The human readable name of the ConstraintVimEnforcement. It should be unique. Defaults to random generated string appended to constraintTemplate Name included
string
constraintTemplateId
Required
The subject ConstraintTemplate identifier.
string
enforcementAction
Optional
The supported enforcementActions are [deny, dryrun, warn]
object
matchSpec
Optional
matchSpec
object
parameters
Optional
parameters
boolean
deployOpa
Optional
deploy opa gatekeeper engine in the cluster if it is not installed already
Responses
200
The Constraint values
Returns
ConstraintResponse
of type(s)
application/json
This response body class contains all of the following:
InlineConstraintResponse0 ,
InlineConstraintResponse1
"ConstraintResponse Object"
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 '[{}]' https://{api_host}/telco/api/securityPolicy/constraintTemplates/constraint/{id}