Skip to content
v2.277.0

CfnMountTargetProps Struct ​

Properties for defining a CfnMountTarget.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_efs as efs } from 'aws-cdk-lib';
const cfnMountTargetProps: efs.CfnMountTargetProps = {
  fileSystemId: 'fileSystemId',
  securityGroups: ['securityGroups'],
  subnetId: 'subnetId',

  // the properties below are optional
  ipAddress: 'ipAddress',
  ipAddressType: 'ipAddressType',
  ipv6Address: 'ipv6Address',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_efs as efs

cfn_mount_target_props = efs.CfnMountTargetProps(
    file_system_id="fileSystemId",
    security_groups=["securityGroups"],
    subnet_id="subnetId",

    # the properties below are optional
    ip_address="ipAddress",
    ip_address_type="ipAddressType",
    ipv6_address="ipv6Address"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.efs.*;

CfnMountTargetProps cfnMountTargetProps = CfnMountTargetProps.builder()
        .fileSystemId("fileSystemId")
        .securityGroups(List.of("securityGroups"))
        .subnetId("subnetId")

        // the properties below are optional
        .ipAddress("ipAddress")
        .ipAddressType("ipAddressType")
        .ipv6Address("ipv6Address")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.EFS;

var cfnMountTargetProps = new CfnMountTargetProps {
    FileSystemId = "fileSystemId",
    SecurityGroups = new [] { "securityGroups" },
    SubnetId = "subnetId",

    // the properties below are optional
    IpAddress = "ipAddress",
    IpAddressType = "ipAddressType",
    Ipv6Address = "ipv6Address"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnMountTargetProps := &CfnMountTargetProps{
	FileSystemId: jsii.String("fileSystemId"),
	SecurityGroups: []interface{}{
		jsii.String("securityGroups"),
	},
	SubnetId: jsii.String("subnetId"),

	// the properties below are optional
	IpAddress: jsii.String("ipAddress"),
	IpAddressType: jsii.String("ipAddressType"),
	Ipv6Address: jsii.String("ipv6Address"),
}

Properties ​

fileSystemIdstring | IFileSystemReffile_system_idtyping.Union[str, IFileSystemRef]fileSystemIdStringFileSystemIdstringFileSystemIdinterface{}required#
The ID of the file system for which to create the mount target.
ipAddressoptionalstringip_addressoptionalstripAddressoptionalStringIpAddressoptionalstringIpAddressoptional*string#
If the `IpAddressType` for the mount target is IPv4 ( `IPV4_ONLY` or `DUAL_STACK` ), then specify the IPv4 address to use.

If you do not specify an IpAddress , then Amazon EFS selects an unused IP address from the subnet specified for SubnetId .

ipAddressTypeoptionalstringip_address_typeoptionalstripAddressTypeoptionalStringIpAddressTypeoptionalstringIpAddressTypeoptional*string#
The IP address type for the mount target.
notes

The possible values are IPV4_ONLY (only IPv4 addresses), IPV6_ONLY (only IPv6 addresses), and DUAL_STACK (dual-stack, both IPv4 and IPv6 addresses). If you don’t specify an IpAddressType , then IPV4_ONLY is used.

The IPAddressType must match the IP type of the subnet. Additionally, the IPAddressType parameter overrides the value set as the default IP address for the subnet in the VPC. For example, if the IPAddressType is IPV4_ONLY and AssignIpv6AddressOnCreation is true , then IPv4 is used for the mount target. For more information, see Modify the IP addressing attributes of your subnet .

ipv6Addressoptionalstringipv6_addressoptionalstripv6AddressoptionalStringIpv6AddressoptionalstringIpv6Addressoptional*string#
If the `IPAddressType` for the mount target is IPv6 ( `IPV6_ONLY` or `DUAL_STACK` ), then specify the IPv6 address to use.

If you do not specify an Ipv6Address , then Amazon EFS selects an unused IP address from the subnet specified for SubnetId .

securityGroupsstring | ISecurityGroupRef[]security_groupstyping.List[typing.Union[str, ISecurityGroupRef]]securityGroupsList<String>SecurityGroupsstring[]SecurityGroups*[]interface{}required#
VPC security group IDs, of the form `sg-xxxxxxxx` .
notes

These must be for the same VPC as the subnet specified. The maximum number of security groups depends on account quota. For more information, see Amazon VPC Quotas in the Amazon VPC User Guide (see the Security Groups table). If you don't specify a security group, then Amazon EFS uses the default security group for the subnet's VPC.

subnetIdstring | ISubnetRefsubnet_idtyping.Union[str, ISubnetRef]subnetIdStringSubnetIdstringSubnetIdinterface{}required#
The ID of the subnet to add the mount target in.

For One Zone file systems, use the subnet that is associated with the file system's Availability Zone. The subnet type must be the same type as the IpAddressType .