get-resource-permission
dci get-resource-permission resourceType resourceId
Returns the permissions associated with the specified Cloud Analytics resource. Supports Allocations, Alerts, Budgets, and Reports.
Output
OK - Resource permissions returned.
By default dci renders the result as a table. Use --output json to get the full structure described below — see Output formats.
| Field | Type | Description |
|---|---|---|
id | string | Resource ID. |
name | string | Resource name. |
description | string | Resource description. |
createTime | integer (int64) | The time when this resource was created, in milliseconds since the epoch. |
updateTime | integer (int64) | The time when this resource was last updated, in milliseconds since the epoch. |
permissions | array of object | |
permissions[].user | string | The email address of the user to whom the role is assigned. |
permissions[].role | string | The role assigned to the user, defining their level of access to the resource. One of: "owner", "editor", "viewer". |
public | string | Type of permissions users in the entire organization have for this resource One of: "editor", "viewer". |
Raw JSON schema
{
"type": "object",
"description": "Permissions and metadata for a resource returned by the sharing API.",
"properties": {
"id": {
"type": "string",
"description": "Resource ID."
},
"name": {
"type": "string",
"description": "Resource name."
},
"description": {
"type": "string",
"description": "Resource description."
},
"createTime": {
"type": "integer",
"description": "The time when this resource was created, in milliseconds since the epoch.",
"format": "int64"
},
"updateTime": {
"type": "integer",
"description": "The time when this resource was last updated, in milliseconds since the epoch.",
"format": "int64"
},
"permissions": {
"type": "array",
"items": {
"type": "object",
"description": "A single user's permission entry for a resource.",
"properties": {
"user": {
"type": "string",
"description": "The email address of the user to whom the role is assigned."
},
"role": {
"type": "string",
"description": "The role assigned to the user, defining their level of access to the resource.",
"enum": [
"owner",
"editor",
"viewer"
]
}
}
}
},
"public": {
"type": "string",
"description": "Type of permissions users in the entire organization have for this resource",
"enum": [
"editor",
"viewer"
],
"nullable": true
}
}
}
Errors
On failure, dci prints a single error message — with a hint when one is available — and exits with a typed code your scripts can branch on. See Errors and exit codes for the full contract.
| HTTP status | Exit code | Error code | Meaning |
|---|---|---|---|
| 400 | 30 | VALIDATION_ERROR | The arguments or request body were rejected. Review the command's flags and payload. |
| 401 | 10 | AUTHENTICATION_FAILED | Not signed in, or the API token is invalid. Run dci login or check DCI_API_KEY. |
| 403 | 11 | PERMISSION_DENIED | The DoiT user or the active customer context does not have access. |
| 404 | 20 | RESOURCE_NOT_FOUND | The requested resource does not exist. Check the identifier argument. |
| 500 | 40 | API_SERVER_ERROR | The API failed to process the request. Retryable; contact DoiT support if it persists. |
Aliases: getresourcepermission