1. Packages
  2. Ibm Provider
  3. API Docs
  4. getPiVolumeSnapshots
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.getPiVolumeSnapshots

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    Retrieve information about your volume snapshots.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const snapshots = ibm.getPiVolumeSnapshots({
        piCloudInstanceId: "<value of the cloud_instance_id>",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    snapshots = ibm.get_pi_volume_snapshots(pi_cloud_instance_id="<value of the cloud_instance_id>")
    
    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.GetPiVolumeSnapshots(ctx, &ibm.GetPiVolumeSnapshotsArgs{
    			PiCloudInstanceId: "<value of the cloud_instance_id>",
    		}, 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 snapshots = Ibm.GetPiVolumeSnapshots.Invoke(new()
        {
            PiCloudInstanceId = "<value of the cloud_instance_id>",
        });
    
    });
    
    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.GetPiVolumeSnapshotsArgs;
    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 snapshots = IbmFunctions.getPiVolumeSnapshots(GetPiVolumeSnapshotsArgs.builder()
                .piCloudInstanceId("<value of the cloud_instance_id>")
                .build());
    
        }
    }
    
    variables:
      snapshots:
        fn::invoke:
          function: ibm:getPiVolumeSnapshots
          arguments:
            piCloudInstanceId: <value of the cloud_instance_id>
    

    Notes

    • Please find supported Regions for endpoints.
    • If a Power cloud instance is provisioned at lon04, The provider level attributes should be as follows:
      • region - lon
      • zone - lon04

    Example usage:

    import * as pulumi from "@pulumi/pulumi";
    
    import pulumi
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    
    return await Deployment.RunAsync(() => 
    {
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    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) {
        }
    }
    
    {}
    

    Using getPiVolumeSnapshots

    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 getPiVolumeSnapshots(args: GetPiVolumeSnapshotsArgs, opts?: InvokeOptions): Promise<GetPiVolumeSnapshotsResult>
    function getPiVolumeSnapshotsOutput(args: GetPiVolumeSnapshotsOutputArgs, opts?: InvokeOptions): Output<GetPiVolumeSnapshotsResult>
    def get_pi_volume_snapshots(id: Optional[str] = None,
                                pi_cloud_instance_id: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetPiVolumeSnapshotsResult
    def get_pi_volume_snapshots_output(id: Optional[pulumi.Input[str]] = None,
                                pi_cloud_instance_id: Optional[pulumi.Input[str]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetPiVolumeSnapshotsResult]
    func GetPiVolumeSnapshots(ctx *Context, args *GetPiVolumeSnapshotsArgs, opts ...InvokeOption) (*GetPiVolumeSnapshotsResult, error)
    func GetPiVolumeSnapshotsOutput(ctx *Context, args *GetPiVolumeSnapshotsOutputArgs, opts ...InvokeOption) GetPiVolumeSnapshotsResultOutput

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

    public static class GetPiVolumeSnapshots 
    {
        public static Task<GetPiVolumeSnapshotsResult> InvokeAsync(GetPiVolumeSnapshotsArgs args, InvokeOptions? opts = null)
        public static Output<GetPiVolumeSnapshotsResult> Invoke(GetPiVolumeSnapshotsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPiVolumeSnapshotsResult> getPiVolumeSnapshots(GetPiVolumeSnapshotsArgs args, InvokeOptions options)
    public static Output<GetPiVolumeSnapshotsResult> getPiVolumeSnapshots(GetPiVolumeSnapshotsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getPiVolumeSnapshots:getPiVolumeSnapshots
      arguments:
        # arguments dictionary

    The following arguments are supported:

    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    Id string
    (String) The volume snapshot UUID.
    PiCloudInstanceId string
    The GUID of the service instance associated with an account.
    Id string
    (String) The volume snapshot UUID.
    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    id String
    (String) The volume snapshot UUID.
    piCloudInstanceId string
    The GUID of the service instance associated with an account.
    id string
    (String) The volume snapshot UUID.
    pi_cloud_instance_id str
    The GUID of the service instance associated with an account.
    id str
    (String) The volume snapshot UUID.
    piCloudInstanceId String
    The GUID of the service instance associated with an account.
    id String
    (String) The volume snapshot UUID.

    getPiVolumeSnapshots Result

    The following output properties are available:

    Id string
    (String) The volume snapshot UUID.
    PiCloudInstanceId string
    VolumeSnapshots List<GetPiVolumeSnapshotsVolumeSnapshot>
    (List) The list of volume snapshots.
    Id string
    (String) The volume snapshot UUID.
    PiCloudInstanceId string
    VolumeSnapshots []GetPiVolumeSnapshotsVolumeSnapshot
    (List) The list of volume snapshots.
    id String
    (String) The volume snapshot UUID.
    piCloudInstanceId String
    volumeSnapshots List<GetPiVolumeSnapshotsVolumeSnapshot>
    (List) The list of volume snapshots.
    id string
    (String) The volume snapshot UUID.
    piCloudInstanceId string
    volumeSnapshots GetPiVolumeSnapshotsVolumeSnapshot[]
    (List) The list of volume snapshots.
    id str
    (String) The volume snapshot UUID.
    pi_cloud_instance_id str
    volume_snapshots Sequence[GetPiVolumeSnapshotsVolumeSnapshot]
    (List) The list of volume snapshots.
    id String
    (String) The volume snapshot UUID.
    piCloudInstanceId String
    volumeSnapshots List<Property Map>
    (List) The list of volume snapshots.

    Supporting Types

    GetPiVolumeSnapshotsVolumeSnapshot

    CreationDate string
    (String) The date and time when the volume snapshot was created.
    Crn string
    (Deprecated, String) The CRN of the volume snapshot.
    Id string
    (String) The volume snapshot UUID.
    Name string
    (String) The volume snapshot name.
    Size double
    (Float) The size of the volume snapshot, in gibibytes (GiB).
    Status string
    (String) The status for the volume snapshot.
    UpdatedDate string
    (String) The date and time when the volume snapshot was last updated.
    VolumeId string
    (String) The volume UUID associated with the snapshot.
    CreationDate string
    (String) The date and time when the volume snapshot was created.
    Crn string
    (Deprecated, String) The CRN of the volume snapshot.
    Id string
    (String) The volume snapshot UUID.
    Name string
    (String) The volume snapshot name.
    Size float64
    (Float) The size of the volume snapshot, in gibibytes (GiB).
    Status string
    (String) The status for the volume snapshot.
    UpdatedDate string
    (String) The date and time when the volume snapshot was last updated.
    VolumeId string
    (String) The volume UUID associated with the snapshot.
    creationDate String
    (String) The date and time when the volume snapshot was created.
    crn String
    (Deprecated, String) The CRN of the volume snapshot.
    id String
    (String) The volume snapshot UUID.
    name String
    (String) The volume snapshot name.
    size Double
    (Float) The size of the volume snapshot, in gibibytes (GiB).
    status String
    (String) The status for the volume snapshot.
    updatedDate String
    (String) The date and time when the volume snapshot was last updated.
    volumeId String
    (String) The volume UUID associated with the snapshot.
    creationDate string
    (String) The date and time when the volume snapshot was created.
    crn string
    (Deprecated, String) The CRN of the volume snapshot.
    id string
    (String) The volume snapshot UUID.
    name string
    (String) The volume snapshot name.
    size number
    (Float) The size of the volume snapshot, in gibibytes (GiB).
    status string
    (String) The status for the volume snapshot.
    updatedDate string
    (String) The date and time when the volume snapshot was last updated.
    volumeId string
    (String) The volume UUID associated with the snapshot.
    creation_date str
    (String) The date and time when the volume snapshot was created.
    crn str
    (Deprecated, String) The CRN of the volume snapshot.
    id str
    (String) The volume snapshot UUID.
    name str
    (String) The volume snapshot name.
    size float
    (Float) The size of the volume snapshot, in gibibytes (GiB).
    status str
    (String) The status for the volume snapshot.
    updated_date str
    (String) The date and time when the volume snapshot was last updated.
    volume_id str
    (String) The volume UUID associated with the snapshot.
    creationDate String
    (String) The date and time when the volume snapshot was created.
    crn String
    (Deprecated, String) The CRN of the volume snapshot.
    id String
    (String) The volume snapshot UUID.
    name String
    (String) The volume snapshot name.
    size Number
    (Float) The size of the volume snapshot, in gibibytes (GiB).
    status String
    (String) The status for the volume snapshot.
    updatedDate String
    (String) The date and time when the volume snapshot was last updated.
    volumeId String
    (String) The volume UUID associated with the snapshot.

    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.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud