View role ownership impact¶
View resource ownership held by a specified role to evaluate resources that need to be processed before role changes or deletions.
GET $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/iam/roles/{role_id}/ownership-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 character.
Prepare personal access token and target workspace ID that can access 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/ownership-impact" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
--data-urlencode "resource_type=workflow"
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Target workspace ID. |
|
string |
Yes |
Target role ID. |
Query parameters
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
No |
Only the ownership of the specified resource type is counted. |
Successful response¶
{
"code": "OK",
"msg": "OK",
"data": {
"workspace_id": "workspace-001",
"role_id": "role-001",
"owned_count": 1,
"by_type": [
{
"resource_type": "workflow",
"count": 1
}
],
"items": [],
"ownership_version": "ownership-v1",
"can_delete": false,
"blocked_reason": "ACTIVE_OWNERSHIP",
"transfer_supported": false,
"role_graph_version": "graph-v1",
"lifecycle_version": "tenant-role-lifecycle-v3:provisioning-v1",
"request_id": "req-001",
"trace_id": "trace-001"
}
}
Field |
Type |
Description |
|---|---|---|
|
string |
The workspace ID to which it belongs. |
|
string |
The role ID being viewed. |
|
integer |
The effective number of ownership held by this character. |
|
array of object |
Amount of ownership by resource type. |
|
string |
Resource type. |
|
integer |
Quantity. |
|
array of object |
Ownership example resources. |
|
string |
Resource type. |
|
string |
Resource ID. |
|
integer |
Ownership version. |
|
string |
Repair status. |
|
string |
Audit event ID. |
|
string |
Creator identity. |
|
string |
The role ID used when creating it. |
|
string |
Version of ownership facts. |
|
boolean |
Currently fixed to false. |
|
string |
Reason why it cannot be deleted. Value: |
|
boolean |
Currently fixed to false. |
|
string |
Character diagram version. |
|
string |
Role lifecycle versions. |
|
string |
Request association ID. |
|
string |
Link tracking ID. |
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. |