AWS v6.73.0 published on Wednesday, Mar 19, 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"],
    }],
});
import pulumi
import pulumi_aws as aws
example = aws.fsx.get_open_zfs_snapshot(most_recent=True,
    filters=[{
        "name": "volume-id",
        "values": ["fsvol-073a32b6098a73feb"],
    }])
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
	})
}
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",
                },
            },
        },
    });
});
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());
    }
}
variables:
  example:
    fn::invoke:
      function: aws:fsx:getOpenZfsSnapshot
      arguments:
        mostRecent: true
        filters:
          - name: volume-id
            values:
              - fsvol-073a32b6098a73feb
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>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]func LookupOpenZfsSnapshot(ctx *Context, args *LookupOpenZfsSnapshotArgs, opts ...InvokeOption) (*LookupOpenZfsSnapshotResult, error)
func LookupOpenZfsSnapshotOutput(ctx *Context, args *LookupOpenZfsSnapshotOutputArgs, opts ...InvokeOption) LookupOpenZfsSnapshotResultOutput> 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)
}public static CompletableFuture<GetOpenZfsSnapshotResult> getOpenZfsSnapshot(GetOpenZfsSnapshotArgs args, InvokeOptions options)
public static Output<GetOpenZfsSnapshotResult> getOpenZfsSnapshot(GetOpenZfsSnapshotArgs args, InvokeOptions options)
fn::invoke:
  function: aws:fsx/getOpenZfsSnapshot:getOpenZfsSnapshot
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Filters
List<GetOpen Zfs Snapshot Filter> 
- 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.
- Dictionary<string, string>
- List of Tag values, with a maximum of 50 elements.
- Filters
[]GetOpen Zfs Snapshot Filter 
- 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.
- map[string]string
- List of Tag values, with a maximum of 50 elements.
- filters
List<GetOpen Zfs Snapshot Filter> 
- 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.
- Map<String,String>
- List of Tag values, with a maximum of 50 elements.
- filters
GetOpen Zfs Snapshot Filter[] 
- 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.
- {[key: string]: string}
- List of Tag values, with a maximum of 50 elements.
- filters
Sequence[GetOpen Zfs Snapshot Filter] 
- 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.
- 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.
- 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.
- 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<GetOpen Zfs Snapshot Filter> 
- 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.
- 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
[]GetOpen Zfs Snapshot Filter 
- 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.
- 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<GetOpen Zfs Snapshot Filter> 
- 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.
- {[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
GetOpen Zfs Snapshot Filter[] 
- 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.
- 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[GetOpen Zfs Snapshot Filter] 
- 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.
- 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    
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the awsTerraform Provider.