From 576a4776a05e9cace30ab16ab7b9f07f4b2a4b05 Mon Sep 17 00:00:00 2001 From: IwonaLanger Date: Thu, 26 Sep 2024 07:23:27 +0200 Subject: [PATCH] Describe the process in steps --- .../03-30-trial-and-free-expiration.md | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/docs/contributor/03-30-trial-and-free-expiration.md b/docs/contributor/03-30-trial-and-free-expiration.md index 96a09100b4..6e443350eb 100644 --- a/docs/contributor/03-30-trial-and-free-expiration.md +++ b/docs/contributor/03-30-trial-and-free-expiration.md @@ -10,15 +10,20 @@ After the allocated time, the [Trial Cleanup](./06-40-trial-cleanup-cronjob.md) ## Details -The cleanup CronJobs perform the trigger the trial or free instance expiration by sending a `PUT` request to `/expire/service_instance/{instanceID}` KEB API endpoint, where **plan** must be set to `trial` or `free`. The possible KEB responses are: +The cleaning process is performed in the following steps: -| Status Code | Description | -| --- |---------------------------------------------------------------------------------------------------------| -| 202 Accepted | Returned if the Service Instance expiration has been accepted and is in progress. | -| 400 Bad Request | Returned if the request is malformed, missing mandatory data, or when the instance's plan is not Trial or Free. | -| 404 Not Found | Returned if the instance does not exist in the database. | +1. The cleanup CronJobs trigger the trial or free instance expiration by sending a `PUT` request to `/expire/service_instance/{instanceID}` KEB API endpoint, where **plan** must be set to `trial` or `free`. The possible KEB responses are: -If KEB accepts the instance expiration request, it marks the instance as expired by populating the instance's `ExpiredAt` field with a timestamp when the request is accepted. Then, it creates a suspension operation. After the suspension operation is added to the operations queue, KEB sets the **parameters.ers_context.active** field to `false`. The instance is deactivated and no longer usable. It can only be removed by deprovisioning request. + | Status Code | Description | + | --- |---------------------------------------------------------------------------------------------------------| + | 202 Accepted | Returned if the Service Instance expiration has been accepted and is in progress. | + | 400 Bad Request | Returned if the request is malformed, missing mandatory data, or when the instance's plan is not Trial or Free. | + | 404 Not Found | Returned if the instance does not exist in the database. | + +2. If KEB accepts the instance expiration request, it marks the instance as expired by populating the instance's `ExpiredAt` field with a timestamp when the request is accepted. +3. KEB creates a suspension operation, which is added to the operations queue. +4. KEB sets the **parameters.ers_context.active** field to `false`. +5. The instance is deactivated and no longer usable. It can only be removed by a deprovisioning request. ## Update Requests @@ -37,4 +42,4 @@ PATCH /oauth/v2/service_instances/"{INSTANCE_ID}"?accepts_incomplete=true } ``` -Requests that don't include a new **globalaccount_id** return the HTTP response `400`. \ No newline at end of file +Requests that don't include a new **globalaccount_id** return the HTTP response `400`.