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>",
});
import pulumi
import pulumi_ovh as ovh
snapshot = ovh.cloud_project.InstanceSnapshot("snapshot",
instance_id="<instance ID>",
service_name="<public cloud project ID>")
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
})
}
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>",
});
});
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());
}
}
resources:
snapshot:
type: ovh:CloudProject:InstanceSnapshot
properties:
instanceId: <instance ID>
serviceName: <public cloud project ID>
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 string
- The unique name of the resource.
- args InstanceSnapshotArgs
- 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 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 string
- The unique name of the resource.
- args InstanceSnapshotArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args InstanceSnapshotArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
});
example, err := cloudproject.NewInstanceSnapshot(ctx, "instanceSnapshotResource", &cloudproject.InstanceSnapshotArgs{
InstanceId: pulumi.String("string"),
ServiceName: pulumi.String("string"),
Name: pulumi.String("string"),
})
var instanceSnapshotResource = new InstanceSnapshot("instanceSnapshotResource", InstanceSnapshotArgs.builder()
.instanceId("string")
.serviceName("string")
.name("string")
.build());
instance_snapshot_resource = ovh.cloud_project.InstanceSnapshot("instanceSnapshotResource",
instance_id="string",
service_name="string",
name="string")
const instanceSnapshotResource = new ovh.cloudproject.InstanceSnapshot("instanceSnapshotResource", {
instanceId: "string",
serviceName: "string",
name: "string",
});
type: ovh:CloudProject:InstanceSnapshot
properties:
instanceId: string
name: string
serviceName: string
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:
- Instance
Id string - Instance ID
- Service
Name string - Service name
- Name string
- Snapshot name
- Instance
Id string - Instance ID
- Service
Name string - Service name
- Name string
- Snapshot name
- instance
Id String - Instance ID
- service
Name String - Service name
- name String
- Snapshot name
- instance
Id string - Instance ID
- service
Name string - Service name
- name string
- Snapshot name
- instance_
id str - Instance ID
- service_
name str - Service name
- name str
- Snapshot name
- instance
Id String - Instance ID
- service
Name 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:
- Creation
Date string - Image creation date
- Flavor
Type string - Image usable only for this type of flavor if not null
- Id string
- The provider-assigned unique ID for this managed resource.
- Min
Disk double - Minimum disks required to use image
- Min
Ram double - Minimum RAM required to use image
- Plan
Code string - Order plan code
- Region string
- Image region
- Size double
- Image size (in GiB)
- Status string
- Image status
- List<string>
- Tags about the image
- Type string
- Image type
- User string
- User to connect with
- Visibility string
- Image visibility
- Creation
Date string - Image creation date
- Flavor
Type string - Image usable only for this type of flavor if not null
- Id string
- The provider-assigned unique ID for this managed resource.
- Min
Disk float64 - Minimum disks required to use image
- Min
Ram float64 - Minimum RAM required to use image
- Plan
Code string - Order plan code
- Region string
- Image region
- Size float64
- Image size (in GiB)
- Status string
- Image status
- []string
- Tags about the image
- Type string
- Image type
- User string
- User to connect with
- Visibility string
- Image visibility
- creation
Date String - Image creation date
- flavor
Type String - Image usable only for this type of flavor if not null
- id String
- The provider-assigned unique ID for this managed resource.
- min
Disk Double - Minimum disks required to use image
- min
Ram Double - Minimum RAM required to use image
- plan
Code String - Order plan code
- region String
- Image region
- size Double
- Image size (in GiB)
- status String
- Image status
- List<String>
- Tags about the image
- type String
- Image type
- user String
- User to connect with
- visibility String
- Image visibility
- creation
Date string - Image creation date
- flavor
Type string - Image usable only for this type of flavor if not null
- id string
- The provider-assigned unique ID for this managed resource.
- min
Disk number - Minimum disks required to use image
- min
Ram number - Minimum RAM required to use image
- plan
Code string - Order plan code
- region string
- Image region
- size number
- Image size (in GiB)
- status string
- Image status
- 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
- Sequence[str]
- Tags about the image
- type str
- Image type
- user str
- User to connect with
- visibility str
- Image visibility
- creation
Date String - Image creation date
- flavor
Type String - Image usable only for this type of flavor if not null
- id String
- The provider-assigned unique ID for this managed resource.
- min
Disk Number - Minimum disks required to use image
- min
Ram Number - Minimum RAM required to use image
- plan
Code String - Order plan code
- region String
- Image region
- size Number
- Image size (in GiB)
- status String
- Image status
- 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
- 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.
- Creation
Date string - Image creation date
- Flavor
Type string - Image usable only for this type of flavor if not null
- Instance
Id string - Instance ID
- Min
Disk double - Minimum disks required to use image
- Min
Ram double - Minimum RAM required to use image
- Name string
- Snapshot name
- Plan
Code string - Order plan code
- Region string
- Image region
- Service
Name string - Service name
- Size double
- Image size (in GiB)
- Status string
- Image status
- List<string>
- Tags about the image
- Type string
- Image type
- User string
- User to connect with
- Visibility string
- Image visibility
- Creation
Date string - Image creation date
- Flavor
Type string - Image usable only for this type of flavor if not null
- Instance
Id string - Instance ID
- Min
Disk float64 - Minimum disks required to use image
- Min
Ram float64 - Minimum RAM required to use image
- Name string
- Snapshot name
- Plan
Code string - Order plan code
- Region string
- Image region
- Service
Name string - Service name
- Size float64
- Image size (in GiB)
- Status string
- Image status
- []string
- Tags about the image
- Type string
- Image type
- User string
- User to connect with
- Visibility string
- Image visibility
- creation
Date String - Image creation date
- flavor
Type String - Image usable only for this type of flavor if not null
- instance
Id String - Instance ID
- min
Disk Double - Minimum disks required to use image
- min
Ram Double - Minimum RAM required to use image
- name String
- Snapshot name
- plan
Code String - Order plan code
- region String
- Image region
- service
Name String - Service name
- size Double
- Image size (in GiB)
- status String
- Image status
- List<String>
- Tags about the image
- type String
- Image type
- user String
- User to connect with
- visibility String
- Image visibility
- creation
Date string - Image creation date
- flavor
Type string - Image usable only for this type of flavor if not null
- instance
Id string - Instance ID
- min
Disk number - Minimum disks required to use image
- min
Ram number - Minimum RAM required to use image
- name string
- Snapshot name
- plan
Code string - Order plan code
- region string
- Image region
- service
Name string - Service name
- size number
- Image size (in GiB)
- status string
- Image status
- 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
- Sequence[str]
- Tags about the image
- type str
- Image type
- user str
- User to connect with
- visibility str
- Image visibility
- creation
Date String - Image creation date
- flavor
Type String - Image usable only for this type of flavor if not null
- instance
Id String - Instance ID
- min
Disk Number - Minimum disks required to use image
- min
Ram Number - Minimum RAM required to use image
- name String
- Snapshot name
- plan
Code String - Order plan code
- region String
- Image region
- service
Name String - Service name
- size Number
- Image size (in GiB)
- status String
- Image status
- 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.