Alibaba Cloud

Pulumi Official
Package maintained by Pulumi
v3.27.0 published on Monday, Aug 8, 2022 by Pulumi

getMountTargets

This data source provides MountTargets available to the user.

NOTE: Available in 1.35.0+

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(AliCloud.Nas.GetMountTargets.InvokeAsync(new AliCloud.Nas.GetMountTargetsArgs
        {
            FileSystemId = "1a2sc4d",
            AccessGroupName = "tf-testAccNasConfig",
        }));
        this.TheFirstMountTargetDomain = example.Apply(example => example.Targets?[0]?.Id);
    }

    [Output("theFirstMountTargetDomain")]
    public Output<string> TheFirstMountTargetDomain { get; set; }
}
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.applyValue(getMountTargetsResult -> getMountTargetsResult.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)
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);
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
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
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
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
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
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
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.

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

Deprecated:

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

NetworkType string
OutputFile string
Status string
Type string

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.

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

Deprecated:

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

NetworkType string
OutputFile string
Status string
Type string

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.

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

Deprecated:

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

networkType String
outputFile String
status String
type String

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.

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

Deprecated:

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

networkType string
outputFile string
status string
type string

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.

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

Deprecated:

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

network_type str
output_file str
status str
type str

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.

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

Deprecated:

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

networkType String
outputFile String
status String
type String

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
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.