1. Packages
  2. OVH
  3. API Docs
  4. CloudProject
  5. InstanceSnapshot
OVHCloud v2.1.1 published on Thursday, Apr 10, 2025 by OVHcloud

ovh.CloudProject.InstanceSnapshot

Explore with Pulumi AI

Create and manage snapshots for an instance in a public cloud project.

import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@ovhcloud/pulumi-ovh";

const snapshot = new ovh.cloudproject.InstanceSnapshot("snapshot", {
    instanceId: "<instance ID>",
    serviceName: "<public cloud project ID>",
});
Copy
import pulumi
import pulumi_ovh as ovh

snapshot = ovh.cloud_project.InstanceSnapshot("snapshot",
    instance_id="<instance ID>",
    service_name="<public cloud project ID>")
Copy
package main

import (
	"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh/cloudproject"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cloudproject.NewInstanceSnapshot(ctx, "snapshot", &cloudproject.InstanceSnapshotArgs{
			InstanceId:  pulumi.String("<instance ID>"),
			ServiceName: pulumi.String("<public cloud project ID>"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ovh = Pulumi.Ovh;

return await Deployment.RunAsync(() => 
{
    var snapshot = new Ovh.CloudProject.InstanceSnapshot("snapshot", new()
    {
        InstanceId = "<instance ID>",
        ServiceName = "<public cloud project ID>",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.ovhcloud.pulumi.ovh.CloudProject.InstanceSnapshot;
import com.ovhcloud.pulumi.ovh.CloudProject.InstanceSnapshotArgs;
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) {
        var snapshot = new InstanceSnapshot("snapshot", InstanceSnapshotArgs.builder()
            .instanceId("<instance ID>")
            .serviceName("<public cloud project ID>")
            .build());

    }
}
Copy
resources:
  snapshot:
    type: ovh:CloudProject:InstanceSnapshot
    properties:
      instanceId: <instance ID>
      serviceName: <public cloud project ID>
Copy

Create InstanceSnapshot Resource

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

Constructor syntax

new InstanceSnapshot(name: string, args: InstanceSnapshotArgs, opts?: CustomResourceOptions);
@overload
def InstanceSnapshot(resource_name: str,
                     args: InstanceSnapshotArgs,
                     opts: Optional[ResourceOptions] = None)

@overload
def InstanceSnapshot(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     instance_id: Optional[str] = None,
                     service_name: Optional[str] = None,
                     name: Optional[str] = None)
func NewInstanceSnapshot(ctx *Context, name string, args InstanceSnapshotArgs, opts ...ResourceOption) (*InstanceSnapshot, error)
public InstanceSnapshot(string name, InstanceSnapshotArgs args, CustomResourceOptions? opts = null)
public InstanceSnapshot(String name, InstanceSnapshotArgs args)
public InstanceSnapshot(String name, InstanceSnapshotArgs args, CustomResourceOptions options)
type: ovh:CloudProject:InstanceSnapshot
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. InstanceSnapshotArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. InstanceSnapshotArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. InstanceSnapshotArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. InstanceSnapshotArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. InstanceSnapshotArgs
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 instanceSnapshotResource = new Ovh.CloudProject.InstanceSnapshot("instanceSnapshotResource", new()
{
    InstanceId = "string",
    ServiceName = "string",
    Name = "string",
});
Copy
example, err := CloudProject.NewInstanceSnapshot(ctx, "instanceSnapshotResource", &CloudProject.InstanceSnapshotArgs{
	InstanceId:  pulumi.String("string"),
	ServiceName: pulumi.String("string"),
	Name:        pulumi.String("string"),
})
Copy
var instanceSnapshotResource = new InstanceSnapshot("instanceSnapshotResource", InstanceSnapshotArgs.builder()
    .instanceId("string")
    .serviceName("string")
    .name("string")
    .build());
Copy
instance_snapshot_resource = ovh.cloud_project.InstanceSnapshot("instanceSnapshotResource",
    instance_id="string",
    service_name="string",
    name="string")
Copy
const instanceSnapshotResource = new ovh.cloudproject.InstanceSnapshot("instanceSnapshotResource", {
    instanceId: "string",
    serviceName: "string",
    name: "string",
});
Copy
type: ovh:CloudProject:InstanceSnapshot
properties:
    instanceId: string
    name: string
    serviceName: string
Copy

InstanceSnapshot 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 InstanceSnapshot resource accepts the following input properties:

InstanceId This property is required. string
Instance ID
ServiceName This property is required. string
Service name
Name string
Snapshot name
InstanceId This property is required. string
Instance ID
ServiceName This property is required. string
Service name
Name string
Snapshot name
instanceId This property is required. String
Instance ID
serviceName This property is required. String
Service name
name String
Snapshot name
instanceId This property is required. string
Instance ID
serviceName This property is required. string
Service name
name string
Snapshot name
instance_id This property is required. str
Instance ID
service_name This property is required. str
Service name
name str
Snapshot name
instanceId This property is required. String
Instance ID
serviceName This property is required. String
Service name
name String
Snapshot name

Outputs

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

CreationDate string
Image creation date
FlavorType string
Image usable only for this type of flavor if not null
Id string
The provider-assigned unique ID for this managed resource.
MinDisk double
Minimum disks required to use image
MinRam double
Minimum RAM required to use image
PlanCode string
Order plan code
Region string
Image region
Size double
Image size (in GiB)
Status string
Image status
Tags List<string>
Tags about the image
Type string
Image type
User string
User to connect with
Visibility string
Image visibility
CreationDate string
Image creation date
FlavorType string
Image usable only for this type of flavor if not null
Id string
The provider-assigned unique ID for this managed resource.
MinDisk float64
Minimum disks required to use image
MinRam float64
Minimum RAM required to use image
PlanCode string
Order plan code
Region string
Image region
Size float64
Image size (in GiB)
Status string
Image status
Tags []string
Tags about the image
Type string
Image type
User string
User to connect with
Visibility string
Image visibility
creationDate String
Image creation date
flavorType String
Image usable only for this type of flavor if not null
id String
The provider-assigned unique ID for this managed resource.
minDisk Double
Minimum disks required to use image
minRam Double
Minimum RAM required to use image
planCode String
Order plan code
region String
Image region
size Double
Image size (in GiB)
status String
Image status
tags List<String>
Tags about the image
type String
Image type
user String
User to connect with
visibility String
Image visibility
creationDate string
Image creation date
flavorType string
Image usable only for this type of flavor if not null
id string
The provider-assigned unique ID for this managed resource.
minDisk number
Minimum disks required to use image
minRam number
Minimum RAM required to use image
planCode string
Order plan code
region string
Image region
size number
Image size (in GiB)
status string
Image status
tags string[]
Tags about the image
type string
Image type
user string
User to connect with
visibility string
Image visibility
creation_date str
Image creation date
flavor_type str
Image usable only for this type of flavor if not null
id str
The provider-assigned unique ID for this managed resource.
min_disk float
Minimum disks required to use image
min_ram float
Minimum RAM required to use image
plan_code str
Order plan code
region str
Image region
size float
Image size (in GiB)
status str
Image status
tags Sequence[str]
Tags about the image
type str
Image type
user str
User to connect with
visibility str
Image visibility
creationDate String
Image creation date
flavorType String
Image usable only for this type of flavor if not null
id String
The provider-assigned unique ID for this managed resource.
minDisk Number
Minimum disks required to use image
minRam Number
Minimum RAM required to use image
planCode String
Order plan code
region String
Image region
size Number
Image size (in GiB)
status String
Image status
tags List<String>
Tags about the image
type String
Image type
user String
User to connect with
visibility String
Image visibility

Look up Existing InstanceSnapshot Resource

Get an existing InstanceSnapshot 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?: InstanceSnapshotState, opts?: CustomResourceOptions): InstanceSnapshot
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        creation_date: Optional[str] = None,
        flavor_type: Optional[str] = None,
        instance_id: Optional[str] = None,
        min_disk: Optional[float] = None,
        min_ram: Optional[float] = None,
        name: Optional[str] = None,
        plan_code: Optional[str] = None,
        region: Optional[str] = None,
        service_name: Optional[str] = None,
        size: Optional[float] = None,
        status: Optional[str] = None,
        tags: Optional[Sequence[str]] = None,
        type: Optional[str] = None,
        user: Optional[str] = None,
        visibility: Optional[str] = None) -> InstanceSnapshot
func GetInstanceSnapshot(ctx *Context, name string, id IDInput, state *InstanceSnapshotState, opts ...ResourceOption) (*InstanceSnapshot, error)
public static InstanceSnapshot Get(string name, Input<string> id, InstanceSnapshotState? state, CustomResourceOptions? opts = null)
public static InstanceSnapshot get(String name, Output<String> id, InstanceSnapshotState state, CustomResourceOptions options)
resources:  _:    type: ovh:CloudProject:InstanceSnapshot    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
CreationDate string
Image creation date
FlavorType string
Image usable only for this type of flavor if not null
InstanceId string
Instance ID
MinDisk double
Minimum disks required to use image
MinRam double
Minimum RAM required to use image
Name string
Snapshot name
PlanCode string
Order plan code
Region string
Image region
ServiceName string
Service name
Size double
Image size (in GiB)
Status string
Image status
Tags List<string>
Tags about the image
Type string
Image type
User string
User to connect with
Visibility string
Image visibility
CreationDate string
Image creation date
FlavorType string
Image usable only for this type of flavor if not null
InstanceId string
Instance ID
MinDisk float64
Minimum disks required to use image
MinRam float64
Minimum RAM required to use image
Name string
Snapshot name
PlanCode string
Order plan code
Region string
Image region
ServiceName string
Service name
Size float64
Image size (in GiB)
Status string
Image status
Tags []string
Tags about the image
Type string
Image type
User string
User to connect with
Visibility string
Image visibility
creationDate String
Image creation date
flavorType String
Image usable only for this type of flavor if not null
instanceId String
Instance ID
minDisk Double
Minimum disks required to use image
minRam Double
Minimum RAM required to use image
name String
Snapshot name
planCode String
Order plan code
region String
Image region
serviceName String
Service name
size Double
Image size (in GiB)
status String
Image status
tags List<String>
Tags about the image
type String
Image type
user String
User to connect with
visibility String
Image visibility
creationDate string
Image creation date
flavorType string
Image usable only for this type of flavor if not null
instanceId string
Instance ID
minDisk number
Minimum disks required to use image
minRam number
Minimum RAM required to use image
name string
Snapshot name
planCode string
Order plan code
region string
Image region
serviceName string
Service name
size number
Image size (in GiB)
status string
Image status
tags string[]
Tags about the image
type string
Image type
user string
User to connect with
visibility string
Image visibility
creation_date str
Image creation date
flavor_type str
Image usable only for this type of flavor if not null
instance_id str
Instance ID
min_disk float
Minimum disks required to use image
min_ram float
Minimum RAM required to use image
name str
Snapshot name
plan_code str
Order plan code
region str
Image region
service_name str
Service name
size float
Image size (in GiB)
status str
Image status
tags Sequence[str]
Tags about the image
type str
Image type
user str
User to connect with
visibility str
Image visibility
creationDate String
Image creation date
flavorType String
Image usable only for this type of flavor if not null
instanceId String
Instance ID
minDisk Number
Minimum disks required to use image
minRam Number
Minimum RAM required to use image
name String
Snapshot name
planCode String
Order plan code
region String
Image region
serviceName String
Service name
size Number
Image size (in GiB)
status String
Image status
tags List<String>
Tags about the image
type String
Image type
user String
User to connect with
visibility String
Image visibility

Package Details

Repository
ovh ovh/pulumi-ovh
License
Apache-2.0
Notes
This Pulumi package is based on the ovh Terraform Provider.