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.

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

Shell
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

workspace_id

string

Yes

Target workspace ID.

role_id

string

Yes

Target role ID.

Query parameters

Parameter

Type

Required

Description

resource_type

string

No

Only the ownership of the specified resource type is counted.

Successful response

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

data.workspace_id

string

The workspace ID to which it belongs.

data.role_id

string

The role ID being viewed.

data.owned_count

integer

The effective number of ownership held by this character.

data.by_type

array of object

Amount of ownership by resource type.

data.by_type[].resource_type

string

Resource type.

data.by_type[].count

integer

Quantity.

data.items

array of object

Ownership example resources.

data.items[].resource_type

string

Resource type.

data.items[].resource_id

string

Resource ID.

data.items[].ownership_version

integer

Ownership version.

data.items[].repair_state

string

Repair status.

data.items[].audit_event_id

string

Audit event ID.

data.items[].created_by_principal

string

Creator identity.

data.items[].created_by_role_id

string

The role ID used when creating it.

data.ownership_version

string

Version of ownership facts.

data.can_delete

boolean

Currently fixed to false.

data.blocked_reason

string

Reason why it cannot be deleted. Value: ACTIVE_OWNERSHIP, DELETE_NOT_SUPPORTED.

data.transfer_supported

boolean

Currently fixed to false.

data.role_graph_version

string

Character diagram version.

data.lifecycle_version

string

Role lifecycle versions.

data.request_id

string

Request association ID.

data.trace_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.

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