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

ibm.getIsSnapshotClone

Explore with Pulumi AI

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

    Import the details of an existing IBM Cloud infrastructure snapshot’s clone in a zone as a read-only data source. You can then reference the fields of the data source in other resources within the same configuration using interpolation syntax, see viewing snapshots.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const dsSnapshotclone = ibm.getIsSnapshotClone({
        snapshot: "xxxx-xxxx-xxxx-xxxx-xxxx",
        zone: "us-south-1",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    ds_snapshotclone = ibm.get_is_snapshot_clone(snapshot="xxxx-xxxx-xxxx-xxxx-xxxx",
        zone="us-south-1")
    
    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.GetIsSnapshotClone(ctx, &ibm.GetIsSnapshotCloneArgs{
    			Snapshot: "xxxx-xxxx-xxxx-xxxx-xxxx",
    			Zone:     "us-south-1",
    		}, 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 dsSnapshotclone = Ibm.GetIsSnapshotClone.Invoke(new()
        {
            Snapshot = "xxxx-xxxx-xxxx-xxxx-xxxx",
            Zone = "us-south-1",
        });
    
    });
    
    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.GetIsSnapshotCloneArgs;
    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 dsSnapshotclone = IbmFunctions.getIsSnapshotClone(GetIsSnapshotCloneArgs.builder()
                .snapshot("xxxx-xxxx-xxxx-xxxx-xxxx")
                .zone("us-south-1")
                .build());
    
        }
    }
    
    variables:
      dsSnapshotclone:
        fn::invoke:
          function: ibm:getIsSnapshotClone
          arguments:
            snapshot: xxxx-xxxx-xxxx-xxxx-xxxx
            zone: us-south-1
    

    Using getIsSnapshotClone

    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 getIsSnapshotClone(args: GetIsSnapshotCloneArgs, opts?: InvokeOptions): Promise<GetIsSnapshotCloneResult>
    function getIsSnapshotCloneOutput(args: GetIsSnapshotCloneOutputArgs, opts?: InvokeOptions): Output<GetIsSnapshotCloneResult>
    def get_is_snapshot_clone(id: Optional[str] = None,
                              snapshot: Optional[str] = None,
                              zone: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetIsSnapshotCloneResult
    def get_is_snapshot_clone_output(id: Optional[pulumi.Input[str]] = None,
                              snapshot: Optional[pulumi.Input[str]] = None,
                              zone: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetIsSnapshotCloneResult]
    func GetIsSnapshotClone(ctx *Context, args *GetIsSnapshotCloneArgs, opts ...InvokeOption) (*GetIsSnapshotCloneResult, error)
    func GetIsSnapshotCloneOutput(ctx *Context, args *GetIsSnapshotCloneOutputArgs, opts ...InvokeOption) GetIsSnapshotCloneResultOutput

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

    public static class GetIsSnapshotClone 
    {
        public static Task<GetIsSnapshotCloneResult> InvokeAsync(GetIsSnapshotCloneArgs args, InvokeOptions? opts = null)
        public static Output<GetIsSnapshotCloneResult> Invoke(GetIsSnapshotCloneInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetIsSnapshotCloneResult> getIsSnapshotClone(GetIsSnapshotCloneArgs args, InvokeOptions options)
    public static Output<GetIsSnapshotCloneResult> getIsSnapshotClone(GetIsSnapshotCloneArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getIsSnapshotClone:getIsSnapshotClone
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Snapshot string
    The unique identifier of the snapshot.
    Zone string
    The zone in which clone resides in.
    Id string
    (String) The zone this snapshot clone resides in.
    Snapshot string
    The unique identifier of the snapshot.
    Zone string
    The zone in which clone resides in.
    Id string
    (String) The zone this snapshot clone resides in.
    snapshot String
    The unique identifier of the snapshot.
    zone String
    The zone in which clone resides in.
    id String
    (String) The zone this snapshot clone resides in.
    snapshot string
    The unique identifier of the snapshot.
    zone string
    The zone in which clone resides in.
    id string
    (String) The zone this snapshot clone resides in.
    snapshot str
    The unique identifier of the snapshot.
    zone str
    The zone in which clone resides in.
    id str
    (String) The zone this snapshot clone resides in.
    snapshot String
    The unique identifier of the snapshot.
    zone String
    The zone in which clone resides in.
    id String
    (String) The zone this snapshot clone resides in.

    getIsSnapshotClone Result

    The following output properties are available:

    Available bool
    (Bool) Indicates whether this snapshot clone is available for use.
    CreatedAt string
    (String) The date and time that this snapshot clone was created.
    Id string
    (String) The zone this snapshot clone resides in.
    Snapshot string
    Zone string
    (String) The zone this snapshot clone resides in.
    Available bool
    (Bool) Indicates whether this snapshot clone is available for use.
    CreatedAt string
    (String) The date and time that this snapshot clone was created.
    Id string
    (String) The zone this snapshot clone resides in.
    Snapshot string
    Zone string
    (String) The zone this snapshot clone resides in.
    available Boolean
    (Bool) Indicates whether this snapshot clone is available for use.
    createdAt String
    (String) The date and time that this snapshot clone was created.
    id String
    (String) The zone this snapshot clone resides in.
    snapshot String
    zone String
    (String) The zone this snapshot clone resides in.
    available boolean
    (Bool) Indicates whether this snapshot clone is available for use.
    createdAt string
    (String) The date and time that this snapshot clone was created.
    id string
    (String) The zone this snapshot clone resides in.
    snapshot string
    zone string
    (String) The zone this snapshot clone resides in.
    available bool
    (Bool) Indicates whether this snapshot clone is available for use.
    created_at str
    (String) The date and time that this snapshot clone was created.
    id str
    (String) The zone this snapshot clone resides in.
    snapshot str
    zone str
    (String) The zone this snapshot clone resides in.
    available Boolean
    (Bool) Indicates whether this snapshot clone is available for use.
    createdAt String
    (String) The date and time that this snapshot clone was created.
    id String
    (String) The zone this snapshot clone resides in.
    snapshot String
    zone String
    (String) The zone this snapshot clone resides in.

    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