getMountTargets

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)
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&#46;Apply(getMountTargetsResult => getMountTargetsResult&#46;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
})
}
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.targets()[0].id());
}
}
variables:
example:
fn::invoke:
function: alicloud:nas:getMountTargets
arguments:
fileSystemId: 1a2sc4d
accessGroupName: tf-testAccNasConfig
outputs:
theFirstMountTargetDomain: ${example.targets[0].id}

Return

A collection of values returned by getMountTargets.

Parameters

argument

A collection of arguments for invoking getMountTargets.


suspend fun getMountTargets(accessGroupName: String? = null, fileSystemId: String, ids: List<String>? = null, mountTargetDomain: String? = null, networkType: String? = null, outputFile: String? = null, status: String? = null, type: String? = null, vpcId: String? = null, vswitchId: String? = null): GetMountTargetsResult

Return

A collection of values returned by getMountTargets.

Parameters

accessGroupName

Filter results by a specific AccessGroupName.

fileSystemId

The ID of the FileSystem that owns the MountTarget.

ids

A list of MountTargetDomain.

mountTargetDomain

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

networkType

Filter results by a specific NetworkType.

outputFile

File name where to save data source results (after running pulumi preview).

status

Filter results by the status of mount target. Valid values: Active, Inactive and Pending.

type

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

vpcId

Filter results by a specific VpcId.

vswitchId

Filter results by a specific VSwitchId.

See also


Return

A collection of values returned by getMountTargets.

Parameters

argument

Builder for com.pulumi.alicloud.nas.kotlin.inputs.GetMountTargetsPlainArgs.

See also