@@ -20,6 +20,7 @@ always exist by virtue of the existence of its parent, with one and exactly one
2020per parent.
2121
2222For example:
23+
2324``` proto
2425message Config {
2526 option (google.api.resource) = {
@@ -32,6 +33,7 @@ message Config {
3233```
3334
3435The ` Config ` singleton would have the following RPCs:
36+
3537``` proto
3638rpc GetConfig(GetConfigRequest) returns (Config) {
3739 option (google.api.http) = {
@@ -57,12 +59,15 @@ rpc UpdateConfig(UpdateConfigRequest) returns (Config) {
5759- Singleton resources ** should** define the [ ` Get ` ] [ aip-131 ] and
5860 [ ` Update ` ] [ aip-134 ] methods, and ** may** define custom methods as
5961 appropriate.
62+ - However, singleton resources ** must not** define the [ ` Update ` ] [ aip-134 ]
63+ method if all fields on the resource are [ output only] [ aip-203 ] .
6064- Singleton resources are always singular.
61- - Example: ' users/1234/thing'
65+ - Example: ` users/1234/thing `
6266- Singleton resources ** may** parent other resources.
6367
6468## Changelog
6569
70+ - ** 2023-07-26:** Clarified that read-only singletons should not have ` Update ` .
6671- ** 2021-11-02:** Added an example message and state parent eligibility.
6772- ** 2021-01-14:** Changed example from ` settings ` to ` config ` for clarity.
6873
@@ -72,3 +77,4 @@ rpc UpdateConfig(UpdateConfigRequest) returns (Config) {
7277[ aip-133 ] : ./0133.md
7378[ aip-134 ] : ./0134.md
7479[ aip-135 ] : ./0135.md
80+ [ aip-203 ] : ./0203.md#output-only
0 commit comments