Have you ever found yourself in a situation where you accidentally deleted a valuable resource, only to realize later that you still need it? You may have mistakenly deleted an important file from your cloud storage or inadvertently removed a critical database entry. These situations can be frustrating and time-consuming to resolve, but with Reclamation Controller you can effortlessly recover deleted resources.
How does the complaint work?
Imagine working on a cloud platform where you manage various resources such as files, databases or virtual machines. The Reclamation Controller acts as a safety net for these resources. When you delete a resource, either intentionally or accidentally, the Reclamation Controller kicks in and initiates a grace period before permanently removing the resource from the system. During this grace period, you have the opportunity to recover your resource, preventing irreversible data loss.
Enabling complaints for your service
Enabling a complaint for your service is a simple process:
- Ensure that your system or platform supports the complaints function. This may include checking if there is a switch or setting to enable reclamation for your resources.
- Use the system interface or API to access the list of deleted resources that can still be recovered. This list provides you with the information you need to identify and retrieve the resources you need.
Actions to be taken: refund or return
Once you’ve identified the resource you want to manage, you have two options:
- Refund status: If you are sure that you no longer need the resource, you can initiate a return action. This permanently deletes the resource from the system, freeing up storage space and resources.
- Restore state: If you realize that you still need a resource, you can restore it from the list of deleted items. This action restores the resource to its previous state, ensuring that you do not lose valuable data or functionality.
Real-life use case: cloud storage
Consider a scenario where you’ve accidentally deleted an important file from your cloud storage. Without the complaint function, this action could lead to permanent data loss. However, with the Reclamation Controller on, you have a safety net. You can quickly access the list of deleted files, identify the one you need and restore it with a simple click. This ensures that even in the event of human error, your data remains secure and accessible.
Let’s look at an example of using the claim controller in IBM Cloud.
Reclamation is an important feature of IBM Cloud that helps you recover deleted instances if you accidentally delete them or change your mind about deleting them. Reclamation works by enabling and disabling “enabled” flag in the Cloudant document. The claims controller waits 7 days before permanently deleting an instance from IBM Cloud. But you still have the chance to restore your instance if you want it back within those 7 days. If you want to enable complaints for your service, follow these steps:
- Make sure your Cloudant document has a key-value pair named “enabled” with a value of true or false. You can update this value via a GET API call to retrieve all recoverable instances.
- Use the GET API call to retrieve all returnable instances. The response will list deleted instances that have not yet been permanently deleted. Once you’ve found the instance you want to recover, make a note of its ID.
Enabling complaints for your service
Make a GET API call to get the deleted instances. Your deleted instance will be listed in the API call response.
- API call:
https://resource-controller.test.cloud.ibm.com/v1/reclamations?account_id=account_id
- Example:
https://resource-controller.test.cloud.ibm.com/v1/reclamations?account_id=e7f84207f02a401784384cc02a128387
Once the deleted instances are listed, locate yours resource_instance_id. Now you can restore or restore this instance according to your needs.
To perform a return operation:
- Call the POST RC API:
https://resource-controller.test.cloud.ibm.com/v1/reclamations/id/actions/reclaim
(Note: Here the ID is not instance_id or resource_instance_id but the ID obtained from the RC API call for that particular instance). - This API call switches the instance’s enabled state to true in Cloudant, and this ensures that the instance is deleted forever.
- Example:
https://resource-controller.test.cloud.ibm.com/v1/reclamations/74abfc91-d1e4-4100-ad10-213a880e5f75/actions/reclaim
API call response:
"id": "74abfc91-d1e4-4100-ad10-213a880e5f75",
"entity_id": "4dc92300-73cd-11ec-8e70-df67665eaed2",
"entity_type_id": "system-default-entity-type-resource-instance",
"entity_crn": "crn:v1:staging:public:privileged-access-gateway:us-south:a/e7f84207f02a401784384cc02a128387:db12e671-c7f5-49cc-907b-eb82bb487548::",
"resource_instance_id": "db12e671-c7f5-49cc-907b-eb82bb487548",
"resource_group_id": "965b86e441464e2abf8461439c08f4bc",
"account_id": "e7f84207f02a401784384cc02a128387",
"policy_id": "system-default-policy-7-days",
"state": "RECLAIMING",
"target_time": "2023-09-14T06:32:10Z",
"location": "dal13",
"request_source": "RC",
"retry_times": 0,
"created_at": "2023-09-07T06:32:10.344714213Z",
"created_by": "iam-ServiceId-9ee41cf7-84a0-443d-b1f6-82481ce83e59",
"updated_at": "2023-09-07T06:34:38.339682147Z",
"updated_by": "IBMid-6670002JET"
Here you can see that the state of the instance “BACK.”
To perform a restore operation:
Call the POST RC API: https://resource-controller.test.cloud.ibm.com/v1/reclamations/id/actions/restore
This API call switches the enabled state and active state of the instance to true in Cloudant.
Example: https://resource-controller.test.cloud.ibm.com/v1/reclamations/74abfc91-d1e4-4100-ad10-213a880e5f75/actions/restore
API call response:
"id": "ec4bdddc-0cc6-417c-bf36-8628916b8fae",
"entity_id": "4dc92300-73cd-11ec-8e70-df67665eaed2",
"entity_type_id": "system-default-entity-type-resource-instance",
"entity_crn": "crn:v1:staging:public:privileged-access-gateway:us-south:a/e7f84207f02a401784384cc02a128387:db12e671-c7f5-49cc-907b-eb82bb487548::",
"resource_instance_id": "db12e671-c7f5-49cc-907b-eb82bb487548",
"resource_group_id": "965b86e441464e2abf8461439c08f4bc",
"account_id": "e7f84207f02a401784384cc02a128387",
"policy_id": "system-default-policy-7-days",
"state": "RESTORING",
"target_time": "2023-09-14T06:15:26Z",
"location": "wdc07",
"request_source": "RC",
"retry_times": 0,
"created_at": "2023-09-07T06:15:26.164931467Z",
"created_by": "iam-ServiceId-9ee41cf7-84a0-443d-b1f6-82481ce83e59",
"updated_at": "2023-09-07T06:29:13.517413296Z",
"updated_by": "IBMid-6670002JET"
Here you can see that the state of the instance “RENEWAL.”
Improved security and compliance
In addition to its utility in data recovery, Reclamation Controller also improves security and compliance measures. By enabling a mechanism for controlled deletion and recovery of resources, organizations can better comply with data retention policies and regulatory requirements. This ensures that sensitive information is handled responsibly and in accordance with industry standards.
Conclusion: Simplify resource recovery with reclamation
Whether you’re managing files, databases, virtual machines or any other resource, Reclamation Controller provides peace of mind. By integrating reclamation functionality into your systems and platforms, you can mitigate the risk of data loss and streamline the resource recovery process. Don’t let accidental deletions disrupt your workflow—reclaim your resources effortlessly with Reclamation Controller.