1. Packages
  2. Volcengine
  3. API Docs
  4. nas
  5. Snapshot
Volcengine v0.0.27 published on Tuesday, Dec 10, 2024 by Volcengine

volcengine.nas.Snapshot

Explore with Pulumi AI

Provides a resource to manage nas snapshot

Example Usage

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

const foo = new volcengine.nas.Snapshot("foo", {
    description: "desc2",
    fileSystemId: "enas-cnbj5c18f02afe0e",
    snapshotName: "tfsnap3",
});
Copy
import pulumi
import pulumi_volcengine as volcengine

foo = volcengine.nas.Snapshot("foo",
    description="desc2",
    file_system_id="enas-cnbj5c18f02afe0e",
    snapshot_name="tfsnap3")
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := nas.NewSnapshot(ctx, "foo", &nas.SnapshotArgs{
			Description:  pulumi.String("desc2"),
			FileSystemId: pulumi.String("enas-cnbj5c18f02afe0e"),
			SnapshotName: pulumi.String("tfsnap3"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;

return await Deployment.RunAsync(() => 
{
    var foo = new Volcengine.Nas.Snapshot("foo", new()
    {
        Description = "desc2",
        FileSystemId = "enas-cnbj5c18f02afe0e",
        SnapshotName = "tfsnap3",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.nas.Snapshot;
import com.pulumi.volcengine.nas.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 foo = new Snapshot("foo", SnapshotArgs.builder()        
            .description("desc2")
            .fileSystemId("enas-cnbj5c18f02afe0e")
            .snapshotName("tfsnap3")
            .build());

    }
}
Copy
resources:
  foo:
    type: volcengine:nas:Snapshot
    properties:
      description: desc2
      fileSystemId: enas-cnbj5c18f02afe0e
      snapshotName: tfsnap3
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,
             file_system_id: Optional[str] = None,
             snapshot_name: Optional[str] = None,
             description: 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: volcengine:nas: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 volcengineSnapshotResource = new Volcengine.Nas.Snapshot("volcengineSnapshotResource", new()
{
    FileSystemId = "string",
    SnapshotName = "string",
    Description = "string",
});
Copy
example, err := nas.NewSnapshot(ctx, "volcengineSnapshotResource", &nas.SnapshotArgs{
	FileSystemId: pulumi.String("string"),
	SnapshotName: pulumi.String("string"),
	Description:  pulumi.String("string"),
})
Copy
var volcengineSnapshotResource = new Snapshot("volcengineSnapshotResource", SnapshotArgs.builder()
    .fileSystemId("string")
    .snapshotName("string")
    .description("string")
    .build());
Copy
volcengine_snapshot_resource = volcengine.nas.Snapshot("volcengineSnapshotResource",
    file_system_id="string",
    snapshot_name="string",
    description="string")
Copy
const volcengineSnapshotResource = new volcengine.nas.Snapshot("volcengineSnapshotResource", {
    fileSystemId: "string",
    snapshotName: "string",
    description: "string",
});
Copy
type: volcengine:nas:Snapshot
properties:
    description: string
    fileSystemId: string
    snapshotName: 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:

FileSystemId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the file system.
SnapshotName This property is required. string
The name of snapshot.
Description string
The description of snapshot.
FileSystemId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the file system.
SnapshotName This property is required. string
The name of snapshot.
Description string
The description of snapshot.
fileSystemId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the file system.
snapshotName This property is required. String
The name of snapshot.
description String
The description of snapshot.
fileSystemId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the file system.
snapshotName This property is required. string
The name of snapshot.
description string
The description of snapshot.
file_system_id
This property is required.
Changes to this property will trigger replacement.
str
The ID of the file system.
snapshot_name This property is required. str
The name of snapshot.
description str
The description of snapshot.
fileSystemId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the file system.
snapshotName This property is required. String
The name of snapshot.
description String
The description of snapshot.

Outputs

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

CreateTime string
The create time of snapshot.
FileSystemName string
The name of file system.
Id string
The provider-assigned unique ID for this managed resource.
IsEncrypt bool
Whether is encrypt.
Progress string
The progress of snapshot.
SnapshotType string
The type of snapshot.
SourceSize int
The size of source.
SourceVersion string
The source version info.
Status string
The status of snapshot.
ZoneId string
The ID of zone.
CreateTime string
The create time of snapshot.
FileSystemName string
The name of file system.
Id string
The provider-assigned unique ID for this managed resource.
IsEncrypt bool
Whether is encrypt.
Progress string
The progress of snapshot.
SnapshotType string
The type of snapshot.
SourceSize int
The size of source.
SourceVersion string
The source version info.
Status string
The status of snapshot.
ZoneId string
The ID of zone.
createTime String
The create time of snapshot.
fileSystemName String
The name of file system.
id String
The provider-assigned unique ID for this managed resource.
isEncrypt Boolean
Whether is encrypt.
progress String
The progress of snapshot.
snapshotType String
The type of snapshot.
sourceSize Integer
The size of source.
sourceVersion String
The source version info.
status String
The status of snapshot.
zoneId String
The ID of zone.
createTime string
The create time of snapshot.
fileSystemName string
The name of file system.
id string
The provider-assigned unique ID for this managed resource.
isEncrypt boolean
Whether is encrypt.
progress string
The progress of snapshot.
snapshotType string
The type of snapshot.
sourceSize number
The size of source.
sourceVersion string
The source version info.
status string
The status of snapshot.
zoneId string
The ID of zone.
create_time str
The create time of snapshot.
file_system_name str
The name of file system.
id str
The provider-assigned unique ID for this managed resource.
is_encrypt bool
Whether is encrypt.
progress str
The progress of snapshot.
snapshot_type str
The type of snapshot.
source_size int
The size of source.
source_version str
The source version info.
status str
The status of snapshot.
zone_id str
The ID of zone.
createTime String
The create time of snapshot.
fileSystemName String
The name of file system.
id String
The provider-assigned unique ID for this managed resource.
isEncrypt Boolean
Whether is encrypt.
progress String
The progress of snapshot.
snapshotType String
The type of snapshot.
sourceSize Number
The size of source.
sourceVersion String
The source version info.
status String
The status of snapshot.
zoneId String
The ID of zone.

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,
        create_time: Optional[str] = None,
        description: Optional[str] = None,
        file_system_id: Optional[str] = None,
        file_system_name: Optional[str] = None,
        is_encrypt: Optional[bool] = None,
        progress: Optional[str] = None,
        snapshot_name: Optional[str] = None,
        snapshot_type: Optional[str] = None,
        source_size: Optional[int] = None,
        source_version: Optional[str] = None,
        status: Optional[str] = None,
        zone_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: volcengine:nas: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:
CreateTime string
The create time of snapshot.
Description string
The description of snapshot.
FileSystemId Changes to this property will trigger replacement. string
The ID of the file system.
FileSystemName string
The name of file system.
IsEncrypt bool
Whether is encrypt.
Progress string
The progress of snapshot.
SnapshotName string
The name of snapshot.
SnapshotType string
The type of snapshot.
SourceSize int
The size of source.
SourceVersion string
The source version info.
Status string
The status of snapshot.
ZoneId string
The ID of zone.
CreateTime string
The create time of snapshot.
Description string
The description of snapshot.
FileSystemId Changes to this property will trigger replacement. string
The ID of the file system.
FileSystemName string
The name of file system.
IsEncrypt bool
Whether is encrypt.
Progress string
The progress of snapshot.
SnapshotName string
The name of snapshot.
SnapshotType string
The type of snapshot.
SourceSize int
The size of source.
SourceVersion string
The source version info.
Status string
The status of snapshot.
ZoneId string
The ID of zone.
createTime String
The create time of snapshot.
description String
The description of snapshot.
fileSystemId Changes to this property will trigger replacement. String
The ID of the file system.
fileSystemName String
The name of file system.
isEncrypt Boolean
Whether is encrypt.
progress String
The progress of snapshot.
snapshotName String
The name of snapshot.
snapshotType String
The type of snapshot.
sourceSize Integer
The size of source.
sourceVersion String
The source version info.
status String
The status of snapshot.
zoneId String
The ID of zone.
createTime string
The create time of snapshot.
description string
The description of snapshot.
fileSystemId Changes to this property will trigger replacement. string
The ID of the file system.
fileSystemName string
The name of file system.
isEncrypt boolean
Whether is encrypt.
progress string
The progress of snapshot.
snapshotName string
The name of snapshot.
snapshotType string
The type of snapshot.
sourceSize number
The size of source.
sourceVersion string
The source version info.
status string
The status of snapshot.
zoneId string
The ID of zone.
create_time str
The create time of snapshot.
description str
The description of snapshot.
file_system_id Changes to this property will trigger replacement. str
The ID of the file system.
file_system_name str
The name of file system.
is_encrypt bool
Whether is encrypt.
progress str
The progress of snapshot.
snapshot_name str
The name of snapshot.
snapshot_type str
The type of snapshot.
source_size int
The size of source.
source_version str
The source version info.
status str
The status of snapshot.
zone_id str
The ID of zone.
createTime String
The create time of snapshot.
description String
The description of snapshot.
fileSystemId Changes to this property will trigger replacement. String
The ID of the file system.
fileSystemName String
The name of file system.
isEncrypt Boolean
Whether is encrypt.
progress String
The progress of snapshot.
snapshotName String
The name of snapshot.
snapshotType String
The type of snapshot.
sourceSize Number
The size of source.
sourceVersion String
The source version info.
status String
The status of snapshot.
zoneId String
The ID of zone.

Import

Nas Snapshot can be imported using the id, e.g.

$ pulumi import volcengine:nas/snapshot:Snapshot default snap-472a716f****
Copy

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

Package Details

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