Querying All Assignments
Function
This API is used to query all assignments.
URI
GET /v1/resource-manager/domains/{domain_id}/policy-assignments
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| domain_id | Yes | String | Specifies the account ID. Maximum length: 36 |
Request Parameters
None
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| value | Array of PolicyAssignment objects | Specifies the assignment list. |
| page_info | PageInfo object | Specifies the pagination object. |
| Parameter | Type | Description |
|---|---|---|
| id | String | Specifies the assignment ID. |
| name | String | Specifies the assignment name. |
| description | String | Provides supplementary information about the assignment. |
| policy_filter | PolicyFilterDefinition object | Specifies the assignment filter. |
| state | String | Specifies the assignment status. |
| created | String | Specifies the time when the assignment was added. |
| updated | String | Specifies the time when the assignment was modified. |
| policy_definition_id | String | Specifies the ID of the policy used by the assignment. |
| parameters | Map<String,PolicyParameterValue> | Specifies the assignment parameters. |
| Parameter | Type | Description |
|---|---|---|
| region_id | String | Specifies the region ID. Maximum length: 128 |
| resource_provider | String | Specifies the cloud service name. Maximum length: 128 |
| resource_type | String | Specifies the resource type. Maximum length: 128 |
| resource_id | String | Specifies the resource ID. Maximum length: 256 |
| tag_key | String | Specifies the tag key. Maximum length: 128 |
| tag_value | String | Specifies the tag value. Maximum length: 256 |
| Parameter | Type | Description |
|---|---|---|
| value | Object | Specifies the value of the assignment parameter. |
| Parameter | Type | Description |
|---|---|---|
| current_count | Integer | Specifies the resource quantity on the current page. Minimum value: 0 Maximum value: 200 |
| next_marker | String | Specifies the marker value of the next page. |
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Specifies the error code. |
| error_msg | String | Specifies the error message. |
Status code: 403
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Specifies the error code. |
| error_msg | String | Specifies the error message. |
Status code: 500
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Specifies the error code. |
| error_msg | String | Specifies the error message. |
Example Request
None
Example Response
Status code: 200
Operation succeeded.
-
[ { "id" : "5fb76a240f2daf0b9662a04d", "name" : "volume-inuse-check", "description": "The EVS disk is non-compliant if it is unmounted.", "policy_filter" : { "region_id" : null, "resource_provider" : "evs", "resource_type" : "volumes", "resource_id" : null, "tag_key" : null, "tag_value" : null }, "state" : "Enabled", "created" : "2020-11-20T07:03:00", "updated" : "2020-11-20T07:03:00", "policy_definition_id" : "5fa36558aa1e6afc05a3d0a7", "parameters" : { } } ] -
{ "current_count" : 1, "next_marker" : null }
Status Codes
| Status Code | Description |
|---|---|
| 200 | Operation succeeded. |
| 400 | Invalid parameter. |
| 403 | Authentication failed or you do not have the operation permission. |
| 500 | Internal server error. |
Error Codes
See Error Codes.
Last Article: Adding an Assignment
Next Article: Modifying an Assignment
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.