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",
});
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")
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
})
}
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",
});
});
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());
}
}
resources:
snapshot:
type: edgecenter:Snapshot
properties:
description: snapshot example description
metadata:
env: test
projectId: 1
regionId: 1
volumeId: 28e9edcb-1593-41fe-971b-da729c6ec301
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 string
- The unique name of the resource.
- args SnapshotArgs
- 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 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 string
- The unique name of the resource.
- args SnapshotArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SnapshotArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
});
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"),
})
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());
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")
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",
});
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
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:
- Volume
Id string - The ID of the volume from which the snapshot was created.
- Description string
- A detailed description of the snapshot.
- Last
Updated string - The timestamp of the last update (use with update context).
- Metadata Dictionary<string, string>
- Name string
- The name of the snapshot.
- Project
Id double - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- Project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
- Region
Id double - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- Region
Name string - The name of the region. Either 'regionid' or 'regionname' must be specified.
- Snapshot
Id string - The ID of this resource.
- Volume
Id string - The ID of the volume from which the snapshot was created.
- Description string
- A detailed description of the snapshot.
- Last
Updated string - The timestamp of the last update (use with update context).
- Metadata map[string]string
- Name string
- The name of the snapshot.
- Project
Id float64 - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- Project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
- Region
Id float64 - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- Region
Name string - The name of the region. Either 'regionid' or 'regionname' must be specified.
- Snapshot
Id string - The ID of this resource.
- volume
Id String - The ID of the volume from which the snapshot was created.
- description String
- A detailed description of the snapshot.
- last
Updated String - The timestamp of the last update (use with update context).
- metadata Map<String,String>
- name String
- The name of the snapshot.
- project
Id Double - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project
Name String - The name of the project. Either 'projectid' or 'projectname' must be specified.
- region
Id Double - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- region
Name String - The name of the region. Either 'regionid' or 'regionname' must be specified.
- snapshot
Id String - The ID of this resource.
- volume
Id string - The ID of the volume from which the snapshot was created.
- description string
- A detailed description of the snapshot.
- last
Updated string - The timestamp of the last update (use with update context).
- metadata {[key: string]: string}
- name string
- The name of the snapshot.
- project
Id number - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
- region
Id number - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- region
Name string - The name of the region. Either 'regionid' or 'regionname' must be specified.
- snapshot
Id string - The ID of this resource.
- volume_
id 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.
- volume
Id String - The ID of the volume from which the snapshot was created.
- description String
- A detailed description of the snapshot.
- last
Updated String - The timestamp of the last update (use with update context).
- metadata Map<String>
- name String
- The name of the snapshot.
- project
Id Number - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project
Name String - The name of the project. Either 'projectid' or 'projectname' must be specified.
- region
Id Number - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- region
Name String - The name of the region. Either 'regionid' or 'regionname' must be specified.
- snapshot
Id 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.
- Metadata
Read List<SnapshotOnlies Metadata Read Only> - 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.
- Metadata
Read []SnapshotOnlies Metadata Read Only - 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.
- metadata
Read List<SnapshotOnlies Metadata Read Only> - 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.
- metadata
Read SnapshotOnlies Metadata Read Only[] - 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_ Sequence[Snapshotonlies Metadata Read Only] - 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.
- metadata
Read List<Property Map>Onlies - 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
- 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.
- Description string
- A detailed description of the snapshot.
- Last
Updated string - The timestamp of the last update (use with update context).
- Metadata Dictionary<string, string>
- Metadata
Read List<SnapshotOnlies Metadata Read Only> - A list of read-only metadata items, e.g. tags.
- Name string
- The name of the snapshot.
- Project
Id double - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- Project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
- Region
Id double - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- Region
Name string - The name of the region. Either 'regionid' or 'regionname' must be specified.
- Size double
- The size of the snapshot in GB.
- Snapshot
Id string - The ID of this resource.
- Status string
- The current status of the snapshot.
- Volume
Id string - The ID of the volume from which the snapshot was created.
- Description string
- A detailed description of the snapshot.
- Last
Updated string - The timestamp of the last update (use with update context).
- Metadata map[string]string
- Metadata
Read []SnapshotOnlies Metadata Read Only Args - A list of read-only metadata items, e.g. tags.
- Name string
- The name of the snapshot.
- Project
Id float64 - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- Project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
- Region
Id float64 - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- Region
Name string - The name of the region. Either 'regionid' or 'regionname' must be specified.
- Size float64
- The size of the snapshot in GB.
- Snapshot
Id string - The ID of this resource.
- Status string
- The current status of the snapshot.
- Volume
Id string - The ID of the volume from which the snapshot was created.
- description String
- A detailed description of the snapshot.
- last
Updated String - The timestamp of the last update (use with update context).
- metadata Map<String,String>
- metadata
Read List<SnapshotOnlies Metadata Read Only> - A list of read-only metadata items, e.g. tags.
- name String
- The name of the snapshot.
- project
Id Double - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project
Name String - The name of the project. Either 'projectid' or 'projectname' must be specified.
- region
Id Double - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- region
Name String - The name of the region. Either 'regionid' or 'regionname' must be specified.
- size Double
- The size of the snapshot in GB.
- snapshot
Id String - The ID of this resource.
- status String
- The current status of the snapshot.
- volume
Id String - The ID of the volume from which the snapshot was created.
- description string
- A detailed description of the snapshot.
- last
Updated string - The timestamp of the last update (use with update context).
- metadata {[key: string]: string}
- metadata
Read SnapshotOnlies Metadata Read Only[] - A list of read-only metadata items, e.g. tags.
- name string
- The name of the snapshot.
- project
Id number - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project
Name string - The name of the project. Either 'projectid' or 'projectname' must be specified.
- region
Id number - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- region
Name string - The name of the region. Either 'regionid' or 'regionname' must be specified.
- size number
- The size of the snapshot in GB.
- snapshot
Id string - The ID of this resource.
- status string
- The current status of the snapshot.
- volume
Id 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_ Sequence[Snapshotonlies Metadata Read Only Args] - 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.
- last
Updated String - The timestamp of the last update (use with update context).
- metadata Map<String>
- metadata
Read List<Property Map>Onlies - A list of read-only metadata items, e.g. tags.
- name String
- The name of the snapshot.
- project
Id Number - The uuid of the project. Either 'projectid' or 'projectname' must be specified.
- project
Name String - The name of the project. Either 'projectid' or 'projectname' must be specified.
- region
Id Number - The uuid of the region. Either 'regionid' or 'regionname' must be specified.
- region
Name String - The name of the region. Either 'regionid' or 'regionname' must be specified.
- size Number
- The size of the snapshot in GB.
- snapshot
Id String - The ID of this resource.
- status String
- The current status of the snapshot.
- volume
Id String - The ID of the volume from which the snapshot was created.
Supporting Types
SnapshotMetadataReadOnly, SnapshotMetadataReadOnlyArgs
Import
import using <project_id>:<region_id>:<snapshot_id> format
$ pulumi import edgecenter:index/snapshot:Snapshot snapshot1 1:6:447d2959-8ae0-4ca0-8d47-9f050a3637d7
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.