URL

PUT https://{api-url}/api/v2/tenants/{tenantId}/policies/management

Sample URLs

https://{api-url}/api/v2/tenants/client_105261/policies/management

Parameters

All fields are mandatory:

FieldDescription
nameName of the policy.
resourceTypeType of resource.
Example: DEVICE, VOLUME, VPN, XENSERVER
matchTypeThe values accepted are ANY or ALL:
  • ANY - Value is returned if ANY of the given filter criteria matches.
  • ALL - Value is returned if ALL the filter criteria match.
rulesSelect at least one rule.
Examples: "key": "Name", "operator": "Contains", and "value": "gateway."
actionSelect at least one action. Examples: "ASSIGN MONITORINGTEMPLATE" and "ASSIGN KNOWLEDGEARTICLE"

Status code

200 OK

Sample request

[
  {
    "id": 1790,
    "name": "Mysql-policy",
    "resourceType": "DEVICE",
    "matchType": "ALL",
    "rules": [
      {
        "key": "Name",
        "operator": "Contains",
        "value": "dc01-mysql-"
      }
    ],
    "actions": [
      {
            "action": "ASSIGN MONITORINGTEMPLATE",
            "items": [
                {
                    "item": "4053",
                    "parameters": {
                        "Packet Count": "3",
                        "Packet interval": "1000",
                        "Data Bytes": "64"
                    },
                    "instances": {
                    }
                }
            ],
            "forceAssignOrUnassign": false
        },
      {
            "action": "ASSIGN CREDENTIALSET",
            "items": [
                {
                    "item": "36218"
                }
            ],
            "forceAssignOrUnassign": true
        }
    ],
    "executionOrder": 0
  }
]

Sample response

[
  {
    "id": 1790,
    "name": "Mysql-policy",
    "resourceType": "DEVICE",
    "matchType": "ALL",
    "rules": [
      {
        "key": "Name",
        "operator": "Contains",
        "value": "dc01-mysql-"
      }
    ],
    "actions": [
      {
            "action": "ASSIGN MONITORINGTEMPLATE",
            "items": [
                {
                    "item": "4053",
                    "parameters": {
                        "Packet Count": "3",
                        "Packet interval": "1000",
                        "Data Bytes": "64"
                    },
                    "instances": {
                    }
                }
            ],
            "forceAssignOrUnassign": false
        },
      {
            "action": "ASSIGN CREDENTIALSET",
            "items": [
                {
                    "item": "36218"
                }
            ],
            "forceAssignOrUnassign": true
        }
    ],
    "executionOrder": 0
  }
]

The attribute forceAssignOrUnassign is not applicable to the ASSIGN AVAILABILITY action.