You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: add status_visibility canister setting to canister_status docs (#315)
Reflect the new status_visibility canister setting (dfinity/ic#10667),
which governs who can read a canister's status via canister_status:
controllers (default), public, or allowed_viewers. Mirrors the existing
log_visibility and snapshot_visibility settings.
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/references/ic-interface-spec/management-canister.md
+20-1Lines changed: 20 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -119,6 +119,17 @@ The optional `settings` parameter can be used to set the following settings:
119
119
120
120
Default value: `controllers`.
121
121
122
+
-`status_visibility` (`status_visibility`)
123
+
124
+
Controls who can access the canister's status through the `canister_status` endpoint of the management canister. Can be one of:
125
+
-`controllers`: Only the canister's controllers can read its status
126
+
-`public`: Anyone can read the canister's status
127
+
-`allowed_viewers` (`vec principal`): Only principals in the provided list and the canister's controllers can read its status, the maximum length of the list is 10
128
+
129
+
Regardless of this setting, subnet admins and the canister itself can always read the canister's status.
130
+
131
+
Default value: `controllers`.
132
+
122
133
-`wasm_memory_threshold` (`nat`)
123
134
124
135
Must be a number between 0 and 2<sup>48</sup>, inclusively, and indicates the threshold on the remaining wasm memory size of the canister in bytes:
@@ -264,6 +275,8 @@ Indicates various information about the canister. It contains:
264
275
265
276
- The visibility of the canister's snapshots.
266
277
278
+
- The visibility of the canister's status.
279
+
267
280
- The WASM heap memory limit of the canister in bytes (the value of `0` means that there is no explicit limit).
268
281
269
282
- The "low wasm memory" threshold, which is used to determine when the [canister_on_low_wasm_memory](./canister-interface.md#on-low-wasm-memory) function is executed.
@@ -292,7 +305,13 @@ Indicates various information about the canister. It contains:
292
305
293
306
*`response_payload_bytes_total`: the total number of query and composite query response payload (reply data or reject message) bytes.
294
307
295
-
Only the controllers of the canister or the canister itself or subnet admins can request its status.
308
+
Who can request a canister's status is governed by the `status_visibility` field of `canister_settings` and can be one of the following variants:
309
+
310
+
-`controllers`: only the canister's controllers can request the status (default);
311
+
-`public`: everyone can request the status;
312
+
-`allowed_viewers` (`vec principal`): only principals in the provided list and the canister's controllers can request the status, the maximum length of the list is 10.
313
+
314
+
Regardless of this setting, the canister itself and subnet admins can always request the canister's status.
Copy file name to clipboardExpand all lines: docs/references/management-canister.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,7 @@ Several methods accept or return a `canister_settings` record. The fields are:
28
28
|`wasm_memory_threshold`|`nat`|`0`| Remaining Wasm memory threshold that triggers the low-memory hook |
29
29
|`log_visibility`|`log_visibility`|`controllers`| Who can read canister logs: `controllers`, `public`, or `allowed_viewers(vec principal)`|
30
30
|`snapshot_visibility`|`snapshot_visibility`|`controllers`| Who can list and read canister snapshots: `controllers`, `public`, or `allowed_viewers(vec principal)`|
31
+
|`status_visibility`|`status_visibility`|`controllers`| Who can read the canister status: `controllers`, `public`, or `allowed_viewers(vec principal)`|
31
32
|`environment_variables`|`opt record`|`null`| Key-value pairs accessible during canister execution |
32
33
33
34
For practical guidance on configuring these, see the [canister settings guide](../guides/canister-management/settings.md).
@@ -118,7 +119,7 @@ Removes a canister's code and state, making it empty. Outstanding calls are reje
118
119
119
120
Returns detailed information about a canister: status, settings, module hash, cycle balance, memory usage, and query statistics.
120
121
121
-
-**Caller:**Controllers, the canister itself, or subnet admins (canisters or external users; also available as a query call)
122
+
-**Caller:**Governed by the `status_visibility` setting (see below); the canister itself and subnet admins can always call it (canisters or external users; also available as a query call)
122
123
-**Parameters:**
123
124
-`canister_id` (`principal`)
124
125
-**Returns:** A record containing:
@@ -134,6 +135,8 @@ Returns detailed information about a canister: status, settings, module hash, cy
By default, only controllers can read a canister's status. The `status_visibility` setting relaxes this: set it to `public` to let anyone read the status, or `allowed_viewers` to grant access to a specific list of up to 10 principals (in addition to the controllers). The canister itself and subnet admins can always read the status regardless of this setting.
139
+
137
140
### `canister_metrics`
138
141
139
142
Returns cycle consumption metrics for a canister broken down by use case. Metrics are monotonically increasing counters accumulating since canister creation (or since the metrics feature was introduced for existing canisters).
0 commit comments