1. Registry
  2. Packages
  3. OVH
  4. API Docs
  5. getCloudInstanceSnapshot
Viewing docs for OVHCloud v2.21.0
published on Friday, Sep 25, 2026 by OVHcloud
ovh logo
Viewing docs for OVHCloud v2.21.0
published on Friday, Sep 25, 2026 by OVHcloud

    Use this data source to retrieve information about an instance snapshot in a public cloud project.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@ovhcloud/pulumi-ovh";
    
    const snapshot = ovh.getCloudInstanceSnapshot({
        serviceName: "<Public cloud project id>",
        id: "<snapshot id>",
    });
    export const snapshotStatus = snapshot.then(snapshot => snapshot.resourceStatus);
    
    import pulumi
    import pulumi_ovh as ovh
    
    snapshot = ovh.get_cloud_instance_snapshot(service_name="<Public cloud project id>",
        id="<snapshot id>")
    pulumi.export("snapshotStatus", snapshot.resource_status)
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		snapshot, err := ovh.LookupCloudInstanceSnapshot(ctx, &ovh.LookupCloudInstanceSnapshotArgs{
    			ServiceName: "<Public cloud project id>",
    			Id:          "<snapshot id>",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("snapshotStatus", snapshot.ResourceStatus)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ovh = Pulumi.Ovh;
    
    return await Deployment.RunAsync(() => 
    {
        var snapshot = Ovh.GetCloudInstanceSnapshot.Invoke(new()
        {
            ServiceName = "<Public cloud project id>",
            Id = "<snapshot id>",
        });
    
        return new Dictionary<string, object?>
        {
            ["snapshotStatus"] = snapshot.Apply(getCloudInstanceSnapshotResult => getCloudInstanceSnapshotResult.ResourceStatus),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ovh.OvhFunctions;
    import com.pulumi.ovh.inputs.GetCloudInstanceSnapshotArgs;
    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 snapshot = OvhFunctions.getCloudInstanceSnapshot(GetCloudInstanceSnapshotArgs.builder()
                .serviceName("<Public cloud project id>")
                .id("<snapshot id>")
                .build());
    
            ctx.export("snapshotStatus", snapshot.resourceStatus());
        }
    }
    
    variables:
      snapshot:
        fn::invoke:
          function: ovh:getCloudInstanceSnapshot
          arguments:
            serviceName: <Public cloud project id>
            id: <snapshot id>
    outputs:
      snapshotStatus: ${snapshot.resourceStatus}
    
    Example coming soon!
    

    Using getCloudInstanceSnapshot

    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 getCloudInstanceSnapshot(args: GetCloudInstanceSnapshotArgs, opts?: InvokeOptions): Promise<GetCloudInstanceSnapshotResult>
    function getCloudInstanceSnapshotOutput(args: GetCloudInstanceSnapshotOutputArgs, opts?: InvokeOutputOptions): Output<GetCloudInstanceSnapshotResult>
    def get_cloud_instance_snapshot(id: Optional[str] = None,
                                    service_name: Optional[str] = None,
                                    opts: Optional[InvokeOptions] = None) -> GetCloudInstanceSnapshotResult
    def get_cloud_instance_snapshot_output(id: pulumi.Input[Optional[str]] = None,
                                    service_name: pulumi.Input[Optional[str]] = None,
                                    opts: Optional[InvokeOutputOptions] = None) -> Output[GetCloudInstanceSnapshotResult]
    func LookupCloudInstanceSnapshot(ctx *Context, args *LookupCloudInstanceSnapshotArgs, opts ...InvokeOption) (*LookupCloudInstanceSnapshotResult, error)
    func LookupCloudInstanceSnapshotOutput(ctx *Context, args *LookupCloudInstanceSnapshotOutputArgs, opts ...InvokeOption) LookupCloudInstanceSnapshotResultOutput

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

    public static class GetCloudInstanceSnapshot 
    {
        public static Task<GetCloudInstanceSnapshotResult> InvokeAsync(GetCloudInstanceSnapshotArgs args, InvokeOptions? opts = null)
        public static Output<GetCloudInstanceSnapshotResult> Invoke(GetCloudInstanceSnapshotInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetCloudInstanceSnapshotResult> Invoke(GetCloudInstanceSnapshotInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetCloudInstanceSnapshotResult> getCloudInstanceSnapshot(GetCloudInstanceSnapshotArgs args, InvokeOptions options)
    public static Output<GetCloudInstanceSnapshotResult> getCloudInstanceSnapshot(GetCloudInstanceSnapshotArgs args, InvokeOptions options)
    public static Output<GetCloudInstanceSnapshotResult> getCloudInstanceSnapshot(GetCloudInstanceSnapshotArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: ovh:index/getCloudInstanceSnapshot:getCloudInstanceSnapshot
      arguments:
        # arguments dictionary
    data "ovh_get_cloud_instance_snapshot" "name" {
        # arguments
    }

    The following arguments are supported:

    Id string
    Snapshot ID.
    ServiceName string
    Service name of the resource representing the id of the cloud project.
    Id string
    Snapshot ID.
    ServiceName string
    Service name of the resource representing the id of the cloud project.
    id string
    Snapshot ID.
    service_name string
    Service name of the resource representing the id of the cloud project.
    id String
    Snapshot ID.
    serviceName String
    Service name of the resource representing the id of the cloud project.
    id string
    Snapshot ID.
    serviceName string
    Service name of the resource representing the id of the cloud project.
    id str
    Snapshot ID.
    service_name str
    Service name of the resource representing the id of the cloud project.
    id String
    Snapshot ID.
    serviceName String
    Service name of the resource representing the id of the cloud project.

    getCloudInstanceSnapshot Result

    The following output properties are available:

    Id string
    InstanceId string
    ID of the snapshotted instance.
    Location GetCloudInstanceSnapshotLocation
    Location of the snapshot:
    MinDisk int
    Minimum disk size in GB required to boot.
    MinRam int
    Minimum RAM in MB required to boot.
    Name string
    Snapshot name.
    ResourceStatus string
    Snapshot readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY).
    ServiceName string
    Size int
    Image size in bytes.
    Status string
    Image status in the backend.
    Visibility string
    Image visibility.
    Id string
    InstanceId string
    ID of the snapshotted instance.
    Location GetCloudInstanceSnapshotLocation
    Location of the snapshot:
    MinDisk int
    Minimum disk size in GB required to boot.
    MinRam int
    Minimum RAM in MB required to boot.
    Name string
    Snapshot name.
    ResourceStatus string
    Snapshot readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY).
    ServiceName string
    Size int
    Image size in bytes.
    Status string
    Image status in the backend.
    Visibility string
    Image visibility.
    id string
    instance_id string
    ID of the snapshotted instance.
    location object
    Location of the snapshot:
    min_disk number
    Minimum disk size in GB required to boot.
    min_ram number
    Minimum RAM in MB required to boot.
    name string
    Snapshot name.
    resource_status string
    Snapshot readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY).
    service_name string
    size number
    Image size in bytes.
    status string
    Image status in the backend.
    visibility string
    Image visibility.
    id String
    instanceId String
    ID of the snapshotted instance.
    location GetCloudInstanceSnapshotLocation
    Location of the snapshot:
    minDisk Integer
    Minimum disk size in GB required to boot.
    minRam Integer
    Minimum RAM in MB required to boot.
    name String
    Snapshot name.
    resourceStatus String
    Snapshot readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY).
    serviceName String
    size Integer
    Image size in bytes.
    status String
    Image status in the backend.
    visibility String
    Image visibility.
    id string
    instanceId string
    ID of the snapshotted instance.
    location GetCloudInstanceSnapshotLocation
    Location of the snapshot:
    minDisk number
    Minimum disk size in GB required to boot.
    minRam number
    Minimum RAM in MB required to boot.
    name string
    Snapshot name.
    resourceStatus string
    Snapshot readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY).
    serviceName string
    size number
    Image size in bytes.
    status string
    Image status in the backend.
    visibility string
    Image visibility.
    id str
    instance_id str
    ID of the snapshotted instance.
    location GetCloudInstanceSnapshotLocation
    Location of the snapshot:
    min_disk int
    Minimum disk size in GB required to boot.
    min_ram int
    Minimum RAM in MB required to boot.
    name str
    Snapshot name.
    resource_status str
    Snapshot readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY).
    service_name str
    size int
    Image size in bytes.
    status str
    Image status in the backend.
    visibility str
    Image visibility.
    id String
    instanceId String
    ID of the snapshotted instance.
    location Property Map
    Location of the snapshot:
    minDisk Number
    Minimum disk size in GB required to boot.
    minRam Number
    Minimum RAM in MB required to boot.
    name String
    Snapshot name.
    resourceStatus String
    Snapshot readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY).
    serviceName String
    size Number
    Image size in bytes.
    status String
    Image status in the backend.
    visibility String
    Image visibility.

    Supporting Types

    GetCloudInstanceSnapshotLocation

    Region string
    Region.
    Region string
    Region.
    region string
    Region.
    region String
    Region.
    region string
    Region.
    region str
    Region.
    region String
    Region.

    Package Details

    Repository
    ovh ovh/pulumi-ovh
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ovh Terraform Provider.
    ovh logo
    Viewing docs for OVHCloud v2.21.0
    published on Friday, Sep 25, 2026 by OVHcloud

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial