1. Packages
  2. Ibm Provider
  3. API Docs
  4. getResourceReclamations
ibm 1.86.0 published on Wednesday, Dec 3, 2025 by ibm-cloud
ibm logo
ibm 1.86.0 published on Wednesday, Dec 3, 2025 by ibm-cloud

    The ibm.getResourceReclamations data source fetches all resource reclamations for the current IBM Cloud account. This is useful to view reclamations that have been created across all resource instances.

    Note: Reclamations represent resources pending deletion or restoration actions in IBM Cloud.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const all = ibm.getResourceReclamations({});
    
    import pulumi
    import pulumi_ibm as ibm
    
    all = ibm.get_resource_reclamations()
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ibm.GetResourceReclamations(ctx, &ibm.GetResourceReclamationsArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var all = Ibm.GetResourceReclamations.Invoke();
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.IbmFunctions;
    import com.pulumi.ibm.inputs.GetResourceReclamationsArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var all = IbmFunctions.getResourceReclamations(GetResourceReclamationsArgs.builder()
                .build());
    
        }
    }
    
    variables:
      all:
        fn::invoke:
          function: ibm:getResourceReclamations
          arguments: {}
    

    To access reclamation IDs:

    output "reclamation_ids" {
      value = [for r in data.ibm_resource_reclamations.all.reclamations : r.id]
    }
    

    Notes

    • Reclamations are managed by IBM Cloud resource controller service.
    • Ensure appropriate permissions to view reclamations in your account.

    Using getResourceReclamations

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getResourceReclamations(args: GetResourceReclamationsArgs, opts?: InvokeOptions): Promise<GetResourceReclamationsResult>
    function getResourceReclamationsOutput(args: GetResourceReclamationsOutputArgs, opts?: InvokeOptions): Output<GetResourceReclamationsResult>
    def get_resource_reclamations(id: Optional[str] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetResourceReclamationsResult
    def get_resource_reclamations_output(id: Optional[pulumi.Input[str]] = None,
                                  opts: Optional[InvokeOptions] = None) -> Output[GetResourceReclamationsResult]
    func GetResourceReclamations(ctx *Context, args *GetResourceReclamationsArgs, opts ...InvokeOption) (*GetResourceReclamationsResult, error)
    func GetResourceReclamationsOutput(ctx *Context, args *GetResourceReclamationsOutputArgs, opts ...InvokeOption) GetResourceReclamationsResultOutput

    > Note: This function is named GetResourceReclamations in the Go SDK.

    public static class GetResourceReclamations 
    {
        public static Task<GetResourceReclamationsResult> InvokeAsync(GetResourceReclamationsArgs args, InvokeOptions? opts = null)
        public static Output<GetResourceReclamationsResult> Invoke(GetResourceReclamationsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetResourceReclamationsResult> getResourceReclamations(GetResourceReclamationsArgs args, InvokeOptions options)
    public static Output<GetResourceReclamationsResult> getResourceReclamations(GetResourceReclamationsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getResourceReclamations:getResourceReclamations
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    (String) The ID of the reclamation.
    Id string
    (String) The ID of the reclamation.
    id String
    (String) The ID of the reclamation.
    id string
    (String) The ID of the reclamation.
    id str
    (String) The ID of the reclamation.
    id String
    (String) The ID of the reclamation.

    getResourceReclamations Result

    The following output properties are available:

    Id string
    (String) The ID of the reclamation.
    Reclamations List<GetResourceReclamationsReclamation>
    (List of Objects) List of reclamations with each object containing:
    Id string
    (String) The ID of the reclamation.
    Reclamations []GetResourceReclamationsReclamation
    (List of Objects) List of reclamations with each object containing:
    id String
    (String) The ID of the reclamation.
    reclamations List<GetResourceReclamationsReclamation>
    (List of Objects) List of reclamations with each object containing:
    id string
    (String) The ID of the reclamation.
    reclamations GetResourceReclamationsReclamation[]
    (List of Objects) List of reclamations with each object containing:
    id str
    (String) The ID of the reclamation.
    reclamations Sequence[GetResourceReclamationsReclamation]
    (List of Objects) List of reclamations with each object containing:
    id String
    (String) The ID of the reclamation.
    reclamations List<Property Map>
    (List of Objects) List of reclamations with each object containing:

    Supporting Types

    GetResourceReclamationsReclamation

    AccountId string
    (String) IBM Cloud account ID.
    CreatedAt string
    (String) Creation timestamp of the reclamation.
    CreatedBy string
    (String) Creator of the reclamation.
    CustomProperties Dictionary<string, string>
    (Map) Additional custom properties associated with the reclamation.
    EntityCrn string
    (String) Full Cloud Resource Name (CRN) related to this reclamation.
    EntityId string
    (String) The ID of the entity for the reclamation.
    EntityTypeId string
    (String) The entity type ID.
    Id string
    (String) The ID of the reclamation.
    PolicyId string
    (String) The policy ID that triggered the reclamation.
    ResourceGroupId string
    (String) Resource group ID.
    ResourceInstanceId string
    (String) Resource instance ID associated.
    State string
    (String) Current state of the reclamation.
    TargetTime string
    (String) Target retention expiration time (RFC3339).
    UpdatedAt string
    (String) Last updated timestamp.
    UpdatedBy string
    (String) Last updater of the reclamation.
    AccountId string
    (String) IBM Cloud account ID.
    CreatedAt string
    (String) Creation timestamp of the reclamation.
    CreatedBy string
    (String) Creator of the reclamation.
    CustomProperties map[string]string
    (Map) Additional custom properties associated with the reclamation.
    EntityCrn string
    (String) Full Cloud Resource Name (CRN) related to this reclamation.
    EntityId string
    (String) The ID of the entity for the reclamation.
    EntityTypeId string
    (String) The entity type ID.
    Id string
    (String) The ID of the reclamation.
    PolicyId string
    (String) The policy ID that triggered the reclamation.
    ResourceGroupId string
    (String) Resource group ID.
    ResourceInstanceId string
    (String) Resource instance ID associated.
    State string
    (String) Current state of the reclamation.
    TargetTime string
    (String) Target retention expiration time (RFC3339).
    UpdatedAt string
    (String) Last updated timestamp.
    UpdatedBy string
    (String) Last updater of the reclamation.
    accountId String
    (String) IBM Cloud account ID.
    createdAt String
    (String) Creation timestamp of the reclamation.
    createdBy String
    (String) Creator of the reclamation.
    customProperties Map<String,String>
    (Map) Additional custom properties associated with the reclamation.
    entityCrn String
    (String) Full Cloud Resource Name (CRN) related to this reclamation.
    entityId String
    (String) The ID of the entity for the reclamation.
    entityTypeId String
    (String) The entity type ID.
    id String
    (String) The ID of the reclamation.
    policyId String
    (String) The policy ID that triggered the reclamation.
    resourceGroupId String
    (String) Resource group ID.
    resourceInstanceId String
    (String) Resource instance ID associated.
    state String
    (String) Current state of the reclamation.
    targetTime String
    (String) Target retention expiration time (RFC3339).
    updatedAt String
    (String) Last updated timestamp.
    updatedBy String
    (String) Last updater of the reclamation.
    accountId string
    (String) IBM Cloud account ID.
    createdAt string
    (String) Creation timestamp of the reclamation.
    createdBy string
    (String) Creator of the reclamation.
    customProperties {[key: string]: string}
    (Map) Additional custom properties associated with the reclamation.
    entityCrn string
    (String) Full Cloud Resource Name (CRN) related to this reclamation.
    entityId string
    (String) The ID of the entity for the reclamation.
    entityTypeId string
    (String) The entity type ID.
    id string
    (String) The ID of the reclamation.
    policyId string
    (String) The policy ID that triggered the reclamation.
    resourceGroupId string
    (String) Resource group ID.
    resourceInstanceId string
    (String) Resource instance ID associated.
    state string
    (String) Current state of the reclamation.
    targetTime string
    (String) Target retention expiration time (RFC3339).
    updatedAt string
    (String) Last updated timestamp.
    updatedBy string
    (String) Last updater of the reclamation.
    account_id str
    (String) IBM Cloud account ID.
    created_at str
    (String) Creation timestamp of the reclamation.
    created_by str
    (String) Creator of the reclamation.
    custom_properties Mapping[str, str]
    (Map) Additional custom properties associated with the reclamation.
    entity_crn str
    (String) Full Cloud Resource Name (CRN) related to this reclamation.
    entity_id str
    (String) The ID of the entity for the reclamation.
    entity_type_id str
    (String) The entity type ID.
    id str
    (String) The ID of the reclamation.
    policy_id str
    (String) The policy ID that triggered the reclamation.
    resource_group_id str
    (String) Resource group ID.
    resource_instance_id str
    (String) Resource instance ID associated.
    state str
    (String) Current state of the reclamation.
    target_time str
    (String) Target retention expiration time (RFC3339).
    updated_at str
    (String) Last updated timestamp.
    updated_by str
    (String) Last updater of the reclamation.
    accountId String
    (String) IBM Cloud account ID.
    createdAt String
    (String) Creation timestamp of the reclamation.
    createdBy String
    (String) Creator of the reclamation.
    customProperties Map<String>
    (Map) Additional custom properties associated with the reclamation.
    entityCrn String
    (String) Full Cloud Resource Name (CRN) related to this reclamation.
    entityId String
    (String) The ID of the entity for the reclamation.
    entityTypeId String
    (String) The entity type ID.
    id String
    (String) The ID of the reclamation.
    policyId String
    (String) The policy ID that triggered the reclamation.
    resourceGroupId String
    (String) Resource group ID.
    resourceInstanceId String
    (String) Resource instance ID associated.
    state String
    (String) Current state of the reclamation.
    targetTime String
    (String) Target retention expiration time (RFC3339).
    updatedAt String
    (String) Last updated timestamp.
    updatedBy String
    (String) Last updater of the reclamation.

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.86.0 published on Wednesday, Dec 3, 2025 by ibm-cloud
      Meet Neo: Your AI Platform Teammate