ComputeSnapshot

Creates a new snapshot of a disk. For more information, see the official documentation.

Example Usage

using Pulumi;
using Yandex = Pulumi.Yandex;

class MyStack : Stack
{
    public MyStack()
    {
        var @default = new Yandex.ComputeSnapshot("default", new Yandex.ComputeSnapshotArgs
        {
            Labels = 
            {
                { "my-label", "my-label-value" },
            },
            SourceDiskId = "test_disk_id",
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-yandex/sdk/go/yandex"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := yandex.NewComputeSnapshot(ctx, "default", &yandex.ComputeSnapshotArgs{
			Labels: pulumi.StringMap{
				"my-label": pulumi.String("my-label-value"),
			},
			SourceDiskId: pulumi.String("test_disk_id"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_yandex as yandex

default = yandex.ComputeSnapshot("default",
    labels={
        "my-label": "my-label-value",
    },
    source_disk_id="test_disk_id")
import * as pulumi from "@pulumi/pulumi";
import * as yandex from "@pulumi/yandex";

const defaultComputeSnapshot = new yandex.ComputeSnapshot("default", {
    labels: {
        "my-label": "my-label-value",
    },
    sourceDiskId: "test_disk_id",
});

Coming soon!

Create ComputeSnapshot Resource

new ComputeSnapshot(name: string, args: ComputeSnapshotArgs, opts?: CustomResourceOptions);
@overload
def ComputeSnapshot(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    description: Optional[str] = None,
                    folder_id: Optional[str] = None,
                    labels: Optional[Mapping[str, str]] = None,
                    name: Optional[str] = None,
                    source_disk_id: Optional[str] = None)
@overload
def ComputeSnapshot(resource_name: str,
                    args: ComputeSnapshotArgs,
                    opts: Optional[ResourceOptions] = None)
func NewComputeSnapshot(ctx *Context, name string, args ComputeSnapshotArgs, opts ...ResourceOption) (*ComputeSnapshot, error)
public ComputeSnapshot(string name, ComputeSnapshotArgs args, CustomResourceOptions? opts = null)
public ComputeSnapshot(String name, ComputeSnapshotArgs args)
public ComputeSnapshot(String name, ComputeSnapshotArgs args, CustomResourceOptions options)
type: yandex:ComputeSnapshot
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args ComputeSnapshotArgs
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 ComputeSnapshotArgs
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 ComputeSnapshotArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ComputeSnapshotArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args ComputeSnapshotArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

ComputeSnapshot Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The ComputeSnapshot resource accepts the following input properties:

SourceDiskId string

ID of the disk to create a snapshot from.

Description string

Description of the resource.

FolderId string

The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.

Labels Dictionary<string, string>

A set of key/value label pairs to assign to the snapshot.

Name string

A name for the resource.

SourceDiskId string

ID of the disk to create a snapshot from.

Description string

Description of the resource.

FolderId string

The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.

Labels map[string]string

A set of key/value label pairs to assign to the snapshot.

Name string

A name for the resource.

sourceDiskId String

ID of the disk to create a snapshot from.

description String

Description of the resource.

folderId String

The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.

labels Map<String,String>

A set of key/value label pairs to assign to the snapshot.

name String

A name for the resource.

sourceDiskId string

ID of the disk to create a snapshot from.

description string

Description of the resource.

folderId string

The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.

labels {[key: string]: string}

A set of key/value label pairs to assign to the snapshot.

name string

A name for the resource.

source_disk_id str

ID of the disk to create a snapshot from.

description str

Description of the resource.

folder_id str

The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.

labels Mapping[str, str]

A set of key/value label pairs to assign to the snapshot.

name str

A name for the resource.

sourceDiskId String

ID of the disk to create a snapshot from.

description String

Description of the resource.

folderId String

The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.

labels Map<String>

A set of key/value label pairs to assign to the snapshot.

name String

A name for the resource.

Outputs

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

CreatedAt string

Creation timestamp of the snapshot.

DiskSize int

Size of the disk when the snapshot was created, specified in GB.

Id string

The provider-assigned unique ID for this managed resource.

StorageSize int

Size of the snapshot, specified in GB.

CreatedAt string

Creation timestamp of the snapshot.

DiskSize int

Size of the disk when the snapshot was created, specified in GB.

Id string

The provider-assigned unique ID for this managed resource.

StorageSize int

Size of the snapshot, specified in GB.

createdAt String

Creation timestamp of the snapshot.

diskSize Integer

Size of the disk when the snapshot was created, specified in GB.

id String

The provider-assigned unique ID for this managed resource.

storageSize Integer

Size of the snapshot, specified in GB.

createdAt string

Creation timestamp of the snapshot.

diskSize number

Size of the disk when the snapshot was created, specified in GB.

id string

The provider-assigned unique ID for this managed resource.

storageSize number

Size of the snapshot, specified in GB.

created_at str

Creation timestamp of the snapshot.

disk_size int

Size of the disk when the snapshot was created, specified in GB.

id str

The provider-assigned unique ID for this managed resource.

storage_size int

Size of the snapshot, specified in GB.

createdAt String

Creation timestamp of the snapshot.

diskSize Number

Size of the disk when the snapshot was created, specified in GB.

id String

The provider-assigned unique ID for this managed resource.

storageSize Number

Size of the snapshot, specified in GB.

Look up Existing ComputeSnapshot Resource

Get an existing ComputeSnapshot 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?: ComputeSnapshotState, opts?: CustomResourceOptions): ComputeSnapshot
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        created_at: Optional[str] = None,
        description: Optional[str] = None,
        disk_size: Optional[int] = None,
        folder_id: Optional[str] = None,
        labels: Optional[Mapping[str, str]] = None,
        name: Optional[str] = None,
        source_disk_id: Optional[str] = None,
        storage_size: Optional[int] = None) -> ComputeSnapshot
func GetComputeSnapshot(ctx *Context, name string, id IDInput, state *ComputeSnapshotState, opts ...ResourceOption) (*ComputeSnapshot, error)
public static ComputeSnapshot Get(string name, Input<string> id, ComputeSnapshotState? state, CustomResourceOptions? opts = null)
public static ComputeSnapshot get(String name, Output<String> id, ComputeSnapshotState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
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.
The following state arguments are supported:
CreatedAt string

Creation timestamp of the snapshot.

Description string

Description of the resource.

DiskSize int

Size of the disk when the snapshot was created, specified in GB.

FolderId string

The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.

Labels Dictionary<string, string>

A set of key/value label pairs to assign to the snapshot.

Name string

A name for the resource.

SourceDiskId string

ID of the disk to create a snapshot from.

StorageSize int

Size of the snapshot, specified in GB.

CreatedAt string

Creation timestamp of the snapshot.

Description string

Description of the resource.

DiskSize int

Size of the disk when the snapshot was created, specified in GB.

FolderId string

The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.

Labels map[string]string

A set of key/value label pairs to assign to the snapshot.

Name string

A name for the resource.

SourceDiskId string

ID of the disk to create a snapshot from.

StorageSize int

Size of the snapshot, specified in GB.

createdAt String

Creation timestamp of the snapshot.

description String

Description of the resource.

diskSize Integer

Size of the disk when the snapshot was created, specified in GB.

folderId String

The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.

labels Map<String,String>

A set of key/value label pairs to assign to the snapshot.

name String

A name for the resource.

sourceDiskId String

ID of the disk to create a snapshot from.

storageSize Integer

Size of the snapshot, specified in GB.

createdAt string

Creation timestamp of the snapshot.

description string

Description of the resource.

diskSize number

Size of the disk when the snapshot was created, specified in GB.

folderId string

The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.

labels {[key: string]: string}

A set of key/value label pairs to assign to the snapshot.

name string

A name for the resource.

sourceDiskId string

ID of the disk to create a snapshot from.

storageSize number

Size of the snapshot, specified in GB.

created_at str

Creation timestamp of the snapshot.

description str

Description of the resource.

disk_size int

Size of the disk when the snapshot was created, specified in GB.

folder_id str

The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.

labels Mapping[str, str]

A set of key/value label pairs to assign to the snapshot.

name str

A name for the resource.

source_disk_id str

ID of the disk to create a snapshot from.

storage_size int

Size of the snapshot, specified in GB.

createdAt String

Creation timestamp of the snapshot.

description String

Description of the resource.

diskSize Number

Size of the disk when the snapshot was created, specified in GB.

folderId String

The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.

labels Map<String>

A set of key/value label pairs to assign to the snapshot.

name String

A name for the resource.

sourceDiskId String

ID of the disk to create a snapshot from.

storageSize Number

Size of the snapshot, specified in GB.

Import

A snapshot can be imported using the id of the resource, e.g.

 $ pulumi import yandex:index/computeSnapshot:ComputeSnapshot disk-snapshot shapshot_id

Package Details

Repository
https://github.com/pulumi/pulumi-yandex
License
Apache-2.0
Notes

This Pulumi package is based on the yandex Terraform Provider.