1. Packages
  2. AWS
  3. API Docs
  4. fsx
  5. getOntapStorageVirtualMachines
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

aws.fsx.getOntapStorageVirtualMachines

Explore with Pulumi AI

aws logo
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

    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"],
        }],
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.fsx.get_ontap_storage_virtual_machines(filters=[{
        "name": "file-system-id",
        "values": ["fs-12345678"],
    }])
    
    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
    	})
    }
    
    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",
                    },
                },
            },
        });
    
    });
    
    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());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: aws:fsx:getOntapStorageVirtualMachines
          Arguments:
            filters:
              - name: file-system-id
                values:
                  - fs-12345678
    

    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>
    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]
    func GetOntapStorageVirtualMachines(ctx *Context, args *GetOntapStorageVirtualMachinesArgs, opts ...InvokeOption) (*GetOntapStorageVirtualMachinesResult, error)
    func GetOntapStorageVirtualMachinesOutput(ctx *Context, args *GetOntapStorageVirtualMachinesOutputArgs, opts ...InvokeOption) GetOntapStorageVirtualMachinesResultOutput

    > 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)
    }
    public static CompletableFuture<GetOntapStorageVirtualMachinesResult> getOntapStorageVirtualMachines(GetOntapStorageVirtualMachinesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:fsx/getOntapStorageVirtualMachines:getOntapStorageVirtualMachines
      arguments:
        # arguments dictionary

    The following arguments are supported:

    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<Pulumi.Aws.Fsx.Outputs.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 string
    Name of the field to filter by, as defined by the underlying AWS API.
    Values 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 string
    Name of the field to filter by, as defined by the underlying AWS API.
    Values []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 String
    Name of the field to filter by, as defined by the underlying AWS API.
    values 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 string
    Name of the field to filter by, as defined by the underlying AWS API.
    values 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 str
    Name of the field to filter by, as defined by the underlying AWS API.
    values 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 String
    Name of the field to filter by, as defined by the underlying AWS API.
    values 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.
    aws logo
    AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi