Constraint (type)

{
  "additionalProperties": false, 
  "description": "Constraint object to constraint any attribute on a resource based on specified expression. Example- Restrict the allowed services in Edge Communication Entry to list of  services, if the destinationGroups contain vCenter. {   \"target\":{      \"target_resource_type\":\"CommunicationEntry\",      \"attribute\":\"services\",      \"path_prefix\":\"/infra/domains/vmc-domain/edge-communication-maps/default/communication-entries\"   }   \"constraint_expression\":{     \"related_attribute\":{       \"attribute\":\"destinationGroups\"     }     \"condition\":{       \"operator\":\"INCLUDES\",       \"rhs_value\":{\"vCenter\"}       \"value_constraint\":{           \"operator\":\"ALLOW\",           \"values\":{\"/ref/services/HTTPS\", \"/ref/services/HTTOP\", ...}      }     }   } }", 
  "extends": {
    "$ref": "PolicyConfigResource
  }, 
  "id": "Constraint", 
  "module_id": "PolicyConstraints", 
  "properties": {
    "_create_time": {
      "$ref": "EpochMsTimestamp, 
      "can_sort": true, 
      "description": "Timestamp of resource creation", 
      "readonly": true
    }, 
    "_create_user": {
      "description": "ID of the user who created this resource", 
      "readonly": true, 
      "type": "string"
    }, 
    "_last_modified_time": {
      "$ref": "EpochMsTimestamp, 
      "can_sort": true, 
      "description": "Timestamp of last modification", 
      "readonly": true
    }, 
    "_last_modified_user": {
      "description": "ID of the user who last modified this resource", 
      "readonly": true, 
      "type": "string"
    }, 
    "_links": {
      "description": "The server will populate this field when returing the resource. Ignored on PUT and POST.", 
      "items": {
        "$ref": "ResourceLink
      }, 
      "readonly": true, 
      "title": "References related to this resource", 
      "type": "array"
    }, 
    "_protection": {
      "description": "Protection status is one of the following: PROTECTED - the client who retrieved the entity is not allowed             to modify it. NOT_PROTECTED - the client who retrieved the entity is allowed                 to modify it REQUIRE_OVERRIDE - the client who retrieved the entity is a super                    user and can modify it, but only when providing                    the request header X-Allow-Overwrite=true. UNKNOWN - the _protection field could not be determined for this           entity.", 
      "readonly": true, 
      "title": "Indicates protection status of this resource", 
      "type": "string"
    }, 
    "_revision": {
      "description": "The _revision property describes the current revision of the resource. To prevent clients from overwriting each other's changes, PUT operations must include the current _revision of the resource, which clients should obtain by issuing a GET operation. If the _revision provided in a PUT request is missing or stale, the operation will be rejected.", 
      "title": "Generation of this resource config", 
      "type": "int"
    }, 
    "_schema": {
      "readonly": true, 
      "title": "Schema for this resource", 
      "type": "string"
    }, 
    "_self": {
      "$ref": "SelfResourceLink, 
      "readonly": true, 
      "title": "Link to this resource"
    }, 
    "_system_owned": {
      "description": "Indicates system owned resource", 
      "readonly": true, 
      "type": "boolean"
    }, 
    "children": {
      "description": "Subtree for this type within policy tree containing nested elements. Note that  this type is applicable to be used in Hierarchical API only.", 
      "items": {
        "$ref": "ChildPolicyConfigResource
      }, 
      "required": false, 
      "title": "Subtree for this type within policy tree", 
      "type": "array"
    }, 
    "constraint_expression": {
      "$ref": "ConstraintExpression, 
      "deprecated": true, 
      "description": "This property is deprecated. Please use the \"constraint_expressions\" property instead to specify one or more constraint expressions. If this property is populated, then the \"constraint_expressions\" value is ignored.", 
      "required": false, 
      "title": "Expression to constrain the target attribute value."
    }, 
    "constraint_expressions": {
      "descripiton": "An array of expressions. Note that if the deprecated property\n\"constraint_expression\" has a value then this property is\nignored. Please empty out the value of \"constraint_expression\"\nbefore using this property.\n", 
      "items": {
        "$ref": "ConstraintExpression
      }, 
      "required": false, 
      "title": "Expressions to constrain the target attribute value.", 
      "type": "array"
    }, 
    "description": {
      "can_sort": true, 
      "maxLength": 1024, 
      "title": "Description of this resource", 
      "type": "string"
    }, 
    "display_name": {
      "can_sort": true, 
      "description": "Defaults to ID if not set", 
      "maxLength": 255, 
      "title": "Identifier to use when displaying entity in logs or GUI", 
      "type": "string"
    }, 
    "id": {
      "can_sort": true, 
      "title": "Unique identifier of this resource", 
      "type": "string"
    }, 
    "marked_for_delete": {
      "default": false, 
      "description": "Intent objects are not directly deleted from the system when a delete is invoked on them. They are marked for deletion and only when all the realized entities for that intent object gets deleted, the intent object is deleted. Objects that are marked for deletion are not returned in GET call. One can use the search API to get these objects.", 
      "readonly": true, 
      "required": false, 
      "title": "Indicates whether the intent object is marked for deletion", 
      "type": "boolean"
    }, 
    "message": {
      "required": false, 
      "title": "User friendly message to be shown to users upon violation.", 
      "type": "string"
    }, 
    "origin_site_id": {
      "description": "This is a UUID generated by the system for knowing which site owns an object. This is used in Pmaas", 
      "readonly": true, 
      "required": false, 
      "title": "A unique identifier assigned by the system for knowing which site owns an object", 
      "type": "string"
    }, 
    "overridden": {
      "default": false, 
      "description": "Global intent objects cannot be modified by the user. However, certain global intent objects can be overridden locally by use of this property. In such cases, the overridden local values take precedence over the globally defined values for the properties.", 
      "readonly": true, 
      "required": false, 
      "title": "Indicates whether this object is the overridden intent object", 
      "type": "boolean"
    }, 
    "owner_id": {
      "description": "This is a UUID generated by the system for knowing whoes owns this object. This is used in Pmaas", 
      "readonly": true, 
      "required": false, 
      "title": "A unique identifier assigned by the system for the ownership of an object", 
      "type": "string"
    }, 
    "parent_path": {
      "description": "Path of its parent", 
      "readonly": true, 
      "required": false, 
      "title": "Path of its parent", 
      "type": "string"
    }, 
    "path": {
      "description": "Absolute path of this object", 
      "readonly": true, 
      "required": false, 
      "title": "Absolute path of this object", 
      "type": "string"
    }, 
    "realization_id": {
      "description": "This is a UUID generated by the system for realizing the entity object. In most cases this should be same as 'unique_id' of the entity. However, in some cases this can be different because of entities have migrated thier unique identifier to NSX Policy intent objects later in the timeline and did not use unique_id for realization. Realization id is helpful for users to debug data path to correlate the configuration with corresponding intent.", 
      "readonly": true, 
      "required": false, 
      "title": "A unique identifier assigned by the system for realizing intent", 
      "type": "string"
    }, 
    "relative_path": {
      "description": "Path relative from its parent", 
      "readonly": true, 
      "required": false, 
      "title": "Relative path of this object", 
      "type": "string"
    }, 
    "remote_path": {
      "description": "This is the path of the object on the local managers when queried on the PMaaS service, and path of the object on PMaaS service when queried from the local managers.", 
      "readonly": true, 
      "required": false, 
      "title": "Path of the object on the remote end.", 
      "type": "string"
    }, 
    "resource_type": {
      "description": "The type of this resource.", 
      "readonly": false, 
      "type": "string"
    }, 
    "tags": {
      "items": {
        "$ref": "Tag
      }, 
      "maxItems": 30, 
      "title": "Opaque identifiers meaningful to the API user", 
      "type": "array"
    }, 
    "target": {
      "$ref": "ConstraintTarget, 
      "deprecated": true, 
      "description": "This property is deprecated. Please use the \"targets\" property instead to specify one or more targets. If this property is populated, then the \"targets\" value is ignored.", 
      "required": false, 
      "title": "Target resource attribute details."
    }, 
    "target_owner_type": {
      "default": "ALL", 
      "descripiton": "Every target resource in the policy tree is owned by either local LM or remote GM/LM.\nThis target_owner_type property helps to apply constraints exclusively to only targets which are managed\nby Gloal policy manager Or local policy manager.\nGM: Target's owner type GM indicates that apply constraints to targets that are owned by GM\nLM: Target's owner type LM indicates that apply constraints to targets that are owned by\n    local policy manager. With owner_type as LM, Constraint will not be applied to targets owned by\n    GM. This owner_type is not allowed on GM/PMaaS.  User can configure this type only on local SDDC/LM.\nALL:  Default type. This indicates that constraints will be applied to all\n      targets either local or remote.\nDefault is ALL\n", 
      "enum": [
        "GM", 
        "LM", 
        "ALL"
      ], 
      "required": false, 
      "title": "Constraint target's owner type", 
      "type": "string"
    }, 
    "targets": {
      "descripiton": "An array of targets to apply constraints. Note that if the\ndeprecated property \"target\" has a value then this property\nis ignored. Please empty out the value of \"target\" before using\nthis property.\n", 
      "items": {
        "$ref": "ConstraintTarget
      }, 
      "required": false, 
      "title": "Collection of target resources attribute details.", 
      "type": "array"
    }, 
    "unique_id": {
      "description": "This is a UUID generated by the GM/LM to uniquely identify entites in a federated environment. For entities that are stretched across multiple sites, the same ID will be used on all the stretched sites.", 
      "readonly": true, 
      "required": false, 
      "title": "A unique identifier assigned by the system", 
      "type": "string"
    }
  }, 
  "title": "Constraint definition.", 
  "type": "object"
}