View role deletion impact¶
View bindings, inheritance, ownership, authorizations, and pending changes that still need to be processed before deleting the specified role. The viewing result is the current snapshot and will still be checked again when deleted.
GET $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/iam/roles/{role_id}/delete-impact
Before you call¶
Configure the CloudSigma regional endpoint and authentication before calling. The endpoint, credentials, workspace, and resource IDs must belong to the same region. First select the role, confirm the role to be evaluated, and check the impact based on the current status in the list.
Prepare personal access token and target workspace ID with corresponding permissions for the target workspace.
Request parameters¶
Replace $WORKSPACE_ID, $ROLE_ID, $CLOUDSIGMA_API_KEY in the example with actual values.
curl -G "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID/iam/roles/$ROLE_ID/delete-impact" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
--data-urlencode "expected_lifecycle_version=3"
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Target workspace ID. |
|
string |
Yes |
Target role ID. |
Query parameters
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
integer |
Yes |
The current role life cycle version must be greater than 0. |
Successful response¶
{
"code": "OK",
"msg": "OK",
"data": {
"role": {
"workspace_id": "",
"role_id": "role-001",
"role_name": "",
"description": "",
"lifecycle_state": "disabled",
"lifecycle_version": 3,
"system_role": false
},
"direct_binding_count": 0,
"default_role_count": 0,
"parent_inheritance_count": 0,
"child_inheritance_count": 0,
"active_ownership_count": 0,
"active_policy_grant_count": 0,
"pending_operation_count": 0,
"blocked": false
}
}
Field |
Type |
Description |
|---|---|---|
|
object |
Summary of roles being checked. |
|
string |
The workspace ID to which it belongs. |
|
string |
Role ID. |
|
string |
Character name. |
|
string |
Description. |
|
string |
life cycle status. Values: |
|
integer |
Role lifecycle versions. |
|
boolean |
Whether it is a system role. |
|
integer |
The number of users directly bound to this role. |
|
integer |
The number of users who have made this role the default role. |
|
integer |
The number of inheritance relationships that this role has as a granted role (granted_id). |
|
integer |
The number of inheritance relationships in which this role serves as the accepting role (grantee_id). |
|
integer |
The effective number of ownership held by this character. |
|
integer |
The number of valid policy authorizations that still reference the role. |
|
integer |
The number of operations that have not been completed or are pending recovery. |
|
boolean |
Whether there is currently a deletion blocking item. |
Confirm the impact of deletion
Before deleting a role, verify that there are no bindings, inheritance, ownership, authorizations, or pending changes that still need to be processed. The viewing results are snapshots and will still be rechecked upon actual deletion.
Error response¶
Normal errors only return code and msg. When core error codes are present, data may contain request_id, trace_id, and core_error_code. Parse results by error response fields.
{
"code": "ErrParamInvalid",
"msg": "请求参数无效"
}
Field |
Type |
Description |
|---|---|---|
code |
string |
error code. |
msg |
string |
error message. |
data |
object |
Only errors carrying core error codes return this object. Other errors are omitted. |
data.request_id |
string |
Current request identifier. |
data.trace_id |
string |
The tracking ID of the current request. |
data.core_error_code |
string |
Core error code. |