1. Packages
  2. Edgecenter Provider
  3. API Docs
  4. Snapshot
edgecenter 0.7.35 published on Friday, Apr 25, 2025 by edge-center

edgecenter.Snapshot

Explore with Pulumi AI

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as edgecenter from "@pulumi/edgecenter";

const snapshot = new edgecenter.Snapshot("snapshot", {
    description: "snapshot example description",
    metadata: {
        env: "test",
    },
    projectId: 1,
    regionId: 1,
    volumeId: "28e9edcb-1593-41fe-971b-da729c6ec301",
});
Copy
import pulumi
import pulumi_edgecenter as edgecenter

snapshot = edgecenter.Snapshot("snapshot",
    description="snapshot example description",
    metadata={
        "env": "test",
    },
    project_id=1,
    region_id=1,
    volume_id="28e9edcb-1593-41fe-971b-da729c6ec301")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/edgecenter/edgecenter"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := edgecenter.NewSnapshot(ctx, "snapshot", &edgecenter.SnapshotArgs{
			Description: pulumi.String("snapshot example description"),
			Metadata: pulumi.StringMap{
				"env": pulumi.String("test"),
			},
			ProjectId: pulumi.Float64(1),
			RegionId:  pulumi.Float64(1),
			VolumeId:  pulumi.String("28e9edcb-1593-41fe-971b-da729c6ec301"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Edgecenter = Pulumi.Edgecenter;

return await Deployment.RunAsync(() => 
{
    var snapshot = new Edgecenter.Snapshot("snapshot", new()
    {
        Description = "snapshot example description",
        Metadata = 
        {
            { "env", "test" },
        },
        ProjectId = 1,
        RegionId = 1,
        VolumeId = "28e9edcb-1593-41fe-971b-da729c6ec301",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.edgecenter.Snapshot;
import com.pulumi.edgecenter.SnapshotArgs;
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 Snapshot("snapshot", SnapshotArgs.builder()
            .description("snapshot example description")
            .metadata(Map.of("env", "test"))
            .projectId(1)
            .regionId(1)
            .volumeId("28e9edcb-1593-41fe-971b-da729c6ec301")
            .build());

    }
}
Copy
resources:
  snapshot:
    type: edgecenter:Snapshot
    properties:
      description: snapshot example description
      metadata:
        env: test
      projectId: 1
      regionId: 1
      volumeId: 28e9edcb-1593-41fe-971b-da729c6ec301
Copy

Create Snapshot Resource

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

Constructor syntax

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

@overload
def Snapshot(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             volume_id: Optional[str] = None,
             description: Optional[str] = None,
             last_updated: Optional[str] = None,
             metadata: Optional[Mapping[str, str]] = None,
             name: Optional[str] = None,
             project_id: Optional[float] = None,
             project_name: Optional[str] = None,
             region_id: Optional[float] = None,
             region_name: Optional[str] = None,
             snapshot_id: Optional[str] = None)
func NewSnapshot(ctx *Context, name string, args SnapshotArgs, opts ...ResourceOption) (*Snapshot, error)
public Snapshot(string name, SnapshotArgs args, CustomResourceOptions? opts = null)
public Snapshot(String name, SnapshotArgs args)
public Snapshot(String name, SnapshotArgs args, CustomResourceOptions options)
type: edgecenter:Snapshot
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. SnapshotArgs
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. SnapshotArgs
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. SnapshotArgs
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. SnapshotArgs
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. SnapshotArgs
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 snapshotResource = new Edgecenter.Snapshot("snapshotResource", new()
{
    VolumeId = "string",
    Description = "string",
    LastUpdated = "string",
    Metadata = 
    {
        { "string", "string" },
    },
    Name = "string",
    ProjectId = 0,
    ProjectName = "string",
    RegionId = 0,
    RegionName = "string",
    SnapshotId = "string",
});
Copy
example, err := edgecenter.NewSnapshot(ctx, "snapshotResource", &edgecenter.SnapshotArgs{
	VolumeId:    pulumi.String("string"),
	Description: pulumi.String("string"),
	LastUpdated: pulumi.String("string"),
	Metadata: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Name:        pulumi.String("string"),
	ProjectId:   pulumi.Float64(0),
	ProjectName: pulumi.String("string"),
	RegionId:    pulumi.Float64(0),
	RegionName:  pulumi.String("string"),
	SnapshotId:  pulumi.String("string"),
})
Copy
var snapshotResource = new Snapshot("snapshotResource", SnapshotArgs.builder()
    .volumeId("string")
    .description("string")
    .lastUpdated("string")
    .metadata(Map.of("string", "string"))
    .name("string")
    .projectId(0)
    .projectName("string")
    .regionId(0)
    .regionName("string")
    .snapshotId("string")
    .build());
Copy
snapshot_resource = edgecenter.Snapshot("snapshotResource",
    volume_id="string",
    description="string",
    last_updated="string",
    metadata={
        "string": "string",
    },
    name="string",
    project_id=0,
    project_name="string",
    region_id=0,
    region_name="string",
    snapshot_id="string")
Copy
const snapshotResource = new edgecenter.Snapshot("snapshotResource", {
    volumeId: "string",
    description: "string",
    lastUpdated: "string",
    metadata: {
        string: "string",
    },
    name: "string",
    projectId: 0,
    projectName: "string",
    regionId: 0,
    regionName: "string",
    snapshotId: "string",
});
Copy
type: edgecenter:Snapshot
properties:
    description: string
    lastUpdated: string
    metadata:
        string: string
    name: string
    projectId: 0
    projectName: string
    regionId: 0
    regionName: string
    snapshotId: string
    volumeId: string
Copy

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

VolumeId This property is required. string
The ID of the volume from which the snapshot was created.
Description string
A detailed description of the snapshot.
LastUpdated string
The timestamp of the last update (use with update context).
Metadata Dictionary<string, string>
Name string
The name of the snapshot.
ProjectId double
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
ProjectName string
The name of the project. Either 'projectid' or 'projectname' must be specified.
RegionId double
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
RegionName string
The name of the region. Either 'regionid' or 'regionname' must be specified.
SnapshotId string
The ID of this resource.
VolumeId This property is required. string
The ID of the volume from which the snapshot was created.
Description string
A detailed description of the snapshot.
LastUpdated string
The timestamp of the last update (use with update context).
Metadata map[string]string
Name string
The name of the snapshot.
ProjectId float64
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
ProjectName string
The name of the project. Either 'projectid' or 'projectname' must be specified.
RegionId float64
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
RegionName string
The name of the region. Either 'regionid' or 'regionname' must be specified.
SnapshotId string
The ID of this resource.
volumeId This property is required. String
The ID of the volume from which the snapshot was created.
description String
A detailed description of the snapshot.
lastUpdated String
The timestamp of the last update (use with update context).
metadata Map<String,String>
name String
The name of the snapshot.
projectId Double
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
projectName String
The name of the project. Either 'projectid' or 'projectname' must be specified.
regionId Double
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
regionName String
The name of the region. Either 'regionid' or 'regionname' must be specified.
snapshotId String
The ID of this resource.
volumeId This property is required. string
The ID of the volume from which the snapshot was created.
description string
A detailed description of the snapshot.
lastUpdated string
The timestamp of the last update (use with update context).
metadata {[key: string]: string}
name string
The name of the snapshot.
projectId number
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
projectName string
The name of the project. Either 'projectid' or 'projectname' must be specified.
regionId number
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
regionName string
The name of the region. Either 'regionid' or 'regionname' must be specified.
snapshotId string
The ID of this resource.
volume_id This property is required. str
The ID of the volume from which the snapshot was created.
description str
A detailed description of the snapshot.
last_updated str
The timestamp of the last update (use with update context).
metadata Mapping[str, str]
name str
The name of the snapshot.
project_id float
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
project_name str
The name of the project. Either 'projectid' or 'projectname' must be specified.
region_id float
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
region_name str
The name of the region. Either 'regionid' or 'regionname' must be specified.
snapshot_id str
The ID of this resource.
volumeId This property is required. String
The ID of the volume from which the snapshot was created.
description String
A detailed description of the snapshot.
lastUpdated String
The timestamp of the last update (use with update context).
metadata Map<String>
name String
The name of the snapshot.
projectId Number
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
projectName String
The name of the project. Either 'projectid' or 'projectname' must be specified.
regionId Number
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
regionName String
The name of the region. Either 'regionid' or 'regionname' must be specified.
snapshotId String
The ID of this resource.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
MetadataReadOnlies List<SnapshotMetadataReadOnly>
A list of read-only metadata items, e.g. tags.
Size double
The size of the snapshot in GB.
Status string
The current status of the snapshot.
Id string
The provider-assigned unique ID for this managed resource.
MetadataReadOnlies []SnapshotMetadataReadOnly
A list of read-only metadata items, e.g. tags.
Size float64
The size of the snapshot in GB.
Status string
The current status of the snapshot.
id String
The provider-assigned unique ID for this managed resource.
metadataReadOnlies List<SnapshotMetadataReadOnly>
A list of read-only metadata items, e.g. tags.
size Double
The size of the snapshot in GB.
status String
The current status of the snapshot.
id string
The provider-assigned unique ID for this managed resource.
metadataReadOnlies SnapshotMetadataReadOnly[]
A list of read-only metadata items, e.g. tags.
size number
The size of the snapshot in GB.
status string
The current status of the snapshot.
id str
The provider-assigned unique ID for this managed resource.
metadata_read_onlies Sequence[SnapshotMetadataReadOnly]
A list of read-only metadata items, e.g. tags.
size float
The size of the snapshot in GB.
status str
The current status of the snapshot.
id String
The provider-assigned unique ID for this managed resource.
metadataReadOnlies List<Property Map>
A list of read-only metadata items, e.g. tags.
size Number
The size of the snapshot in GB.
status String
The current status of the snapshot.

Look up Existing Snapshot Resource

Get an existing Snapshot 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?: SnapshotState, opts?: CustomResourceOptions): Snapshot
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        description: Optional[str] = None,
        last_updated: Optional[str] = None,
        metadata: Optional[Mapping[str, str]] = None,
        metadata_read_onlies: Optional[Sequence[SnapshotMetadataReadOnlyArgs]] = None,
        name: Optional[str] = None,
        project_id: Optional[float] = None,
        project_name: Optional[str] = None,
        region_id: Optional[float] = None,
        region_name: Optional[str] = None,
        size: Optional[float] = None,
        snapshot_id: Optional[str] = None,
        status: Optional[str] = None,
        volume_id: Optional[str] = None) -> Snapshot
func GetSnapshot(ctx *Context, name string, id IDInput, state *SnapshotState, opts ...ResourceOption) (*Snapshot, error)
public static Snapshot Get(string name, Input<string> id, SnapshotState? state, CustomResourceOptions? opts = null)
public static Snapshot get(String name, Output<String> id, SnapshotState state, CustomResourceOptions options)
resources:  _:    type: edgecenter:Snapshot    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:
Description string
A detailed description of the snapshot.
LastUpdated string
The timestamp of the last update (use with update context).
Metadata Dictionary<string, string>
MetadataReadOnlies List<SnapshotMetadataReadOnly>
A list of read-only metadata items, e.g. tags.
Name string
The name of the snapshot.
ProjectId double
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
ProjectName string
The name of the project. Either 'projectid' or 'projectname' must be specified.
RegionId double
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
RegionName string
The name of the region. Either 'regionid' or 'regionname' must be specified.
Size double
The size of the snapshot in GB.
SnapshotId string
The ID of this resource.
Status string
The current status of the snapshot.
VolumeId string
The ID of the volume from which the snapshot was created.
Description string
A detailed description of the snapshot.
LastUpdated string
The timestamp of the last update (use with update context).
Metadata map[string]string
MetadataReadOnlies []SnapshotMetadataReadOnlyArgs
A list of read-only metadata items, e.g. tags.
Name string
The name of the snapshot.
ProjectId float64
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
ProjectName string
The name of the project. Either 'projectid' or 'projectname' must be specified.
RegionId float64
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
RegionName string
The name of the region. Either 'regionid' or 'regionname' must be specified.
Size float64
The size of the snapshot in GB.
SnapshotId string
The ID of this resource.
Status string
The current status of the snapshot.
VolumeId string
The ID of the volume from which the snapshot was created.
description String
A detailed description of the snapshot.
lastUpdated String
The timestamp of the last update (use with update context).
metadata Map<String,String>
metadataReadOnlies List<SnapshotMetadataReadOnly>
A list of read-only metadata items, e.g. tags.
name String
The name of the snapshot.
projectId Double
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
projectName String
The name of the project. Either 'projectid' or 'projectname' must be specified.
regionId Double
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
regionName String
The name of the region. Either 'regionid' or 'regionname' must be specified.
size Double
The size of the snapshot in GB.
snapshotId String
The ID of this resource.
status String
The current status of the snapshot.
volumeId String
The ID of the volume from which the snapshot was created.
description string
A detailed description of the snapshot.
lastUpdated string
The timestamp of the last update (use with update context).
metadata {[key: string]: string}
metadataReadOnlies SnapshotMetadataReadOnly[]
A list of read-only metadata items, e.g. tags.
name string
The name of the snapshot.
projectId number
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
projectName string
The name of the project. Either 'projectid' or 'projectname' must be specified.
regionId number
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
regionName string
The name of the region. Either 'regionid' or 'regionname' must be specified.
size number
The size of the snapshot in GB.
snapshotId string
The ID of this resource.
status string
The current status of the snapshot.
volumeId string
The ID of the volume from which the snapshot was created.
description str
A detailed description of the snapshot.
last_updated str
The timestamp of the last update (use with update context).
metadata Mapping[str, str]
metadata_read_onlies Sequence[SnapshotMetadataReadOnlyArgs]
A list of read-only metadata items, e.g. tags.
name str
The name of the snapshot.
project_id float
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
project_name str
The name of the project. Either 'projectid' or 'projectname' must be specified.
region_id float
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
region_name str
The name of the region. Either 'regionid' or 'regionname' must be specified.
size float
The size of the snapshot in GB.
snapshot_id str
The ID of this resource.
status str
The current status of the snapshot.
volume_id str
The ID of the volume from which the snapshot was created.
description String
A detailed description of the snapshot.
lastUpdated String
The timestamp of the last update (use with update context).
metadata Map<String>
metadataReadOnlies List<Property Map>
A list of read-only metadata items, e.g. tags.
name String
The name of the snapshot.
projectId Number
The uuid of the project. Either 'projectid' or 'projectname' must be specified.
projectName String
The name of the project. Either 'projectid' or 'projectname' must be specified.
regionId Number
The uuid of the region. Either 'regionid' or 'regionname' must be specified.
regionName String
The name of the region. Either 'regionid' or 'regionname' must be specified.
size Number
The size of the snapshot in GB.
snapshotId String
The ID of this resource.
status String
The current status of the snapshot.
volumeId String
The ID of the volume from which the snapshot was created.

Supporting Types

SnapshotMetadataReadOnly
, SnapshotMetadataReadOnlyArgs

Key This property is required. string
ReadOnly This property is required. bool
Value This property is required. string
Key This property is required. string
ReadOnly This property is required. bool
Value This property is required. string
key This property is required. String
readOnly This property is required. Boolean
value This property is required. String
key This property is required. string
readOnly This property is required. boolean
value This property is required. string
key This property is required. str
read_only This property is required. bool
value This property is required. str
key This property is required. String
readOnly This property is required. Boolean
value This property is required. String

Import

import using <project_id>:<region_id>:<snapshot_id> format

$ pulumi import edgecenter:index/snapshot:Snapshot snapshot1 1:6:447d2959-8ae0-4ca0-8d47-9f050a3637d7
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
edgecenter edge-center/terraform-provider-edgecenter
License
Notes
This Pulumi package is based on the edgecenter Terraform Provider.