1. Packages
  2. AWS
  3. API Docs
  4. fsx
  5. getOntapStorageVirtualMachines
AWS v6.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

aws.fsx.getOntapStorageVirtualMachines

Explore with Pulumi AI

This resource can be useful for getting back a set of FSx ONTAP Storage Virtual Machine (SVM) IDs.

Example Usage

The following shows outputting all SVM IDs for a given FSx ONTAP File System.

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

const example = aws.fsx.getOntapStorageVirtualMachines({
    filters: [{
        name: "file-system-id",
        values: ["fs-12345678"],
    }],
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.fsx.get_ontap_storage_virtual_machines(filters=[{
    "name": "file-system-id",
    "values": ["fs-12345678"],
}])
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.GetOntapStorageVirtualMachines(ctx, &fsx.GetOntapStorageVirtualMachinesArgs{
			Filters: []fsx.GetOntapStorageVirtualMachinesFilter{
				{
					Name: "file-system-id",
					Values: []string{
						"fs-12345678",
					},
				},
			},
		}, 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.GetOntapStorageVirtualMachines.Invoke(new()
    {
        Filters = new[]
        {
            new Aws.Fsx.Inputs.GetOntapStorageVirtualMachinesFilterInputArgs
            {
                Name = "file-system-id",
                Values = new[]
                {
                    "fs-12345678",
                },
            },
        },
    });

});
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.GetOntapStorageVirtualMachinesArgs;
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.getOntapStorageVirtualMachines(GetOntapStorageVirtualMachinesArgs.builder()
            .filters(GetOntapStorageVirtualMachinesFilterArgs.builder()
                .name("file-system-id")
                .values("fs-12345678")
                .build())
            .build());

    }
}
Copy
variables:
  example:
    fn::invoke:
      function: aws:fsx:getOntapStorageVirtualMachines
      arguments:
        filters:
          - name: file-system-id
            values:
              - fs-12345678
Copy

Using getOntapStorageVirtualMachines

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 getOntapStorageVirtualMachines(args: GetOntapStorageVirtualMachinesArgs, opts?: InvokeOptions): Promise<GetOntapStorageVirtualMachinesResult>
function getOntapStorageVirtualMachinesOutput(args: GetOntapStorageVirtualMachinesOutputArgs, opts?: InvokeOptions): Output<GetOntapStorageVirtualMachinesResult>
Copy
def get_ontap_storage_virtual_machines(filters: Optional[Sequence[GetOntapStorageVirtualMachinesFilter]] = None,
                                       opts: Optional[InvokeOptions] = None) -> GetOntapStorageVirtualMachinesResult
def get_ontap_storage_virtual_machines_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetOntapStorageVirtualMachinesFilterArgs]]]] = None,
                                       opts: Optional[InvokeOptions] = None) -> Output[GetOntapStorageVirtualMachinesResult]
Copy
func GetOntapStorageVirtualMachines(ctx *Context, args *GetOntapStorageVirtualMachinesArgs, opts ...InvokeOption) (*GetOntapStorageVirtualMachinesResult, error)
func GetOntapStorageVirtualMachinesOutput(ctx *Context, args *GetOntapStorageVirtualMachinesOutputArgs, opts ...InvokeOption) GetOntapStorageVirtualMachinesResultOutput
Copy

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

public static class GetOntapStorageVirtualMachines 
{
    public static Task<GetOntapStorageVirtualMachinesResult> InvokeAsync(GetOntapStorageVirtualMachinesArgs args, InvokeOptions? opts = null)
    public static Output<GetOntapStorageVirtualMachinesResult> Invoke(GetOntapStorageVirtualMachinesInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetOntapStorageVirtualMachinesResult> getOntapStorageVirtualMachines(GetOntapStorageVirtualMachinesArgs args, InvokeOptions options)
public static Output<GetOntapStorageVirtualMachinesResult> getOntapStorageVirtualMachines(GetOntapStorageVirtualMachinesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: aws:fsx/getOntapStorageVirtualMachines:getOntapStorageVirtualMachines
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Filters List<GetOntapStorageVirtualMachinesFilter>
Configuration block. Detailed below.
Filters []GetOntapStorageVirtualMachinesFilter
Configuration block. Detailed below.
filters List<GetOntapStorageVirtualMachinesFilter>
Configuration block. Detailed below.
filters GetOntapStorageVirtualMachinesFilter[]
Configuration block. Detailed below.
filters Sequence[GetOntapStorageVirtualMachinesFilter]
Configuration block. Detailed below.
filters List<Property Map>
Configuration block. Detailed below.

getOntapStorageVirtualMachines Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Ids List<string>
List of all SVM IDs found.
Filters List<GetOntapStorageVirtualMachinesFilter>
Id string
The provider-assigned unique ID for this managed resource.
Ids []string
List of all SVM IDs found.
Filters []GetOntapStorageVirtualMachinesFilter
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
List of all SVM IDs found.
filters List<GetOntapStorageVirtualMachinesFilter>
id string
The provider-assigned unique ID for this managed resource.
ids string[]
List of all SVM IDs found.
filters GetOntapStorageVirtualMachinesFilter[]
id str
The provider-assigned unique ID for this managed resource.
ids Sequence[str]
List of all SVM IDs found.
filters Sequence[GetOntapStorageVirtualMachinesFilter]
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
List of all SVM IDs found.
filters List<Property Map>

Supporting Types

GetOntapStorageVirtualMachinesFilter

Name This property is required. string
Name of the field to filter by, as defined by the underlying AWS API.
Values This property is required. List<string>
Set of values that are accepted for the given field. An SVM will be selected if any one of the given values matches.
Name This property is required. string
Name of the field to filter by, as defined by the underlying AWS API.
Values This property is required. []string
Set of values that are accepted for the given field. An SVM will be selected if any one of the given values matches.
name This property is required. String
Name of the field to filter by, as defined by the underlying AWS API.
values This property is required. List<String>
Set of values that are accepted for the given field. An SVM will be selected if any one of the given values matches.
name This property is required. string
Name of the field to filter by, as defined by the underlying AWS API.
values This property is required. string[]
Set of values that are accepted for the given field. An SVM will be selected if any one of the given values matches.
name This property is required. str
Name of the field to filter by, as defined by the underlying AWS API.
values This property is required. Sequence[str]
Set of values that are accepted for the given field. An SVM will be selected if any one of the given values matches.
name This property is required. String
Name of the field to filter by, as defined by the underlying AWS API.
values This property is required. List<String>
Set of values that are accepted for the given field. An SVM will be selected if any one of the given values matches.

Package Details

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