AWS v6.73.0 published on Wednesday, Mar 19, 2025 by Pulumi
aws.efs.getMountTarget
Explore with Pulumi AI
Provides information about an Elastic File System Mount Target (EFS).
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const config = new pulumi.Config();
const mountTargetId = config.get("mountTargetId") || "";
const byId = aws.efs.getMountTarget({
    mountTargetId: mountTargetId,
});
import pulumi
import pulumi_aws as aws
config = pulumi.Config()
mount_target_id = config.get("mountTargetId")
if mount_target_id is None:
    mount_target_id = ""
by_id = aws.efs.get_mount_target(mount_target_id=mount_target_id)
package main
import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/efs"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		mountTargetId := ""
		if param := cfg.Get("mountTargetId"); param != "" {
			mountTargetId = param
		}
		_, err := efs.LookupMountTarget(ctx, &efs.LookupMountTargetArgs{
			MountTargetId: pulumi.StringRef(mountTargetId),
		}, 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 config = new Config();
    var mountTargetId = config.Get("mountTargetId") ?? "";
    var byId = Aws.Efs.GetMountTarget.Invoke(new()
    {
        MountTargetId = mountTargetId,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.efs.EfsFunctions;
import com.pulumi.aws.efs.inputs.GetMountTargetArgs;
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 config = ctx.config();
        final var mountTargetId = config.get("mountTargetId").orElse("");
        final var byId = EfsFunctions.getMountTarget(GetMountTargetArgs.builder()
            .mountTargetId(mountTargetId)
            .build());
    }
}
configuration:
  mountTargetId:
    type: string
    default: ""
variables:
  byId:
    fn::invoke:
      function: aws:efs:getMountTarget
      arguments:
        mountTargetId: ${mountTargetId}
Using getMountTarget
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 getMountTarget(args: GetMountTargetArgs, opts?: InvokeOptions): Promise<GetMountTargetResult>
function getMountTargetOutput(args: GetMountTargetOutputArgs, opts?: InvokeOptions): Output<GetMountTargetResult>def get_mount_target(access_point_id: Optional[str] = None,
                     file_system_id: Optional[str] = None,
                     mount_target_id: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetMountTargetResult
def get_mount_target_output(access_point_id: Optional[pulumi.Input[str]] = None,
                     file_system_id: Optional[pulumi.Input[str]] = None,
                     mount_target_id: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetMountTargetResult]func LookupMountTarget(ctx *Context, args *LookupMountTargetArgs, opts ...InvokeOption) (*LookupMountTargetResult, error)
func LookupMountTargetOutput(ctx *Context, args *LookupMountTargetOutputArgs, opts ...InvokeOption) LookupMountTargetResultOutput> Note: This function is named LookupMountTarget in the Go SDK.
public static class GetMountTarget 
{
    public static Task<GetMountTargetResult> InvokeAsync(GetMountTargetArgs args, InvokeOptions? opts = null)
    public static Output<GetMountTargetResult> Invoke(GetMountTargetInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetMountTargetResult> getMountTarget(GetMountTargetArgs args, InvokeOptions options)
public static Output<GetMountTargetResult> getMountTarget(GetMountTargetArgs args, InvokeOptions options)
fn::invoke:
  function: aws:efs/getMountTarget:getMountTarget
  arguments:
    # arguments dictionaryThe following arguments are supported:
- AccessPoint stringId 
- ID or ARN of the access point whose mount target that you want to find. It must be included if a file_system_idandmount_target_idare not included.
- FileSystem stringId 
- ID or ARN of the file system whose mount target that you want to find. It must be included if an access_point_idandmount_target_idare not included.
- MountTarget stringId 
- ID or ARN of the mount target that you want to find. It must be included in your request if an access_point_idandfile_system_idare not included.
- AccessPoint stringId 
- ID or ARN of the access point whose mount target that you want to find. It must be included if a file_system_idandmount_target_idare not included.
- FileSystem stringId 
- ID or ARN of the file system whose mount target that you want to find. It must be included if an access_point_idandmount_target_idare not included.
- MountTarget stringId 
- ID or ARN of the mount target that you want to find. It must be included in your request if an access_point_idandfile_system_idare not included.
- accessPoint StringId 
- ID or ARN of the access point whose mount target that you want to find. It must be included if a file_system_idandmount_target_idare not included.
- fileSystem StringId 
- ID or ARN of the file system whose mount target that you want to find. It must be included if an access_point_idandmount_target_idare not included.
- mountTarget StringId 
- ID or ARN of the mount target that you want to find. It must be included in your request if an access_point_idandfile_system_idare not included.
- accessPoint stringId 
- ID or ARN of the access point whose mount target that you want to find. It must be included if a file_system_idandmount_target_idare not included.
- fileSystem stringId 
- ID or ARN of the file system whose mount target that you want to find. It must be included if an access_point_idandmount_target_idare not included.
- mountTarget stringId 
- ID or ARN of the mount target that you want to find. It must be included in your request if an access_point_idandfile_system_idare not included.
- access_point_ strid 
- ID or ARN of the access point whose mount target that you want to find. It must be included if a file_system_idandmount_target_idare not included.
- file_system_ strid 
- ID or ARN of the file system whose mount target that you want to find. It must be included if an access_point_idandmount_target_idare not included.
- mount_target_ strid 
- ID or ARN of the mount target that you want to find. It must be included in your request if an access_point_idandfile_system_idare not included.
- accessPoint StringId 
- ID or ARN of the access point whose mount target that you want to find. It must be included if a file_system_idandmount_target_idare not included.
- fileSystem StringId 
- ID or ARN of the file system whose mount target that you want to find. It must be included if an access_point_idandmount_target_idare not included.
- mountTarget StringId 
- ID or ARN of the mount target that you want to find. It must be included in your request if an access_point_idandfile_system_idare not included.
getMountTarget Result
The following output properties are available:
- AvailabilityZone stringId 
- The unique and consistent identifier of the Availability Zone (AZ) that the mount target resides in.
- AvailabilityZone stringName 
- The name of the Availability Zone (AZ) that the mount target resides in.
- DnsName string
- DNS name for the EFS file system.
- FileSystem stringArn 
- Amazon Resource Name of the file system for which the mount target is intended.
- FileSystem stringId 
- Id string
- The provider-assigned unique ID for this managed resource.
- IpAddress string
- Address at which the file system may be mounted via the mount target.
- MountTarget stringDns Name 
- The DNS name for the given subnet/AZ per documented convention.
- MountTarget stringId 
- NetworkInterface stringId 
- The ID of the network interface that Amazon EFS created when it created the mount target.
- OwnerId string
- AWS account ID that owns the resource.
- SecurityGroups List<string>
- List of VPC security group IDs attached to the mount target.
- SubnetId string
- ID of the mount target's subnet.
- AccessPoint stringId 
- AvailabilityZone stringId 
- The unique and consistent identifier of the Availability Zone (AZ) that the mount target resides in.
- AvailabilityZone stringName 
- The name of the Availability Zone (AZ) that the mount target resides in.
- DnsName string
- DNS name for the EFS file system.
- FileSystem stringArn 
- Amazon Resource Name of the file system for which the mount target is intended.
- FileSystem stringId 
- Id string
- The provider-assigned unique ID for this managed resource.
- IpAddress string
- Address at which the file system may be mounted via the mount target.
- MountTarget stringDns Name 
- The DNS name for the given subnet/AZ per documented convention.
- MountTarget stringId 
- NetworkInterface stringId 
- The ID of the network interface that Amazon EFS created when it created the mount target.
- OwnerId string
- AWS account ID that owns the resource.
- SecurityGroups []string
- List of VPC security group IDs attached to the mount target.
- SubnetId string
- ID of the mount target's subnet.
- AccessPoint stringId 
- availabilityZone StringId 
- The unique and consistent identifier of the Availability Zone (AZ) that the mount target resides in.
- availabilityZone StringName 
- The name of the Availability Zone (AZ) that the mount target resides in.
- dnsName String
- DNS name for the EFS file system.
- fileSystem StringArn 
- Amazon Resource Name of the file system for which the mount target is intended.
- fileSystem StringId 
- id String
- The provider-assigned unique ID for this managed resource.
- ipAddress String
- Address at which the file system may be mounted via the mount target.
- mountTarget StringDns Name 
- The DNS name for the given subnet/AZ per documented convention.
- mountTarget StringId 
- networkInterface StringId 
- The ID of the network interface that Amazon EFS created when it created the mount target.
- ownerId String
- AWS account ID that owns the resource.
- securityGroups List<String>
- List of VPC security group IDs attached to the mount target.
- subnetId String
- ID of the mount target's subnet.
- accessPoint StringId 
- availabilityZone stringId 
- The unique and consistent identifier of the Availability Zone (AZ) that the mount target resides in.
- availabilityZone stringName 
- The name of the Availability Zone (AZ) that the mount target resides in.
- dnsName string
- DNS name for the EFS file system.
- fileSystem stringArn 
- Amazon Resource Name of the file system for which the mount target is intended.
- fileSystem stringId 
- id string
- The provider-assigned unique ID for this managed resource.
- ipAddress string
- Address at which the file system may be mounted via the mount target.
- mountTarget stringDns Name 
- The DNS name for the given subnet/AZ per documented convention.
- mountTarget stringId 
- networkInterface stringId 
- The ID of the network interface that Amazon EFS created when it created the mount target.
- ownerId string
- AWS account ID that owns the resource.
- securityGroups string[]
- List of VPC security group IDs attached to the mount target.
- subnetId string
- ID of the mount target's subnet.
- accessPoint stringId 
- availability_zone_ strid 
- The unique and consistent identifier of the Availability Zone (AZ) that the mount target resides in.
- availability_zone_ strname 
- The name of the Availability Zone (AZ) that the mount target resides in.
- dns_name str
- DNS name for the EFS file system.
- file_system_ strarn 
- Amazon Resource Name of the file system for which the mount target is intended.
- file_system_ strid 
- id str
- The provider-assigned unique ID for this managed resource.
- ip_address str
- Address at which the file system may be mounted via the mount target.
- mount_target_ strdns_ name 
- The DNS name for the given subnet/AZ per documented convention.
- mount_target_ strid 
- network_interface_ strid 
- The ID of the network interface that Amazon EFS created when it created the mount target.
- owner_id str
- AWS account ID that owns the resource.
- security_groups Sequence[str]
- List of VPC security group IDs attached to the mount target.
- subnet_id str
- ID of the mount target's subnet.
- access_point_ strid 
- availabilityZone StringId 
- The unique and consistent identifier of the Availability Zone (AZ) that the mount target resides in.
- availabilityZone StringName 
- The name of the Availability Zone (AZ) that the mount target resides in.
- dnsName String
- DNS name for the EFS file system.
- fileSystem StringArn 
- Amazon Resource Name of the file system for which the mount target is intended.
- fileSystem StringId 
- id String
- The provider-assigned unique ID for this managed resource.
- ipAddress String
- Address at which the file system may be mounted via the mount target.
- mountTarget StringDns Name 
- The DNS name for the given subnet/AZ per documented convention.
- mountTarget StringId 
- networkInterface StringId 
- The ID of the network interface that Amazon EFS created when it created the mount target.
- ownerId String
- AWS account ID that owns the resource.
- securityGroups List<String>
- List of VPC security group IDs attached to the mount target.
- subnetId String
- ID of the mount target's subnet.
- accessPoint StringId 
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the awsTerraform Provider.