1. Packages
  2. Genesis Cloud
  3. API Docs
  4. Snapshot
Genesis Cloud v0.0.33 published on Thursday, Feb 27, 2025 by Genesiscloud

genesiscloud.Snapshot

Explore with Pulumi AI

Snapshot resource

Example Usage

Coming soon!
Coming soon!
Coming soon!
Coming soon!
Coming soon!
resources:
  target:
    type: genesiscloud:Instance
  example:
    type: genesiscloud:Snapshot
    properties:
      instanceId: ${target.id}
      retainOnDelete: true
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: Optional[SnapshotArgs] = None,
             opts: Optional[ResourceOptions] = None)

@overload
def Snapshot(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             name: Optional[str] = None,
             region: Optional[str] = None,
             replicated_region: Optional[str] = None,
             retain_on_delete: Optional[bool] = None,
             source_instance_id: Optional[str] = None,
             source_snapshot_id: Optional[str] = None,
             timeouts: Optional[SnapshotTimeoutsArgs] = None)
func NewSnapshot(ctx *Context, name string, args *SnapshotArgs, opts ...ResourceOption) (*Snapshot, error)
public Snapshot(string name, SnapshotArgs? args = null, CustomResourceOptions? opts = null)
public Snapshot(String name, SnapshotArgs args)
public Snapshot(String name, SnapshotArgs args, CustomResourceOptions options)
type: genesiscloud: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 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 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 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 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 Genesiscloud.Snapshot("snapshotResource", new()
{
    Name = "string",
    Region = "string",
    ReplicatedRegion = "string",
    RetainOnDelete = false,
    SourceInstanceId = "string",
    SourceSnapshotId = "string",
    Timeouts = new Genesiscloud.Inputs.SnapshotTimeoutsArgs
    {
        Create = "string",
        Delete = "string",
        Read = "string",
        Update = "string",
    },
});
Copy
example, err := genesiscloud.NewSnapshot(ctx, "snapshotResource", &genesiscloud.SnapshotArgs{
	Name:             pulumi.String("string"),
	Region:           pulumi.String("string"),
	ReplicatedRegion: pulumi.String("string"),
	RetainOnDelete:   pulumi.Bool(false),
	SourceInstanceId: pulumi.String("string"),
	SourceSnapshotId: pulumi.String("string"),
	Timeouts: &genesiscloud.SnapshotTimeoutsArgs{
		Create: pulumi.String("string"),
		Delete: pulumi.String("string"),
		Read:   pulumi.String("string"),
		Update: pulumi.String("string"),
	},
})
Copy
var snapshotResource = new Snapshot("snapshotResource", SnapshotArgs.builder()
    .name("string")
    .region("string")
    .replicatedRegion("string")
    .retainOnDelete(false)
    .sourceInstanceId("string")
    .sourceSnapshotId("string")
    .timeouts(SnapshotTimeoutsArgs.builder()
        .create("string")
        .delete("string")
        .read("string")
        .update("string")
        .build())
    .build());
Copy
snapshot_resource = genesiscloud.Snapshot("snapshotResource",
    name="string",
    region="string",
    replicated_region="string",
    retain_on_delete=False,
    source_instance_id="string",
    source_snapshot_id="string",
    timeouts={
        "create": "string",
        "delete": "string",
        "read": "string",
        "update": "string",
    })
Copy
const snapshotResource = new genesiscloud.Snapshot("snapshotResource", {
    name: "string",
    region: "string",
    replicatedRegion: "string",
    retainOnDelete: false,
    sourceInstanceId: "string",
    sourceSnapshotId: "string",
    timeouts: {
        create: "string",
        "delete": "string",
        read: "string",
        update: "string",
    },
});
Copy
type: genesiscloud:Snapshot
properties:
    name: string
    region: string
    replicatedRegion: string
    retainOnDelete: false
    sourceInstanceId: string
    sourceSnapshotId: string
    timeouts:
        create: string
        delete: string
        read: string
        update: 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:

Name string
The human-readable name for the snapshot.
Region string
The region identifier. Should only be explicity specified when using the 'source_snapshot_id'.
ReplicatedRegion string
Target region for snapshot replication. When specified, also creates a copy of the snapshot in the given region. If omitted, the snapshot exists only in the current region.
RetainOnDelete bool
Flag to retain the snapshot when the resource is deleted. - Sets the default value "false" if the attribute is not set.
SourceInstanceId string
The id of the source instance from which this snapshot was derived. - If the value of this attribute changes, the resource will be replaced.
SourceSnapshotId string
The id of the source snapshot from which this snapsot was derived. - If the value of this attribute changes, the resource will be replaced.
Timeouts GenesisCloud.PulumiPackage.Genesiscloud.Inputs.SnapshotTimeouts
Name string
The human-readable name for the snapshot.
Region string
The region identifier. Should only be explicity specified when using the 'source_snapshot_id'.
ReplicatedRegion string
Target region for snapshot replication. When specified, also creates a copy of the snapshot in the given region. If omitted, the snapshot exists only in the current region.
RetainOnDelete bool
Flag to retain the snapshot when the resource is deleted. - Sets the default value "false" if the attribute is not set.
SourceInstanceId string
The id of the source instance from which this snapshot was derived. - If the value of this attribute changes, the resource will be replaced.
SourceSnapshotId string
The id of the source snapshot from which this snapsot was derived. - If the value of this attribute changes, the resource will be replaced.
Timeouts SnapshotTimeoutsArgs
name String
The human-readable name for the snapshot.
region String
The region identifier. Should only be explicity specified when using the 'source_snapshot_id'.
replicatedRegion String
Target region for snapshot replication. When specified, also creates a copy of the snapshot in the given region. If omitted, the snapshot exists only in the current region.
retainOnDelete Boolean
Flag to retain the snapshot when the resource is deleted. - Sets the default value "false" if the attribute is not set.
sourceInstanceId String
The id of the source instance from which this snapshot was derived. - If the value of this attribute changes, the resource will be replaced.
sourceSnapshotId String
The id of the source snapshot from which this snapsot was derived. - If the value of this attribute changes, the resource will be replaced.
timeouts SnapshotTimeouts
name string
The human-readable name for the snapshot.
region string
The region identifier. Should only be explicity specified when using the 'source_snapshot_id'.
replicatedRegion string
Target region for snapshot replication. When specified, also creates a copy of the snapshot in the given region. If omitted, the snapshot exists only in the current region.
retainOnDelete boolean
Flag to retain the snapshot when the resource is deleted. - Sets the default value "false" if the attribute is not set.
sourceInstanceId string
The id of the source instance from which this snapshot was derived. - If the value of this attribute changes, the resource will be replaced.
sourceSnapshotId string
The id of the source snapshot from which this snapsot was derived. - If the value of this attribute changes, the resource will be replaced.
timeouts SnapshotTimeouts
name str
The human-readable name for the snapshot.
region str
The region identifier. Should only be explicity specified when using the 'source_snapshot_id'.
replicated_region str
Target region for snapshot replication. When specified, also creates a copy of the snapshot in the given region. If omitted, the snapshot exists only in the current region.
retain_on_delete bool
Flag to retain the snapshot when the resource is deleted. - Sets the default value "false" if the attribute is not set.
source_instance_id str
The id of the source instance from which this snapshot was derived. - If the value of this attribute changes, the resource will be replaced.
source_snapshot_id str
The id of the source snapshot from which this snapsot was derived. - If the value of this attribute changes, the resource will be replaced.
timeouts SnapshotTimeoutsArgs
name String
The human-readable name for the snapshot.
region String
The region identifier. Should only be explicity specified when using the 'source_snapshot_id'.
replicatedRegion String
Target region for snapshot replication. When specified, also creates a copy of the snapshot in the given region. If omitted, the snapshot exists only in the current region.
retainOnDelete Boolean
Flag to retain the snapshot when the resource is deleted. - Sets the default value "false" if the attribute is not set.
sourceInstanceId String
The id of the source instance from which this snapshot was derived. - If the value of this attribute changes, the resource will be replaced.
sourceSnapshotId String
The id of the source snapshot from which this snapsot was derived. - If the value of this attribute changes, the resource will be replaced.
timeouts Property Map

Outputs

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

CreatedAt string
The timestamp when this snapshot was created in RFC 3339.
Id string
The provider-assigned unique ID for this managed resource.
Size int
The storage size of this snapshot given in GiB.
Status string
The snapshot status.
CreatedAt string
The timestamp when this snapshot was created in RFC 3339.
Id string
The provider-assigned unique ID for this managed resource.
Size int
The storage size of this snapshot given in GiB.
Status string
The snapshot status.
createdAt String
The timestamp when this snapshot was created in RFC 3339.
id String
The provider-assigned unique ID for this managed resource.
size Integer
The storage size of this snapshot given in GiB.
status String
The snapshot status.
createdAt string
The timestamp when this snapshot was created in RFC 3339.
id string
The provider-assigned unique ID for this managed resource.
size number
The storage size of this snapshot given in GiB.
status string
The snapshot status.
created_at str
The timestamp when this snapshot was created in RFC 3339.
id str
The provider-assigned unique ID for this managed resource.
size int
The storage size of this snapshot given in GiB.
status str
The snapshot status.
createdAt String
The timestamp when this snapshot was created in RFC 3339.
id String
The provider-assigned unique ID for this managed resource.
size Number
The storage size of this snapshot given in GiB.
status String
The snapshot status.

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,
        created_at: Optional[str] = None,
        name: Optional[str] = None,
        region: Optional[str] = None,
        replicated_region: Optional[str] = None,
        retain_on_delete: Optional[bool] = None,
        size: Optional[int] = None,
        source_instance_id: Optional[str] = None,
        source_snapshot_id: Optional[str] = None,
        status: Optional[str] = None,
        timeouts: Optional[SnapshotTimeoutsArgs] = 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: genesiscloud: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:
CreatedAt string
The timestamp when this snapshot was created in RFC 3339.
Name string
The human-readable name for the snapshot.
Region string
The region identifier. Should only be explicity specified when using the 'source_snapshot_id'.
ReplicatedRegion string
Target region for snapshot replication. When specified, also creates a copy of the snapshot in the given region. If omitted, the snapshot exists only in the current region.
RetainOnDelete bool
Flag to retain the snapshot when the resource is deleted. - Sets the default value "false" if the attribute is not set.
Size int
The storage size of this snapshot given in GiB.
SourceInstanceId string
The id of the source instance from which this snapshot was derived. - If the value of this attribute changes, the resource will be replaced.
SourceSnapshotId string
The id of the source snapshot from which this snapsot was derived. - If the value of this attribute changes, the resource will be replaced.
Status string
The snapshot status.
Timeouts GenesisCloud.PulumiPackage.Genesiscloud.Inputs.SnapshotTimeouts
CreatedAt string
The timestamp when this snapshot was created in RFC 3339.
Name string
The human-readable name for the snapshot.
Region string
The region identifier. Should only be explicity specified when using the 'source_snapshot_id'.
ReplicatedRegion string
Target region for snapshot replication. When specified, also creates a copy of the snapshot in the given region. If omitted, the snapshot exists only in the current region.
RetainOnDelete bool
Flag to retain the snapshot when the resource is deleted. - Sets the default value "false" if the attribute is not set.
Size int
The storage size of this snapshot given in GiB.
SourceInstanceId string
The id of the source instance from which this snapshot was derived. - If the value of this attribute changes, the resource will be replaced.
SourceSnapshotId string
The id of the source snapshot from which this snapsot was derived. - If the value of this attribute changes, the resource will be replaced.
Status string
The snapshot status.
Timeouts SnapshotTimeoutsArgs
createdAt String
The timestamp when this snapshot was created in RFC 3339.
name String
The human-readable name for the snapshot.
region String
The region identifier. Should only be explicity specified when using the 'source_snapshot_id'.
replicatedRegion String
Target region for snapshot replication. When specified, also creates a copy of the snapshot in the given region. If omitted, the snapshot exists only in the current region.
retainOnDelete Boolean
Flag to retain the snapshot when the resource is deleted. - Sets the default value "false" if the attribute is not set.
size Integer
The storage size of this snapshot given in GiB.
sourceInstanceId String
The id of the source instance from which this snapshot was derived. - If the value of this attribute changes, the resource will be replaced.
sourceSnapshotId String
The id of the source snapshot from which this snapsot was derived. - If the value of this attribute changes, the resource will be replaced.
status String
The snapshot status.
timeouts SnapshotTimeouts
createdAt string
The timestamp when this snapshot was created in RFC 3339.
name string
The human-readable name for the snapshot.
region string
The region identifier. Should only be explicity specified when using the 'source_snapshot_id'.
replicatedRegion string
Target region for snapshot replication. When specified, also creates a copy of the snapshot in the given region. If omitted, the snapshot exists only in the current region.
retainOnDelete boolean
Flag to retain the snapshot when the resource is deleted. - Sets the default value "false" if the attribute is not set.
size number
The storage size of this snapshot given in GiB.
sourceInstanceId string
The id of the source instance from which this snapshot was derived. - If the value of this attribute changes, the resource will be replaced.
sourceSnapshotId string
The id of the source snapshot from which this snapsot was derived. - If the value of this attribute changes, the resource will be replaced.
status string
The snapshot status.
timeouts SnapshotTimeouts
created_at str
The timestamp when this snapshot was created in RFC 3339.
name str
The human-readable name for the snapshot.
region str
The region identifier. Should only be explicity specified when using the 'source_snapshot_id'.
replicated_region str
Target region for snapshot replication. When specified, also creates a copy of the snapshot in the given region. If omitted, the snapshot exists only in the current region.
retain_on_delete bool
Flag to retain the snapshot when the resource is deleted. - Sets the default value "false" if the attribute is not set.
size int
The storage size of this snapshot given in GiB.
source_instance_id str
The id of the source instance from which this snapshot was derived. - If the value of this attribute changes, the resource will be replaced.
source_snapshot_id str
The id of the source snapshot from which this snapsot was derived. - If the value of this attribute changes, the resource will be replaced.
status str
The snapshot status.
timeouts SnapshotTimeoutsArgs
createdAt String
The timestamp when this snapshot was created in RFC 3339.
name String
The human-readable name for the snapshot.
region String
The region identifier. Should only be explicity specified when using the 'source_snapshot_id'.
replicatedRegion String
Target region for snapshot replication. When specified, also creates a copy of the snapshot in the given region. If omitted, the snapshot exists only in the current region.
retainOnDelete Boolean
Flag to retain the snapshot when the resource is deleted. - Sets the default value "false" if the attribute is not set.
size Number
The storage size of this snapshot given in GiB.
sourceInstanceId String
The id of the source instance from which this snapshot was derived. - If the value of this attribute changes, the resource will be replaced.
sourceSnapshotId String
The id of the source snapshot from which this snapsot was derived. - If the value of this attribute changes, the resource will be replaced.
status String
The snapshot status.
timeouts Property Map

Supporting Types

SnapshotTimeouts
, SnapshotTimeoutsArgs

Create string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Delete string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
Read string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
Update string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Create string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Delete string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
Read string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
Update string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
create String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
delete String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
read String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
update String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
create string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
delete string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
read string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
update string
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
create str
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
delete str
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
read str
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
update str
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
create String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
delete String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
read String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
update String
A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).

Import

$ pulumi import genesiscloud:index/snapshot:Snapshot example 18efeec8-94f0-4776-8ff2-5e9b49c74608
Copy

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

Package Details

Repository
genesiscloud genesiscloud/pulumi-genesiscloud
License
Apache-2.0
Notes
This Pulumi package is based on the genesiscloud Terraform Provider.