yandex.ComputeSnapshot
Explore with Pulumi AI
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:
- Source
Disk stringId ID of the disk to create a snapshot from.
- Description string
Description of the resource.
- Folder
Id 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.
- Source
Disk stringId ID of the disk to create a snapshot from.
- Description string
Description of the resource.
- Folder
Id 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.
- source
Disk StringId ID of the disk to create a snapshot from.
- description String
Description of the resource.
- folder
Id 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.
- source
Disk stringId ID of the disk to create a snapshot from.
- description string
Description of the resource.
- folder
Id 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_ strid 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.
- source
Disk StringId ID of the disk to create a snapshot from.
- description String
Description of the resource.
- folder
Id 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:
- Created
At string Creation timestamp of the snapshot.
- Disk
Size int Size of the disk when the snapshot was created, specified in GB.
- Id string
The provider-assigned unique ID for this managed resource.
- Storage
Size int Size of the snapshot, specified in GB.
- Created
At string Creation timestamp of the snapshot.
- Disk
Size int Size of the disk when the snapshot was created, specified in GB.
- Id string
The provider-assigned unique ID for this managed resource.
- Storage
Size int Size of the snapshot, specified in GB.
- created
At String Creation timestamp of the snapshot.
- disk
Size Integer Size of the disk when the snapshot was created, specified in GB.
- id String
The provider-assigned unique ID for this managed resource.
- storage
Size Integer Size of the snapshot, specified in GB.
- created
At string Creation timestamp of the snapshot.
- disk
Size number Size of the disk when the snapshot was created, specified in GB.
- id string
The provider-assigned unique ID for this managed resource.
- storage
Size 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.
- created
At String Creation timestamp of the snapshot.
- disk
Size Number Size of the disk when the snapshot was created, specified in GB.
- id String
The provider-assigned unique ID for this managed resource.
- storage
Size 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.
- Created
At string Creation timestamp of the snapshot.
- Description string
Description of the resource.
- Disk
Size int Size of the disk when the snapshot was created, specified in GB.
- Folder
Id 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.
- Source
Disk stringId ID of the disk to create a snapshot from.
- Storage
Size int Size of the snapshot, specified in GB.
- Created
At string Creation timestamp of the snapshot.
- Description string
Description of the resource.
- Disk
Size int Size of the disk when the snapshot was created, specified in GB.
- Folder
Id 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.
- Source
Disk stringId ID of the disk to create a snapshot from.
- Storage
Size int Size of the snapshot, specified in GB.
- created
At String Creation timestamp of the snapshot.
- description String
Description of the resource.
- disk
Size Integer Size of the disk when the snapshot was created, specified in GB.
- folder
Id 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.
- source
Disk StringId ID of the disk to create a snapshot from.
- storage
Size Integer Size of the snapshot, specified in GB.
- created
At string Creation timestamp of the snapshot.
- description string
Description of the resource.
- disk
Size number Size of the disk when the snapshot was created, specified in GB.
- folder
Id 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 stringId ID of the disk to create a snapshot from.
- storage
Size 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_ strid ID of the disk to create a snapshot from.
- storage_
size int Size of the snapshot, specified in GB.
- created
At String Creation timestamp of the snapshot.
- description String
Description of the resource.
- disk
Size Number Size of the disk when the snapshot was created, specified in GB.
- folder
Id 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.
- source
Disk StringId ID of the disk to create a snapshot from.
- storage
Size 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
- Yandex pulumi/pulumi-yandex
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
yandex
Terraform Provider.