Policy > Infra > Constraints

Create or update tenant Constraint

Create tenant constraint if it does not exist,
otherwise replace the existing constraint.

Request:

Method:
PUT
URI Path(s):
/policy/api/v1/infra/constraints/<constraint-id>
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
Constraint+

Example Request:

PUT https://<policy-mgr>policy/api/v1/infra/constraints/value-constraint { "target":{ "target_resource_type":"CommunicationEntry", "attribute":"services", "path_prefix":"/infra/domains/{{DOMAIN}}/edge-communication-maps/default/communication-entries/" }, "constraint_expression":{ "resource_type":"RelatedAttributeConditionalExpression", "related_attribute":{ "attribute":"destinationGroups" }, "condition":{ "operator":"INCLUDES", "rhs_value":["/infra/domains/mgw/groups/VCENTER"], "value_constraint":{ "operator":"INCLUDES", "values":["/infra/services/HTTP", "/infra/services/HTTPS"] } } } }

Successful Response:

Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
Constraint+

Example Response:

{ "constraint_expression": { "resource_type": "RelatedAttributeConditionalExpression", "condition": { "value_constraint": { "resource_type": "ValueConstraintExpression", "values": [ "/infra/services/HTTP", "/infra/services/HTTPS" ], "operator": "INCLUDES", "_protection": "NOT_PROTECTED" }, "rhs_value": [ "/infra/domains/mgw/groups/VCENTER" ], "operator": "INCLUDES" }, "related_attribute": { "attribute": "destinationGroups" }, "_protection": "NOT_PROTECTED" }, "target": { "target_resource_type": "CommunicationEntry", "attribute": "services", "path_prefix": "/infra/domains/amar/edge-communication-maps/default/communication-entries/" }, "_protection": "NOT_PROTECTED" }

Required Permissions:

crud

Feature:

policy_constraints

Additional Errors: