OpenZfsSnapshot class

Manages an Amazon FSx for OpenZFS volume. See the FSx OpenZFS User Guide for more information.

Example Usage

Root volume Example

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

const exampleOpenZfsFileSystem = new aws.fsx.OpenZfsFileSystem("example", {
    storageCapacity: 64,
    subnetIds: [exampleAwsSubnet.id],
    deploymentType: "SINGLE_AZ_1",
    throughputCapacity: 64,
});
const example = new aws.fsx.OpenZfsSnapshot("example", {
    name: "example",
    volumeId: exampleOpenZfsFileSystem.rootVolumeId,
});
import pulumi
import pulumi_aws as aws

example_open_zfs_file_system = aws.fsx.OpenZfsFileSystem("example",
    storage_capacity=64,
    subnet_ids=[example_aws_subnet["id"]],
    deployment_type="SINGLE_AZ_1",
    throughput_capacity=64)
example = aws.fsx.OpenZfsSnapshot("example",
    name="example",
    volume_id=example_open_zfs_file_system.root_volume_id)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var exampleOpenZfsFileSystem = new Aws.Fsx.OpenZfsFileSystem("example", new()
    {
        StorageCapacity = 64,
        SubnetIds = new[]
        {
            exampleAwsSubnet.Id,
        },
        DeploymentType = "SINGLE_AZ_1",
        ThroughputCapacity = 64,
    });

    var example = new Aws.Fsx.OpenZfsSnapshot("example", new()
    {
        Name = "example",
        VolumeId = exampleOpenZfsFileSystem.RootVolumeId,
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/fsx"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleOpenZfsFileSystem, err := fsx.NewOpenZfsFileSystem(ctx, "example", &fsx.OpenZfsFileSystemArgs{
			StorageCapacity: pulumi.Int(64),
			SubnetIds: pulumi.StringArray{
				exampleAwsSubnet.Id,
			},
			DeploymentType:     pulumi.String("SINGLE_AZ_1"),
			ThroughputCapacity: pulumi.Int(64),
		})
		if err != nil {
			return err
		}
		_, err = fsx.NewOpenZfsSnapshot(ctx, "example", &fsx.OpenZfsSnapshotArgs{
			Name:     pulumi.String("example"),
			VolumeId: exampleOpenZfsFileSystem.RootVolumeId,
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_fsx_openzfssnapshot" "example" {
  name      = "example"
  volume_id = aws_fsx_openzfsfilesystem.example.root_volume_id
}
resource "aws_fsx_openzfsfilesystem" "example" {
  storage_capacity    = 64
  subnet_ids          = [exampleAwsSubnet.id]
  deployment_type     = "SINGLE_AZ_1"
  throughput_capacity = 64
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.fsx.OpenZfsFileSystem;
import com.pulumi.aws.fsx.OpenZfsFileSystemArgs;
import com.pulumi.aws.fsx.OpenZfsSnapshot;
import com.pulumi.aws.fsx.OpenZfsSnapshotArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 exampleOpenZfsFileSystem = new OpenZfsFileSystem("exampleOpenZfsFileSystem", OpenZfsFileSystemArgs.builder()
            .storageCapacity(64)
            .subnetIds(exampleAwsSubnet.id())
            .deploymentType("SINGLE_AZ_1")
            .throughputCapacity(64)
            .build());

        var example = new OpenZfsSnapshot("example", OpenZfsSnapshotArgs.builder()
            .name("example")
            .volumeId(exampleOpenZfsFileSystem.rootVolumeId())
            .build());

    }
}
resources:
  example:
    type: aws:fsx:OpenZfsSnapshot
    properties:
      name: example
      volumeId: ${exampleOpenZfsFileSystem.rootVolumeId}
  exampleOpenZfsFileSystem:
    type: aws:fsx:OpenZfsFileSystem
    name: example
    properties:
      storageCapacity: 64
      subnetIds:
        - ${exampleAwsSubnet.id}
      deploymentType: SINGLE_AZ_1
      throughputCapacity: 64

Child volume Example

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

const exampleOpenZfsFileSystem = new aws.fsx.OpenZfsFileSystem("example", {
    storageCapacity: 64,
    subnetIds: [exampleAwsSubnet.id],
    deploymentType: "SINGLE_AZ_1",
    throughputCapacity: 64,
});
const exampleOpenZfsVolume = new aws.fsx.OpenZfsVolume("example", {
    name: "example",
    parentVolumeId: exampleOpenZfsFileSystem.rootVolumeId,
});
const example = new aws.fsx.OpenZfsSnapshot("example", {
    name: "example",
    volumeId: exampleOpenZfsVolume.id,
});
import pulumi
import pulumi_aws as aws

example_open_zfs_file_system = aws.fsx.OpenZfsFileSystem("example",
    storage_capacity=64,
    subnet_ids=[example_aws_subnet["id"]],
    deployment_type="SINGLE_AZ_1",
    throughput_capacity=64)
example_open_zfs_volume = aws.fsx.OpenZfsVolume("example",
    name="example",
    parent_volume_id=example_open_zfs_file_system.root_volume_id)
example = aws.fsx.OpenZfsSnapshot("example",
    name="example",
    volume_id=example_open_zfs_volume.id)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var exampleOpenZfsFileSystem = new Aws.Fsx.OpenZfsFileSystem("example", new()
    {
        StorageCapacity = 64,
        SubnetIds = new[]
        {
            exampleAwsSubnet.Id,
        },
        DeploymentType = "SINGLE_AZ_1",
        ThroughputCapacity = 64,
    });

    var exampleOpenZfsVolume = new Aws.Fsx.OpenZfsVolume("example", new()
    {
        Name = "example",
        ParentVolumeId = exampleOpenZfsFileSystem.RootVolumeId,
    });

    var example = new Aws.Fsx.OpenZfsSnapshot("example", new()
    {
        Name = "example",
        VolumeId = exampleOpenZfsVolume.Id,
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/fsx"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleOpenZfsFileSystem, err := fsx.NewOpenZfsFileSystem(ctx, "example", &fsx.OpenZfsFileSystemArgs{
			StorageCapacity: pulumi.Int(64),
			SubnetIds: pulumi.StringArray{
				exampleAwsSubnet.Id,
			},
			DeploymentType:     pulumi.String("SINGLE_AZ_1"),
			ThroughputCapacity: pulumi.Int(64),
		})
		if err != nil {
			return err
		}
		exampleOpenZfsVolume, err := fsx.NewOpenZfsVolume(ctx, "example", &fsx.OpenZfsVolumeArgs{
			Name:           pulumi.String("example"),
			ParentVolumeId: exampleOpenZfsFileSystem.RootVolumeId,
		})
		if err != nil {
			return err
		}
		_, err = fsx.NewOpenZfsSnapshot(ctx, "example", &fsx.OpenZfsSnapshotArgs{
			Name:     pulumi.String("example"),
			VolumeId: exampleOpenZfsVolume.ID().ToIDOutput().ToStringOutput(),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_fsx_openzfssnapshot" "example" {
  name      = "example"
  volume_id = aws_fsx_openzfsvolume.example.id
}
resource "aws_fsx_openzfsvolume" "example" {
  name             = "example"
  parent_volume_id = aws_fsx_openzfsfilesystem.example.root_volume_id
}
resource "aws_fsx_openzfsfilesystem" "example" {
  storage_capacity    = 64
  subnet_ids          = [exampleAwsSubnet.id]
  deployment_type     = "SINGLE_AZ_1"
  throughput_capacity = 64
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.fsx.OpenZfsFileSystem;
import com.pulumi.aws.fsx.OpenZfsFileSystemArgs;
import com.pulumi.aws.fsx.OpenZfsVolume;
import com.pulumi.aws.fsx.OpenZfsVolumeArgs;
import com.pulumi.aws.fsx.OpenZfsSnapshot;
import com.pulumi.aws.fsx.OpenZfsSnapshotArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 exampleOpenZfsFileSystem = new OpenZfsFileSystem("exampleOpenZfsFileSystem", OpenZfsFileSystemArgs.builder()
            .storageCapacity(64)
            .subnetIds(exampleAwsSubnet.id())
            .deploymentType("SINGLE_AZ_1")
            .throughputCapacity(64)
            .build());

        var exampleOpenZfsVolume = new OpenZfsVolume("exampleOpenZfsVolume", OpenZfsVolumeArgs.builder()
            .name("example")
            .parentVolumeId(exampleOpenZfsFileSystem.rootVolumeId())
            .build());

        var example = new OpenZfsSnapshot("example", OpenZfsSnapshotArgs.builder()
            .name("example")
            .volumeId(exampleOpenZfsVolume.id())
            .build());

    }
}
resources:
  example:
    type: aws:fsx:OpenZfsSnapshot
    properties:
      name: example
      volumeId: ${exampleOpenZfsVolume.id}
  exampleOpenZfsVolume:
    type: aws:fsx:OpenZfsVolume
    name: example
    properties:
      name: example
      parentVolumeId: ${exampleOpenZfsFileSystem.rootVolumeId}
  exampleOpenZfsFileSystem:
    type: aws:fsx:OpenZfsFileSystem
    name: example
    properties:
      storageCapacity: 64
      subnetIds:
        - ${exampleAwsSubnet.id}
      deploymentType: SINGLE_AZ_1
      throughputCapacity: 64

Import

Using pulumi import, import FSx OpenZFS snapshot using the id. For example:

$ pulumi import aws:fsx/openZfsSnapshot:OpenZfsSnapshot example fs-543ab12b1ca672f33

Constructors

OpenZfsSnapshot(String name, {OpenZfsSnapshotArgs? args, CustomResourceOptions? options})
Creates a new OpenZfsSnapshot. name The Pulumi resource name. args Arguments used to configure this OpenZfsSnapshot. The set of arguments for OpenZfsSnapshot. options Resource options controlling this resource's behavior.
OpenZfsSnapshot.reference(String urn)
Creates a typed reference to an existing OpenZfsSnapshot resource.

Properties

arn ↔ Output<String>
ARN of the snapshot.
latefinal
childResources → Set<Resource>
finalinherited
completionSources ↔ Map<String, IOutputCompletionSource>
latefinalinherited
creationTime ↔ Output<String>
Time that the snapshot was created.
latefinal
hashCode → int
The hash code for this object.
no setterinherited
id ↔ Output<String>
getter/setter pairinherited
isCustom → bool
Returns whether this resource is provider-managed.
no setterinherited
isProtected → bool
Returns whether this resource is protected from deletion.
no setterinherited
isRemote → bool
Whether this resource is registered as remote.
no setterinherited
isResourceReference → bool
Whether this instance represents a resource value returned over RPC.
finalinherited
name ↔ Output<String>
Name of the Snapshot. You can use a maximum of 203 alphanumeric characters plus either _ or - or : or . for the name.
latefinal
region ↔ Output<String>
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
resourceTransforms → List<ResourceTransform>
Inherited/explicit async transforms.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
tags ↔ Output<Map<String, String>?>
Map of tags to assign to the file system. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level. If you have set copyTagsToBackups to true, and you specify one or more tags, no existing file system tags are copied from the file system to the backup.
latefinal
tagsAll ↔ Output<Map<String, String>>
Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
latefinal
transformations → List<ResourceTransformation>
Inherited/explicit legacy transformations.
no setterinherited
urn ↔ Output<String>
latefinalinherited
volumeId ↔ Output<String>
ID of the volume to snapshot. This can be the root volume or a child volume.
latefinal

Methods

failId(Object error) → void
Completes this resource ID with an error when registration fails.
inherited
failOutputs(Object error) → void
Completes all output properties with error.
inherited
failUrn(Object error) → void
Completes this resource URN with an error when registration fails.
inherited
getProvider(String moduleMember) → ProviderResource?
Returns provider for moduleMember's package, if configured.
inherited
getResourceName() → String
Returns this resource's logical name.
inherited
getResourceType() → String
Returns this resource's Pulumi type token.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerOutput<T>(String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output<T>
Registers a dynamic output property for this resource.
inherited
resolveId(String? value, {required bool isKnown}) → void
Resolves the provider-assigned ID for this resource.
inherited
resolveOutputs(Struct outputs) → void
Resolves all output properties from a monitor response payload.
inherited
resolveUrn(String value) → void
Resolves this resource's URN once assigned by the engine.
inherited
serializeProperties(Map<String, dynamic> properties) → Future<Struct>
Serializes resource properties for RPC transmission.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

get(String name, Input<String> id, {OpenZfsSnapshotState? state, CustomResourceOptions? options}) → OpenZfsSnapshot
Gets an existing OpenZfsSnapshot resource's state with the given name and id.