List policy assignments
Relative path: /v2/policy-assignments
All assignments available to the caller.
Query parameters
Name |
Type |
Description |
---|---|---|
policyUuid |
string |
If filled, only assignments of given policy will be included in the response. type: Policy |
target.deviceUuid |
string |
Policy is assigned to [device]. type: device_management.v1.Device |
target.deviceGroupUuid |
string |
Policy is assigned to [device group]. type: device_management.v1.DeviceGroup |
target.subscriptionUuid |
string |
Police is assigned to [subscription]. type: subscription_provisioning.v2.Subscription |
pageSize |
integer |
Limit for pagination purposes.
|
pageToken |
string |
Page token of current page.
|
Responses
Display Schema instead of an Example or vice-versa
Code |
Description |
Example |
Schema |
---|---|---|---|
200 |
Successful response. |
{ "assignments": [ { "policyUuid": "string", "rank": 0, "target": { "deviceUuid": "string", "deviceGroupUuid": "string", "subscriptionUuid": "string" }, "uuid": "string" } ], "nextPageToken": "string" } |
{ "$ref": "v2ListPolicyAssignmentsResponse", "assignments": [ { "$ref": "v2PolicyAssignment", "description": "Relation between policy and target. One target can have multiple policies assigned. Those policies are", "policyUuid": { "type": "string", "description": "Assigned policy. type: Policy" }, "rank": { "type": "integer", "description": "Ranking within multiple assignments to the target. Rank 1 is the highest rank, i.e. the rank of highest priority. Policies are applied in order from the highest rank to the lowest. EP(c) migration note This attribute was called priority in ERA/ESMC/EP(c). This, however, lead to counterintuitive behavior of highest priority with lowest number.", "format": "int64" }, "target": { "$ref": "v2PolicyTarget", "description": "Identifies entity to which the policy is assigned.", "deviceUuid": { "type": "string", "description": "Policy is assigned to [device]. type: device_management.v1.Device" }, "deviceGroupUuid": { "type": "string", "description": "Policy is assigned to [device group]. type: device_management.v1.DeviceGroup" }, "subscriptionUuid": { "type": "string", "description": "Police is assigned to [subscription]. type: subscription_provisioning.v2.Subscription" } }, "uuid": { "type": "string", "description": "Universally Unique Identifier References use this identifier so it must be filled in all the cases except resource creation. Compliant with RFC 4122: A Universally Unique IDentifier (UUID) URN Namespace Formatted according to template xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx, as explained on wikipedia. For example: '123e4567-e89b-12d3-a456-426614174000'" } } ], "nextPageToken": { "type": "string", "description": "Page token of next page. info For more information, refer to Paginating Requests in APIs or https://cloud.google.com/apis/design/design_patterns#list_pagination" } } |
202 |
Response took too long; request cached. Response can be retrieved later using the response-id header. |
null |
[] |
400 |
One of the errors: 1. Bad or missing authorization. 2. Validation error. Invalid argument provided. |
null |
[] |
401 |
Token has expired or is invalid. |
null |
[] |
403 |
Access denied. Check permissions. |
null |
[] |
404 |
Requested resource not found. |
null |
[] |
429 |
Rate limit reached. Try again later. |
null |
[] |
500 |
Internal server failure. Try again later. |
null |
[] |
502 |
Internal server failure. Try again later. |
null |
[] |
503 |
Environment under maintenance. Try again later. |
null |
[] |
504 |
Action took too long; timeout reached |
null |
[] |