diff --git a/temporal/api/operatorservice/v1/request_response.proto b/temporal/api/operatorservice/v1/request_response.proto index f4a74b331..d53f3f78d 100644 --- a/temporal/api/operatorservice/v1/request_response.proto +++ b/temporal/api/operatorservice/v1/request_response.proto @@ -53,6 +53,10 @@ message DeleteNamespaceRequest { // If provided, the deletion of namespace info will be delayed for the given duration (0 means no delay). // If not provided, the default delay configured in the cluster will be used. google.protobuf.Duration namespace_delete_delay = 3; + // If provided, execution deletion is delayed by this duration, during which a + // RestoreSoftDeletedNamespace call can cancel the deletion (0 means no window). + // If not provided, the default soft delete window configured in the cluster will be used. + google.protobuf.Duration soft_delete_window = 4; } message DeleteNamespaceResponse { @@ -173,3 +177,11 @@ message ListNexusEndpointsResponse { bytes next_page_token = 1; repeated temporal.api.nexus.v1.Endpoint endpoints = 2; } + +message RestoreSoftDeletedNamespaceRequest { + // Namespace ID of the namespace to restore. + string namespace_id = 1; +} + +message RestoreSoftDeletedNamespaceResponse { +} diff --git a/temporal/api/operatorservice/v1/service.proto b/temporal/api/operatorservice/v1/service.proto index bcf5ab04b..ba0365743 100644 --- a/temporal/api/operatorservice/v1/service.proto +++ b/temporal/api/operatorservice/v1/service.proto @@ -121,4 +121,16 @@ service OperatorService { } }; } + + // RestoreSoftDeletedNamespace cancels an in-progress namespace deletion by sending a restore + // update to the ReclaimResources workflow. Only valid while the soft delete window is still open. + // If the window has passed the request will be rejected with a FailedPrecondition error. + rpc RestoreSoftDeletedNamespace(RestoreSoftDeletedNamespaceRequest) returns (RestoreSoftDeletedNamespaceResponse) { + option (google.api.http) = { + post: "/namespaces/{namespace_id}/restore" + additional_bindings { + post: "/api/v1/namespaces/{namespace_id}/restore" + } + }; + } }