1. Packages
  2. AWS
  3. API Docs
  4. fsx
  5. getOpenZfsSnapshot
AWS v6.77.0 published on Wednesday, Apr 9, 2025 by Pulumi

aws.fsx.getOpenZfsSnapshot

Explore with Pulumi AI

Use this data source to get information about an Amazon FSx for OpenZFS Snapshot for use when provisioning new Volumes.

Example Usage

Root volume Example

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

const example = aws.fsx.getOpenZfsSnapshot({
    mostRecent: true,
    filters: [{
        name: "volume-id",
        values: ["fsvol-073a32b6098a73feb"],
    }],
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.fsx.get_open_zfs_snapshot(most_recent=True,
    filters=[{
        "name": "volume-id",
        "values": ["fsvol-073a32b6098a73feb"],
    }])
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := fsx.LookupOpenZfsSnapshot(ctx, &fsx.LookupOpenZfsSnapshotArgs{
			MostRecent: pulumi.BoolRef(true),
			Filters: []fsx.GetOpenZfsSnapshotFilter{
				{
					Name: "volume-id",
					Values: []string{
						"fsvol-073a32b6098a73feb",
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = Aws.Fsx.GetOpenZfsSnapshot.Invoke(new()
    {
        MostRecent = true,
        Filters = new[]
        {
            new Aws.Fsx.Inputs.GetOpenZfsSnapshotFilterInputArgs
            {
                Name = "volume-id",
                Values = new[]
                {
                    "fsvol-073a32b6098a73feb",
                },
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.fsx.FsxFunctions;
import com.pulumi.aws.fsx.inputs.GetOpenZfsSnapshotArgs;
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) {
        final var example = FsxFunctions.getOpenZfsSnapshot(GetOpenZfsSnapshotArgs.builder()
            .mostRecent(true)
            .filters(GetOpenZfsSnapshotFilterArgs.builder()
                .name("volume-id")
                .values("fsvol-073a32b6098a73feb")
                .build())
            .build());

    }
}
Copy
variables:
  example:
    fn::invoke:
      function: aws:fsx:getOpenZfsSnapshot
      arguments:
        mostRecent: true
        filters:
          - name: volume-id
            values:
              - fsvol-073a32b6098a73feb
Copy

Using getOpenZfsSnapshot

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getOpenZfsSnapshot(args: GetOpenZfsSnapshotArgs, opts?: InvokeOptions): Promise<GetOpenZfsSnapshotResult>
function getOpenZfsSnapshotOutput(args: GetOpenZfsSnapshotOutputArgs, opts?: InvokeOptions): Output<GetOpenZfsSnapshotResult>
Copy
def get_open_zfs_snapshot(filters: Optional[Sequence[GetOpenZfsSnapshotFilter]] = None,
                          most_recent: Optional[bool] = None,
                          name: Optional[str] = None,
                          snapshot_ids: Optional[Sequence[str]] = None,
                          tags: Optional[Mapping[str, str]] = None,
                          opts: Optional[InvokeOptions] = None) -> GetOpenZfsSnapshotResult
def get_open_zfs_snapshot_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetOpenZfsSnapshotFilterArgs]]]] = None,
                          most_recent: Optional[pulumi.Input[bool]] = None,
                          name: Optional[pulumi.Input[str]] = None,
                          snapshot_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                          tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetOpenZfsSnapshotResult]
Copy
func LookupOpenZfsSnapshot(ctx *Context, args *LookupOpenZfsSnapshotArgs, opts ...InvokeOption) (*LookupOpenZfsSnapshotResult, error)
func LookupOpenZfsSnapshotOutput(ctx *Context, args *LookupOpenZfsSnapshotOutputArgs, opts ...InvokeOption) LookupOpenZfsSnapshotResultOutput
Copy

> Note: This function is named LookupOpenZfsSnapshot in the Go SDK.

public static class GetOpenZfsSnapshot 
{
    public static Task<GetOpenZfsSnapshotResult> InvokeAsync(GetOpenZfsSnapshotArgs args, InvokeOptions? opts = null)
    public static Output<GetOpenZfsSnapshotResult> Invoke(GetOpenZfsSnapshotInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetOpenZfsSnapshotResult> getOpenZfsSnapshot(GetOpenZfsSnapshotArgs args, InvokeOptions options)
public static Output<GetOpenZfsSnapshotResult> getOpenZfsSnapshot(GetOpenZfsSnapshotArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: aws:fsx/getOpenZfsSnapshot:getOpenZfsSnapshot
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Filters List<GetOpenZfsSnapshotFilter>
One or more name/value pairs to filter off of. The supported names are file-system-id or volume-id.
MostRecent bool
If more than one result is returned, use the most recent snapshot.
Name string
Name of the snapshot.
SnapshotIds List<string>
Returns information on a specific snapshot_id.
Tags Dictionary<string, string>
List of Tag values, with a maximum of 50 elements.
Filters []GetOpenZfsSnapshotFilter
One or more name/value pairs to filter off of. The supported names are file-system-id or volume-id.
MostRecent bool
If more than one result is returned, use the most recent snapshot.
Name string
Name of the snapshot.
SnapshotIds []string
Returns information on a specific snapshot_id.
Tags map[string]string
List of Tag values, with a maximum of 50 elements.
filters List<GetOpenZfsSnapshotFilter>
One or more name/value pairs to filter off of. The supported names are file-system-id or volume-id.
mostRecent Boolean
If more than one result is returned, use the most recent snapshot.
name String
Name of the snapshot.
snapshotIds List<String>
Returns information on a specific snapshot_id.
tags Map<String,String>
List of Tag values, with a maximum of 50 elements.
filters GetOpenZfsSnapshotFilter[]
One or more name/value pairs to filter off of. The supported names are file-system-id or volume-id.
mostRecent boolean
If more than one result is returned, use the most recent snapshot.
name string
Name of the snapshot.
snapshotIds string[]
Returns information on a specific snapshot_id.
tags {[key: string]: string}
List of Tag values, with a maximum of 50 elements.
filters Sequence[GetOpenZfsSnapshotFilter]
One or more name/value pairs to filter off of. The supported names are file-system-id or volume-id.
most_recent bool
If more than one result is returned, use the most recent snapshot.
name str
Name of the snapshot.
snapshot_ids Sequence[str]
Returns information on a specific snapshot_id.
tags Mapping[str, str]
List of Tag values, with a maximum of 50 elements.
filters List<Property Map>
One or more name/value pairs to filter off of. The supported names are file-system-id or volume-id.
mostRecent Boolean
If more than one result is returned, use the most recent snapshot.
name String
Name of the snapshot.
snapshotIds List<String>
Returns information on a specific snapshot_id.
tags Map<String>
List of Tag values, with a maximum of 50 elements.

getOpenZfsSnapshot Result

The following output properties are available:

Arn string
Amazon Resource Name of the snapshot.
CreationTime string
Time that the resource was created.
Id string
The provider-assigned unique ID for this managed resource.
SnapshotId string
ID of the snapshot.
Tags Dictionary<string, string>
List of Tag values, with a maximum of 50 elements.
VolumeId string
ID of the volume that the snapshot is of.
Filters List<GetOpenZfsSnapshotFilter>
MostRecent bool
Name string
Name of the snapshot.
SnapshotIds List<string>
Arn string
Amazon Resource Name of the snapshot.
CreationTime string
Time that the resource was created.
Id string
The provider-assigned unique ID for this managed resource.
SnapshotId string
ID of the snapshot.
Tags map[string]string
List of Tag values, with a maximum of 50 elements.
VolumeId string
ID of the volume that the snapshot is of.
Filters []GetOpenZfsSnapshotFilter
MostRecent bool
Name string
Name of the snapshot.
SnapshotIds []string
arn String
Amazon Resource Name of the snapshot.
creationTime String
Time that the resource was created.
id String
The provider-assigned unique ID for this managed resource.
snapshotId String
ID of the snapshot.
tags Map<String,String>
List of Tag values, with a maximum of 50 elements.
volumeId String
ID of the volume that the snapshot is of.
filters List<GetOpenZfsSnapshotFilter>
mostRecent Boolean
name String
Name of the snapshot.
snapshotIds List<String>
arn string
Amazon Resource Name of the snapshot.
creationTime string
Time that the resource was created.
id string
The provider-assigned unique ID for this managed resource.
snapshotId string
ID of the snapshot.
tags {[key: string]: string}
List of Tag values, with a maximum of 50 elements.
volumeId string
ID of the volume that the snapshot is of.
filters GetOpenZfsSnapshotFilter[]
mostRecent boolean
name string
Name of the snapshot.
snapshotIds string[]
arn str
Amazon Resource Name of the snapshot.
creation_time str
Time that the resource was created.
id str
The provider-assigned unique ID for this managed resource.
snapshot_id str
ID of the snapshot.
tags Mapping[str, str]
List of Tag values, with a maximum of 50 elements.
volume_id str
ID of the volume that the snapshot is of.
filters Sequence[GetOpenZfsSnapshotFilter]
most_recent bool
name str
Name of the snapshot.
snapshot_ids Sequence[str]
arn String
Amazon Resource Name of the snapshot.
creationTime String
Time that the resource was created.
id String
The provider-assigned unique ID for this managed resource.
snapshotId String
ID of the snapshot.
tags Map<String>
List of Tag values, with a maximum of 50 elements.
volumeId String
ID of the volume that the snapshot is of.
filters List<Property Map>
mostRecent Boolean
name String
Name of the snapshot.
snapshotIds List<String>

Supporting Types

GetOpenZfsSnapshotFilter

Name This property is required. string
Name of the snapshot.
Values This property is required. List<string>
Name This property is required. string
Name of the snapshot.
Values This property is required. []string
name This property is required. String
Name of the snapshot.
values This property is required. List<String>
name This property is required. string
Name of the snapshot.
values This property is required. string[]
name This property is required. str
Name of the snapshot.
values This property is required. Sequence[str]
name This property is required. String
Name of the snapshot.
values This property is required. List<String>

Package Details

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