assignPolicy
Use this method to assign a policy to one or more endpoints. This method works on all endpoint types, including containers. The policy is not assigned to targets that have an enforced policy.
Parameters
Parameter | Description | Included in request | Type | Values |
---|---|---|---|---|
| The IDs of the endpoints you want to assign the policy to. | Mandatory | Array of Strings | No additional requirements. |
| If You can not use this parameter if | Optional | Boolean | Default value: |
| The ID of the policy you want to assign. If not included in the request, the | Optional | String | No additional requirements. |
| If To use this parameter, | Optional | Boolean | Default value: |
Return value
Attribute | Type | Description |
---|---|---|
| Boolean | Indicates if the operation was successful and the policy was successfully assigned to one or more targets. |
Examples
Request
{ "params": { "targetIds": [ "56728d66b1a43de92c7****", "69738d66b1a43de92c71****" ], "inheritFromAbove": false, "policyId": "55828d66b1a43de92c71****", "forcePolicyInheritance": true }, "jsonrpc": "2.0", "method": "assignPolicy", "id": "787b5e36-89a8-4353-88b9-6b7a32e9c87f" }
Response
{ "id": "787b5e36-89a8-4353-88b9-6b7a32e9c87f", "jsonrpc":"2.0", "result": True }