1. Packages
  2. Packages
  3. Powerstore Provider
  4. API Docs
  5. getRecycleBin
Viewing docs for powerstore 1.3.0
published on Wednesday, Jun 24, 2026 by dell
Viewing docs for powerstore 1.3.0
published on Wednesday, Jun 24, 2026 by dell

    This datasource is used to query the recycle bin contents from a PowerStore array. The information fetched from this datasource can be used for recovering or permanently deleting items.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as powerstore from "@pulumi/powerstore";
    
    //Copyright (c) 2026 Dell Inc., or its subsidiaries. All Rights Reserved.
    //
    //Licensed under the Mozilla Public License Version 2.0 (the "License");
    //you may not use this file except in compliance with the License.
    //You may obtain a copy of the License at
    //
    //    http://mozilla.org/MPL/2.0/
    //
    //
    //Unless required by applicable law or agreed to in writing, software
    //distributed under the License is distributed on an "AS IS" BASIS,
    //WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    //See the License for the specific language governing permissions and
    //limitations under the License.
    // commands to run this tf file : terraform init && pulumi up --auto-approve
    // This datasource reads Recycle Bin items from the PowerStore array
    // If it is an empty datasource block, then it will read all recycle bin items
    // If id is provided then it reads a particular recycle bin item
    // If resource_type is provided, it filters by volume or volume_group
    // filter_expression can be used for advanced filtering
    // Fetch all recycle bin items
    const all = powerstore.getRecycleBin({});
    // Fetch recycle bin items filtered by resource type (volumes only)
    const volumesOnly = powerstore.getRecycleBin({
        resourceType: "volume",
    });
    // Fetch recycle bin items filtered by resource type (volume groups only)
    const volumeGroupsOnly = powerstore.getRecycleBin({
        resourceType: "volume_group",
    });
    // Fetch recycle bin items using filter expression
    const filtered = powerstore.getRecycleBin({
        filterExpression: "resource_type=eq.volume",
    });
    export const recycleBinAll = all.then(all => all.recycleBinItems);
    export const recycleBinIds = all.then(all => all.recycleBinItems.map(__item => __item.id));
    export const recycleBinSummary = all.then(all => .reduce((__obj, item) => ({ ...__obj, [item.id]: {
        name: item.name,
        resourceType: item.resourceType,
        expires: item.expirationTimestamp,
    } })));
    
    import pulumi
    import pulumi_powerstore as powerstore
    
    #Copyright (c) 2026 Dell Inc., or its subsidiaries. All Rights Reserved.
    #
    #Licensed under the Mozilla Public License Version 2.0 (the "License");
    #you may not use this file except in compliance with the License.
    #You may obtain a copy of the License at
    #
    #    http://mozilla.org/MPL/2.0/
    #
    #
    #Unless required by applicable law or agreed to in writing, software
    #distributed under the License is distributed on an "AS IS" BASIS,
    #WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    #See the License for the specific language governing permissions and
    #limitations under the License.
    # commands to run this tf file : terraform init && pulumi up --auto-approve
    # This datasource reads Recycle Bin items from the PowerStore array
    # If it is an empty datasource block, then it will read all recycle bin items
    # If id is provided then it reads a particular recycle bin item
    # If resource_type is provided, it filters by volume or volume_group
    # filter_expression can be used for advanced filtering
    # Fetch all recycle bin items
    all = powerstore.get_recycle_bin()
    # Fetch recycle bin items filtered by resource type (volumes only)
    volumes_only = powerstore.get_recycle_bin(resource_type="volume")
    # Fetch recycle bin items filtered by resource type (volume groups only)
    volume_groups_only = powerstore.get_recycle_bin(resource_type="volume_group")
    # Fetch recycle bin items using filter expression
    filtered = powerstore.get_recycle_bin(filter_expression="resource_type=eq.volume")
    pulumi.export("recycleBinAll", all.recycle_bin_items)
    pulumi.export("recycleBinIds", [__item.id for __item in all.recycle_bin_items])
    pulumi.export("recycleBinSummary", {item.id: {
        "name": item.name,
        "resourceType": item.resource_type,
        "expires": item.expiration_timestamp,
    } for item in all.recycle_bin_items})
    
    Example coming soon!
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Powerstore = Pulumi.Powerstore;
    
    return await Deployment.RunAsync(() => 
    {
        //Copyright (c) 2026 Dell Inc., or its subsidiaries. All Rights Reserved.
        //
        //Licensed under the Mozilla Public License Version 2.0 (the "License");
        //you may not use this file except in compliance with the License.
        //You may obtain a copy of the License at
        //
        //    http://mozilla.org/MPL/2.0/
        //
        //
        //Unless required by applicable law or agreed to in writing, software
        //distributed under the License is distributed on an "AS IS" BASIS,
        //WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
        //See the License for the specific language governing permissions and
        //limitations under the License.
        // commands to run this tf file : terraform init && pulumi up --auto-approve
        // This datasource reads Recycle Bin items from the PowerStore array
        // If it is an empty datasource block, then it will read all recycle bin items
        // If id is provided then it reads a particular recycle bin item
        // If resource_type is provided, it filters by volume or volume_group
        // filter_expression can be used for advanced filtering
        // Fetch all recycle bin items
        var all = Powerstore.GetRecycleBin.Invoke();
    
        // Fetch recycle bin items filtered by resource type (volumes only)
        var volumesOnly = Powerstore.GetRecycleBin.Invoke(new()
        {
            ResourceType = "volume",
        });
    
        // Fetch recycle bin items filtered by resource type (volume groups only)
        var volumeGroupsOnly = Powerstore.GetRecycleBin.Invoke(new()
        {
            ResourceType = "volume_group",
        });
    
        // Fetch recycle bin items using filter expression
        var filtered = Powerstore.GetRecycleBin.Invoke(new()
        {
            FilterExpression = "resource_type=eq.volume",
        });
    
        return new Dictionary<string, object?>
        {
            ["recycleBinAll"] = all.Apply(getRecycleBinResult => getRecycleBinResult.RecycleBinItems),
            ["recycleBinIds"] = all.Apply(getRecycleBinResult => getRecycleBinResult.RecycleBinItems).Select(__item => __item.Id).ToList(),
            ["recycleBinSummary"] = .ToDictionary(item => {
                var item = item.Value;
                return item.Id;
            }, item => {
                var item = item.Value;
                return 
                {
                    { "name", item.Name },
                    { "resourceType", item.ResourceType },
                    { "expires", item.ExpirationTimestamp },
                };
            }),
        };
    });
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    

    Using getRecycleBin

    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 getRecycleBin(args: GetRecycleBinArgs, opts?: InvokeOptions): Promise<GetRecycleBinResult>
    function getRecycleBinOutput(args: GetRecycleBinOutputArgs, opts?: InvokeOptions): Output<GetRecycleBinResult>
    def get_recycle_bin(filter_expression: Optional[str] = None,
                        id: Optional[str] = None,
                        resource_type: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetRecycleBinResult
    def get_recycle_bin_output(filter_expression: pulumi.Input[Optional[str]] = None,
                        id: pulumi.Input[Optional[str]] = None,
                        resource_type: pulumi.Input[Optional[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetRecycleBinResult]
    func GetRecycleBin(ctx *Context, args *GetRecycleBinArgs, opts ...InvokeOption) (*GetRecycleBinResult, error)
    func GetRecycleBinOutput(ctx *Context, args *GetRecycleBinOutputArgs, opts ...InvokeOption) GetRecycleBinResultOutput

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

    public static class GetRecycleBin 
    {
        public static Task<GetRecycleBinResult> InvokeAsync(GetRecycleBinArgs args, InvokeOptions? opts = null)
        public static Output<GetRecycleBinResult> Invoke(GetRecycleBinInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetRecycleBinResult> getRecycleBin(GetRecycleBinArgs args, InvokeOptions options)
    public static Output<GetRecycleBinResult> getRecycleBin(GetRecycleBinArgs args, InvokeOptions options)
    
    fn::invoke:
      function: powerstore:index/getRecycleBin:getRecycleBin
      arguments:
        # arguments dictionary
    data "powerstore_getrecyclebin" "name" {
        # arguments
    }

    The following arguments are supported:

    FilterExpression string
    PowerStore filter expression to filter recycle bin items. Conflicts with id.
    Id string
    Unique identifier of a specific recycle bin item. Conflicts with resource_type and filter_expression.
    ResourceType string
    Filter recycle bin items by resource type. Valid values are volume and volume_group. Conflicts with id.
    FilterExpression string
    PowerStore filter expression to filter recycle bin items. Conflicts with id.
    Id string
    Unique identifier of a specific recycle bin item. Conflicts with resource_type and filter_expression.
    ResourceType string
    Filter recycle bin items by resource type. Valid values are volume and volume_group. Conflicts with id.
    filter_expression string
    PowerStore filter expression to filter recycle bin items. Conflicts with id.
    id string
    Unique identifier of a specific recycle bin item. Conflicts with resource_type and filter_expression.
    resource_type string
    Filter recycle bin items by resource type. Valid values are volume and volume_group. Conflicts with id.
    filterExpression String
    PowerStore filter expression to filter recycle bin items. Conflicts with id.
    id String
    Unique identifier of a specific recycle bin item. Conflicts with resource_type and filter_expression.
    resourceType String
    Filter recycle bin items by resource type. Valid values are volume and volume_group. Conflicts with id.
    filterExpression string
    PowerStore filter expression to filter recycle bin items. Conflicts with id.
    id string
    Unique identifier of a specific recycle bin item. Conflicts with resource_type and filter_expression.
    resourceType string
    Filter recycle bin items by resource type. Valid values are volume and volume_group. Conflicts with id.
    filter_expression str
    PowerStore filter expression to filter recycle bin items. Conflicts with id.
    id str
    Unique identifier of a specific recycle bin item. Conflicts with resource_type and filter_expression.
    resource_type str
    Filter recycle bin items by resource type. Valid values are volume and volume_group. Conflicts with id.
    filterExpression String
    PowerStore filter expression to filter recycle bin items. Conflicts with id.
    id String
    Unique identifier of a specific recycle bin item. Conflicts with resource_type and filter_expression.
    resourceType String
    Filter recycle bin items by resource type. Valid values are volume and volume_group. Conflicts with id.

    getRecycleBin Result

    The following output properties are available:

    Id string
    Unique identifier of a specific recycle bin item. Conflicts with resource_type and filter_expression.
    RecycleBinItems List<GetRecycleBinRecycleBinItem>
    List of recycle bin items.
    FilterExpression string
    PowerStore filter expression to filter recycle bin items. Conflicts with id.
    ResourceType string
    Filter recycle bin items by resource type. Valid values are volume and volume_group. Conflicts with id.
    Id string
    Unique identifier of a specific recycle bin item. Conflicts with resource_type and filter_expression.
    RecycleBinItems []GetRecycleBinRecycleBinItem
    List of recycle bin items.
    FilterExpression string
    PowerStore filter expression to filter recycle bin items. Conflicts with id.
    ResourceType string
    Filter recycle bin items by resource type. Valid values are volume and volume_group. Conflicts with id.
    id string
    Unique identifier of a specific recycle bin item. Conflicts with resource_type and filter_expression.
    recycle_bin_items list(object)
    List of recycle bin items.
    filter_expression string
    PowerStore filter expression to filter recycle bin items. Conflicts with id.
    resource_type string
    Filter recycle bin items by resource type. Valid values are volume and volume_group. Conflicts with id.
    id String
    Unique identifier of a specific recycle bin item. Conflicts with resource_type and filter_expression.
    recycleBinItems List<GetRecycleBinRecycleBinItem>
    List of recycle bin items.
    filterExpression String
    PowerStore filter expression to filter recycle bin items. Conflicts with id.
    resourceType String
    Filter recycle bin items by resource type. Valid values are volume and volume_group. Conflicts with id.
    id string
    Unique identifier of a specific recycle bin item. Conflicts with resource_type and filter_expression.
    recycleBinItems GetRecycleBinRecycleBinItem[]
    List of recycle bin items.
    filterExpression string
    PowerStore filter expression to filter recycle bin items. Conflicts with id.
    resourceType string
    Filter recycle bin items by resource type. Valid values are volume and volume_group. Conflicts with id.
    id str
    Unique identifier of a specific recycle bin item. Conflicts with resource_type and filter_expression.
    recycle_bin_items Sequence[GetRecycleBinRecycleBinItem]
    List of recycle bin items.
    filter_expression str
    PowerStore filter expression to filter recycle bin items. Conflicts with id.
    resource_type str
    Filter recycle bin items by resource type. Valid values are volume and volume_group. Conflicts with id.
    id String
    Unique identifier of a specific recycle bin item. Conflicts with resource_type and filter_expression.
    recycleBinItems List<Property Map>
    List of recycle bin items.
    filterExpression String
    PowerStore filter expression to filter recycle bin items. Conflicts with id.
    resourceType String
    Filter recycle bin items by resource type. Valid values are volume and volume_group. Conflicts with id.

    Supporting Types

    GetRecycleBinRecycleBinItem

    ApplianceId string
    The appliance where this resource is located.
    DeletionTimestamp string
    Time when the object was moved to the recycle bin.
    ExpirationTimestamp string
    Time when the object will be auto-purged.
    Id string
    Unique identifier for the recycle bin item.
    LogicalProvisioned double
    Provisioned size of the object in bytes.
    LogicalUsed double
    Logical space used by the object in bytes.
    Name string
    The name of the deleted object.
    ResourceType string
    Type of the storage object (volume or volume_group).
    ResourceTypeL10n string
    Localized message string corresponding to resource_type.
    ApplianceId string
    The appliance where this resource is located.
    DeletionTimestamp string
    Time when the object was moved to the recycle bin.
    ExpirationTimestamp string
    Time when the object will be auto-purged.
    Id string
    Unique identifier for the recycle bin item.
    LogicalProvisioned float64
    Provisioned size of the object in bytes.
    LogicalUsed float64
    Logical space used by the object in bytes.
    Name string
    The name of the deleted object.
    ResourceType string
    Type of the storage object (volume or volume_group).
    ResourceTypeL10n string
    Localized message string corresponding to resource_type.
    appliance_id string
    The appliance where this resource is located.
    deletion_timestamp string
    Time when the object was moved to the recycle bin.
    expiration_timestamp string
    Time when the object will be auto-purged.
    id string
    Unique identifier for the recycle bin item.
    logical_provisioned number
    Provisioned size of the object in bytes.
    logical_used number
    Logical space used by the object in bytes.
    name string
    The name of the deleted object.
    resource_type string
    Type of the storage object (volume or volume_group).
    resource_type_l10n string
    Localized message string corresponding to resource_type.
    applianceId String
    The appliance where this resource is located.
    deletionTimestamp String
    Time when the object was moved to the recycle bin.
    expirationTimestamp String
    Time when the object will be auto-purged.
    id String
    Unique identifier for the recycle bin item.
    logicalProvisioned Double
    Provisioned size of the object in bytes.
    logicalUsed Double
    Logical space used by the object in bytes.
    name String
    The name of the deleted object.
    resourceType String
    Type of the storage object (volume or volume_group).
    resourceTypeL10n String
    Localized message string corresponding to resource_type.
    applianceId string
    The appliance where this resource is located.
    deletionTimestamp string
    Time when the object was moved to the recycle bin.
    expirationTimestamp string
    Time when the object will be auto-purged.
    id string
    Unique identifier for the recycle bin item.
    logicalProvisioned number
    Provisioned size of the object in bytes.
    logicalUsed number
    Logical space used by the object in bytes.
    name string
    The name of the deleted object.
    resourceType string
    Type of the storage object (volume or volume_group).
    resourceTypeL10n string
    Localized message string corresponding to resource_type.
    appliance_id str
    The appliance where this resource is located.
    deletion_timestamp str
    Time when the object was moved to the recycle bin.
    expiration_timestamp str
    Time when the object will be auto-purged.
    id str
    Unique identifier for the recycle bin item.
    logical_provisioned float
    Provisioned size of the object in bytes.
    logical_used float
    Logical space used by the object in bytes.
    name str
    The name of the deleted object.
    resource_type str
    Type of the storage object (volume or volume_group).
    resource_type_l10n str
    Localized message string corresponding to resource_type.
    applianceId String
    The appliance where this resource is located.
    deletionTimestamp String
    Time when the object was moved to the recycle bin.
    expirationTimestamp String
    Time when the object will be auto-purged.
    id String
    Unique identifier for the recycle bin item.
    logicalProvisioned Number
    Provisioned size of the object in bytes.
    logicalUsed Number
    Logical space used by the object in bytes.
    name String
    The name of the deleted object.
    resourceType String
    Type of the storage object (volume or volume_group).
    resourceTypeL10n String
    Localized message string corresponding to resource_type.

    Package Details

    Repository
    powerstore dell/terraform-provider-powerstore
    License
    Notes
    This Pulumi package is based on the powerstore Terraform Provider.
    Viewing docs for powerstore 1.3.0
    published on Wednesday, Jun 24, 2026 by dell

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial