@@ -60,20 +60,19 @@ A resource that supports soft delete **should** provide an `Undelete` method:
6060
6161{% endtabs %}
6262
63- ### Long-running undelete
63+ ### Create
6464
65- Some resources take longer to undelete a resource than is reasonable for a
66- regular API request. In this situation, the API **should** follow the
67- long-running request pattern AEP-151.
65+ If a user attempts a create on a soft-deleted resource, the request **must**
66+ succeed, acting as if the resource did not exist previously.
6867
6968### List and Get
7069
71- Soft-deleted resources **should not** be returned in `List` AEP-132 responses
72- by default (unless `bool show_deleted` is true).
70+ Soft-deleted resources **must not** be returned in `List` AEP-132 responses by
71+ default (unless `bool show_deleted` is true).
7372
74- A `Get` AEP-131 request for a soft deleted resource **should ** error with
75- `410 Gone` unless `bool show_deleted` is true, in which case soft-deleted
76- resources **must** return the resource.
73+ A `Get` AEP-131 request for a soft deleted resource **must ** return with a
74+ `410 Gone` response unless `bool show_deleted` is true, in which case
75+ soft-deleted resources **must** return the resource.
7776
7877Services that soft delete resources **may** choose a reasonable strategy for
7978purging those resources, including automatic purging after a reasonable time
@@ -84,9 +83,6 @@ removed.
8483
8584### Declarative-friendly resources
8685
87- A resource that is declarative-friendly AEP-128 **should** support soft delete
88- and undelete.
89-
9086**Important:** There is an ambiguity in declarative tooling between "create"
9187and "undelete". When given an alias which was previously deleted and a
9288directive to make it exist, tooling usually does not know if the intent is to
@@ -96,27 +92,17 @@ a new resource: the only way to undelete is to explicitly use the undelete RPC
9692(an imperative operation), and declarative tools **may** elect not to map
9793anything to undelete at all.
9894
99- Declarative-friendly resources **must** use long-running operations for both
100- soft delete and undelete. The service **may** return an LRO that is already set
101- to done if the request is effectively immediate.
102-
103- Declarative-friendly resources **must** include `validate_only` AEP-163 and
104- `etag` AEP-154 in their `Undelete` methods.
105-
10695### Errors
10796
108- If the user does not have permission to access the resource, regardless of
109- whether or not it exists, the service **must** error with `403 Forbidden`.
110- Permission **must** be checked prior to checking if the resource exists.
97+ Also see [errors](/errors) for additional guidance.
11198
11299If the user does have proper permission, but the requested resource does not
113100exist (either it was never created or already expunged), the service **must**
114101error with `404 Not Found`.
115102
116103If the user calling a soft `Delete` has proper permission, but the requested
117104resource is already deleted, the service **must** succeed if `allow_missing` is
118- `true`, and **should** error with `404 Not Found` if `allow_missing` is
119- `false`.
105+ `true`, and **must** error with `404 Not Found` if `allow_missing` is `false`.
120106
121107If the user calling `Undelete` has proper permission, but the requested
122108resource is not deleted, the service **must** error with `409 Conflict`.
0 commit comments