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.

HTTP
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.

Shell
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

workspace_id

string

Yes

Target workspace ID.

role_id

string

Yes

Target role ID.

Query parameters

Parameter

Type

Required

Description

expected_lifecycle_version

integer

Yes

The current role life cycle version must be greater than 0.

Successful response

JSON
{
  "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

data.role

object

Summary of roles being checked.

data.role.workspace_id

string

The workspace ID to which it belongs.

data.role.role_id

string

Role ID.

data.role.role_name

string

Character name.

data.role.description

string

Description.

data.role.lifecycle_state

string

life cycle status. Values: active, disabled, deleted.

data.role.lifecycle_version

integer

Role lifecycle versions.

data.role.system_role

boolean

Whether it is a system role.

data.direct_binding_count

integer

The number of users directly bound to this role.

data.default_role_count

integer

The number of users who have made this role the default role.

data.parent_inheritance_count

integer

The number of inheritance relationships that this role has as a granted role (granted_id).

data.child_inheritance_count

integer

The number of inheritance relationships in which this role serves as the accepting role (grantee_id).

data.active_ownership_count

integer

The effective number of ownership held by this character.

data.active_policy_grant_count

integer

The number of valid policy authorizations that still reference the role.

data.pending_operation_count

integer

The number of operations that have not been completed or are pending recovery.

data.blocked

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.

JSON
{
  "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.

Last updated on