DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Last call! Secure your stack and shape the future! Help dev teams across the globe navigate their software supply chain security challenges.

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Releasing software shouldn't be stressful or risky. Learn how to leverage progressive delivery techniques to ensure safer deployments.

Avoid machine learning mistakes and boost model performance! Discover key ML patterns, anti-patterns, data strategies, and more.

Related

  • AI Meets Vector Databases: Redefining Data Retrieval in the Age of Intelligence
  • Self-Healing Data Pipelines: The Next Big Thing in Data Engineering?
  • Expert Guide: How to Slash Cloud Cost in 2025
  • Top Tools for Object Storage and Data Management

Trending

  • Beyond ChatGPT, AI Reasoning 2.0: Engineering AI Models With Human-Like Reasoning
  • Mastering Advanced Traffic Management in Multi-Cloud Kubernetes: Scaling With Multiple Istio Ingress Gateways
  • Artificial Intelligence, Real Consequences: Balancing Good vs Evil AI [Infographic]
  • Comprehensive Guide to Property-Based Testing in Go: Principles and Implementation
  1. DZone
  2. Software Design and Architecture
  3. Cloud Architecture
  4. Reclaim Your Deleted Resources With the Reclamation Controller

Reclaim Your Deleted Resources With the Reclamation Controller

Accidentally deleting valuable resources can be frustrating, but the Reclamation Controller offers an effortless solution: reclaiming deleted resources is made easy.

By 
Ruchika Sreedhar user avatar
Ruchika Sreedhar
·
Pradeep Gopalgowda user avatar
Pradeep Gopalgowda
·
Feb. 28, 24 · Tutorial
Likes (2)
Comment
Save
Tweet
Share
2.4K Views

Join the DZone community and get the full member experience.

Join For Free

Have you ever found yourself in a situation where you accidentally deleted a valuable resource, only to realize later that you still needed it? Perhaps you mistakenly deleted an important file from your cloud storage, or you removed a critical database entry without intending to. These situations can be frustrating and time-consuming to resolve, but with the Reclamation Controller, you can reclaim your deleted resources effortlessly.

How Does Reclamation Work?

Imagine you're 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, whether 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 restore your resource, preventing irreversible data loss.

Enabling Reclamation for Your Service

Enabling reclamation for your service is a straightforward process:

  1. Ensure your system or platform supports reclamation functionality. This may involve checking if there's a toggle or setting to enable reclamation for your resources.
  2. Use the system's interface or API to access the list of deleted resources that are still recoverable. This list provides you with the necessary information to identify and reclaim the resources you need.

Taking Action: Reclaim or Restore

Once you've identified the resource you want to manage, you have two options:

  1. Reclaim state: If you're certain you no longer need the resource, you can initiate the reclaim action. This permanently deletes the resource from the system, freeing up storage space and resources.
  2. Restore state: If you realize that you still need the resource, you can restore it from the deleted items list. This action reinstates the resource to its previous state, ensuring you don't lose any valuable data or functionality.

Real-Life Use Case: Cloud Storage

Consider a scenario where you accidentally delete an important file from your cloud storage. Without reclamation functionality, this action could lead to permanent data loss. However, with the Reclamation Controller enabled, 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 face of human error, your data remains safe and accessible.

Let's look at an example of using the reclamation 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 the "enabled" flag in the Cloudant document. The reclamation controller waits for 7 days before deleting the instance permanently from IBM Cloud. But you still have a chance to restore your instance if you want it back within those 7 days. If you want to enable reclamation for your service, follow these steps:

  1. Make sure that your Cloudant document has a key-value pair named “enabled” with the value as true or false. You can update this value through the GET API call to retrieve all reclaimable instances.
  2. Use the GET API call to fetch all reclaimable instances. The response will list deleted instances that have not been permanently deleted yet. Once you find the instance you want to reclaim, note down its ID.

Enabling Reclamation for Your Service

Call the GET API call to get the deleted instances. Your deleted instance will be listed in the response of the API call.

  • 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, find your resource_instance_id. Now, you can either reclaim or restore this instance as per your need.

To perform the reclaim operation:

  • Call the POST RC API: https://resource-controller.test.cloud.ibm.com/v1/reclamations/{id}/actions/reclaim(Note: Here, the id is not the instance_id or the resource_instance_id but the id obtained from the RC API call for that particular instance).
  • This API call toggles the enabled state of the instance to true in the 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

Response of the API call:

JSON
 
{
    "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 is "RECLAIMING."

To perform the restore operation:

Call the POST RC API: https://resource-controller.test.cloud.ibm.com/v1/reclamations/{id}/actions/restore

This API call toggles the enabled state and the active state of the instance to true in the Cloudant.

Example: https://resource-controller.test.cloud.ibm.com/v1/reclamations/74abfc91-d1e4-4100-ad10-213a880e5f75/actions/restore

Response of the API call:

JSON
 
{
    "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 is "RESTORING."

Enhanced Security and Compliance

Beyond its utility in data recovery, the Reclamation Controller also enhances security and compliance measures. By providing a mechanism for controlled deletion and restoration of resources, organizations can better adhere to data retention policies and regulatory requirements. This ensures that sensitive information is handled responsibly and follows industry standards.

Conclusion: Simplify Resource Recovery With Reclamation

Whether you're managing files, databases, virtual machines, or any other resources, the 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 process of resource recovery. Don't let accidental deletions derail your workflow — reclaim your resources effortlessly with the Reclamation Controller.

Cloud storage Data loss Data recovery

Opinions expressed by DZone contributors are their own.

Related

  • AI Meets Vector Databases: Redefining Data Retrieval in the Age of Intelligence
  • Self-Healing Data Pipelines: The Next Big Thing in Data Engineering?
  • Expert Guide: How to Slash Cloud Cost in 2025
  • Top Tools for Object Storage and Data Management

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!