1. Registry
  2. Packages
  3. Powerflex Provider
  4. API Docs
  5. VolumeActionV2
Viewing docs for powerflex 1.9.0
published on Monday, Sep 28, 2026 by dell
Viewing docs for powerflex 1.9.0
published on Monday, Sep 28, 2026 by dell

    This resource performs actions on volumes for PowerFlex Gen2 systems (5.0+). Supported actions: refresh, restore, map_to_host, unmap_from_host.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as powerflex from "@pulumi/powerflex";
    
    // Copyright (c) 2024-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.
    // Refresh volume metadata
    const refresh = new powerflex.VolumeActionV2("refresh", {
        volumeId: "vol-abc123",
        action: "refresh",
    });
    // Restore volume from a snapshot
    const restore = new powerflex.VolumeActionV2("restore", {
        volumeId: "vol-abc123",
        action: "restore",
        sourceSnapshotId: "snap-def456",
    });
    // Map a volume to a host with read-write access
    const map = new powerflex.VolumeActionV2("map", {
        volumeId: "vol-abc123",
        action: "map_to_host",
        hostId: "host-ghi789",
        accessMode: "READ_WRITE",
    });
    // Unmap a volume from a host
    const unmap = new powerflex.VolumeActionV2("unmap", {
        volumeId: "vol-abc123",
        action: "unmap_from_host",
        hostId: "host-ghi789",
    });
    
    import pulumi
    import pulumi_powerflex as powerflex
    
    # Copyright (c) 2024-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.
    # Refresh volume metadata
    refresh = powerflex.VolumeActionV2("refresh",
        volume_id="vol-abc123",
        action="refresh")
    # Restore volume from a snapshot
    restore = powerflex.VolumeActionV2("restore",
        volume_id="vol-abc123",
        action="restore",
        source_snapshot_id="snap-def456")
    # Map a volume to a host with read-write access
    map = powerflex.VolumeActionV2("map",
        volume_id="vol-abc123",
        action="map_to_host",
        host_id="host-ghi789",
        access_mode="READ_WRITE")
    # Unmap a volume from a host
    unmap = powerflex.VolumeActionV2("unmap",
        volume_id="vol-abc123",
        action="unmap_from_host",
        host_id="host-ghi789")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/powerflex/powerflex"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Copyright (c) 2024-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.
    		// Refresh volume metadata
    		_, err := powerflex.NewVolumeActionV2(ctx, "refresh", &powerflex.VolumeActionV2Args{
    			VolumeId: pulumi.String("vol-abc123"),
    			Action:   pulumi.String("refresh"),
    		})
    		if err != nil {
    			return err
    		}
    		// Restore volume from a snapshot
    		_, err = powerflex.NewVolumeActionV2(ctx, "restore", &powerflex.VolumeActionV2Args{
    			VolumeId:         pulumi.String("vol-abc123"),
    			Action:           pulumi.String("restore"),
    			SourceSnapshotId: pulumi.String("snap-def456"),
    		})
    		if err != nil {
    			return err
    		}
    		// Map a volume to a host with read-write access
    		_, err = powerflex.NewVolumeActionV2(ctx, "map", &powerflex.VolumeActionV2Args{
    			VolumeId:   pulumi.String("vol-abc123"),
    			Action:     pulumi.String("map_to_host"),
    			HostId:     pulumi.String("host-ghi789"),
    			AccessMode: pulumi.String("READ_WRITE"),
    		})
    		if err != nil {
    			return err
    		}
    		// Unmap a volume from a host
    		_, err = powerflex.NewVolumeActionV2(ctx, "unmap", &powerflex.VolumeActionV2Args{
    			VolumeId: pulumi.String("vol-abc123"),
    			Action:   pulumi.String("unmap_from_host"),
    			HostId:   pulumi.String("host-ghi789"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Powerflex = Pulumi.Powerflex;
    
    return await Deployment.RunAsync(() => 
    {
        // Copyright (c) 2024-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.
        // Refresh volume metadata
        var refresh = new Powerflex.VolumeActionV2("refresh", new()
        {
            VolumeId = "vol-abc123",
            Action = "refresh",
        });
    
        // Restore volume from a snapshot
        var restore = new Powerflex.VolumeActionV2("restore", new()
        {
            VolumeId = "vol-abc123",
            Action = "restore",
            SourceSnapshotId = "snap-def456",
        });
    
        // Map a volume to a host with read-write access
        var map = new Powerflex.VolumeActionV2("map", new()
        {
            VolumeId = "vol-abc123",
            Action = "map_to_host",
            HostId = "host-ghi789",
            AccessMode = "READ_WRITE",
        });
    
        // Unmap a volume from a host
        var unmap = new Powerflex.VolumeActionV2("unmap", new()
        {
            VolumeId = "vol-abc123",
            Action = "unmap_from_host",
            HostId = "host-ghi789",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.powerflex.VolumeActionV2;
    import com.pulumi.powerflex.VolumeActionV2Args;
    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) {
            // Copyright (c) 2024-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.
            // Refresh volume metadata
            var refresh = new VolumeActionV2("refresh", VolumeActionV2Args.builder()
                .volumeId("vol-abc123")
                .action("refresh")
                .build());
    
            // Restore volume from a snapshot
            var restore = new VolumeActionV2("restore", VolumeActionV2Args.builder()
                .volumeId("vol-abc123")
                .action("restore")
                .sourceSnapshotId("snap-def456")
                .build());
    
            // Map a volume to a host with read-write access
            var map = new VolumeActionV2("map", VolumeActionV2Args.builder()
                .volumeId("vol-abc123")
                .action("map_to_host")
                .hostId("host-ghi789")
                .accessMode("READ_WRITE")
                .build());
    
            // Unmap a volume from a host
            var unmap = new VolumeActionV2("unmap", VolumeActionV2Args.builder()
                .volumeId("vol-abc123")
                .action("unmap_from_host")
                .hostId("host-ghi789")
                .build());
    
        }
    }
    
    resources:
      # Copyright (c) 2024-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.
    
      # Refresh volume metadata
      refresh:
        type: powerflex:VolumeActionV2
        properties:
          volumeId: vol-abc123
          action: refresh
      # Restore volume from a snapshot
      restore:
        type: powerflex:VolumeActionV2
        properties:
          volumeId: vol-abc123
          action: restore
          sourceSnapshotId: snap-def456
      # Map a volume to a host with read-write access
      map:
        type: powerflex:VolumeActionV2
        properties:
          volumeId: vol-abc123
          action: map_to_host
          hostId: host-ghi789
          accessMode: READ_WRITE
      # Unmap a volume from a host
      unmap:
        type: powerflex:VolumeActionV2
        properties:
          volumeId: vol-abc123
          action: unmap_from_host
          hostId: host-ghi789
    
    Example coming soon!
    

    Create VolumeActionV2 Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new VolumeActionV2(name: string, args: VolumeActionV2Args, opts?: CustomResourceOptions);
    @overload
    def VolumeActionV2(resource_name: str,
                       args: VolumeActionV2Args,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def VolumeActionV2(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       action: Optional[str] = None,
                       volume_id: Optional[str] = None,
                       access_mode: Optional[str] = None,
                       host_id: Optional[str] = None,
                       source_snapshot_id: Optional[str] = None)
    func NewVolumeActionV2(ctx *Context, name string, args VolumeActionV2Args, opts ...ResourceOption) (*VolumeActionV2, error)
    public VolumeActionV2(string name, VolumeActionV2Args args, CustomResourceOptions? opts = null)
    public VolumeActionV2(String name, VolumeActionV2Args args)
    public VolumeActionV2(String name, VolumeActionV2Args args, CustomResourceOptions options)
    
    type: powerflex:VolumeActionV2
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "powerflex_volume_action_v2" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args VolumeActionV2Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args VolumeActionV2Args
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args VolumeActionV2Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VolumeActionV2Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VolumeActionV2Args
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var volumeActionV2Resource = new Powerflex.VolumeActionV2("volumeActionV2Resource", new()
    {
        Action = "string",
        VolumeId = "string",
        AccessMode = "string",
        HostId = "string",
        SourceSnapshotId = "string",
    });
    
    example, err := powerflex.NewVolumeActionV2(ctx, "volumeActionV2Resource", &powerflex.VolumeActionV2Args{
    	Action:           pulumi.String("string"),
    	VolumeId:         pulumi.String("string"),
    	AccessMode:       pulumi.String("string"),
    	HostId:           pulumi.String("string"),
    	SourceSnapshotId: pulumi.String("string"),
    })
    
    resource "powerflex_volume_action_v2" "volumeActionV2Resource" {
      lifecycle {
        create_before_destroy = true
      }
      action             = "string"
      volume_id          = "string"
      access_mode        = "string"
      host_id            = "string"
      source_snapshot_id = "string"
    }
    
    var volumeActionV2Resource = new VolumeActionV2("volumeActionV2Resource", VolumeActionV2Args.builder()
        .action("string")
        .volumeId("string")
        .accessMode("string")
        .hostId("string")
        .sourceSnapshotId("string")
        .build());
    
    volume_action_v2_resource = powerflex.VolumeActionV2("volumeActionV2Resource",
        action="string",
        volume_id="string",
        access_mode="string",
        host_id="string",
        source_snapshot_id="string")
    
    const volumeActionV2Resource = new powerflex.VolumeActionV2("volumeActionV2Resource", {
        action: "string",
        volumeId: "string",
        accessMode: "string",
        hostId: "string",
        sourceSnapshotId: "string",
    });
    
    type: powerflex:VolumeActionV2
    properties:
        accessMode: string
        action: string
        hostId: string
        sourceSnapshotId: string
        volumeId: string
    

    VolumeActionV2 Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The VolumeActionV2 resource accepts the following input properties:

    Action string
    The action to perform. Valid values: refresh, restore, map_to_host, unmap_from_host.
    VolumeId string
    The ID of the volume to perform the action on.
    AccessMode string
    Access mode for map_to_host action. Valid values: READ_ONLY, READ_WRITE.
    HostId string
    Host ID for map_to_host and unmap_from_host actions.
    SourceSnapshotId string
    Source snapshot ID for restore action.
    Action string
    The action to perform. Valid values: refresh, restore, map_to_host, unmap_from_host.
    VolumeId string
    The ID of the volume to perform the action on.
    AccessMode string
    Access mode for map_to_host action. Valid values: READ_ONLY, READ_WRITE.
    HostId string
    Host ID for map_to_host and unmap_from_host actions.
    SourceSnapshotId string
    Source snapshot ID for restore action.
    action string
    The action to perform. Valid values: refresh, restore, map_to_host, unmap_from_host.
    volume_id string
    The ID of the volume to perform the action on.
    access_mode string
    Access mode for map_to_host action. Valid values: READ_ONLY, READ_WRITE.
    host_id string
    Host ID for map_to_host and unmap_from_host actions.
    source_snapshot_id string
    Source snapshot ID for restore action.
    action String
    The action to perform. Valid values: refresh, restore, map_to_host, unmap_from_host.
    volumeId String
    The ID of the volume to perform the action on.
    accessMode String
    Access mode for map_to_host action. Valid values: READ_ONLY, READ_WRITE.
    hostId String
    Host ID for map_to_host and unmap_from_host actions.
    sourceSnapshotId String
    Source snapshot ID for restore action.
    action string
    The action to perform. Valid values: refresh, restore, map_to_host, unmap_from_host.
    volumeId string
    The ID of the volume to perform the action on.
    accessMode string
    Access mode for map_to_host action. Valid values: READ_ONLY, READ_WRITE.
    hostId string
    Host ID for map_to_host and unmap_from_host actions.
    sourceSnapshotId string
    Source snapshot ID for restore action.
    action str
    The action to perform. Valid values: refresh, restore, map_to_host, unmap_from_host.
    volume_id str
    The ID of the volume to perform the action on.
    access_mode str
    Access mode for map_to_host action. Valid values: READ_ONLY, READ_WRITE.
    host_id str
    Host ID for map_to_host and unmap_from_host actions.
    source_snapshot_id str
    Source snapshot ID for restore action.
    action String
    The action to perform. Valid values: refresh, restore, map_to_host, unmap_from_host.
    volumeId String
    The ID of the volume to perform the action on.
    accessMode String
    Access mode for map_to_host action. Valid values: READ_ONLY, READ_WRITE.
    hostId String
    Host ID for map_to_host and unmap_from_host actions.
    sourceSnapshotId String
    Source snapshot ID for restore action.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the VolumeActionV2 resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing VolumeActionV2 Resource

    Get an existing VolumeActionV2 resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: VolumeActionV2State, opts?: CustomResourceOptions): VolumeActionV2
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            access_mode: Optional[str] = None,
            action: Optional[str] = None,
            host_id: Optional[str] = None,
            source_snapshot_id: Optional[str] = None,
            volume_id: Optional[str] = None) -> VolumeActionV2
    func GetVolumeActionV2(ctx *Context, name string, id IDInput, state *VolumeActionV2State, opts ...ResourceOption) (*VolumeActionV2, error)
    public static VolumeActionV2 Get(string name, Input<string> id, VolumeActionV2State? state, CustomResourceOptions? opts = null)
    public static VolumeActionV2 get(String name, Output<String> id, VolumeActionV2State state, CustomResourceOptions options)
    resources:  _:    type: powerflex:VolumeActionV2    get:      id: ${id}
    import {
      to = powerflex_volume_action_v2.example
      id = "${id}"
    }
    
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AccessMode string
    Access mode for map_to_host action. Valid values: READ_ONLY, READ_WRITE.
    Action string
    The action to perform. Valid values: refresh, restore, map_to_host, unmap_from_host.
    HostId string
    Host ID for map_to_host and unmap_from_host actions.
    SourceSnapshotId string
    Source snapshot ID for restore action.
    VolumeId string
    The ID of the volume to perform the action on.
    AccessMode string
    Access mode for map_to_host action. Valid values: READ_ONLY, READ_WRITE.
    Action string
    The action to perform. Valid values: refresh, restore, map_to_host, unmap_from_host.
    HostId string
    Host ID for map_to_host and unmap_from_host actions.
    SourceSnapshotId string
    Source snapshot ID for restore action.
    VolumeId string
    The ID of the volume to perform the action on.
    access_mode string
    Access mode for map_to_host action. Valid values: READ_ONLY, READ_WRITE.
    action string
    The action to perform. Valid values: refresh, restore, map_to_host, unmap_from_host.
    host_id string
    Host ID for map_to_host and unmap_from_host actions.
    source_snapshot_id string
    Source snapshot ID for restore action.
    volume_id string
    The ID of the volume to perform the action on.
    accessMode String
    Access mode for map_to_host action. Valid values: READ_ONLY, READ_WRITE.
    action String
    The action to perform. Valid values: refresh, restore, map_to_host, unmap_from_host.
    hostId String
    Host ID for map_to_host and unmap_from_host actions.
    sourceSnapshotId String
    Source snapshot ID for restore action.
    volumeId String
    The ID of the volume to perform the action on.
    accessMode string
    Access mode for map_to_host action. Valid values: READ_ONLY, READ_WRITE.
    action string
    The action to perform. Valid values: refresh, restore, map_to_host, unmap_from_host.
    hostId string
    Host ID for map_to_host and unmap_from_host actions.
    sourceSnapshotId string
    Source snapshot ID for restore action.
    volumeId string
    The ID of the volume to perform the action on.
    access_mode str
    Access mode for map_to_host action. Valid values: READ_ONLY, READ_WRITE.
    action str
    The action to perform. Valid values: refresh, restore, map_to_host, unmap_from_host.
    host_id str
    Host ID for map_to_host and unmap_from_host actions.
    source_snapshot_id str
    Source snapshot ID for restore action.
    volume_id str
    The ID of the volume to perform the action on.
    accessMode String
    Access mode for map_to_host action. Valid values: READ_ONLY, READ_WRITE.
    action String
    The action to perform. Valid values: refresh, restore, map_to_host, unmap_from_host.
    hostId String
    Host ID for map_to_host and unmap_from_host actions.
    sourceSnapshotId String
    Source snapshot ID for restore action.
    volumeId String
    The ID of the volume to perform the action on.

    Package Details

    Repository
    powerflex dell/terraform-provider-powerflex
    License
    Notes
    This Pulumi package is based on the powerflex Terraform Provider.
    Viewing docs for powerflex 1.9.0
    published on Monday, Sep 28, 2026 by dell

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial