AWS v6.60.0 published on Tuesday, Nov 19, 2024 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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: aws:fsx/getOpenZfsSnapshot:getOpenZfsSnapshot
arguments:
# arguments dictionary
The following arguments are supported:
- Filters
List<Get
Open 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 string
- Name of the snapshot.
- Snapshot
Ids List<string> - Returns information on a specific snapshot_id.
- Dictionary<string, string>
- List of Tag values, with a maximum of 50 elements.
- Filters
[]Get
Open 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 string
- Name of the snapshot.
- Snapshot
Ids []string - Returns information on a specific snapshot_id.
- map[string]string
- List of Tag values, with a maximum of 50 elements.
- filters
List<Get
Open 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 Boolean - If more than one result is returned, use the most recent snapshot.
- name String
- Name of the snapshot.
- snapshot
Ids List<String> - Returns information on a specific snapshot_id.
- Map<String,String>
- List of Tag values, with a maximum of 50 elements.
- filters
Get
Open 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 boolean - If more than one result is returned, use the most recent snapshot.
- name string
- Name of the snapshot.
- snapshot
Ids string[] - Returns information on a specific snapshot_id.
- {[key: string]: string}
- List of Tag values, with a maximum of 50 elements.
- filters
Sequence[Get
Open 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.
- most
Recent Boolean - If more than one result is returned, use the most recent snapshot.
- name String
- Name of the snapshot.
- snapshot
Ids 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.
- Creation
Time string - Time that the resource was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Snapshot
Id string - ID of the snapshot.
- Dictionary<string, string>
- List of Tag values, with a maximum of 50 elements.
- Volume
Id string - ID of the volume that the snapshot is of.
- Filters
List<Get
Open Zfs Snapshot Filter> - Most
Recent bool - Name string
- Name of the snapshot.
- Snapshot
Ids List<string>
- Arn string
- Amazon Resource Name of the snapshot.
- Creation
Time string - Time that the resource was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Snapshot
Id string - ID of the snapshot.
- map[string]string
- List of Tag values, with a maximum of 50 elements.
- Volume
Id string - ID of the volume that the snapshot is of.
- Filters
[]Get
Open Zfs Snapshot Filter - Most
Recent bool - Name string
- Name of the snapshot.
- Snapshot
Ids []string
- arn String
- Amazon Resource Name of the snapshot.
- creation
Time String - Time that the resource was created.
- id String
- The provider-assigned unique ID for this managed resource.
- snapshot
Id String - ID of the snapshot.
- Map<String,String>
- List of Tag values, with a maximum of 50 elements.
- volume
Id String - ID of the volume that the snapshot is of.
- filters
List<Get
Open Zfs Snapshot Filter> - most
Recent Boolean - name String
- Name of the snapshot.
- snapshot
Ids List<String>
- arn string
- Amazon Resource Name of the snapshot.
- creation
Time string - Time that the resource was created.
- id string
- The provider-assigned unique ID for this managed resource.
- snapshot
Id string - ID of the snapshot.
- {[key: string]: string}
- List of Tag values, with a maximum of 50 elements.
- volume
Id string - ID of the volume that the snapshot is of.
- filters
Get
Open Zfs Snapshot Filter[] - most
Recent boolean - name string
- Name of the snapshot.
- snapshot
Ids 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[Get
Open Zfs Snapshot Filter] - most_
recent bool - name str
- Name of the snapshot.
- snapshot_
ids Sequence[str]
- arn String
- Amazon Resource Name of the snapshot.
- creation
Time String - Time that the resource was created.
- id String
- The provider-assigned unique ID for this managed resource.
- snapshot
Id String - ID of the snapshot.
- Map<String>
- List of Tag values, with a maximum of 50 elements.
- volume
Id String - ID of the volume that the snapshot is of.
- filters List<Property Map>
- most
Recent Boolean - name String
- Name of the snapshot.
- snapshot
Ids 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
aws
Terraform Provider.