Class MountTarget


  • public class MountTarget
    extends com.pulumi.resources.CustomResource
    Provides an Elastic File System (EFS) mount target. ## Example Usage
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.ec2.Vpc;
     import com.pulumi.aws.ec2.VpcArgs;
     import com.pulumi.aws.ec2.Subnet;
     import com.pulumi.aws.ec2.SubnetArgs;
     import com.pulumi.aws.efs.MountTarget;
     import com.pulumi.aws.efs.MountTargetArgs;
     import java.util.ArrayList;
     import java.util.Arrays;
     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) {
             var exampleVpc = new Vpc("exampleVpc", VpcArgs.builder()
                 .cidrBlock("10.0.0.0/16")
                 .build());
     
             var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()
                 .vpcId(exampleVpc.id())
                 .availabilityZone("us-west-2a")
                 .cidrBlock("10.0.1.0/24")
                 .build());
     
             var example = new MountTarget("example", MountTargetArgs.builder()
                 .fileSystemId(exampleAwsEfsFileSystem.id())
                 .subnetId(exampleSubnet.id())
                 .build());
     
         }
     }
     
     
    ## Import ### Identity Schema #### Required * `id` (String) ID of the mount target. #### Optional * `accountId` (String) AWS Account where this resource is managed. * `region` (String) Region where this resource is managed. Using `pulumi import`, import the EFS mount targets using the `id`. For example: ```sh $ pulumi import aws:efs/mountTarget:MountTarget example fsmt-52a643fb ```
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.pulumi.core.Output<java.lang.String> availabilityZoneId()  
      com.pulumi.core.Output<java.lang.String> availabilityZoneName()  
      com.pulumi.core.Output<java.lang.String> dnsName()  
      com.pulumi.core.Output<java.lang.String> fileSystemArn()  
      com.pulumi.core.Output<java.lang.String> fileSystemId()  
      static MountTarget get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, MountTargetState state, com.pulumi.resources.CustomResourceOptions options)
      Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
      com.pulumi.core.Output<java.lang.String> ipAddress()  
      com.pulumi.core.Output<java.lang.String> ipAddressType()  
      com.pulumi.core.Output<java.lang.String> ipv6Address()  
      com.pulumi.core.Output<java.lang.String> mountTargetDnsName()  
      com.pulumi.core.Output<java.lang.String> networkInterfaceId()  
      com.pulumi.core.Output<java.lang.String> ownerId()  
      com.pulumi.core.Output<java.lang.String> region()  
      com.pulumi.core.Output<java.util.List<java.lang.String>> securityGroups()  
      com.pulumi.core.Output<java.lang.String> subnetId()  
      • Methods inherited from class com.pulumi.resources.CustomResource

        getId, id, idFuture
      • Methods inherited from class com.pulumi.resources.Resource

        getChildResources, getResourceName, getResourceType, getUrn, pulumiChildResources, pulumiResourceName, pulumiResourceType, urn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MountTarget

        public MountTarget​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • MountTarget

        public MountTarget​(java.lang.String name,
                           MountTargetArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • MountTarget

        public MountTarget​(java.lang.String name,
                           MountTargetArgs args,
                           @Nullable
                           com.pulumi.resources.CustomResourceOptions options)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
        options - A bag of options that control this resource's behavior.
    • Method Detail

      • availabilityZoneId

        public com.pulumi.core.Output<java.lang.String> availabilityZoneId()
        Returns:
        The unique and consistent identifier of the Availability Zone (AZ) that the mount target resides in.
      • availabilityZoneName

        public com.pulumi.core.Output<java.lang.String> availabilityZoneName()
        Returns:
        The name of the Availability Zone (AZ) that the mount target resides in.
      • dnsName

        public com.pulumi.core.Output<java.lang.String> dnsName()
        Returns:
        The DNS name for the EFS file system.
      • fileSystemArn

        public com.pulumi.core.Output<java.lang.String> fileSystemArn()
        Returns:
        ARN of the file system.
      • fileSystemId

        public com.pulumi.core.Output<java.lang.String> fileSystemId()
        Returns:
        The ID of the file system for which the mount target is intended.
      • ipAddress

        public com.pulumi.core.Output<java.lang.String> ipAddress()
        Returns:
        The address (within the address range of the specified subnet) at which the file system may be mounted via the mount target.
      • ipAddressType

        public com.pulumi.core.Output<java.lang.String> ipAddressType()
        Returns:
        IP address type for the mount target. Valid values are `IPV4_ONLY` (only IPv4 addresses), `IPV6_ONLY` (only IPv6 addresses), and `DUAL_STACK` (dual-stack, both IPv4 and IPv6 addresses). Defaults to `IPV4_ONLY`.
      • ipv6Address

        public com.pulumi.core.Output<java.lang.String> ipv6Address()
        Returns:
        IPv6 address to use. Valid only when `ipAddressType` is set to `IPV6_ONLY` or `DUAL_STACK`.
      • mountTargetDnsName

        public com.pulumi.core.Output<java.lang.String> mountTargetDnsName()
        Returns:
        The DNS name for the given subnet/AZ per [documented convention](http://docs.aws.amazon.com/efs/latest/ug/mounting-fs-mount-cmd-dns-name.html).
      • networkInterfaceId

        public com.pulumi.core.Output<java.lang.String> networkInterfaceId()
        Returns:
        The ID of the network interface that Amazon EFS created when it created the mount target.
      • ownerId

        public com.pulumi.core.Output<java.lang.String> ownerId()
        Returns:
        AWS account ID that owns the resource.
      • region

        public com.pulumi.core.Output<java.lang.String> region()
        Returns:
        Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
      • securityGroups

        public com.pulumi.core.Output<java.util.List<java.lang.String>> securityGroups()
        Returns:
        A list of up to 5 VPC security group IDs (that must be for the same VPC as subnet specified) in effect for the mount target.
      • subnetId

        public com.pulumi.core.Output<java.lang.String> subnetId()
        Returns:
        The ID of the subnet to add the mount target in.
      • get

        public static MountTarget get​(java.lang.String name,
                                      com.pulumi.core.Output<java.lang.String> id,
                                      @Nullable
                                      MountTargetState state,
                                      @Nullable
                                      com.pulumi.resources.CustomResourceOptions options)
        Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
        Parameters:
        name - The _unique_ name of the resulting resource.
        id - The _unique_ provider ID of the resource to lookup.
        state -
        options - Optional settings to control the behavior of the CustomResource.