Alibaba Cloud v3.75.0 published on Friday, Mar 7, 2025 by Pulumi
alicloud.nas.getMountTargets
Explore with Pulumi AI
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)
public static Output<GetMountTargetsResult> getMountTargets(GetMountTargetsArgs args, InvokeOptions options)
fn::invoke:
  function: alicloud:nas/getMountTargets:getMountTargets
  arguments:
    # arguments dictionaryThe following arguments are supported:
- FileSystem stringId 
- The ID of the FileSystem that owns the MountTarget.
- AccessGroup stringName 
- Filter results by a specific AccessGroupName.
- Ids List<string>
- A list of MountTargetDomain.
- MountTarget stringDomain 
- Field mount_target_domainhas been deprecated from provider version 1.53.0. New fieldidsreplaces 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,InactiveandPending.
- Type string
- Field typehas been deprecated from provider version 1.95.0. New fieldnetwork_typereplaces it.
- VpcId string
- Filter results by a specific VpcId.
- VswitchId string
- Filter results by a specific VSwitchId.
- FileSystem stringId 
- The ID of the FileSystem that owns the MountTarget.
- AccessGroup stringName 
- Filter results by a specific AccessGroupName.
- Ids []string
- A list of MountTargetDomain.
- MountTarget stringDomain 
- Field mount_target_domainhas been deprecated from provider version 1.53.0. New fieldidsreplaces 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,InactiveandPending.
- Type string
- Field typehas been deprecated from provider version 1.95.0. New fieldnetwork_typereplaces it.
- VpcId string
- Filter results by a specific VpcId.
- VswitchId string
- Filter results by a specific VSwitchId.
- fileSystem StringId 
- The ID of the FileSystem that owns the MountTarget.
- accessGroup StringName 
- Filter results by a specific AccessGroupName.
- ids List<String>
- A list of MountTargetDomain.
- mountTarget StringDomain 
- Field mount_target_domainhas been deprecated from provider version 1.53.0. New fieldidsreplaces 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,InactiveandPending.
- type String
- Field typehas been deprecated from provider version 1.95.0. New fieldnetwork_typereplaces it.
- vpcId String
- Filter results by a specific VpcId.
- vswitchId String
- Filter results by a specific VSwitchId.
- fileSystem stringId 
- The ID of the FileSystem that owns the MountTarget.
- accessGroup stringName 
- Filter results by a specific AccessGroupName.
- ids string[]
- A list of MountTargetDomain.
- mountTarget stringDomain 
- Field mount_target_domainhas been deprecated from provider version 1.53.0. New fieldidsreplaces 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,InactiveandPending.
- type string
- Field typehas been deprecated from provider version 1.95.0. New fieldnetwork_typereplaces it.
- vpcId string
- Filter results by a specific VpcId.
- vswitchId string
- Filter results by a specific VSwitchId.
- file_system_ strid 
- The ID of the FileSystem that owns the MountTarget.
- access_group_ strname 
- Filter results by a specific AccessGroupName.
- ids Sequence[str]
- A list of MountTargetDomain.
- mount_target_ strdomain 
- Field mount_target_domainhas been deprecated from provider version 1.53.0. New fieldidsreplaces 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,InactiveandPending.
- type str
- Field typehas been deprecated from provider version 1.95.0. New fieldnetwork_typereplaces it.
- vpc_id str
- Filter results by a specific VpcId.
- vswitch_id str
- Filter results by a specific VSwitchId.
- fileSystem StringId 
- The ID of the FileSystem that owns the MountTarget.
- accessGroup StringName 
- Filter results by a specific AccessGroupName.
- ids List<String>
- A list of MountTargetDomain.
- mountTarget StringDomain 
- Field mount_target_domainhas been deprecated from provider version 1.53.0. New fieldidsreplaces 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,InactiveandPending.
- type String
- Field typehas been deprecated from provider version 1.95.0. New fieldnetwork_typereplaces 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:
- FileSystem stringId 
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- A list of MountTargetDomain.
- Targets
List<Pulumi.Ali Cloud. Nas. Outputs. Get Mount Targets Target> 
- A list of MountTargetDomains. Each element contains the following attributes:
- AccessGroup stringName 
- AccessGroup of The MountTarget.
- MountTarget stringDomain 
- MountTargetDomain of the MountTarget.
- 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 typehas been deprecated from provider version 1.95.0. New fieldnetwork_typereplaces it.
- VpcId string
- VpcId of The MountTarget.
- VswitchId string
- VSwitchId of The MountTarget.
- FileSystem stringId 
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- A list of MountTargetDomain.
- Targets
[]GetMount Targets Target 
- A list of MountTargetDomains. Each element contains the following attributes:
- AccessGroup stringName 
- AccessGroup of The MountTarget.
- MountTarget stringDomain 
- MountTargetDomain of the MountTarget.
- 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 typehas been deprecated from provider version 1.95.0. New fieldnetwork_typereplaces it.
- VpcId string
- VpcId of The MountTarget.
- VswitchId string
- VSwitchId of The MountTarget.
- fileSystem StringId 
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of MountTargetDomain.
- targets
List<GetMount Targets Target> 
- A list of MountTargetDomains. Each element contains the following attributes:
- accessGroup StringName 
- AccessGroup of The MountTarget.
- mountTarget StringDomain 
- MountTargetDomain of the MountTarget.
- 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 typehas been deprecated from provider version 1.95.0. New fieldnetwork_typereplaces it.
- vpcId String
- VpcId of The MountTarget.
- vswitchId String
- VSwitchId of The MountTarget.
- fileSystem stringId 
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- A list of MountTargetDomain.
- targets
GetMount Targets Target[] 
- A list of MountTargetDomains. Each element contains the following attributes:
- accessGroup stringName 
- AccessGroup of The MountTarget.
- mountTarget stringDomain 
- MountTargetDomain of the MountTarget.
- 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 typehas been deprecated from provider version 1.95.0. New fieldnetwork_typereplaces it.
- vpcId string
- VpcId of The MountTarget.
- vswitchId string
- VSwitchId of The MountTarget.
- file_system_ strid 
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- A list of MountTargetDomain.
- targets
Sequence[GetMount Targets Target] 
- A list of MountTargetDomains. Each element contains the following attributes:
- access_group_ strname 
- AccessGroup of The MountTarget.
- mount_target_ strdomain 
- MountTargetDomain of the MountTarget.
- 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 typehas been deprecated from provider version 1.95.0. New fieldnetwork_typereplaces it.
- vpc_id str
- VpcId of The MountTarget.
- vswitch_id str
- VSwitchId of The MountTarget.
- fileSystem StringId 
- 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:
- accessGroup StringName 
- AccessGroup of The MountTarget.
- mountTarget StringDomain 
- MountTargetDomain of the MountTarget.
- 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 typehas been deprecated from provider version 1.95.0. New fieldnetwork_typereplaces it.
- vpcId String
- VpcId of The MountTarget.
- vswitchId String
- VSwitchId of The MountTarget.
Supporting Types
GetMountTargetsTarget   
- AccessGroup stringName 
- Filter results by a specific AccessGroupName.
- Id string
- ID of the MountTargetDomain.
- MountTarget stringDomain 
- Field mount_target_domainhas been deprecated from provider version 1.53.0. New fieldidsreplaces it.
- NetworkType string
- Filter results by a specific NetworkType.
- Status string
- Filter results by the status of mount target. Valid values: Active,InactiveandPending.
- Type string
- Field typehas been deprecated from provider version 1.95.0. New fieldnetwork_typereplaces it.
- VpcId string
- Filter results by a specific VpcId.
- VswitchId string
- Filter results by a specific VSwitchId.
- AccessGroup stringName 
- Filter results by a specific AccessGroupName.
- Id string
- ID of the MountTargetDomain.
- MountTarget stringDomain 
- Field mount_target_domainhas been deprecated from provider version 1.53.0. New fieldidsreplaces it.
- NetworkType string
- Filter results by a specific NetworkType.
- Status string
- Filter results by the status of mount target. Valid values: Active,InactiveandPending.
- Type string
- Field typehas been deprecated from provider version 1.95.0. New fieldnetwork_typereplaces it.
- VpcId string
- Filter results by a specific VpcId.
- VswitchId string
- Filter results by a specific VSwitchId.
- accessGroup StringName 
- Filter results by a specific AccessGroupName.
- id String
- ID of the MountTargetDomain.
- mountTarget StringDomain 
- Field mount_target_domainhas been deprecated from provider version 1.53.0. New fieldidsreplaces it.
- networkType String
- Filter results by a specific NetworkType.
- status String
- Filter results by the status of mount target. Valid values: Active,InactiveandPending.
- type String
- Field typehas been deprecated from provider version 1.95.0. New fieldnetwork_typereplaces it.
- vpcId String
- Filter results by a specific VpcId.
- vswitchId String
- Filter results by a specific VSwitchId.
- accessGroup stringName 
- Filter results by a specific AccessGroupName.
- id string
- ID of the MountTargetDomain.
- mountTarget stringDomain 
- Field mount_target_domainhas been deprecated from provider version 1.53.0. New fieldidsreplaces it.
- networkType string
- Filter results by a specific NetworkType.
- status string
- Filter results by the status of mount target. Valid values: Active,InactiveandPending.
- type string
- Field typehas been deprecated from provider version 1.95.0. New fieldnetwork_typereplaces it.
- vpcId string
- Filter results by a specific VpcId.
- vswitchId string
- Filter results by a specific VSwitchId.
- access_group_ strname 
- Filter results by a specific AccessGroupName.
- id str
- ID of the MountTargetDomain.
- mount_target_ strdomain 
- Field mount_target_domainhas been deprecated from provider version 1.53.0. New fieldidsreplaces it.
- network_type str
- Filter results by a specific NetworkType.
- status str
- Filter results by the status of mount target. Valid values: Active,InactiveandPending.
- type str
- Field typehas been deprecated from provider version 1.95.0. New fieldnetwork_typereplaces it.
- vpc_id str
- Filter results by a specific VpcId.
- vswitch_id str
- Filter results by a specific VSwitchId.
- accessGroup StringName 
- Filter results by a specific AccessGroupName.
- id String
- ID of the MountTargetDomain.
- mountTarget StringDomain 
- Field mount_target_domainhas been deprecated from provider version 1.53.0. New fieldidsreplaces it.
- networkType String
- Filter results by a specific NetworkType.
- status String
- Filter results by the status of mount target. Valid values: Active,InactiveandPending.
- type String
- Field typehas been deprecated from provider version 1.95.0. New fieldnetwork_typereplaces 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 alicloudTerraform Provider.