Skip to content

Commit

Permalink
Describe the process in steps
Browse files Browse the repository at this point in the history
  • Loading branch information
IwonaLanger committed Sep 26, 2024
1 parent 062494a commit 576a477
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions docs/contributor/03-30-trial-and-free-expiration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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`.
Requests that don't include a new **globalaccount_id** return the HTTP response `400`.

0 comments on commit 576a477

Please sign in to comment.