1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. nas
  5. getMountTargets
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

alicloud.nas.getMountTargets

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

    This data source provides MountTargets available to the user.

    NOTE: Available in 1.35.0+

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const example = alicloud.nas.getMountTargets({
        fileSystemId: "1a2sc4d",
        accessGroupName: "tf-testAccNasConfig",
    });
    export const theFirstMountTargetDomain = example.then(example => example.targets?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    example = alicloud.nas.get_mount_targets(file_system_id="1a2sc4d",
        access_group_name="tf-testAccNasConfig")
    pulumi.export("theFirstMountTargetDomain", example.targets[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/nas"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := nas.GetMountTargets(ctx, &nas.GetMountTargetsArgs{
    			FileSystemId:    "1a2sc4d",
    			AccessGroupName: pulumi.StringRef("tf-testAccNasConfig"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("theFirstMountTargetDomain", example.Targets[0].Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = AliCloud.Nas.GetMountTargets.Invoke(new()
        {
            FileSystemId = "1a2sc4d",
            AccessGroupName = "tf-testAccNasConfig",
        });
    
        return new Dictionary<string, object?>
        {
            ["theFirstMountTargetDomain"] = example.Apply(getMountTargetsResult => getMountTargetsResult.Targets[0]?.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.nas.NasFunctions;
    import com.pulumi.alicloud.nas.inputs.GetMountTargetsArgs;
    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 = NasFunctions.getMountTargets(GetMountTargetsArgs.builder()
                .fileSystemId("1a2sc4d")
                .accessGroupName("tf-testAccNasConfig")
                .build());
    
            ctx.export("theFirstMountTargetDomain", example.applyValue(getMountTargetsResult -> getMountTargetsResult.targets()[0].id()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: alicloud:nas:getMountTargets
          Arguments:
            fileSystemId: 1a2sc4d
            accessGroupName: tf-testAccNasConfig
    outputs:
      theFirstMountTargetDomain: ${example.targets[0].id}
    

    Using getMountTargets

    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 getMountTargets(args: GetMountTargetsArgs, opts?: InvokeOptions): Promise<GetMountTargetsResult>
    function getMountTargetsOutput(args: GetMountTargetsOutputArgs, opts?: InvokeOptions): Output<GetMountTargetsResult>
    def get_mount_targets(access_group_name: Optional[str] = None,
                          file_system_id: Optional[str] = None,
                          ids: Optional[Sequence[str]] = None,
                          mount_target_domain: Optional[str] = None,
                          network_type: Optional[str] = None,
                          output_file: Optional[str] = None,
                          status: Optional[str] = None,
                          type: Optional[str] = None,
                          vpc_id: Optional[str] = None,
                          vswitch_id: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetMountTargetsResult
    def get_mount_targets_output(access_group_name: Optional[pulumi.Input[str]] = None,
                          file_system_id: Optional[pulumi.Input[str]] = None,
                          ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                          mount_target_domain: Optional[pulumi.Input[str]] = None,
                          network_type: Optional[pulumi.Input[str]] = None,
                          output_file: Optional[pulumi.Input[str]] = None,
                          status: Optional[pulumi.Input[str]] = None,
                          type: Optional[pulumi.Input[str]] = None,
                          vpc_id: Optional[pulumi.Input[str]] = None,
                          vswitch_id: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetMountTargetsResult]
    func GetMountTargets(ctx *Context, args *GetMountTargetsArgs, opts ...InvokeOption) (*GetMountTargetsResult, error)
    func GetMountTargetsOutput(ctx *Context, args *GetMountTargetsOutputArgs, opts ...InvokeOption) GetMountTargetsResultOutput

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

    public static class GetMountTargets 
    {
        public static Task<GetMountTargetsResult> InvokeAsync(GetMountTargetsArgs args, InvokeOptions? opts = null)
        public static Output<GetMountTargetsResult> Invoke(GetMountTargetsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetMountTargetsResult> getMountTargets(GetMountTargetsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:nas/getMountTargets:getMountTargets
      arguments:
        # arguments dictionary

    The following arguments are supported:

    FileSystemId string
    The ID of the FileSystem that owns the MountTarget.
    AccessGroupName string
    Filter results by a specific AccessGroupName.
    Ids List<string>
    A list of MountTargetDomain.
    MountTargetDomain string
    Field mount_target_domain has been deprecated from provider version 1.53.0. New field ids replaces it.

    Deprecated: Field 'mount_target_domain' has been deprecated from provider version 1.53.0. New field 'ids' replaces it.

    NetworkType string
    Filter results by a specific NetworkType.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Status string
    Filter results by the status of mount target. Valid values: Active, Inactive and Pending.
    Type string
    Field type has been deprecated from provider version 1.95.0. New field network_type replaces it.

    Deprecated: Field 'type' has been deprecated from provider version 1.95.0. New field 'network_type' replaces it.

    VpcId string
    Filter results by a specific VpcId.
    VswitchId string
    Filter results by a specific VSwitchId.
    FileSystemId string
    The ID of the FileSystem that owns the MountTarget.
    AccessGroupName string
    Filter results by a specific AccessGroupName.
    Ids []string
    A list of MountTargetDomain.
    MountTargetDomain string
    Field mount_target_domain has been deprecated from provider version 1.53.0. New field ids replaces it.

    Deprecated: Field 'mount_target_domain' has been deprecated from provider version 1.53.0. New field 'ids' replaces it.

    NetworkType string
    Filter results by a specific NetworkType.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Status string
    Filter results by the status of mount target. Valid values: Active, Inactive and Pending.
    Type string
    Field type has been deprecated from provider version 1.95.0. New field network_type replaces it.

    Deprecated: Field 'type' has been deprecated from provider version 1.95.0. New field 'network_type' replaces it.

    VpcId string
    Filter results by a specific VpcId.
    VswitchId string
    Filter results by a specific VSwitchId.
    fileSystemId String
    The ID of the FileSystem that owns the MountTarget.
    accessGroupName String
    Filter results by a specific AccessGroupName.
    ids List<String>
    A list of MountTargetDomain.
    mountTargetDomain String
    Field mount_target_domain has been deprecated from provider version 1.53.0. New field ids replaces it.

    Deprecated: Field 'mount_target_domain' has been deprecated from provider version 1.53.0. New field 'ids' replaces it.

    networkType String
    Filter results by a specific NetworkType.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    status String
    Filter results by the status of mount target. Valid values: Active, Inactive and Pending.
    type String
    Field type has been deprecated from provider version 1.95.0. New field network_type replaces it.

    Deprecated: Field 'type' has been deprecated from provider version 1.95.0. New field 'network_type' replaces it.

    vpcId String
    Filter results by a specific VpcId.
    vswitchId String
    Filter results by a specific VSwitchId.
    fileSystemId string
    The ID of the FileSystem that owns the MountTarget.
    accessGroupName string
    Filter results by a specific AccessGroupName.
    ids string[]
    A list of MountTargetDomain.
    mountTargetDomain string
    Field mount_target_domain has been deprecated from provider version 1.53.0. New field ids replaces it.

    Deprecated: Field 'mount_target_domain' has been deprecated from provider version 1.53.0. New field 'ids' replaces it.

    networkType string
    Filter results by a specific NetworkType.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    status string
    Filter results by the status of mount target. Valid values: Active, Inactive and Pending.
    type string
    Field type has been deprecated from provider version 1.95.0. New field network_type replaces it.

    Deprecated: Field 'type' has been deprecated from provider version 1.95.0. New field 'network_type' replaces it.

    vpcId string
    Filter results by a specific VpcId.
    vswitchId string
    Filter results by a specific VSwitchId.
    file_system_id str
    The ID of the FileSystem that owns the MountTarget.
    access_group_name str
    Filter results by a specific AccessGroupName.
    ids Sequence[str]
    A list of MountTargetDomain.
    mount_target_domain str
    Field mount_target_domain has been deprecated from provider version 1.53.0. New field ids replaces it.

    Deprecated: Field 'mount_target_domain' has been deprecated from provider version 1.53.0. New field 'ids' replaces it.

    network_type str
    Filter results by a specific NetworkType.
    output_file str
    File name where to save data source results (after running pulumi preview).
    status str
    Filter results by the status of mount target. Valid values: Active, Inactive and Pending.
    type str
    Field type has been deprecated from provider version 1.95.0. New field network_type replaces it.

    Deprecated: Field 'type' has been deprecated from provider version 1.95.0. New field 'network_type' replaces it.

    vpc_id str
    Filter results by a specific VpcId.
    vswitch_id str
    Filter results by a specific VSwitchId.
    fileSystemId String
    The ID of the FileSystem that owns the MountTarget.
    accessGroupName String
    Filter results by a specific AccessGroupName.
    ids List<String>
    A list of MountTargetDomain.
    mountTargetDomain String
    Field mount_target_domain has been deprecated from provider version 1.53.0. New field ids replaces it.

    Deprecated: Field 'mount_target_domain' has been deprecated from provider version 1.53.0. New field 'ids' replaces it.

    networkType String
    Filter results by a specific NetworkType.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    status String
    Filter results by the status of mount target. Valid values: Active, Inactive and Pending.
    type String
    Field type has been deprecated from provider version 1.95.0. New field network_type replaces it.

    Deprecated: Field 'type' has been deprecated from provider version 1.95.0. New field 'network_type' replaces it.

    vpcId String
    Filter results by a specific VpcId.
    vswitchId String
    Filter results by a specific VSwitchId.

    getMountTargets Result

    The following output properties are available:

    FileSystemId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    A list of MountTargetDomain.
    Targets List<Pulumi.AliCloud.Nas.Outputs.GetMountTargetsTarget>
    A list of MountTargetDomains. Each element contains the following attributes:
    AccessGroupName string
    AccessGroup of The MountTarget.
    MountTargetDomain string
    MountTargetDomain of the MountTarget.

    Deprecated: Field 'mount_target_domain' has been deprecated from provider version 1.53.0. New field 'ids' replaces it.

    NetworkType string
    (Available 1.95.0+) NetworkType of The MountTarget.
    OutputFile string
    Status string
    (Available 1.95.0+) The status of the mount target.
    Type string
    Field type has been deprecated from provider version 1.95.0. New field network_type replaces it.

    Deprecated: Field 'type' has been deprecated from provider version 1.95.0. New field 'network_type' replaces it.

    VpcId string
    VpcId of The MountTarget.
    VswitchId string
    VSwitchId of The MountTarget.
    FileSystemId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    A list of MountTargetDomain.
    Targets []GetMountTargetsTarget
    A list of MountTargetDomains. Each element contains the following attributes:
    AccessGroupName string
    AccessGroup of The MountTarget.
    MountTargetDomain string
    MountTargetDomain of the MountTarget.

    Deprecated: Field 'mount_target_domain' has been deprecated from provider version 1.53.0. New field 'ids' replaces it.

    NetworkType string
    (Available 1.95.0+) NetworkType of The MountTarget.
    OutputFile string
    Status string
    (Available 1.95.0+) The status of the mount target.
    Type string
    Field type has been deprecated from provider version 1.95.0. New field network_type replaces it.

    Deprecated: Field 'type' has been deprecated from provider version 1.95.0. New field 'network_type' replaces it.

    VpcId string
    VpcId of The MountTarget.
    VswitchId string
    VSwitchId of The MountTarget.
    fileSystemId String
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of MountTargetDomain.
    targets List<GetMountTargetsTarget>
    A list of MountTargetDomains. Each element contains the following attributes:
    accessGroupName String
    AccessGroup of The MountTarget.
    mountTargetDomain String
    MountTargetDomain of the MountTarget.

    Deprecated: Field 'mount_target_domain' has been deprecated from provider version 1.53.0. New field 'ids' replaces it.

    networkType String
    (Available 1.95.0+) NetworkType of The MountTarget.
    outputFile String
    status String
    (Available 1.95.0+) The status of the mount target.
    type String
    Field type has been deprecated from provider version 1.95.0. New field network_type replaces it.

    Deprecated: Field 'type' has been deprecated from provider version 1.95.0. New field 'network_type' replaces it.

    vpcId String
    VpcId of The MountTarget.
    vswitchId String
    VSwitchId of The MountTarget.
    fileSystemId string
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    A list of MountTargetDomain.
    targets GetMountTargetsTarget[]
    A list of MountTargetDomains. Each element contains the following attributes:
    accessGroupName string
    AccessGroup of The MountTarget.
    mountTargetDomain string
    MountTargetDomain of the MountTarget.

    Deprecated: Field 'mount_target_domain' has been deprecated from provider version 1.53.0. New field 'ids' replaces it.

    networkType string
    (Available 1.95.0+) NetworkType of The MountTarget.
    outputFile string
    status string
    (Available 1.95.0+) The status of the mount target.
    type string
    Field type has been deprecated from provider version 1.95.0. New field network_type replaces it.

    Deprecated: Field 'type' has been deprecated from provider version 1.95.0. New field 'network_type' replaces it.

    vpcId string
    VpcId of The MountTarget.
    vswitchId string
    VSwitchId of The MountTarget.
    file_system_id str
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    A list of MountTargetDomain.
    targets Sequence[GetMountTargetsTarget]
    A list of MountTargetDomains. Each element contains the following attributes:
    access_group_name str
    AccessGroup of The MountTarget.
    mount_target_domain str
    MountTargetDomain of the MountTarget.

    Deprecated: Field 'mount_target_domain' has been deprecated from provider version 1.53.0. New field 'ids' replaces it.

    network_type str
    (Available 1.95.0+) NetworkType of The MountTarget.
    output_file str
    status str
    (Available 1.95.0+) The status of the mount target.
    type str
    Field type has been deprecated from provider version 1.95.0. New field network_type replaces it.

    Deprecated: Field 'type' has been deprecated from provider version 1.95.0. New field 'network_type' replaces it.

    vpc_id str
    VpcId of The MountTarget.
    vswitch_id str
    VSwitchId of The MountTarget.
    fileSystemId String
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of MountTargetDomain.
    targets List<Property Map>
    A list of MountTargetDomains. Each element contains the following attributes:
    accessGroupName String
    AccessGroup of The MountTarget.
    mountTargetDomain String
    MountTargetDomain of the MountTarget.

    Deprecated: Field 'mount_target_domain' has been deprecated from provider version 1.53.0. New field 'ids' replaces it.

    networkType String
    (Available 1.95.0+) NetworkType of The MountTarget.
    outputFile String
    status String
    (Available 1.95.0+) The status of the mount target.
    type String
    Field type has been deprecated from provider version 1.95.0. New field network_type replaces it.

    Deprecated: Field 'type' has been deprecated from provider version 1.95.0. New field 'network_type' replaces it.

    vpcId String
    VpcId of The MountTarget.
    vswitchId String
    VSwitchId of The MountTarget.

    Supporting Types

    GetMountTargetsTarget

    AccessGroupName string
    Filter results by a specific AccessGroupName.
    Id string
    ID of the MountTargetDomain.
    MountTargetDomain string
    Field mount_target_domain has been deprecated from provider version 1.53.0. New field ids replaces it.
    NetworkType string
    Filter results by a specific NetworkType.
    Status string
    Filter results by the status of mount target. Valid values: Active, Inactive and Pending.
    Type string
    Field type has been deprecated from provider version 1.95.0. New field network_type replaces it.
    VpcId string
    Filter results by a specific VpcId.
    VswitchId string
    Filter results by a specific VSwitchId.
    AccessGroupName string
    Filter results by a specific AccessGroupName.
    Id string
    ID of the MountTargetDomain.
    MountTargetDomain string
    Field mount_target_domain has been deprecated from provider version 1.53.0. New field ids replaces it.
    NetworkType string
    Filter results by a specific NetworkType.
    Status string
    Filter results by the status of mount target. Valid values: Active, Inactive and Pending.
    Type string
    Field type has been deprecated from provider version 1.95.0. New field network_type replaces it.
    VpcId string
    Filter results by a specific VpcId.
    VswitchId string
    Filter results by a specific VSwitchId.
    accessGroupName String
    Filter results by a specific AccessGroupName.
    id String
    ID of the MountTargetDomain.
    mountTargetDomain String
    Field mount_target_domain has been deprecated from provider version 1.53.0. New field ids replaces it.
    networkType String
    Filter results by a specific NetworkType.
    status String
    Filter results by the status of mount target. Valid values: Active, Inactive and Pending.
    type String
    Field type has been deprecated from provider version 1.95.0. New field network_type replaces it.
    vpcId String
    Filter results by a specific VpcId.
    vswitchId String
    Filter results by a specific VSwitchId.
    accessGroupName string
    Filter results by a specific AccessGroupName.
    id string
    ID of the MountTargetDomain.
    mountTargetDomain string
    Field mount_target_domain has been deprecated from provider version 1.53.0. New field ids replaces it.
    networkType string
    Filter results by a specific NetworkType.
    status string
    Filter results by the status of mount target. Valid values: Active, Inactive and Pending.
    type string
    Field type has been deprecated from provider version 1.95.0. New field network_type replaces it.
    vpcId string
    Filter results by a specific VpcId.
    vswitchId string
    Filter results by a specific VSwitchId.
    access_group_name str
    Filter results by a specific AccessGroupName.
    id str
    ID of the MountTargetDomain.
    mount_target_domain str
    Field mount_target_domain has been deprecated from provider version 1.53.0. New field ids replaces it.
    network_type str
    Filter results by a specific NetworkType.
    status str
    Filter results by the status of mount target. Valid values: Active, Inactive and Pending.
    type str
    Field type has been deprecated from provider version 1.95.0. New field network_type replaces it.
    vpc_id str
    Filter results by a specific VpcId.
    vswitch_id str
    Filter results by a specific VSwitchId.
    accessGroupName String
    Filter results by a specific AccessGroupName.
    id String
    ID of the MountTargetDomain.
    mountTargetDomain String
    Field mount_target_domain has been deprecated from provider version 1.53.0. New field ids replaces it.
    networkType String
    Filter results by a specific NetworkType.
    status String
    Filter results by the status of mount target. Valid values: Active, Inactive and Pending.
    type String
    Field type has been deprecated from provider version 1.95.0. New field network_type replaces it.
    vpcId String
    Filter results by a specific VpcId.
    vswitchId String
    Filter results by a specific VSwitchId.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi